@conduction/components 2.2.1 → 2.2.3

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 (136) hide show
  1. package/.prettierrc +30 -30
  2. package/README.md +8 -0
  3. package/lib/components/Pagination/Pagination.d.ts +9 -9
  4. package/lib/components/Pagination/Pagination.js +12 -12
  5. package/lib/components/Pagination/Pagination.module.css +2 -2
  6. package/lib/components/badgeCounter/BadgeCounter.d.ts +8 -8
  7. package/lib/components/badgeCounter/BadgeCounter.js +4 -4
  8. package/lib/components/badgeCounter/BadgeCounter.module.css +27 -27
  9. package/lib/components/card/cardHeader/CardHeader.d.ts +4 -4
  10. package/lib/components/card/cardHeader/CardHeader.js +14 -14
  11. package/lib/components/card/cardWrapper/CardWrapper.d.ts +2 -2
  12. package/lib/components/card/cardWrapper/CardWrapper.js +6 -6
  13. package/lib/components/card/detailsCard/DetailsCard.d.ts +14 -14
  14. package/lib/components/card/detailsCard/DetailsCard.js +11 -11
  15. package/lib/components/card/downloadCard/DownloadCard.d.ts +11 -11
  16. package/lib/components/card/downloadCard/DownloadCard.js +9 -9
  17. package/lib/components/card/horizontalImageCard/HorizontalImageCard.d.ts +13 -13
  18. package/lib/components/card/horizontalImageCard/HorizontalImageCard.js +10 -10
  19. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.d.ts +14 -14
  20. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +10 -10
  21. package/lib/components/card/index.d.ts +8 -8
  22. package/lib/components/card/index.js +8 -8
  23. package/lib/components/card/infoCard/InfoCard.d.ts +8 -8
  24. package/lib/components/card/infoCard/InfoCard.js +6 -6
  25. package/lib/components/card/infoCard/InfoCard.module.css +26 -26
  26. package/lib/components/card/richContentCard/RichContentCard.d.ts +19 -19
  27. package/lib/components/card/richContentCard/RichContentCard.js +15 -16
  28. package/lib/components/codeBlock/CodeBlock.d.ts +6 -6
  29. package/lib/components/codeBlock/CodeBlock.js +3 -3
  30. package/lib/components/codeBlock/CodeBlock.module.css +6 -6
  31. package/lib/components/container/Container.d.ts +6 -6
  32. package/lib/components/container/Container.js +4 -4
  33. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -222
  34. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.d.ts +17 -17
  35. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +20 -20
  36. package/lib/components/denhaag-wrappers/pagination/Pagination.css +120 -120
  37. package/lib/components/denhaag-wrappers/pagination/Pagination.d.ts +9 -9
  38. package/lib/components/denhaag-wrappers/pagination/Pagination.js +15 -15
  39. package/lib/components/editableTableRow/EditableTableRow.d.ts +14 -14
  40. package/lib/components/editableTableRow/EditableTableRow.js +31 -31
  41. package/lib/components/editableTableRow/EditableTableRow.module.css +25 -25
  42. package/lib/components/formFields/checkbox/Checkbox.module.css +7 -7
  43. package/lib/components/formFields/checkbox/checkbox.d.ts +9 -9
  44. package/lib/components/formFields/checkbox/checkbox.js +3 -3
  45. package/lib/components/formFields/createKeyValue/CreateKeyValue.d.ts +23 -23
  46. package/lib/components/formFields/createKeyValue/CreateKeyValue.js +41 -42
  47. package/lib/components/formFields/date/Date.d.ts +12 -12
  48. package/lib/components/formFields/date/Date.js +10 -10
  49. package/lib/components/formFields/date/Date.module.css +12 -12
  50. package/lib/components/formFields/errorMessage/ErrorMessage.d.ts +5 -5
  51. package/lib/components/formFields/errorMessage/ErrorMessage.js +3 -3
  52. package/lib/components/formFields/index.d.ts +7 -7
  53. package/lib/components/formFields/index.js +7 -7
  54. package/lib/components/formFields/input.d.ts +21 -21
  55. package/lib/components/formFields/input.js +12 -12
  56. package/lib/components/formFields/radio.d.ts +9 -9
  57. package/lib/components/formFields/radio.js +3 -3
  58. package/lib/components/formFields/select/select.d.ts +23 -23
  59. package/lib/components/formFields/select/select.js +58 -58
  60. package/lib/components/formFields/textarea.d.ts +9 -9
  61. package/lib/components/formFields/textarea.js +4 -4
  62. package/lib/components/formFields/types.d.ts +6 -6
  63. package/lib/components/formFields/types.js +1 -1
  64. package/lib/components/imageDivider/ImageDivider.d.ts +7 -7
  65. package/lib/components/imageDivider/ImageDivider.js +6 -6
  66. package/lib/components/imageDivider/imageDivider.module.css +5 -5
  67. package/lib/components/logo/Logo.d.ts +8 -8
  68. package/lib/components/logo/Logo.js +10 -10
  69. package/lib/components/logo/Logo.module.css +15 -15
  70. package/lib/components/metaIcon/MetaIcon.d.ts +7 -7
  71. package/lib/components/metaIcon/MetaIcon.js +3 -3
  72. package/lib/components/metaIcon/MetaIcon.module.css +29 -29
  73. package/lib/components/notificationPopUp/NotificationPopUp.d.ts +26 -26
  74. package/lib/components/notificationPopUp/NotificationPopUp.js +32 -33
  75. package/lib/components/notificationPopUp/NotificationPopUp.module.css +5 -0
  76. package/lib/components/privateRoute/PrivateRoute.d.ts +6 -6
  77. package/lib/components/privateRoute/PrivateRoute.js +15 -15
  78. package/lib/components/quoteWrapper/QuoteWrapper.d.ts +7 -7
  79. package/lib/components/quoteWrapper/QuoteWrapper.js +5 -5
  80. package/lib/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  81. package/lib/components/statusSteps/StatusSteps.d.ts +13 -0
  82. package/lib/components/statusSteps/StatusSteps.js +5 -0
  83. package/lib/components/tabs/Tabs.d.ts +14 -0
  84. package/lib/components/tabs/Tabs.js +7 -0
  85. package/lib/components/tabs/Tabs.module.css +102 -0
  86. package/lib/components/tag/Tag.d.ts +10 -10
  87. package/lib/components/tag/Tag.js +6 -6
  88. package/lib/components/tag/Tag.module.css +44 -44
  89. package/lib/components/toolTip/ToolTip.d.ts +9 -9
  90. package/lib/components/toolTip/ToolTip.js +8 -8
  91. package/lib/components/topNav/index.d.ts +3 -3
  92. package/lib/components/topNav/index.js +3 -3
  93. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.d.ts +20 -20
  94. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.js +17 -17
  95. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.d.ts +12 -12
  96. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.js +7 -7
  97. package/lib/custom.d copy.d.ts +5 -0
  98. package/lib/custom.d copy.js +1 -0
  99. package/lib/index.d.ts +26 -25
  100. package/lib/index.js +19 -18
  101. package/package.json +8 -8
  102. package/src/components/Pagination/Pagination.module.css +2 -2
  103. package/src/components/Pagination/Pagination.tsx +3 -1
  104. package/src/components/badgeCounter/BadgeCounter.module.css +27 -27
  105. package/src/components/card/infoCard/InfoCard.module.css +26 -26
  106. package/src/components/codeBlock/CodeBlock.module.css +6 -6
  107. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -222
  108. package/src/components/formFields/checkbox/Checkbox.module.css +7 -7
  109. package/src/components/formFields/createKeyValue/CreateKeyValue.tsx +5 -6
  110. package/src/components/formFields/date/Date.module.css +12 -12
  111. package/src/components/imageDivider/imageDivider.module.css +5 -5
  112. package/src/components/logo/Logo.module.css +15 -15
  113. package/src/components/metaIcon/MetaIcon.module.css +29 -29
  114. package/src/components/notificationPopUp/NotificationPopUp.module.css +5 -0
  115. package/src/components/notificationPopUp/NotificationPopUp.tsx +3 -4
  116. package/src/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  117. package/src/components/tabs/Tabs.module.css +102 -0
  118. package/src/components/tabs/Tabs.tsx +37 -0
  119. package/src/components/tag/Tag.module.css +44 -44
  120. package/src/components/topNav/index.ts +4 -4
  121. package/src/custom.d.ts +4 -4
  122. package/src/index.ts +2 -0
  123. package/src/components/card/downloadCard/DownloadCard.js +0 -10
  124. package/src/components/card/horizontalImageCard/HorizontalImageCard.js +0 -9
  125. package/src/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +0 -9
  126. package/src/components/card/index.js +0 -5
  127. package/src/components/container/Container.js +0 -3
  128. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +0 -84
  129. package/src/components/formFields/index.js +0 -4
  130. package/src/components/formFields/input.js +0 -12
  131. package/src/components/formFields/textarea.js +0 -3
  132. package/src/components/formFields/types.js +0 -1
  133. package/src/components/imageDivider/ImageDivider.js +0 -6
  134. package/src/components/logo/Logo.js +0 -10
  135. package/src/components/metaIcon/MetaIcon.js +0 -3
  136. package/src/components/privateRoute/PrivateRoute.js +0 -15
