@conduction/components 2.2.21 → 2.2.23

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 (170) hide show
  1. package/.prettierrc +30 -30
  2. package/README.md +2 -0
  3. package/lib/components/Pagination/Pagination.d.ts +14 -14
  4. package/lib/components/Pagination/Pagination.js +12 -12
  5. package/lib/components/badgeCounter/BadgeCounter.d.ts +8 -8
  6. package/lib/components/badgeCounter/BadgeCounter.js +4 -4
  7. package/lib/components/badgeCounter/BadgeCounter.module.css +27 -27
  8. package/lib/components/card/cardHeader/CardHeader.d.ts +4 -4
  9. package/lib/components/card/cardHeader/CardHeader.js +14 -14
  10. package/lib/components/card/cardWrapper/CardWrapper.d.ts +2 -2
  11. package/lib/components/card/cardWrapper/CardWrapper.js +6 -6
  12. package/lib/components/card/detailsCard/DetailsCard.d.ts +14 -14
  13. package/lib/components/card/detailsCard/DetailsCard.js +11 -11
  14. package/lib/components/card/downloadCard/DownloadCard.d.ts +11 -11
  15. package/lib/components/card/downloadCard/DownloadCard.js +9 -9
  16. package/lib/components/card/horizontalImageCard/HorizontalImageCard.d.ts +13 -13
  17. package/lib/components/card/horizontalImageCard/HorizontalImageCard.js +10 -10
  18. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.d.ts +14 -14
  19. package/lib/components/card/imageAndDetailsCard/ImageAndDetailsCard.js +10 -10
  20. package/lib/components/card/index.d.ts +8 -8
  21. package/lib/components/card/index.js +8 -8
  22. package/lib/components/card/infoCard/InfoCard.d.ts +8 -8
  23. package/lib/components/card/infoCard/InfoCard.js +6 -6
  24. package/lib/components/card/infoCard/InfoCard.module.css +26 -26
  25. package/lib/components/card/richContentCard/RichContentCard.d.ts +19 -19
  26. package/lib/components/card/richContentCard/RichContentCard.js +16 -15
  27. package/lib/components/card/richContentCard/RichContentCard.module.css +93 -103
  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 +40 -40
  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 +22 -22
  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 +24 -24
  59. package/lib/components/formFields/select/select.js +74 -74
  60. package/lib/components/formFields/textarea.d.ts +10 -10
  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/horizontalOverflowWrapper/HorizontalOverflowWrapper.d.ts +10 -10
  65. package/lib/components/horizontalOverflowWrapper/HorizontalOverflowWrapper.js +36 -36
  66. package/lib/components/imageDivider/ImageDivider.d.ts +7 -7
  67. package/lib/components/imageDivider/ImageDivider.js +6 -6
  68. package/lib/components/imageDivider/imageDivider.module.css +5 -5
  69. package/lib/components/jumbotron/Jumbotron.d.ts +23 -22
  70. package/lib/components/jumbotron/Jumbotron.js +34 -21
  71. package/lib/components/jumbotron/Jumbotron.module.css +26 -31
  72. package/lib/components/logo/Logo.d.ts +8 -8
  73. package/lib/components/logo/Logo.js +9 -10
  74. package/lib/components/logo/Logo.module.css +31 -15
  75. package/lib/components/metaIcon/MetaIcon.d.ts +7 -7
  76. package/lib/components/metaIcon/MetaIcon.js +3 -3
  77. package/lib/components/metaIcon/MetaIcon.module.css +29 -29
  78. package/lib/components/notificationPopUp/NotificationPopUp.d.ts +26 -26
  79. package/lib/components/notificationPopUp/NotificationPopUp.js +32 -32
  80. package/lib/components/privateRoute/PrivateRoute.d.ts +6 -6
  81. package/lib/components/privateRoute/PrivateRoute.js +15 -15
  82. package/lib/components/quoteWrapper/QuoteWrapper.d.ts +7 -7
  83. package/lib/components/quoteWrapper/QuoteWrapper.js +5 -5
  84. package/lib/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  85. package/lib/components/tabs/Tabs.d.ts +5 -5
  86. package/lib/components/tabs/Tabs.js +49 -49
  87. package/lib/components/tag/Tag.d.ts +10 -10
  88. package/lib/components/tag/Tag.js +6 -6
  89. package/lib/components/tag/Tag.module.css +44 -44
  90. package/lib/components/toolTip/ToolTip.d.ts +14 -14
  91. package/lib/components/toolTip/ToolTip.js +14 -14
  92. package/lib/components/topNav/index.d.ts +3 -3
  93. package/lib/components/topNav/index.js +3 -3
  94. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.d.ts +39 -39
  95. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.js +23 -23
  96. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.d.ts +12 -12
  97. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.js +7 -7
  98. package/lib/index.d.ts +28 -28
  99. package/lib/index.js +21 -21
  100. package/package.json +1 -1
  101. package/src/components/badgeCounter/BadgeCounter.module.css +27 -27
  102. package/src/components/card/infoCard/InfoCard.module.css +26 -26
  103. package/src/components/codeBlock/CodeBlock.module.css +6 -6
  104. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -222
  105. package/src/components/formFields/checkbox/Checkbox.module.css +7 -7
  106. package/src/components/formFields/date/Date.module.css +12 -12
  107. package/src/components/imageDivider/imageDivider.module.css +5 -5
  108. package/src/components/jumbotron/Jumbotron.module.css +26 -31
  109. package/src/components/jumbotron/Jumbotron.tsx +92 -60
  110. package/src/components/logo/Logo.module.css +31 -15
  111. package/src/components/logo/Logo.tsx +12 -16
  112. package/src/components/metaIcon/MetaIcon.module.css +29 -29
  113. package/src/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  114. package/src/components/tag/Tag.module.css +44 -44
  115. package/src/components/topNav/index.ts +4 -4
  116. package/src/custom.d.ts +4 -4
  117. package/src/index.ts +2 -3
  118. package/lib/components/htmlParser/ParsedHTML.d.ts +0 -10
  119. package/lib/components/htmlParser/ParsedHTML.js +0 -17
  120. package/lib/components/htmlParser/ParsedHTML.module.css +0 -7
  121. package/lib/components/htmlParser/parser/alert/getAlert.d.ts +0 -1
  122. package/lib/components/htmlParser/parser/alert/getAlert.js +0 -18
  123. package/lib/components/htmlParser/parser/alert/getAlert.module.css +0 -28
  124. package/lib/components/htmlParser/parser/anchor/getAnchor.d.ts +0 -2
  125. package/lib/components/htmlParser/parser/anchor/getAnchor.js +0 -74
  126. package/lib/components/htmlParser/parser/code/getCode.d.ts +0 -1
  127. package/lib/components/htmlParser/parser/code/getCode.js +0 -11
  128. package/lib/components/htmlParser/parser/getBlockquote/getBlockquote.d.ts +0 -1
  129. package/lib/components/htmlParser/parser/getBlockquote/getBlockquote.js +0 -6
  130. package/lib/components/htmlParser/parser/header/getHeader.d.ts +0 -1
  131. package/lib/components/htmlParser/parser/header/getHeader.js +0 -15
  132. package/lib/components/htmlParser/parser/image/getImage.d.ts +0 -1
  133. package/lib/components/htmlParser/parser/image/getImage.js +0 -28
  134. package/lib/components/htmlParser/parser/list/getList.d.ts +0 -1
  135. package/lib/components/htmlParser/parser/list/getList.js +0 -12
  136. package/lib/components/htmlParser/parser/list/getList.module.css +0 -3
  137. package/lib/components/htmlParser/parser/listItem/getListItem.d.ts +0 -1
  138. package/lib/components/htmlParser/parser/listItem/getListItem.js +0 -12
  139. package/lib/components/htmlParser/parser/paragraph/getParagraph.d.ts +0 -1
  140. package/lib/components/htmlParser/parser/paragraph/getParagraph.js +0 -6
  141. package/lib/components/htmlParser/parser/svg/getSvg.d.ts +0 -1
  142. package/lib/components/htmlParser/parser/svg/getSvg.js +0 -8
  143. package/lib/components/htmlParser/parser/table/getTable.d.ts +0 -1
  144. package/lib/components/htmlParser/parser/table/getTable.js +0 -7
  145. package/lib/components/htmlParser/parser/table/getTable.module.css +0 -3
  146. package/lib/components/htmlParser/parser/tableBody/getTableBody.d.ts +0 -1
  147. package/lib/components/htmlParser/parser/tableBody/getTableBody.js +0 -7
  148. package/lib/components/htmlParser/parser/tableBody/getTableBody.module.css +0 -3
  149. package/lib/components/htmlParser/parser/tableCell/getTableCell.d.ts +0 -1
  150. package/lib/components/htmlParser/parser/tableCell/getTableCell.js +0 -7
  151. package/lib/components/htmlParser/parser/tableCell/getTableCell.module.css +0 -3
  152. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.d.ts +0 -1
  153. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.js +0 -7
  154. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.module.css +0 -28
  155. package/lib/components/htmlParser/parser/tableHeaderCell/getTableHeaderCell.d.ts +0 -1
  156. package/lib/components/htmlParser/parser/tableHeaderCell/getTableHeaderCell.js +0 -6
  157. package/lib/components/htmlParser/parser/tableRow/getTableRow.d.ts +0 -1
  158. package/lib/components/htmlParser/parser/tableRow/getTableRow.js +0 -7
  159. package/lib/components/htmlParser/parser/tableRow/getTableRow.module.css +0 -29
  160. package/lib/components/htmlParser/parser/useHtmlParser.d.ts +0 -5
  161. package/lib/components/htmlParser/parser/useHtmlParser.js +0 -78
  162. package/lib/components/htmlParser/useGitHubDirectories.d.ts +0 -10
  163. package/lib/components/htmlParser/useGitHubDirectories.js +0 -31
  164. package/lib/components/statusSteps/StatusSteps.d.ts +0 -13
  165. package/lib/components/statusSteps/StatusSteps.js +0 -5
  166. package/lib/components/tableWrapper/TableWrapper.d.ts +0 -4
  167. package/lib/components/tableWrapper/TableWrapper.js +0 -30
  168. package/lib/components/tableWrapper/TableWrapper.module.css +0 -67
  169. package/lib/custom.d copy.d.ts +0 -5
  170. package/lib/custom.d copy.js +0 -1
