@conduction/components 2.2.23 → 2.2.24

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 (171) hide show
  1. package/.prettierrc +30 -30
  2. package/README.md +4 -1
  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/cardHeader/CardHeader.module.css +0 -10
  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/card/richContentCard/RichContentCard.module.css +103 -93
  29. package/lib/components/codeBlock/CodeBlock.d.ts +6 -6
  30. package/lib/components/codeBlock/CodeBlock.js +3 -3
  31. package/lib/components/codeBlock/CodeBlock.module.css +6 -6
  32. package/lib/components/container/Container.d.ts +6 -6
  33. package/lib/components/container/Container.js +4 -4
  34. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -222
  35. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.d.ts +17 -17
  36. package/lib/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.js +20 -20
  37. package/lib/components/denhaag-wrappers/pagination/Pagination.css +120 -120
  38. package/lib/components/denhaag-wrappers/pagination/Pagination.d.ts +9 -9
  39. package/lib/components/denhaag-wrappers/pagination/Pagination.js +15 -15
  40. package/lib/components/displaySwitch/DisplaySwitch.d.ts +18 -0
  41. package/lib/components/displaySwitch/DisplaySwitch.js +13 -0
  42. package/lib/components/displaySwitch/DisplaySwitch.module.css +3 -0
  43. package/lib/components/editableTableRow/EditableTableRow.d.ts +14 -14
  44. package/lib/components/editableTableRow/EditableTableRow.js +31 -31
  45. package/lib/components/editableTableRow/EditableTableRow.module.css +25 -25
  46. package/lib/components/formFields/checkbox/Checkbox.module.css +7 -7
  47. package/lib/components/formFields/checkbox/checkbox.d.ts +9 -9
  48. package/lib/components/formFields/checkbox/checkbox.js +3 -3
  49. package/lib/components/formFields/createKeyValue/CreateKeyValue.d.ts +23 -23
  50. package/lib/components/formFields/createKeyValue/CreateKeyValue.js +40 -40
  51. package/lib/components/formFields/date/Date.d.ts +12 -12
  52. package/lib/components/formFields/date/Date.js +10 -10
  53. package/lib/components/formFields/date/Date.module.css +12 -12
  54. package/lib/components/formFields/errorMessage/ErrorMessage.d.ts +5 -5
  55. package/lib/components/formFields/errorMessage/ErrorMessage.js +3 -3
  56. package/lib/components/formFields/index.d.ts +7 -7
  57. package/lib/components/formFields/index.js +7 -7
  58. package/lib/components/formFields/input.d.ts +22 -22
  59. package/lib/components/formFields/input.js +12 -12
  60. package/lib/components/formFields/radio.d.ts +9 -9
  61. package/lib/components/formFields/radio.js +3 -3
  62. package/lib/components/formFields/select/select.d.ts +24 -24
  63. package/lib/components/formFields/select/select.js +74 -74
  64. package/lib/components/formFields/textarea.d.ts +10 -10
  65. package/lib/components/formFields/textarea.js +4 -4
  66. package/lib/components/formFields/types.d.ts +6 -6
  67. package/lib/components/formFields/types.js +1 -1
  68. package/lib/components/horizontalOverflowWrapper/HorizontalOverflowWrapper.d.ts +10 -10
  69. package/lib/components/horizontalOverflowWrapper/HorizontalOverflowWrapper.js +36 -36
  70. package/lib/components/htmlParser/ParsedHTML.d.ts +10 -0
  71. package/lib/components/htmlParser/ParsedHTML.js +17 -0
  72. package/lib/components/htmlParser/ParsedHTML.module.css +7 -0
  73. package/lib/components/htmlParser/parser/alert/getAlert.d.ts +1 -0
  74. package/lib/components/htmlParser/parser/alert/getAlert.js +18 -0
  75. package/lib/components/htmlParser/parser/alert/getAlert.module.css +28 -0
  76. package/lib/components/htmlParser/parser/anchor/getAnchor.d.ts +2 -0
  77. package/lib/components/htmlParser/parser/anchor/getAnchor.js +74 -0
  78. package/lib/components/htmlParser/parser/code/getCode.d.ts +1 -0
  79. package/lib/components/htmlParser/parser/code/getCode.js +11 -0
  80. package/lib/components/htmlParser/parser/getBlockquote/getBlockquote.d.ts +1 -0
  81. package/lib/components/htmlParser/parser/getBlockquote/getBlockquote.js +6 -0
  82. package/lib/components/htmlParser/parser/header/getHeader.d.ts +1 -0
  83. package/lib/components/htmlParser/parser/header/getHeader.js +15 -0
  84. package/lib/components/htmlParser/parser/image/getImage.d.ts +1 -0
  85. package/lib/components/htmlParser/parser/image/getImage.js +28 -0
  86. package/lib/components/htmlParser/parser/list/getList.d.ts +1 -0
  87. package/lib/components/htmlParser/parser/list/getList.js +12 -0
  88. package/lib/components/htmlParser/parser/list/getList.module.css +3 -0
  89. package/lib/components/htmlParser/parser/listItem/getListItem.d.ts +1 -0
  90. package/lib/components/htmlParser/parser/listItem/getListItem.js +12 -0
  91. package/lib/components/htmlParser/parser/paragraph/getParagraph.d.ts +1 -0
  92. package/lib/components/htmlParser/parser/paragraph/getParagraph.js +6 -0
  93. package/lib/components/htmlParser/parser/svg/getSvg.d.ts +1 -0
  94. package/lib/components/htmlParser/parser/svg/getSvg.js +8 -0
  95. package/lib/components/htmlParser/parser/table/getTable.d.ts +1 -0
  96. package/lib/components/htmlParser/parser/table/getTable.js +7 -0
  97. package/lib/components/htmlParser/parser/table/getTable.module.css +3 -0
  98. package/lib/components/htmlParser/parser/tableBody/getTableBody.d.ts +1 -0
  99. package/lib/components/htmlParser/parser/tableBody/getTableBody.js +7 -0
  100. package/lib/components/htmlParser/parser/tableBody/getTableBody.module.css +3 -0
  101. package/lib/components/htmlParser/parser/tableCell/getTableCell.d.ts +1 -0
  102. package/lib/components/htmlParser/parser/tableCell/getTableCell.js +7 -0
  103. package/lib/components/htmlParser/parser/tableCell/getTableCell.module.css +3 -0
  104. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.d.ts +1 -0
  105. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.js +7 -0
  106. package/lib/components/htmlParser/parser/tableHeader/getTableHeader.module.css +28 -0
  107. package/lib/components/htmlParser/parser/tableHeaderCell/getTableHeaderCell.d.ts +1 -0
  108. package/lib/components/htmlParser/parser/tableHeaderCell/getTableHeaderCell.js +6 -0
  109. package/lib/components/htmlParser/parser/tableRow/getTableRow.d.ts +1 -0
  110. package/lib/components/htmlParser/parser/tableRow/getTableRow.js +7 -0
  111. package/lib/components/htmlParser/parser/tableRow/getTableRow.module.css +29 -0
  112. package/lib/components/htmlParser/parser/useHtmlParser.d.ts +5 -0
  113. package/lib/components/htmlParser/parser/useHtmlParser.js +78 -0
  114. package/lib/components/htmlParser/useGitHubDirectories.d.ts +10 -0
  115. package/lib/components/htmlParser/useGitHubDirectories.js +31 -0
  116. package/lib/components/imageDivider/ImageDivider.d.ts +7 -7
  117. package/lib/components/imageDivider/ImageDivider.js +6 -6
  118. package/lib/components/imageDivider/imageDivider.module.css +5 -5
  119. package/lib/components/jumbotron/Jumbotron.d.ts +23 -23
  120. package/lib/components/jumbotron/Jumbotron.js +34 -34
  121. package/lib/components/logo/Logo.d.ts +8 -8
  122. package/lib/components/logo/Logo.js +9 -9
  123. package/lib/components/metaIcon/MetaIcon.d.ts +7 -7
  124. package/lib/components/metaIcon/MetaIcon.js +3 -3
  125. package/lib/components/metaIcon/MetaIcon.module.css +29 -29
  126. package/lib/components/notificationPopUp/NotificationPopUp.d.ts +26 -26
  127. package/lib/components/notificationPopUp/NotificationPopUp.js +32 -32
  128. package/lib/components/privateRoute/PrivateRoute.d.ts +6 -6
  129. package/lib/components/privateRoute/PrivateRoute.js +15 -15
  130. package/lib/components/quoteWrapper/QuoteWrapper.d.ts +7 -7
  131. package/lib/components/quoteWrapper/QuoteWrapper.js +5 -5
  132. package/lib/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  133. package/lib/components/statusSteps/StatusSteps.d.ts +13 -0
  134. package/lib/components/statusSteps/StatusSteps.js +5 -0
  135. package/lib/components/tableWrapper/TableWrapper.d.ts +4 -0
  136. package/lib/components/tableWrapper/TableWrapper.js +30 -0
  137. package/lib/components/tableWrapper/TableWrapper.module.css +67 -0
  138. package/lib/components/tabs/Tabs.d.ts +5 -5
  139. package/lib/components/tabs/Tabs.js +49 -49
  140. package/lib/components/tag/Tag.d.ts +10 -10
  141. package/lib/components/tag/Tag.js +6 -6
  142. package/lib/components/tag/Tag.module.css +44 -44
  143. package/lib/components/toolTip/ToolTip.d.ts +14 -14
  144. package/lib/components/toolTip/ToolTip.js +14 -14
  145. package/lib/components/topNav/index.d.ts +3 -3
  146. package/lib/components/topNav/index.js +3 -3
  147. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.d.ts +39 -39
  148. package/lib/components/topNav/primaryTopNav/PrimaryTopNav.js +23 -23
  149. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.d.ts +12 -12
  150. package/lib/components/topNav/secondaryTopNav/SecondaryTopNav.js +7 -7
  151. package/lib/custom.d copy.d.ts +5 -0
  152. package/lib/custom.d copy.js +1 -0
  153. package/lib/index.d.ts +29 -28
  154. package/lib/index.js +22 -21
  155. package/package.json +1 -1
  156. package/src/components/badgeCounter/BadgeCounter.module.css +27 -27
  157. package/src/components/card/cardHeader/CardHeader.module.css +0 -10
  158. package/src/components/card/infoCard/InfoCard.module.css +26 -26
  159. package/src/components/codeBlock/CodeBlock.module.css +6 -6
  160. package/src/components/denhaag-wrappers/breadcrumbs/Breadcrumbs.css +222 -222
  161. package/src/components/displaySwitch/DisplaySwitch.module.css +3 -0
  162. package/src/components/displaySwitch/DisplaySwitch.tsx +48 -0
  163. package/src/components/formFields/checkbox/Checkbox.module.css +7 -7
  164. package/src/components/formFields/date/Date.module.css +12 -12
  165. package/src/components/imageDivider/imageDivider.module.css +5 -5
  166. package/src/components/metaIcon/MetaIcon.module.css +29 -29
  167. package/src/components/quoteWrapper/QuoteWrapper.module.css +12 -12
  168. package/src/components/tag/Tag.module.css +44 -44
  169. package/src/components/topNav/index.ts +4 -4
  170. package/src/custom.d.ts +4 -4
  171. package/src/index.ts +2 -0