@@ -1,12 +1,12 @@
1
- :root {
2
- --conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
3
- --conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
4
- --conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
5
- }
6
-
7
- .container {
8
- border-left-width: var(--conduction-quote-wrapper-border-width);
9
- border-left-style: solid;
10
- border-left-color: var(--conduction-quote-wrapper-border-color);
11
- padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
12
- }
1
+ :root {
2
+ --conduction-quote-wrapper-border-width: var(--skeleton-size-sm);
3
+ --conduction-quote-wrapper-border-color: var(--skeleton-color-grey-1);
4
+ --conduction-quote-wrapper-padding-inline: var(--skeleton-size-lg);
5
+ }
6
+
7
+ .container {
8
+ border-left-width: var(--conduction-quote-wrapper-border-width);
9
+ border-left-style: solid;
10
+ border-left-color: var(--conduction-quote-wrapper-border-color);
11
+ padding-inline-start: var(--conduction-quote-wrapper-padding-inline);
12
+ }
@@ -0,0 +1,102 @@
1
+ :root {
2
+ --conduction-tab-list-padding-inline-start: 0px;
3
+ --conduction-tab-list-border-bottom-width: var(--skeleton-size-3xs);
4
+ --conduction-tab-list-border-bottom-style: solid;
5
+ --conduction-tab-list-border-bottom-color: #d1d1d1;
6
+
7
+ --conduction-tab-padding-block-start: var(--skeleton-size-xs);
8
+ --conduction-tab-padding-block-end: var(--skeleton-size-xs);
9
+ --conduction-tab-padding-inline-start: var(--skeleton-size-sm);
10
+ --conduction-tab-padding-inline-end: var(--skeleton-size-sm);
11
+ --conduction-tab-font-size: var(--skeleton-font-size-sm: );
12
+ --conduction-tab-font-weight: var(--skeleton-font-weight-normal);
13
+ --conduction-tab-font-family: "Noto Sans", Arial, sans-serif;
14
+ --conduction-tab-max-width: unset;
15
+ --conduction-tab-min-width: 160px;
16
+ --conduction-tab-min-height: 61px;
17
+ /* --conduction-tab-letter-spacing: 0.02857em; */
18
+ /* --conduction-tab-text-transform: uppercase; */
19
+ --conduction-tab-color: #4a4a4a;
20
+
21
+ --conduction-tab-selected-color: #4a4a4a;
22
+ --conduction-tab-selected-border-bottom-width: var(--skeleton-size-3xs);
23
+ --conduction-tab-selected-border-bottom-style: solid;
24
+ --conduction-tab-selected-border-bottom-color: #4376fc;
25
+ --conduction-tab-selected-font-weight: var(--skeleton-font-weight-bold);
26
+
27
+ --conduction-tab-panel-padding-block-start: var(--skeleton-size-lg);
28
+ --conduction-tab-panel-padding-block-end: var(--skeleton-size-lg);
29
+ --conduction-tab-panel-padding-inline-start: var(--skeleton-size-lg);
30
+ --conduction-tab-panel-padding-inline-end: var(--skeleton-size-lg);
31
+
32
+ --conduction-tab-badge-margin-inline-start: var(--skeleton-size-xs);
33
+ }
34
+
35
+ .tabList {
36
+ padding-inline-start: var(--conduction-tab-list-padding-inline-start);
37
+ border-bottom-width: var(--conduction-tab-list-border-bottom-width);
38
+ border-bottom-style: var(--conduction-tab-list-border-bottom-style);
39
+ border-bottom-color: var(--conduction-tab-list-border-bottom-color);
40
+ }
41
+
42
+ .tab {
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ cursor: pointer;
47
+ overflow: hidden;
48
+ position: relative;
49
+ box-sizing: border-box;
50
+ text-align: center;
51
+ white-space: normal;
52
+ bottom: -2px;
53
+
54
+ color: var(--conduction-tab-color);
55
+ padding-block-start: var(--conduction-tab-padding-block-start);
56
+ padding-block-end: var(--conduction-tab-padding-block-end);
57
+ padding-inline-start: var(--conduction-tab-padding-inline-start);
58
+ padding-inline-end: var(--conduction-tab-padding-inline-end);
59
+ font-size: var(--conduction-tab-font-size);
60
+ font-weight: var(--conduction-tab-font-weight);
61
+ font-family: var(--conduction-tab-font-family);
62
+ max-width: var(--conduction-tab-max-width);
63
+ min-width: var(--conduction-tab-min-width);
64
+ min-height: var(--conduction-tab-min-height);
65
+ letter-spacing: var(--conduction-tab-letter-spacing);
66
+ text-transform: var(--conduction-tab-text-transform);
67
+
68
+ border-bottom-width: var(--conduction-tab-list-border-bottom-width);
69
+ border-bottom-style: var(--conduction-tab-list-border-bottom-style);
70
+ border-bottom-color: var(--conduction-tab-list-border-bottom-color);
71
+ }
72
+
73
+ .tab[aria-selected="true"] {
74
+ color: var(--conduction-tab-selected-color);
75
+ border-bottom-width: var(--conduction-tab-selected-border-bottom-width);
76
+ border-bottom-style: var(--conduction-tab-selected-border-bottom-style);
77
+ border-bottom-color: var(--conduction-tab-selected-border-bottom-color);
78
+ font-weight: var(--conduction-tab-selected-font-weight);
79
+ }
80
+
81
+ .tabs [class*="react-tabs__tab-panel--selected"] {
82
+ padding-block-start: var(--conduction-tab-panel-padding-block-start);
83
+ padding-block-end: var(--conduction-tab-panel-padding-block-end);
84
+ padding-inline-start: var(--conduction-tab-panel-padding-inline-start);
85
+ padding-inline-end: var(--conduction-tab-panel-padding-inline-end);
86
+ }
87
+
88
+ .badge {
89
+ margin-inline-start: var(--conduction-tab-badge-margin-inline-start);
90
+ background-color: var(--utrecht-badge-counter-background-color, var(--utrecht-badge-background-color, #000));
91
+ border-radius: var(--utrecht-badge-counter-border-radius, var(--utrecht-badge-border-radius, 0.5ch));
92
+ color: var(--utrecht-badge-counter-color, var(--utrecht-badge-color, #fff));
93
+ display: inline-block;
94
+ font-family: var(--utrecht-document-font-family, sans-serif);
95
+ font-style: var(--utrecht-badge-counter-font-style, normal);
96
+ font-weight: var(--utrecht-badge-counter-font-weight, var(--utrecht-badge-font-weight, bold));
97
+ padding-block-end: var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));
98
+ padding-block-start: var(--utrecht-badge-counter-padding-block, var(--utrecht-badge-padding-block, 0.5ex));
99
+ padding-inline-end: var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));
100
+ padding-inline-start: var(--utrecht-badge-counter-padding-inline, var(--utrecht-badge-padding-inline, 0.5ch));
101
+ text-decoration: none;
102
+ }
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import * as styles from "./Tabs.module.css";
3
+ import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
4
+ import { BadgeCounter } from "@utrecht/component-library-react";
5
+
6
+ interface testProps {
7
+ tabs: ITabProps[];
8
+ tabContent: ITabPanelProps[];
9
+ }
10
+
11
+ interface ITabProps {
12
+ name: string;
13
+ badge?: string;
14
+ }
15
+ interface ITabPanelProps {
16
+ content: JSX.Element;
17
+ }
18
+
19
+ export const TabContext: React.FC<testProps> = ({ tabs, tabContent }) => {
20
+ return (
21
+ <Tabs className={styles.tabs}>
22
+ <TabList className={styles.tabList}>
23
+ {tabs.map(({ name, badge }) => (
24
+ <Tab className={styles.tab}>
25
+ <span>
26
+ {name}
27
+ {badge !== undefined && <BadgeCounter className={styles.badge}>{badge}</BadgeCounter>}
28
+ </span>
29
+ </Tab>
30
+ ))}
31
+ </TabList>
32
+ {tabContent.map(({ content }) => (
33
+ <TabPanel className={styles.tabPanel}>{content}</TabPanel>
34
+ ))}
35
+ </Tabs>
36
+ );
37
+ };
@@ -1,44 +1,44 @@
1
- :root {
2
- --conduction-tag-font-size: var(--skeleton-font-size-sm);
3
- --conduction-tag-color: var(--skeleton-black);
4
- --conduction-tag-background-color: var(--skeleton-color-grey-1);
5
- --conduction-tag-border-radius: var(--skeleton-border-radius-md);
6
- --conduction-tag-padding: var(--skeleton-size-xs);
7
- --conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
8
- --conduction-tag-remove-background-color: #ffbdad;
9
- --conduction-tag-remove-text-color: #e44f2a;
10
- }
11
-
12
- .tag {
13
- display: inline-block;
14
- width: fit-content;
15
- font-size: var(--conduction-tag-font-size);
16
- color: var(--conduction-tag-color);
17
- background-color: var(--conduction-tag-background-color);
18
- padding-inline-start: var(--conduction-tag-padding);
19
- padding-inline-end: var(--conduction-tag-padding);
20
- padding-block-start: var(--conduction-tag-padding);
21
- padding-block-end: var(--conduction-tag-padding);
22
- }
23
-
24
- .tag > *:not(:last-child) {
25
- margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
26
- }
27
-
28
- .clickable :hover {
29
- cursor: pointer;
30
- }
31
-
32
- .remove {
33
- padding-inline-end: 4px;
34
- }
35
-
36
- .tagContainer {
37
- display: flex;
38
- }
39
-
40
- .removeTag:hover {
41
- cursor: pointer;
42
- background-color: var(--conduction-tag-remove-background-color);
43
- color: var(--conduction-tag-remove-text-color);
44
- }
1
+ :root {
2
+ --conduction-tag-font-size: var(--skeleton-font-size-sm);
3
+ --conduction-tag-color: var(--skeleton-black);
4
+ --conduction-tag-background-color: var(--skeleton-color-grey-1);
5
+ --conduction-tag-border-radius: var(--skeleton-border-radius-md);
6
+ --conduction-tag-padding: var(--skeleton-size-xs);
7
+ --conduction-tag-icon-margin-inline-end: var(--skeleton-size-2xs);
8
+ --conduction-tag-remove-background-color: #ffbdad;
9
+ --conduction-tag-remove-text-color: #e44f2a;
10
+ }
11
+
12
+ .tag {
13
+ display: inline-block;
14
+ width: fit-content;
15
+ font-size: var(--conduction-tag-font-size);
16
+ color: var(--conduction-tag-color);
17
+ background-color: var(--conduction-tag-background-color);
18
+ padding-inline-start: var(--conduction-tag-padding);
19
+ padding-inline-end: var(--conduction-tag-padding);
20
+ padding-block-start: var(--conduction-tag-padding);
21
+ padding-block-end: var(--conduction-tag-padding);
22
+ }
23
+
24
+ .tag > *:not(:last-child) {
25
+ margin-inline-end: var(--conduction-tag-icon-margin-inline-end);
26
+ }
27
+
28
+ .clickable :hover {
29
+ cursor: pointer;
30
+ }
31
+
32
+ .remove {
33
+ padding-inline-end: 4px;
34
+ }
35
+
36
+ .tagContainer {
37
+ display: flex;
38
+ }
39
+
40
+ .removeTag:hover {
41
+ cursor: pointer;
42
+ background-color: var(--conduction-tag-remove-background-color);
43
+ color: var(--conduction-tag-remove-text-color);
44
+ }
@@ -1,4 +1,4 @@
1
- import { PrimaryTopNav } from "./primaryTopNav/PrimaryTopNav";
2
- import { SecondaryTopNav } from "./secondaryTopNav/SecondaryTopNav";
3
-
4
- export { PrimaryTopNav, SecondaryTopNav };
1
+ import { PrimaryTopNav } from "./primaryTopNav/PrimaryTopNav";
2
+ import { SecondaryTopNav } from "./secondaryTopNav/SecondaryTopNav";
3
+
4
+ export { PrimaryTopNav, SecondaryTopNav };
package/src/custom.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "*.svg";
2
- declare module "*.jpg";
3
- declare module "*.png";
4
- declare module "*.module.css";
1
+ declare module "*.svg";
2
+ declare module "*.jpg";
3
+ declare module "*.png";
4
+ declare module "*.module.css";
package/src/index.ts CHANGED
@@ -29,6 +29,7 @@ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
29
29
  import { CodeBlock } from "./components/codeBlock/CodeBlock";