@@ -1,3 +1,9 @@
1
+ .wrapper {
2
+ padding-block-start: 72px;
3
+ padding-block-end: 72px;
4
+ width: auto !important;
5
+ }
6
+
1
7
  .backgroundImageWrapper {
2
8
  background-size: cover;
3
9
  background-position: 48% 39%;
@@ -10,10 +16,22 @@
10
16
  background-color: var(--utrecht-page-header-background-color) !important;
11
17
  }
12
18
 
13
- .wrapper {
14
- padding-block-start: 72px;
15
- padding-block-end: 72px;
16
- width: auto !important;
19
+ .imageRightContainer {
20
+ display: flex;
21
+ margin: auto;
22
+ justify-content: space-between;
23
+ gap: var(--utrecht-space-inline-xl);
24
+ align-items: center;
25
+ }
26
+
27
+ .headerSearchForm > *:not(:last-child) {
28
+ margin-block-end: 32px;
29
+ }
30
+
31
+ .headerSearchForm > .subHeading2 {
32
+ width: 100%;
33
+ max-width: 800px;
34
+ margin-block-end: 48px;
17
35
  }
18
36
 
19
37
  .card {
@@ -41,10 +59,6 @@
41
59
  width: max-content;
42
60
  }
43
61
 
44
- .cardDescription {
45
- color: var(--conduction-card-wrapper-color) !important;
46
- }
47
-
48
62
  .cardSubTitle,
49
63
  .subTitle {
50
64
  position: relative;
@@ -54,12 +68,8 @@
54
68
  font-size: var(--utrecht-document-font-size);
55
69
  }
56
70
 
57
- .imageRightContainer {
58
- display: flex;
59
- margin: auto;
60
- justify-content: space-between;
61
- gap: var(--utrecht-space-inline-xl);
62
- align-items: center;
71
+ .cardDescription {
72
+ color: var(--conduction-card-wrapper-color) !important;
63
73
  }
64
74
 
65
75
  .image {
@@ -73,21 +83,6 @@
73
83
  color: var(--utrecht-page-header-color) !important;
74
84
  }
75
85
 
76
- .title {
77
- margin-block-end: var(--utrecht-space-block-md);
78
- }
79
-
80
- .headerSearchForm > *:not(:last-child) {
81
- margin-block-end: 32px;
82
- }
83
-
84
- .headerSearchForm > .subHeading2 {
85
- width: 100%;
86
- max-width: 800px;
87
- margin-block-end: 48px;
88
- }
89
-
90
- .searchFormContainer {
91
- width: 100%;
92
- max-width: 650px;
86
+ .titleSingle {
87
+ margin-block-end: var(--utrecht-space-block-2xs);
93
88
  }
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  import * as styles from "./Jumbotron.module.css";
3
3
  import clsx from "clsx";
4
4
  import { Paragraph, Page, PageContent, Heading1, Image } from "@utrecht/component-library-react/dist/css-module";
5
- import { CardWrapper } from "../card";
6
5
  import { Container } from "../container/Container";
6
+ import { CardWrapper } from "../card";
7
7
 
8
8
  interface JumbotronProps {
9
9
  title: string;
@@ -19,6 +19,7 @@ interface JumbotronProps {
19
19
  url: string;
20
20
  };
21
21
  isCard?: boolean;
22
+ container?: boolean;
22
23
  searchForm?: {
23
24
  element: JSX.Element;
24
25
  show: boolean;
@@ -34,51 +35,103 @@ export const Jumbotron: React.FC<JumbotronProps> = ({
34
35
  image,
35
36
  isCard,
36
37
  searchForm,
38
+ container,
37
39
  }) => {
38
40
  return (
39
- <div
40
- aria-label={ariaLabel.container}
41
- role={role}
42
- style={{
43
- backgroundImage: image?.placement === "background" ? `url(${image.url})` : "",
44
- }}
45
- className={clsx(
46
- image?.placement === "background" && styles.backgroundImageWrapper,
47
- image?.placement === "right" && styles.rightImageWrapper,
48
- (!image || image.placement === "false") && styles.wrapper,
49
- )}
50
- >
51
- <Page>
52
- <PageContent>
53
- {isCard && (
54
- <JumbotronCard {...{ title, ariaLabel, role, subTitle, description, image, isCard, searchForm }} />
55
- )}
56
- {!isCard && (
57
- <JumbotronContent {...{ title, ariaLabel, role, subTitle, description, image, isCard, searchForm }} />
58
- )}
59
- </PageContent>
60
- </Page>
61
- </div>
41
+ <OptionalContainer {...{ container }}>
42
+ <div
43
+ aria-label={ariaLabel.container}
44
+ role={role}
45
+ style={{
46
+ backgroundImage: image?.placement === "background" ? `url(${image.url})` : "",
47
+ }}
48
+ className={clsx(
49
+ image?.placement === "background" && styles.backgroundImageWrapper,
50
+ image?.placement === "right" && styles.rightImageWrapper,
51
+ )}
52
+ >
53
+ <Page>
54
+ <PageContent>
55
+ <ImageContainer image={{ placement: image?.placement ?? "false", url: image?.url ?? "" }}>
56
+ <SearchForm searchForm={{ show: searchForm?.show ?? false, element: searchForm?.element ?? <></> }}>
57
+ {isCard && (
58
+ <JumbotronCard {...{ title, ariaLabel, role, subTitle, description, image, isCard, searchForm }} />
59
+ )}
60
+ {!isCard && (
61
+ <JumbotronContent {...{ title, ariaLabel, role, subTitle, description, image, isCard, searchForm }} />
62
+ )}
63
+ </SearchForm>
64
+ </ImageContainer>
65
+ </PageContent>
66
+ </Page>
67
+ </div>
68
+ </OptionalContainer>
62
69
  );
63
70
  };
64
71
 
65
- const JumbotronCard: React.FC<JumbotronProps> = ({ title, ariaLabel, subTitle, description, image }) => {
66
- if (image?.placement === "right")
72
+ interface ContainerProps {
73
+ children: React.ReactNode;
74
+ container: boolean | undefined;
75
+ }
76
+
77
+ const OptionalContainer: React.FC<ContainerProps> = ({ children, container }) => {
78
+ if (container === true) return <Container layoutClassName={styles.wrapper}>{children}</Container>;
79
+
80
+ return <>{children}</>;
81
+ };
82
+
83
+ interface ImageContainerProps {
84
+ children: React.ReactNode;
85
+ image: {
86
+ placement: "false" | "background" | "right";
87
+ url: string;
88
+ };
89
+ }
90
+
91
+ const ImageContainer: React.FC<ImageContainerProps> = ({ children, image }) => {
92
+ if (image.placement === "right")
67
93
  return (
68
94
  <div className={styles.imageRightContainer}>
69
- <CardWrapper aria-label={ariaLabel.card} role="contentinfo" className={styles.card}>
70
- <Heading1 className={styles.cardAndImageTitle}>{title} </Heading1>
71
- <span className={styles.cardSubTitle}>{subTitle}</span>
72
-
73
- <Paragraph className={styles.cardDescription}>{description}</Paragraph>
74
- </CardWrapper>
75
- <Image src={image?.url} alt={"jumbotron-image"} className={styles.image} />
95
+ {children}
96
+ {<Image src={image.url} alt={"jumbotron-image"} className={styles.image} />}
76
97
  </div>
77
98
  );
78
99
 
100
+ if (image.placement === "false" || image.placement === "background") return <>{children}</>;
101
+
102
+ return <>{children}</>;
103
+ };
104
+
105
+ interface SearchFormProps {
106
+ children: React.ReactNode;
107
+ searchForm: {
108
+ element: JSX.Element;
109
+ show: boolean;
110
+ };
111
+ }
112
+
113
+ const SearchForm: React.FC<SearchFormProps> = ({
114
+ children,
115
+
116
+ searchForm,
117
+ }) => {
118
+ if (searchForm.show)
119
+ return (
120
+ <section className={clsx(styles.headerSearchForm)}>
121
+ {children}
122
+ {searchForm.element}
123
+ </section>
124
+ );
125
+
126
+ return <>{children}</>;
127
+ };
128
+
129
+ const JumbotronCard: React.FC<JumbotronProps> = ({ title, ariaLabel, subTitle, description, image, searchForm }) => {
79
130
  return (
80
131
  <CardWrapper aria-label={ariaLabel.card} role="contentinfo" className={styles.card}>
81
- <Heading1 className={styles.cardTitle}>{title} </Heading1>
132
+ <Heading1 className={clsx(image?.placement === "right" ? styles.cardAndImageTitle : styles.cardTitle)}>
133
+ {title}{" "}
134
+ </Heading1>
82
135
  <span className={styles.cardSubTitle}>{subTitle}</span>
83
136
 
84
137
  <Paragraph className={styles.cardDescription}>{description}</Paragraph>
@@ -87,33 +140,12 @@ const JumbotronCard: React.FC<JumbotronProps> = ({ title, ariaLabel, subTitle, d
87
140
  };
88
141
 
89
142
  const JumbotronContent: React.FC<JumbotronProps> = ({ title, subTitle, description, image, searchForm }) => {
90
- if (image?.placement === "right")
91
- return (
92
- <div className={styles.imageRightContainer}>
93
- <div>
94
- <Heading1 className={styles.title}>{title}</Heading1>
95
-
96
- {subTitle && <span className={styles.subTitle}>{subTitle}</span>}
97
-
98
- {description && <Paragraph className={styles.description}>{description}</Paragraph>}
99
- </div>
100
-
101
- {image?.placement === "right" && <Image src={image?.url} alt={"jumbotron-image"} className={styles.image} />}
102
- </div>
103
- );
104
-
105
143
  return (
106
- <Container layoutClassName={styles.wrapper}>
107
- <section className={clsx(searchForm?.show && styles.headerSearchForm)}>
108
- <div>
109
- <Heading1 className={styles.title}>{title}</Heading1>
110
-
111
- {subTitle && <span className={styles.subTitle}>{subTitle}</span>}
144
+ <div>
145
+ <Heading1 className={clsx(clsx(styles.title, !subTitle && styles.titleSingle))}>{title}</Heading1>
146
+ {subTitle && <span className={styles.subTitle}>{subTitle}</span>}
112
147
 
113
- {description && <Paragraph className={styles.description}>{description}</Paragraph>}
114
- </div>
115
- {searchForm?.show && searchForm.element}
116
- </section>
117
- </Container>
148
+ {description && <Paragraph className={styles.description}>{description}</Paragraph>}
149
+ </div>
118
150
  );
119
151
  };
@@ -1,15 +1,31 @@
1
- .logoContainer {
2
- height: 100%;
3
- }
4
-
5
- .logo {
6
- background-size: 100% 100%;
7
- }
8
-
9
- .authenticatedLogo {
10
- background-image: var(--conduction-authenticated-logo-background);
11
- }
12
-
13
- .unauthenticatedLogo {
14
- background-image: var(--conduction-unauthenticated-logo-background);
15
- }
1
+ :root {
2
+ --conduction-logo-header-inline-size: 220px;
3
+ --conduction-logo-header-block-size: 40px;
4
+ --conduction-logo-header-background-image: url("https://conduction.nl/wp-content/uploads/2021/07/cropped-conductionlogo-1.png");
5
+
6
+ --conduction-logo-footer-inline-size: 330px;
7
+ --conduction-logo-footer-block-size: 60px;
8
+ --conduction-logo-footer-background-image: url("https://conduction.nl/wp-content/uploads/2021/07/cropped-conductionlogo-1.png");
9
+ }
10
+
11
+ .container {
12
+ background-size: contain;
13
+ background-position: center;
14
+ background-repeat: no-repeat;
15
+ }
16
+
17
+ .container.header {
18
+ inline-size: var(--conduction-logo-header-inline-size);
19
+ block-size: var(--conduction-logo-header-block-size);
20
+ background-image: var(--conduction-logo-header-background-image);
21
+ }
22
+
23
+ .container.footer {
24
+ inline-size: var(--conduction-logo-footer-inline-size);
25
+ block-size: var(--conduction-logo-footer-block-size);
26
+ background-image: var(--conduction-logo-footer-background-image);
27
+ }
28
+
29
+ .container.clickable:hover {
30
+ cursor: pointer;
31
+ }
@@ -1,25 +1,21 @@
1
- import clsx from "clsx";
2
- import { Link } from "gatsby";
3
1
  import * as React from "react";
4
2
  import * as styles from "./Logo.module.css";
3
+ import clsx from "clsx";
5
4
 
6
5
  interface LogoProps {
7
- layoutClassName: string;
8
- href?: string;
6
+ variant?: "header" | "footer";
7
+ onClick?: () => any;
8
+ layoutClassName?: string;
9
9
  }
10
10
 
11
- export const AuthenticatedLogo = ({ layoutClassName, href }: LogoProps): JSX.Element => {
12
- return (
13
- <Link className={styles.logoContainer} to={href ?? "#"}>
14
- <div className={clsx(styles.authenticatedLogo, styles.logo, layoutClassName)} />
15
- </Link>
16
- );
17
- };
18
-
19
- export const UnauthenticatedLogo = ({ layoutClassName, href }: LogoProps): JSX.Element => {
11
+ export const Logo: React.FC<LogoProps> = ({ onClick, layoutClassName, variant = "header" }) => {
20
12
  return (
21
- <Link className={styles.logoContainer} to={href ?? "#"}>
22
- <div className={clsx(styles.unauthenticatedLogo, styles.logo, layoutClassName)} />
23
- </Link>
13
+ <div
14
+ className={clsx(styles.container, styles[variant], [
15
+ onClick && styles.clickable,
16
+ layoutClassName && layoutClassName,
17
+ ])}
18
+ {...{ onClick }}
19
+ />
24
20
  );
25
21
  };
@@ -1,29 +1,29 @@
1
- :root {
2
- --conduction-meta-icon-icon-size: var(--skeleton-size-lg);
3
- --conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
4
- }
5
-
6
- .container {
7
- display: flex;
8
- align-items: center;
9
- flex-direction: column;
10
- }
11
-
12
- .container > *:not(:last-child) {
13
- margin-block-end: var(--skeleton-size-xs);
14
- }
15
-
16
- .icon {
17
- color: var(--conduction-meta-icon-icon-color);
18
- height: var(--conduction-meta-icon-icon-size);
19
- width: var(--conduction-meta-icon-icon-size);
20
- }
21
-
22
- .icon > svg {
23
- height: 100%;
24
- width: 100%;
25
- }
26
-
27
- .value {
28
- font-weight: var(--skeleton-font-weight-bold);
29
- }
1
+ :root {
2
+ --conduction-meta-icon-icon-size: var(--skeleton-size-lg);
3
+ --conduction-meta-icon-icon-color: var(--skeleton-color-secondary-4);
4
+ }
5
+
6
+ .container {
7
+ display: flex;
8
+ align-items: center;
9
+ flex-direction: column;
10
+ }
11
+
12
+ .container > *:not(:last-child) {
13
+ margin-block-end: var(--skeleton-size-xs);
14
+ }
15
+
16
+ .icon {
17
+ color: var(--conduction-meta-icon-icon-color);
18
+ height: var(--conduction-meta-icon-icon-size);
19
+ width: var(--conduction-meta-icon-icon-size);
20
+ }
21
+
22
+ .icon > svg {
23
+ height: 100%;
24
+ width: 100%;
25
+ }
26
+
27
+ .value {
28
+ font-weight: var(--skeleton-font-weight-bold);
29
+ }
@@ -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
+ }
@@ -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
@@ -24,7 +24,7 @@ import {
24
24
  SelectSingle,
25
25
  } from "./components/formFields";
26
26
  import { ImageDivider } from "./components/imageDivider/ImageDivider";
27
- import { AuthenticatedLogo, UnauthenticatedLogo } from "./components/logo/Logo";
27
+ import { Logo } from "./components/logo/Logo";
28
28
  import { MetaIcon } from "./components/metaIcon/MetaIcon";
29
29
  import { PrivateRoute } from "./components/privateRoute/PrivateRoute";
30
30
  import { PrimaryTopNav, SecondaryTopNav } from "./components/topNav";
@@ -62,8 +62,7 @@ export {
62
62
  SelectMultiple,
63
63
  SelectSingle,
64
64
  ImageDivider,
65
- AuthenticatedLogo,
66
- UnauthenticatedLogo,
65
+ Logo,
67
66
  MetaIcon,
68
67
  PrivateRoute,
69
68
  PrimaryTopNav,
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import { UseQueryResult } from "react-query";
3
- interface ParsedHTMLProps {
4
- contentQuery: UseQueryResult<any, Error>;
5
- location: string;
6
- directories: string;
7
- layoutClassName?: string;
8
- }
9
- export declare const ParsedHTML: React.FC<ParsedHTMLProps>;
10
- export {};
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as styles from "./ParsedHTML.module.css";
3
- import Parser from "html-react-parser";
4
- import Skeleton from "react-loading-skeleton";
5
- import { Alert } from "@utrecht/component-library-react/dist/css-module";
6
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
- import { faWarning } from "@fortawesome/free-solid-svg-icons";
8
- import clsx from "clsx";
9
- import { useHtmlParser } from "./parser/useHtmlParser";
10
- export const ParsedHTML = ({ contentQuery, location, layoutClassName, directories }) => {
11
- const { options } = useHtmlParser(location, directories);
12
- if (contentQuery.isLoading)
13
- return (_jsx("div", { className: styles.container, children: _jsx(Skeleton, { height: "200px" }) }));
14
- if (contentQuery.isError)
15
- return (_jsx("div", { className: styles.container, children: _jsx(Alert, { icon: _jsx(FontAwesomeIcon, { icon: faWarning }), type: "error", children: "Oops, something went wrong retrieving the .md file from GitHub." }) }));
16
- return (_jsx("div", { className: clsx(styles.container, layoutClassName && layoutClassName), children: Parser(contentQuery.data, options) }));
17
- };
@@ -1,7 +0,0 @@
1
- .container {
2
- margin-block-start: var(--utrecht-space-block-3xl);
3
- }
4
-
5
- .container > div > article > *:not(:last-child) {
6
- margin-block-end: var(--utrecht-space-block-lg);
7
- }
@@ -1 +0,0 @@
1
- export declare const getAlert: (children: any, options: any, type: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as styles from "./getAlert.module.css";
3
- import { Alert } from "@utrecht/component-library-react/dist/css-module";
4
- import { domToReact } from "html-react-parser";
5
- export const getAlert = (children, options, type) => {
6
- switch (true) {
7
- case type.includes("note") || type.includes("info"):
8
- return (_jsx(Alert, { className: styles.info, type: "info", children: domToReact(children, options) }));
9
- case type.includes("error"):
10
- return (_jsx(Alert, { className: styles.error, type: "error", children: domToReact(children, options) }));
11
- case type.includes("warning"):
12
- return (_jsx(Alert, { className: styles.warning, type: "warning", children: domToReact(children, options) }));
13
- case type.includes("succes") || type.includes("ok"):
14
- return (_jsx(Alert, { className: styles.ok, type: "ok", children: domToReact(children, options) }));
15
- default:
16
- return _jsx(Alert, { type: "info", children: domToReact(children, options) });
17
- }
18
- };
@@ -1,28 +0,0 @@
1
- .info svg {
2
- fill: var(--utrecht-alert-icon-info-color);
3
- }
4
- .info p {
5
- color: var(--utrecht-alert-info-color);
6
- }
7
-
8
- .warning svg {
9
- fill: var(--utrecht-alert-icon-warning-color);
10
- }
11
- .warning p {
12
- color: var(--utrecht-alert-warning-color);
13
- }
14
-
15
- .error svg {
16
- fill: var(--utrecht-alert-icon-error-color);
17
- }
18
- .error p {
19
- color: var(--utrecht-alert-error-color);
20
- }
21
-
22
- .ok svg {
23
- fill: var(--utrecht-alert-icon-ok-color);
24
- }
25
- .ok p {
26
- color: var(--utrecht-alert-ok-color);
27
- }
28
-