@@ -1,120 +1,120 @@
1
- .denhaag-pagination {
2
- --denhaag-pagination-align: center;
3
-
4
- align-items: center;
5
- display: flex;
6
- flex-direction: row;
7
- justify-content: var(--denhaag-pagination-align);
8
- }
9
-
10
- @media (min-width: 640px) {
11
- .denhaag-pagination,
12
- .denhaag-pagination--start {
13
- --denhaag-pagination-align: flex-start;
14
- }
15
-
16
- .denhaag-pagination--center {
17
- --denhaag-pagination-align: center;
18
- }
19
-
20
- .denhaag-pagination--end {
21
- --denhaag-pagination-align: end;
22
- }
23
- }
24
-
25
- .denhaag-pagination__links {
26
- display: flex;
27
- flex-direction: row;
28
- }
29
-
30
- .denhaag-pagination__link {
31
- aspect-ratio: 1 / 1;
32
- align-items: center;
33
- background-color: var(--denhaag-pagination-background-color, transparent);
34
- border: 0;
35
- border-radius: var(
36
- --denhaag-pagination-border-radius,
37
- var(--denhaag-border-radius)
38
- );
39
- color: var(--denhaag-pagination-color, var(--denhaag-pagination-link-color));
40
- display: flex;
41
- height: var(--denhaag-pagination-size);
42
- justify-content: center;
43
- line-height: 1.5;
44
- position: relative;
45
- text-align: center;
46
- text-decoration: none;
47
- width: var(--denhaag-pagination-size);
48
- font-style: normal;
49
- font-weight: var(--denhaag-pagination-font-weight);
50
- font-size: var(--denhaag-pagination-font-size);
51
- }
52
-
53
- .denhaag-pagination__link:hover,
54
- .denhaag-pagination__link--hover {
55
- --denhaag-pagination-color: var(--denhaag-pagination-link-hover-color);
56
- cursor: pointer;
57
- }
58
-
59
- .denhaag-pagination__link:focus,
60
- .denhaag-pagination__link--focus {
61
- outline: var(--denhaag-link-focus-outline);
62
- border-radius: 0;
63
- }
64
-
65
- .denhaag-pagination__link:disabled,
66
- .denhaag-pagination__link--disabled {
67
- --denhaag-pagination-color: var(--denhaag-pagination-link-disabled-color);
68
-
69
- pointer-events: none;
70
- }
71
-
72
- .denhaag-pagination__link--arrow {
73
- --denhaag-pagination-size: var(--denhaag-pagination-arrow-size);
74
- --denhaag-pagination-font-size: var(--denhaag-pagination-arrow-font-size);
75
- }
76
-
77
- [dir="rtl"] .denhaag-pagination__link--arrow {
78
- transform: scaleX(-1);
79
- }
80
-
81
- .denhaag-pagination__link + .denhaag-pagination__links,
82
- .denhaag-pagination__links + .denhaag-pagination__link {
83
- margin-inline-start: var(--denhaag-pagination-margin-inline, 10px);
84
- }
85
-
86
- .denhaag-pagination__link:not(:first-child):not(:last-child):not(.denhaag-pagination__link--current):not([rel]) {
87
- overflow: hidden;
88
- pointer-events: none;
89
- text-indent: calc(var(--denhaag-pagination-size) * 2);
90
- }
91
-
92
- .denhaag-pagination__link:not(:first-child):not(:last-child):not(.denhaag-pagination__link--current):not([rel])::before {
93
- content: "...";
94
- left: calc(50% - 7px);
95
- line-height: 0;
96
- position: absolute;
97
- text-indent: 0;
98
- vertical-align: baseline;
99
- }
100
-
101
- .denhaag-pagination__link--current {
102
- --denhaag-pagination-color: var(--denhaag-pagination-link-current-color);
103
- --denhaag-pagination-font-weight: var(
104
- --denhaag-pagination-link-current-font-weight
105
- );
106
- }
107
-
108
- .denhaag-pagination__link--current.denhaag-pagination__link:disabled,
109
- .denhaag-pagination__link--current.denhaag-pagination__link--disabled {
110
- --denhaag-pagination-color: var(
111
- --denhaag-pagination-link-current-disabled-color
112
- );
113
- --denhaag-pagination-background-color: var(
114
- --denhaag-pagination-link-current-disabled-background-color
115
- );
116
- }
117
-
118
- .denhaag-pagination .denhaag-icon {
119
- font-size: inherit;
120
- }
1
+ .denhaag-pagination {
2
+ --denhaag-pagination-align: center;
3
+
4
+ align-items: center;
5
+ display: flex;
6
+ flex-direction: row;
7
+ justify-content: var(--denhaag-pagination-align);
8
+ }
9
+
10
+ @media (min-width: 640px) {
11
+ .denhaag-pagination,
12
+ .denhaag-pagination--start {
13
+ --denhaag-pagination-align: flex-start;
14
+ }
15
+
16
+ .denhaag-pagination--center {
17
+ --denhaag-pagination-align: center;
18
+ }
19
+
20
+ .denhaag-pagination--end {
21
+ --denhaag-pagination-align: end;
22
+ }
23
+ }
24
+
25
+ .denhaag-pagination__links {
26
+ display: flex;
27
+ flex-direction: row;
28
+ }
29
+
30
+ .denhaag-pagination__link {
31
+ aspect-ratio: 1 / 1;
32
+ align-items: center;
33
+ background-color: var(--denhaag-pagination-background-color, transparent);
34
+ border: 0;
35
+ border-radius: var(
36
+ --denhaag-pagination-border-radius,
37
+ var(--denhaag-border-radius)
38
+ );
39
+ color: var(--denhaag-pagination-color, var(--denhaag-pagination-link-color));
40
+ display: flex;
41
+ height: var(--denhaag-pagination-size);
42
+ justify-content: center;
43
+ line-height: 1.5;
44
+ position: relative;
45
+ text-align: center;
46
+ text-decoration: none;
47
+ width: var(--denhaag-pagination-size);
48
+ font-style: normal;
49
+ font-weight: var(--denhaag-pagination-font-weight);
50
+ font-size: var(--denhaag-pagination-font-size);
51
+ }
52
+
53
+ .denhaag-pagination__link:hover,
54
+ .denhaag-pagination__link--hover {
55
+ --denhaag-pagination-color: var(--denhaag-pagination-link-hover-color);
56
+ cursor: pointer;
57
+ }
58
+
59
+ .denhaag-pagination__link:focus,
60
+ .denhaag-pagination__link--focus {
61
+ outline: var(--denhaag-link-focus-outline);
62
+ border-radius: 0;
63
+ }
64
+
65
+ .denhaag-pagination__link:disabled,
66
+ .denhaag-pagination__link--disabled {
67
+ --denhaag-pagination-color: var(--denhaag-pagination-link-disabled-color);
68
+
69
+ pointer-events: none;
70
+ }
71
+
72
+ .denhaag-pagination__link--arrow {
73
+ --denhaag-pagination-size: var(--denhaag-pagination-arrow-size);
74
+ --denhaag-pagination-font-size: var(--denhaag-pagination-arrow-font-size);
75
+ }
76
+
77
+ [dir="rtl"] .denhaag-pagination__link--arrow {
78
+ transform: scaleX(-1);
79
+ }
80
+
81
+ .denhaag-pagination__link + .denhaag-pagination__links,
82
+ .denhaag-pagination__links + .denhaag-pagination__link {
83
+ margin-inline-start: var(--denhaag-pagination-margin-inline, 10px);
84
+ }
85
+
86
+ .denhaag-pagination__link:not(:first-child):not(:last-child):not(.denhaag-pagination__link--current):not([rel]) {
87
+ overflow: hidden;
88
+ pointer-events: none;
89
+ text-indent: calc(var(--denhaag-pagination-size) * 2);
90
+ }
91
+
92
+ .denhaag-pagination__link:not(:first-child):not(:last-child):not(.denhaag-pagination__link--current):not([rel])::before {
93
+ content: "...";
94
+ left: calc(50% - 7px);
95
+ line-height: 0;
96
+ position: absolute;
97
+ text-indent: 0;
98
+ vertical-align: baseline;
99
+ }
100
+
101
+ .denhaag-pagination__link--current {
102
+ --denhaag-pagination-color: var(--denhaag-pagination-link-current-color);
103
+ --denhaag-pagination-font-weight: var(
104
+ --denhaag-pagination-link-current-font-weight
105
+ );
106
+ }
107
+
108
+ .denhaag-pagination__link--current.denhaag-pagination__link:disabled,
109
+ .denhaag-pagination__link--current.denhaag-pagination__link--disabled {
110
+ --denhaag-pagination-color: var(
111
+ --denhaag-pagination-link-current-disabled-color
112
+ );
113
+ --denhaag-pagination-background-color: var(
114
+ --denhaag-pagination-link-current-disabled-background-color
115
+ );
116
+ }
117
+
118
+ .denhaag-pagination .denhaag-icon {
119
+ font-size: inherit;
120
+ }
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import "./Pagination.css";
3
- interface PaginationProps {
4
- pages: number;
5
- currentPage: number;
6
- setPage: (page: number) => any;
7
- }
8
- export declare const Pagination: ({ pages, currentPage, setPage }: PaginationProps) => JSX.Element;
9
- export {};
1
+ /// <reference types="react" />
2
+ import "./Pagination.css";
3
+ interface PaginationProps {
4
+ pages: number;
5
+ currentPage: number;
6
+ setPage: (page: number) => any;
7
+ }
8
+ export declare const Pagination: ({ pages, currentPage, setPage }: PaginationProps) => JSX.Element;
9
+ export {};
@@ -1,15 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import clsx from "clsx";
3
- import "./Pagination.css";
4
- export const Pagination = ({ pages, currentPage, setPage }) => {
5
- return (_jsxs("nav", { className: "denhaag-pagination", children: [_jsx(PreviousButton, { previousPage: currentPage > 1 ? currentPage - 1 : undefined, ...{ setPage } }), _jsx("span", { className: "denhaag-pagination__links", role: "group", children: Array.from({ length: pages }, (_, i) => i + 1).map((page, idx) => (_jsx(Link, { ...{ page }, current: page === currentPage, ...{ setPage } }, idx))) }), _jsx(NextButton, { nextPage: currentPage < pages ? currentPage + 1 : undefined, ...{ setPage } })] }));
6
- };
7
- const Link = ({ page, current, setPage }) => {
8
- return (_jsx("a", { "aria-current": current && "page", "aria-label": `Page ${page}`, className: clsx("denhaag-pagination__link", current && "denhaag-pagination__link--current"), onClick: () => setPage(page), children: page }));
9
- };
10
- const PreviousButton = ({ previousPage, setPage }) => {
11
- return (_jsx("a", { "aria-label": "Previous page", className: clsx("denhaag-pagination__link denhaag-pagination__link--arrow", !previousPage && "denhaag-pagination__link--disabled"), onClick: () => previousPage && setPage(previousPage), rel: "prev", children: _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", height: "1em", viewBox: "0 0 7 12", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M4.9921 10.8143C5.36382 11.1914 5.97222 11.1914 6.34393 10.8143C6.7079 10.4451 6.70822 9.8521 6.34466 9.48248L3.36315 6.45123C2.98039 6.06209 2.98039 5.43791 3.36315 5.04877L6.34466 2.01752C6.70822 1.6479 6.7079 1.05492 6.34394 0.685696C5.97222 0.308599 5.36382 0.308599 4.9921 0.685695L0.692003 5.04799C0.308224 5.43732 0.308224 6.06268 0.692003 6.45201L4.9921 10.8143Z", fill: "currentColor" }) }) }));
12
- };
13
- const NextButton = ({ nextPage, setPage }) => {
14
- return (_jsx("a", { "aria-label": "Next page", className: clsx("denhaag-pagination__link denhaag-pagination__link--arrow", !nextPage && "denhaag-pagination__link--disabled"), onClick: () => nextPage && setPage(nextPage), rel: "next", children: _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", height: "1em", viewBox: "0 0 7 12", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M2.0079 1.1857C1.63618 0.8086 1.02778 0.8086 0.656065 1.18569V1.18569C0.292103 1.55492 0.291779 2.1479 0.655339 2.51752L3.63685 5.54877C4.01961 5.93791 4.01961 6.56209 3.63686 6.95123L0.655339 9.98248C0.291779 10.3521 0.292102 10.9451 0.656065 11.3143V11.3143C1.02778 11.6914 1.63618 11.6914 2.0079 11.3143L6.308 6.95201C6.69178 6.56268 6.69178 5.93732 6.308 5.54799L2.0079 1.1857Z", fill: "currentColor" }) }) }));
15
- };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import "./Pagination.css";
4
+ export const Pagination = ({ pages, currentPage, setPage }) => {
5
+ return (_jsxs("nav", { className: "denhaag-pagination", children: [_jsx(PreviousButton, { previousPage: currentPage > 1 ? currentPage - 1 : undefined, ...{ setPage } }), _jsx("span", { className: "denhaag-pagination__links", role: "group", children: Array.from({ length: pages }, (_, i) => i + 1).map((page, idx) => (_jsx(Link, { ...{ page }, current: page === currentPage, ...{ setPage } }, idx))) }), _jsx(NextButton, { nextPage: currentPage < pages ? currentPage + 1 : undefined, ...{ setPage } })] }));
6
+ };
7
+ const Link = ({ page, current, setPage }) => {
8
+ return (_jsx("a", { "aria-current": current && "page", "aria-label": `Page ${page}`, className: clsx("denhaag-pagination__link", current && "denhaag-pagination__link--current"), onClick: () => setPage(page), children: page }));
9
+ };
10
+ const PreviousButton = ({ previousPage, setPage }) => {
11
+ return (_jsx("a", { "aria-label": "Previous page", className: clsx("denhaag-pagination__link denhaag-pagination__link--arrow", !previousPage && "denhaag-pagination__link--disabled"), onClick: () => previousPage && setPage(previousPage), rel: "prev", children: _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", height: "1em", viewBox: "0 0 7 12", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M4.9921 10.8143C5.36382 11.1914 5.97222 11.1914 6.34393 10.8143C6.7079 10.4451 6.70822 9.8521 6.34466 9.48248L3.36315 6.45123C2.98039 6.06209 2.98039 5.43791 3.36315 5.04877L6.34466 2.01752C6.70822 1.6479 6.7079 1.05492 6.34394 0.685696C5.97222 0.308599 5.36382 0.308599 4.9921 0.685695L0.692003 5.04799C0.308224 5.43732 0.308224 6.06268 0.692003 6.45201L4.9921 10.8143Z", fill: "currentColor" }) }) }));
12
+ };
13
+ const NextButton = ({ nextPage, setPage }) => {
14
+ return (_jsx("a", { "aria-label": "Next page", className: clsx("denhaag-pagination__link denhaag-pagination__link--arrow", !nextPage && "denhaag-pagination__link--disabled"), onClick: () => nextPage && setPage(nextPage), rel: "next", children: _jsx("svg", { "aria-hidden": "true", className: "denhaag-icon", fill: "none", height: "1em", viewBox: "0 0 7 12", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M2.0079 1.1857C1.63618 0.8086 1.02778 0.8086 0.656065 1.18569V1.18569C0.292103 1.55492 0.291779 2.1479 0.655339 2.51752L3.63685 5.54877C4.01961 5.93791 4.01961 6.56209 3.63686 6.95123L0.655339 9.98248C0.291779 10.3521 0.292102 10.9451 0.656065 11.3143V11.3143C1.02778 11.6914 1.63618 11.6914 2.0079 11.3143L6.308 6.95201C6.69178 6.56268 6.69178 5.93732 6.308 5.54799L2.0079 1.1857Z", fill: "currentColor" }) }) }));
15
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import { IconPrefix, IconName } from "@fortawesome/fontawesome-svg-core";
3
+ interface DisplaySwitchProps {
4
+ buttons: DisplaySwitchButtonProps[];
5
+ layoutClassName?: string;
6
+ }
7
+ interface DisplaySwitchButtonProps {
8
+ label: string;
9
+ pressed: boolean;
10
+ handleClick: () => any;
11
+ icon?: {
12
+ name: IconName;
13
+ prefix: IconPrefix;
14
+ };
15
+ }
16
+ export declare type IDisplaySwitchButton = DisplaySwitchButtonProps;
17
+ declare const DisplaySwitch: React.FC<DisplaySwitchProps>;
18
+ export default DisplaySwitch;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as styles from "./DisplaySwitch.module.css";
3
+ import clsx from "clsx";
4
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5
+ import { Button, ButtonGroup } from "@utrecht/component-library-react/dist/css-module";
6
+ const DisplaySwitch = ({ layoutClassName, buttons }) => {
7
+ return (_jsx(ButtonGroup, { className: clsx(styles.displaySwitchButtons, [layoutClassName] && layoutClassName), children: buttons.map((button, idx) => {
8
+ // TODO: Once the Rotterdam design system supports the "pressed" state,
9
+ // remove the `appereance` switch, and use the same appearance for each button.
10
+ return (_jsxs(Button, { pressed: button.pressed, appearance: button.pressed ? "secondary-action-button" : "subtle-button", onClick: button.handleClick, children: [button.icon && _jsx(FontAwesomeIcon, { icon: [button.icon.prefix, button.icon.name] }), _jsx("span", { children: button.label })] }, idx));
11
+ }) }));
12
+ };
13
+ export default DisplaySwitch;
@@ -0,0 +1,3 @@
1
+ .displaySwitchButtons {
2
+ align-items: center;
3
+ }
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- interface InputTypes {
3
- inputType: "text" | "email";
4
- }
5
- interface EditableTableRowProps {
6
- thead: string;
7
- value: string;
8
- saveLabel: string;
9
- cancelLabel: string;
10
- editLabel: string;
11
- handleSave: (value: any) => void;
12
- }
13
- export declare const EditableTableRow: ({ thead, value, inputType, editLabel, cancelLabel, saveLabel, handleSave, }: EditableTableRowProps & InputTypes) => JSX.Element;
14
- export {};
1
+ /// <reference types="react" />
2
+ interface InputTypes {
3
+ inputType: "text" | "email";
4
+ }
5
+ interface EditableTableRowProps {
6
+ thead: string;
7
+ value: string;
8
+ saveLabel: string;
9
+ cancelLabel: string;
10
+ editLabel: string;
11
+ handleSave: (value: any) => void;
12
+ }
13
+ export declare const EditableTableRow: ({ thead, value, inputType, editLabel, cancelLabel, saveLabel, handleSave, }: EditableTableRowProps & InputTypes) => JSX.Element;
14
+ export {};
@@ -1,31 +1,31 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
3
- import * as styles from "./EditableTableRow.module.css";
4
- import * as React from "react";
5
- import { Link } from "@gemeente-denhaag/link";
6
- import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
7
- import { useForm } from "react-hook-form";
8
- import { InputEmail, InputText } from "../formFields";
9
- export const EditableTableRow = ({ thead, value, inputType, editLabel, cancelLabel, saveLabel, handleSave, }) => {
10
- const [editing, setEditing] = React.useState(false);
11
- return (_jsxs(TableRow, { children: [_jsx(TableHeader, { className: styles.th, children: thead }), editing && _jsx(EditingTableRow, { ...{ value, inputType, handleSave, setEditing, saveLabel, cancelLabel } }), !editing && _jsx(RegularTableRow, { ...{ value, setEditing, editLabel } })] }));
12
- };
13
- const RegularTableRow = ({ value, editLabel, setEditing }) => {
14
- return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: value }), _jsx(TableCell, { children: _jsx("div", { className: styles.editButton, onClick: () => setEditing(true), children: _jsx(Link, { icon: _jsx(EditIcon, {}), iconAlign: "start", children: editLabel }) }) })] }));
15
- };
16
- const EditingTableRow = ({ value, setEditing, handleSave, inputType, saveLabel, cancelLabel, }) => {
17
- const { register, handleSubmit, formState: { errors }, } = useForm();
18
- const onSubmit = (data) => {
19
- handleSave(data.value);
20
- setEditing(false);
21
- };
22
- return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: _jsxs("form", { onSubmit: handleSubmit(onSubmit), children: [_jsx(FormField, { ...{ inputType, value, register, errors } }), _jsxs("div", { className: styles.editButtonsContainer, children: [_jsx("button", { type: "submit", className: styles.submit, children: _jsx(Link, { icon: _jsx(CheckedIcon, {}), iconAlign: "start", children: saveLabel }) }), _jsx("div", { onClick: () => setEditing(false), children: _jsx(Link, { icon: _jsx(CloseIcon, {}), iconAlign: "start", className: styles.cancel, children: cancelLabel }) })] })] }) }), _jsx(TableCell, {})] }));
23
- };
24
- const FormField = ({ inputType, value, register, errors }) => {
25
- switch (inputType) {
26
- case "email":
27
- return _jsx(InputEmail, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
28
- case "text":
29
- return _jsx(InputText, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
30
- }
31
- };
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { TableCell, TableHeader, TableRow } from "@gemeente-denhaag/table";
3
+ import * as styles from "./EditableTableRow.module.css";
4
+ import * as React from "react";
5
+ import { Link } from "@gemeente-denhaag/link";
6
+ import { CheckedIcon, CloseIcon, EditIcon } from "@gemeente-denhaag/icons";
7
+ import { useForm } from "react-hook-form";
8
+ import { InputEmail, InputText } from "../formFields";
9
+ export const EditableTableRow = ({ thead, value, inputType, editLabel, cancelLabel, saveLabel, handleSave, }) => {
10
+ const [editing, setEditing] = React.useState(false);
11
+ return (_jsxs(TableRow, { children: [_jsx(TableHeader, { className: styles.th, children: thead }), editing && _jsx(EditingTableRow, { ...{ value, inputType, handleSave, setEditing, saveLabel, cancelLabel } }), !editing && _jsx(RegularTableRow, { ...{ value, setEditing, editLabel } })] }));
12
+ };
13
+ const RegularTableRow = ({ value, editLabel, setEditing }) => {
14
+ return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: value }), _jsx(TableCell, { children: _jsx("div", { className: styles.editButton, onClick: () => setEditing(true), children: _jsx(Link, { icon: _jsx(EditIcon, {}), iconAlign: "start", children: editLabel }) }) })] }));
15
+ };
16
+ const EditingTableRow = ({ value, setEditing, handleSave, inputType, saveLabel, cancelLabel, }) => {
17
+ const { register, handleSubmit, formState: { errors }, } = useForm();
18
+ const onSubmit = (data) => {
19
+ handleSave(data.value);
20
+ setEditing(false);
21
+ };
22
+ return (_jsxs(_Fragment, { children: [_jsx(TableCell, { children: _jsxs("form", { onSubmit: handleSubmit(onSubmit), children: [_jsx(FormField, { ...{ inputType, value, register, errors } }), _jsxs("div", { className: styles.editButtonsContainer, children: [_jsx("button", { type: "submit", className: styles.submit, children: _jsx(Link, { icon: _jsx(CheckedIcon, {}), iconAlign: "start", children: saveLabel }) }), _jsx("div", { onClick: () => setEditing(false), children: _jsx(Link, { icon: _jsx(CloseIcon, {}), iconAlign: "start", className: styles.cancel, children: cancelLabel }) })] })] }) }), _jsx(TableCell, {})] }));
23
+ };
24
+ const FormField = ({ inputType, value, register, errors }) => {
25
+ switch (inputType) {
26
+ case "email":
27
+ return _jsx(InputEmail, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
28
+ case "text":
29
+ return _jsx(InputText, { defaultValue: value, ...{ register, errors }, name: "value", validation: { required: true } });
30
+ }
31
+ };
@@ -1,25 +1,25 @@
1
- .th {
2
- width: 35%;
3
- }
4
-
5
- .cancel {
6
- color: var(--skeleton-color-grey-3) !important;
7
- }
8
-
9
- .editButtonsContainer {
10
- display: flex;
11
- margin-block-start: var(--skeleton-size-xs);
12
- }
13
-
14
- .editButtonsContainer > *:not(:last-child) {
15
- margin-inline-end: var(--skeleton-size-md);
16
- }
17
-
18
- .submit {
19
- all: unset;
20
- }
21
-
22
- .editButton {
23
- display: flex;
24
- justify-content: flex-end;
25
- }
1
+ .th {
2
+ width: 35%;
3
+ }
4
+
5
+ .cancel {
6
+ color: var(--skeleton-color-grey-3) !important;
7
+ }
8
+
9
+ .editButtonsContainer {
10
+ display: flex;
11
+ margin-block-start: var(--skeleton-size-xs);
12
+ }
13
+
14
+ .editButtonsContainer > *:not(:last-child) {
15
+ margin-inline-end: var(--skeleton-size-md);
16
+ }
17
+
18
+ .submit {
19
+ all: unset;
20
+ }
21
+
22
+ .editButton {
23
+ display: flex;
24
+ justify-content: flex-end;
25
+ }
@@ -1,7 +1,7 @@
1
- .container {
2
- user-select: none;
3
- }
4
-
5
- .container:hover {
6
- cursor: pointer;
7
- }
1
+ .container {
2
+ user-select: none;
3
+ }
4
+
5
+ .container:hover {
6
+ cursor: pointer;
7
+ }
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import { IReactHookFormProps } from "./../types";
3
- export interface ICheckboxProps {
4
- label: string;
5
- name: string;
6
- defaultChecked?: boolean;
7
- disabled?: boolean;
8
- }
9
- export declare const InputCheckbox: ({ name, validation, register, label, defaultChecked, disabled, }: ICheckboxProps & IReactHookFormProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { IReactHookFormProps } from "./../types";
3
+ export interface ICheckboxProps {
4
+ label: string;
5
+ name: string;
6
+ defaultChecked?: boolean;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const InputCheckbox: ({ name, validation, register, label, defaultChecked, disabled, }: ICheckboxProps & IReactHookFormProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as styles from "./Checkbox.module.css";
3
- export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsxs("div", { className: styles.container, children: [_jsx("input", { type: "checkbox", id: `checkbox${name}`, ...{ defaultChecked, disabled }, ...register(name, { ...validation }) }), _jsx("label", { htmlFor: `checkbox${name}`, children: label })] }));
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as styles from "./Checkbox.module.css";
3
+ export const InputCheckbox = ({ name, validation, register, label, defaultChecked, disabled, }) => (_jsxs("div", { className: styles.container, children: [_jsx("input", { type: "checkbox", id: `checkbox${name}`, ...{ defaultChecked, disabled }, ...register(name, { ...validation }) }), _jsx("label", { htmlFor: `checkbox${name}`, children: label })] }));
@@ -1,23 +1,23 @@
1
- /// <reference types="react" />
2
- import { Control, FieldValues } from "react-hook-form";
3
- import { IReactHookFormProps } from "../types";
4
- /**
5
- * Export KeyValue input component (wrapped in FormFieldGroup)
6
- */
7
- interface CreateKeyValueProps {
8
- name: string;
9
- control: Control<FieldValues, any>;
10
- defaultValue?: IKeyValue[];
11
- disabled?: boolean;
12
- copyValue?: {
13
- canCopy: boolean;
14
- onCopied?: () => any;
15
- };
16
- hideErrorMessage?: boolean;
17
- }
18
- export interface IKeyValue {
19
- key: string;
20
- value: string;
21
- }
22
- export declare const CreateKeyValue: ({ name, errors, control, validation, defaultValue, disabled, copyValue, hideErrorMessage, }: CreateKeyValueProps & IReactHookFormProps) => JSX.Element;
23
- export {};
1
+ /// <reference types="react" />
2
+ import { Control, FieldValues } from "react-hook-form";
3
+ import { IReactHookFormProps } from "../types";
4
+ /**
5
+ * Export KeyValue input component (wrapped in FormFieldGroup)
6
+ */
7
+ interface CreateKeyValueProps {
8
+ name: string;
9
+ control: Control<FieldValues, any>;
10
+ defaultValue?: IKeyValue[];
11
+ disabled?: boolean;
12
+ copyValue?: {
13
+ canCopy: boolean;
14
+ onCopied?: () => any;
15
+ };
16
+ hideErrorMessage?: boolean;
17
+ }
18
+ export interface IKeyValue {
19
+ key: string;
20
+ value: string;
21
+ }
22
+ export declare const CreateKeyValue: ({ name, errors, control, validation, defaultValue, disabled, copyValue, hideErrorMessage, }: CreateKeyValueProps & IReactHookFormProps) => JSX.Element;
23
+ export {};