30
30
  import { ToolTip } from "./components/toolTip/ToolTip";
31
31
  import { Pagination } from "./components/Pagination/Pagination";
32
+ import { TabContext } from "./components/tabs/Tabs";
32
33
 
33
34
  export {
34
35
  DownloadCard,
@@ -62,4 +63,5 @@ export {
62
63
  BadgeCounter,
63
64
  CodeBlock,
64
65
  ToolTip,
66
+ TabContext,
65
67
  };
@@ -1,10 +0,0 @@
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,9 +0,0 @@
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,9 +0,0 @@
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,5 +0,0 @@
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 };
@@ -1,3 +0,0 @@
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 });
@@ -1,84 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * This is a wrapper element based on https://nl-design-system.github.io/denhaag/?path=/docs/css-navigation-breadcrumb--default-story
4
- *
5
- * IMPORTANT: DO NOT MAKE CHANGES TO THIS FILE, AS ALL CHANGES WILL BE LOST UPON PACKAGE IMPLEMENTATION
6
- *
7
- * Note: we do not use css modules here due to this component being a wrapper
8
- */
9
- import { Link } from "gatsby";
10
- import "./Breadcrumbs.css";
11
- export const Breadcrumbs = ({ crumbs }) => {
12
- return _jsx("nav", {
13
- "aria-label": "Breadcrumb",
14
- className: "denhaag-breadcrumb",
15
- children: _jsx("ol", {
16
- className: "denhaag-breadcrumb__list",
17
- itemScope: true,
18
- itemType: "https://schema.org/BreadcrumbList",
19
- children: crumbs.map((crumb, idx) => {
20
- if (crumbs.length !== idx + 1) {
21
- return _jsx(CrumbItem, { ...crumb, ...{ idx } }, idx);
22
- }
23
- return _jsx(LastCrumbItem, { ...crumb, ...{ idx } }, idx);
24
- }),
25
- }),
26
- });
27
- };
28
- const CrumbItem = ({ pathname, crumbLabel, idx }) =>
29
- _jsx("li", {
30
- className: "denhaag-breadcrumb__item",
31
- itemProp: "itemListElement",
32
- itemScope: true,
33
- itemType: "https://schema.org/ListItem",
34
- children: _jsxs(Link, {
35
- className: "denhaag-breadcrumb__link",
36
- to: pathname,
37
- itemProp: "item",
38
- children: [
39
- _jsx("span", {
40
- className: "denhaag-breadcrumb__text",
41
- itemProp: "name",
42
- children: crumbLabel,
43
- }),
44
- _jsx("svg", {
45
- "aria-hidden": "true",
46
- className: "denhaag-icon",
47
- fill: "none",
48
- focusable: "false",
49
- height: "1em",
50
- shapeRendering: "auto",
51
- viewBox: "0 0 24 24",
52
- width: "1em",
53
- xmlns: "http://www.w3.org/2000/svg",
54
- children: _jsx("path", {
55
- d: "M9.293 18.707a1 1 0 010-1.414L14.586 12 9.293 6.707a1 1 0 011.414-1.414l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0z",
56
- fill: "currentColor",
57
- }),
58
- }),
59
- _jsx("meta", { content: idx.toString(), itemProp: "position" }),
60
- ],
61
- }),
62
- });
63
- const LastCrumbItem = ({ pathname, crumbLabel, idx }) =>
64
- _jsx("li", {
65
- "aria-current": "page",
66
- className: "denhaag-breadcrumb__item",
67
- itemProp: "itemListElement",
68
- itemScope: true,
69
- itemType: "https://schema.org/ListItem",
70
- children: _jsxs(Link, {
71
- "aria-current": "page",
72
- className: "denhaag-breadcrumb__link denhaag-breadcrumb__link--current",
73
- to: pathname,
74
- itemProp: "item",
75
- children: [
76
- _jsx("span", {
77
- className: "denhaag-breadcrumb__text",
78
- itemProp: "name",
79
- children: crumbLabel,
80
- }),
81
- _jsx("meta", { content: idx.toString(), itemProp: "position" }),
82
- ],
83
- }),
84
- });
@@ -1,4 +0,0 @@
1
- import { InputText, InputPassword, InputEmail, InputDate, InputNumber } from "./input";
2
- import { Textarea } from "./textarea";
3
- import { InputCheckbox } from "./checkbox";
4
- export { InputText, InputPassword, InputEmail, InputDate, InputNumber, InputCheckbox, Textarea };
@@ -1,12 +0,0 @@
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,3 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TextArea } from "@gemeente-denhaag/textarea";
3
- export const Textarea = ({ name, validation, register, errors }) => (_jsx(TextArea, { ...register(name, { ...validation }), invalid: errors[name] }));
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import * as styles from "./imageDivider.module.css";
4
- export const ImageDivider = ({ image, layoutClassName }) => {
5
- return _jsx("img", { src: image, className: clsx(styles.divider, layoutClassName) });
6
- };
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import { Link } from "gatsby";
4
- import * as styles from "./Logo.module.css";
5
- export const AuthenticatedLogo = ({ layoutClassName, href }) => {
6
- return (_jsx(Link, { className: styles.logoContainer, to: href ?? "#", children: _jsx("div", { className: clsx(styles.authenticatedLogo, styles.logo, layoutClassName) }) }));
7
- };
8
- export const UnauthenticatedLogo = ({ layoutClassName, href }) => {
9
- return (_jsx(Link, { className: styles.logoContainer, to: href ?? "#", children: _jsx("div", { className: clsx(styles.unauthenticatedLogo, styles.logo, layoutClassName) }) }));
10
- };
@@ -1,3 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as styles from "./MetaIcon.module.css";
3
- export const MetaIcon = ({ icon, label, value }) => (_jsxs("div", { className: styles.container, children: [_jsx("span", { className: styles.icon, children: icon }), _jsx("span", { children: label }), _jsx("span", { className: styles.value, children: value })] }));
@@ -1,15 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import React from "react";
3
- import { navigate } from "gatsby";
4
- export const PrivateRoute = ({ children, isLoggedIn }) => {
5
- const [authenticated, setAuthenticated] = React.useState(false);
6
- React.useEffect(() => {
7
- if (!isLoggedIn && window.location.pathname !== "/login") {
8
- navigate("/login");
9
- }
10
- isLoggedIn && setAuthenticated(true);
11
- }, [isLoggedIn]);
12
- if (!authenticated)
13
- return _jsx(_Fragment, {});
14
- return _jsx(_Fragment, { children: children });
15
- };