@utrecht/component-library-react 1.0.0-alpha.16 → 1.0.0-alpha.161

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 (127) hide show
  1. package/README.md +26 -2
  2. package/dist/{cjs/Article.d.ts → Article.d.ts} +9 -7
  3. package/dist/{cjs/Backdrop.d.ts → Backdrop.d.ts} +9 -7
  4. package/dist/Button.d.ts +27 -0
  5. package/dist/ButtonGroup.d.ts +10 -0
  6. package/dist/ButtonLink.d.ts +14 -0
  7. package/dist/Calendar/CalendarButton.d.ts +5 -0
  8. package/dist/Calendar/CalendarIcon.d.ts +5 -0
  9. package/dist/Calendar/CalendarNavigation.d.ts +5 -0
  10. package/dist/Calendar/CalendarNavigationButtons.d.ts +13 -0
  11. package/dist/Calendar/CalendarNavigationLabel.d.ts +6 -0
  12. package/dist/Calendar/CalendarTableDaysContainer.d.ts +5 -0
  13. package/dist/Calendar/CalendarTableDaysItem.d.ts +5 -0
  14. package/dist/Calendar/CalendarTableDaysItemDay.d.ts +11 -0
  15. package/dist/Calendar/CalendarTableWeeksContainer.d.ts +4 -0
  16. package/dist/Calendar/CalendarTableWeeksItem.d.ts +5 -0
  17. package/dist/Calendar/IconArrowLeft.d.ts +7 -0
  18. package/dist/Calendar/IconArrowLeftDouble.d.ts +7 -0
  19. package/dist/Calendar/IconArrowRight.d.ts +7 -0
  20. package/dist/Calendar/IconArrowRightDouble.d.ts +7 -0
  21. package/dist/Calendar/index.d.ts +41 -0
  22. package/dist/{cjs/Checkbox.d.ts → Checkbox.d.ts} +5 -5
  23. package/dist/CustomRadioButton.d.ts +13 -0
  24. package/dist/DataList.d.ts +28 -0
  25. package/dist/{cjs/Document.d.ts → Document.d.ts} +9 -7
  26. package/dist/Emphasis.d.ts +10 -0
  27. package/dist/{cjs/Fieldset.d.ts → Fieldset.d.ts} +5 -3
  28. package/dist/{cjs/FieldsetLegend.d.ts → FieldsetLegend.d.ts} +5 -3
  29. package/dist/Figure.d.ts +5 -0
  30. package/dist/FigureCaption.d.ts +5 -0
  31. package/dist/{cjs/FormField.d.ts → FormField.d.ts} +5 -3
  32. package/dist/{cjs/FormFieldDescription.d.ts → FormFieldDescription.d.ts} +9 -7
  33. package/dist/{cjs/FormLabel.d.ts → FormLabel.d.ts} +10 -8
  34. package/dist/{cjs/HTMLContent.d.ts → HTMLContent.d.ts} +9 -7
  35. package/dist/Heading.d.ts +11 -0
  36. package/dist/{cjs/Heading1.d.ts → Heading1.d.ts} +9 -7
  37. package/dist/{cjs/Heading2.d.ts → Heading2.d.ts} +9 -7
  38. package/dist/{cjs/Heading3.d.ts → Heading3.d.ts} +9 -7
  39. package/dist/{cjs/Heading4.d.ts → Heading4.d.ts} +9 -7
  40. package/dist/{cjs/Heading5.d.ts → Heading5.d.ts} +9 -7
  41. package/dist/{cjs/Heading6.d.ts → Heading6.d.ts} +9 -7
  42. package/dist/HeadingGroup.d.ts +9 -0
  43. package/dist/Image.d.ts +9 -0
  44. package/dist/Link.d.ts +14 -0
  45. package/dist/LinkButton.d.ts +12 -0
  46. package/dist/LinkSocial.d.ts +12 -0
  47. package/dist/ListSocial.d.ts +13 -0
  48. package/dist/NumberValue.d.ts +11 -0
  49. package/dist/{cjs/OrderedList.d.ts → OrderedList.d.ts} +9 -7
  50. package/dist/{cjs/OrderedListItem.d.ts → OrderedListItem.d.ts} +9 -7
  51. package/dist/{cjs/Page.d.ts → Page.d.ts} +9 -7
  52. package/dist/{cjs/PageContent.d.ts → PageContent.d.ts} +13 -9
  53. package/dist/{cjs/PageFooter.d.ts → PageFooter.d.ts} +9 -7
  54. package/dist/{cjs/PageHeader.d.ts → PageHeader.d.ts} +9 -7
  55. package/dist/{cjs/Paragraph.d.ts → Paragraph.d.ts} +12 -9
  56. package/dist/PreHeading.d.ts +9 -0
  57. package/dist/{cjs/RadioButton.d.ts → RadioButton.d.ts} +5 -5
  58. package/dist/{cjs/Select.d.ts → Select.d.ts} +19 -11
  59. package/dist/{cjs/Separator.d.ts → Separator.d.ts} +7 -7
  60. package/dist/SkipLink.d.ts +5 -0
  61. package/dist/Strong.d.ts +10 -0
  62. package/dist/{cjs/Surface.d.ts → Surface.d.ts} +9 -7
  63. package/dist/{cjs/Table.d.ts → Table.d.ts} +9 -7
  64. package/dist/{cjs/TableBody.d.ts → TableBody.d.ts} +9 -7
  65. package/dist/{cjs/TableCaption.d.ts → TableCaption.d.ts} +9 -7
  66. package/dist/{cjs/TableCell.d.ts → TableCell.d.ts} +9 -7
  67. package/dist/{cjs/TableFooter.d.ts → TableFooter.d.ts} +9 -7
  68. package/dist/{cjs/TableHeader.d.ts → TableHeader.d.ts} +9 -7
  69. package/dist/{cjs/TableHeaderCell.d.ts → TableHeaderCell.d.ts} +9 -7
  70. package/dist/{cjs/TableRow.d.ts → TableRow.d.ts} +9 -7
  71. package/dist/{cjs/Textarea.d.ts → Textarea.d.ts} +5 -5
  72. package/dist/{cjs/Textbox.d.ts → Textbox.d.ts} +7 -7
  73. package/dist/{cjs/URLValue.d.ts → URLValue.d.ts} +9 -7
  74. package/dist/{cjs/UnorderedList.d.ts → UnorderedList.d.ts} +9 -7
  75. package/dist/{cjs/UnorderedListItem.d.ts → UnorderedListItem.d.ts} +9 -7
  76. package/dist/index.cjs.js +1551 -0
  77. package/dist/index.cjs.js.map +1 -0
  78. package/dist/{cjs/index.d.ts → index.d.ts} +64 -46
  79. package/dist/index.esm.js +1474 -0
  80. package/dist/index.esm.js.map +1 -0
  81. package/package.json +44 -192
  82. package/dist/cjs/Article.js +0 -29
  83. package/dist/cjs/Backdrop.js +0 -29
  84. package/dist/cjs/Button.d.ts +0 -5
  85. package/dist/cjs/Button.js +0 -25
  86. package/dist/cjs/Checkbox.js +0 -25
  87. package/dist/cjs/Document.js +0 -29
  88. package/dist/cjs/Fieldset.js +0 -25
  89. package/dist/cjs/FieldsetLegend.js +0 -25
  90. package/dist/cjs/FormField.js +0 -25
  91. package/dist/cjs/FormFieldDescription.js +0 -25
  92. package/dist/cjs/FormLabel.js +0 -25
  93. package/dist/cjs/HTMLContent.js +0 -29
  94. package/dist/cjs/Heading1.js +0 -29
  95. package/dist/cjs/Heading2.js +0 -29
  96. package/dist/cjs/Heading3.js +0 -29
  97. package/dist/cjs/Heading4.js +0 -29
  98. package/dist/cjs/Heading5.js +0 -29
  99. package/dist/cjs/Heading6.js +0 -29
  100. package/dist/cjs/Link.d.ts +0 -15
  101. package/dist/cjs/Link.js +0 -42
  102. package/dist/cjs/OrderedList.js +0 -29
  103. package/dist/cjs/OrderedListItem.js +0 -29
  104. package/dist/cjs/Page.js +0 -29
  105. package/dist/cjs/PageContent.js +0 -34
  106. package/dist/cjs/PageFooter.js +0 -29
  107. package/dist/cjs/PageHeader.js +0 -29
  108. package/dist/cjs/Paragraph.js +0 -29
  109. package/dist/cjs/RadioButton.js +0 -25
  110. package/dist/cjs/Select.js +0 -31
  111. package/dist/cjs/Separator.js +0 -30
  112. package/dist/cjs/Surface.js +0 -29
  113. package/dist/cjs/Table.js +0 -29
  114. package/dist/cjs/TableBody.js +0 -29
  115. package/dist/cjs/TableCaption.js +0 -29
  116. package/dist/cjs/TableCell.js +0 -29
  117. package/dist/cjs/TableFooter.js +0 -29
  118. package/dist/cjs/TableHeader.js +0 -29
  119. package/dist/cjs/TableHeaderCell.js +0 -29
  120. package/dist/cjs/TableRow.js +0 -29
  121. package/dist/cjs/Textarea.js +0 -25
  122. package/dist/cjs/Textbox.js +0 -25
  123. package/dist/cjs/URLValue.js +0 -29
  124. package/dist/cjs/UnorderedList.js +0 -29
  125. package/dist/cjs/UnorderedListItem.js +0 -29
  126. package/dist/cjs/index.js +0 -92
  127. package/dist/cjs/tsconfig.tsbuildinfo +0 -2533
@@ -0,0 +1,1474 @@
1
+ import { __rest } from 'tslib';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import clsx, { clsx as clsx$1 } from 'clsx';
4
+ import { forwardRef, useState } from 'react';
5
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
+ import { eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfDay, parseISO, setYear, getYear, addYears, setMonth, addMonths, format, isSameMonth, setDate, formatISO, startOfMonth, addWeeks } from 'date-fns';
7
+ import { enUS } from 'date-fns/locale';
8
+ import { chunk, toNumber } from 'lodash';
9
+
10
+ var Article = /*#__PURE__*/forwardRef(function (_a, ref) {
11
+ var children = _a.children,
12
+ className = _a.className,
13
+ restProps = __rest(_a, ["children", "className"]);
14
+
15
+ return jsx("article", Object.assign({}, restProps, {
16
+ ref: ref,
17
+ className: clsx('utrecht-article', className)
18
+ }, {
19
+ children: children
20
+ }));
21
+ });
22
+ Article.displayName = 'Article';
23
+
24
+ var Backdrop = /*#__PURE__*/forwardRef(function (_a, ref) {
25
+ var children = _a.children,
26
+ className = _a.className,
27
+ restProps = __rest(_a, ["children", "className"]);
28
+
29
+ return jsx("div", Object.assign({}, restProps, {
30
+ ref: ref,
31
+ className: clsx('utrecht-backdrop', className)
32
+ }, {
33
+ children: children
34
+ }));
35
+ });
36
+ Backdrop.displayName = 'Backdrop';
37
+
38
+ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
39
+ var appearance = _a.appearance,
40
+ busy = _a.busy,
41
+ disabled = _a.disabled,
42
+ children = _a.children,
43
+ className = _a.className,
44
+ hint = _a.hint,
45
+ type = _a.type,
46
+ restProps = __rest(_a, ["appearance", "busy", "disabled", "children", "className", "hint", "type"]);
47
+
48
+ return jsx("button", Object.assign({}, restProps, {
49
+ ref: ref,
50
+ className: clsx('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', appearance === 'primary-action-button' && 'utrecht-button--primary-action', appearance === 'secondary-action-button' && 'utrecht-button--secondary-action', appearance === 'subtle-button' && 'utrecht-button--subtle', hint === 'danger' && 'utrecht-button--danger', hint === 'warning' && 'utrecht-button--warning', hint === 'ready' && 'utrecht-button--ready', className),
51
+ "aria-busy": busy || undefined,
52
+ disabled: disabled,
53
+ type: type || 'button'
54
+ }, {
55
+ children: children
56
+ }));
57
+ });
58
+ Button.displayName = 'Button';
59
+ var PrimaryActionButton = function PrimaryActionButton(_a) {
60
+ var args = __rest(_a, []);
61
+
62
+ return jsx(Button, Object.assign({}, args, {
63
+ appearance: "primary-action-button"
64
+ }));
65
+ };
66
+ PrimaryActionButton.displayName = 'PrimaryActionButton';
67
+ var SecondaryActionButton = function SecondaryActionButton(_a) {
68
+ var args = __rest(_a, []);
69
+
70
+ return jsx(Button, Object.assign({}, args, {
71
+ appearance: "secondary-action-button"
72
+ }));
73
+ };
74
+ SecondaryActionButton.displayName = 'SecondaryActionButton';
75
+ var SubtleButton = function SubtleButton(_a) {
76
+ var args = __rest(_a, []);
77
+
78
+ return jsx(Button, Object.assign({}, args, {
79
+ appearance: "subtle-button"
80
+ }));
81
+ };
82
+ SubtleButton.displayName = 'SubtleButton';
83
+
84
+ var ButtonGroup = /*#__PURE__*/forwardRef(function (_a, ref) {
85
+ var children = _a.children,
86
+ className = _a.className,
87
+ restProps = __rest(_a, ["children", "className"]);
88
+
89
+ return jsx("p", Object.assign({}, restProps, {
90
+ ref: ref,
91
+ className: clsx('utrecht-button-group', className)
92
+ }, {
93
+ children: children
94
+ }));
95
+ });
96
+ ButtonGroup.displayName = 'ButtonGroup';
97
+
98
+ var onKeyDown = function onKeyDown(evt) {
99
+ var _a;
100
+
101
+ if (evt.key === ' ' && typeof ((_a = evt.target) === null || _a === void 0 ? void 0 : _a.click) === 'function') {
102
+ // Prevent other side-effects, such as scrolling
103
+ evt.preventDefault(); // Navigate to the link target
104
+
105
+ evt.target.click();
106
+ }
107
+ };
108
+
109
+ var ButtonLink = /*#__PURE__*/forwardRef(function (_a, ref) {
110
+ var appearance = _a.appearance,
111
+ children = _a.children,
112
+ className = _a.className,
113
+ external = _a.external,
114
+ href = _a.href,
115
+ placeholder = _a.placeholder,
116
+ role = _a.role,
117
+ restProps = __rest(_a, ["appearance", "children", "className", "external", "href", "placeholder", "role"]);
118
+
119
+ var props = restProps;
120
+
121
+ if (role === 'button') {
122
+ // When this link is announced as button by accessibility tools,
123
+ // it should also behave like a button. Links are not activated
124
+ // using `Space`, so we need to implement that behaviour here
125
+ // to reach parity with the `button` element.
126
+ props = Object.assign(Object.assign({}, restProps), {
127
+ onKeyDown: onKeyDown
128
+ });
129
+ }
130
+
131
+ return jsx("a", Object.assign({
132
+ href: placeholder ? undefined : href,
133
+ ref: ref,
134
+ role: role || (placeholder ? 'link' : undefined),
135
+ className: clsx('utrecht-button-link', 'utrecht-button-link--html-a', {
136
+ 'utrecht-button-link--external': external,
137
+ 'utrecht-button-link--primary-action': appearance === 'primary-action-button',
138
+ 'utrecht-button-link--secondary-action': appearance === 'secondary-action-button',
139
+ 'utrecht-button-link--subtle': appearance === 'subtle-button',
140
+ 'utrecht-button-link--placeholder': placeholder
141
+ }, className),
142
+ rel: external ? 'external noopener noreferrer' : undefined,
143
+ "aria-disabled": placeholder ? 'true' : undefined
144
+ }, props, {
145
+ children: children
146
+ }));
147
+ });
148
+ ButtonLink.displayName = 'ButtonLink';
149
+
150
+ var CalendarNavigation = function CalendarNavigation(_a) {
151
+ var children = _a.children,
152
+ props = __rest(_a, ["children"]);
153
+
154
+ return jsx("div", Object.assign({
155
+ className: "utrecht-calendar__navigation"
156
+ }, props, {
157
+ children: children
158
+ }));
159
+ };
160
+
161
+ var CalendarButton = function CalendarButton(_a) {
162
+ var children = _a.children,
163
+ className = _a.className,
164
+ props = __rest(_a, ["children", "className"]);
165
+
166
+ return jsx(Button, Object.assign({
167
+ appearance: "subtle-button"
168
+ }, props, {
169
+ className: clsx$1('utrecht-calendar__button', className)
170
+ }, {
171
+ children: children
172
+ }));
173
+ };
174
+
175
+ var CalendarIcon = function CalendarIcon(_a) {
176
+ var children = _a.children,
177
+ props = __rest(_a, ["children"]);
178
+
179
+ return jsx("div", Object.assign({
180
+ className: clsx$1('utrecht-calendar__icon')
181
+ }, props, {
182
+ children: children
183
+ }));
184
+ };
185
+
186
+ var CalendarNavigationButtons = function CalendarNavigationButtons(_a) {
187
+ var onPreviousClick = _a.onPreviousClick,
188
+ onNextClick = _a.onNextClick,
189
+ previousIcon = _a.previousIcon,
190
+ nextIcon = _a.nextIcon,
191
+ children = _a.children,
192
+ props = __rest(_a, ["onPreviousClick", "onNextClick", "previousIcon", "nextIcon", "children"]);
193
+
194
+ return jsxs("div", Object.assign({
195
+ className: "utrecht-calendar__navigation-buttons"
196
+ }, {
197
+ children: [jsx(CalendarButton, Object.assign({
198
+ onClick: onPreviousClick
199
+ }, props, {
200
+ children: jsx(CalendarIcon, {
201
+ children: previousIcon
202
+ })
203
+ })), children, jsx(CalendarButton, Object.assign({
204
+ onClick: onNextClick
205
+ }, props, {
206
+ children: jsx(CalendarIcon, {
207
+ children: nextIcon
208
+ })
209
+ }))]
210
+ }));
211
+ };
212
+
213
+ var Heading2 = /*#__PURE__*/forwardRef(function (_a, ref) {
214
+ var children = _a.children,
215
+ className = _a.className,
216
+ restProps = __rest(_a, ["children", "className"]);
217
+
218
+ return jsx("h2", Object.assign({}, restProps, {
219
+ ref: ref,
220
+ className: clsx('utrecht-heading-2', className)
221
+ }, {
222
+ children: children
223
+ }));
224
+ });
225
+ Heading2.displayName = 'Heading2';
226
+
227
+ var CalendarNavigationLabel = function CalendarNavigationLabel(_ref) {
228
+ var label = _ref.label;
229
+ return jsx(Heading2, Object.assign({
230
+ className: "utrecht-calendar__navigation-label"
231
+ }, {
232
+ children: label
233
+ }));
234
+ };
235
+
236
+ var CalendarTableDaysContainer = function CalendarTableDaysContainer(_a) {
237
+ var children = _a.children,
238
+ props = __rest(_a, ["children"]);
239
+
240
+ return jsx("tbody", Object.assign({}, props, {
241
+ className: "utrecht-calendar__table-days-container"
242
+ }, {
243
+ children: children
244
+ }));
245
+ };
246
+
247
+ var CalendarTableDaysItem = function CalendarTableDaysItem(_a) {
248
+ var children = _a.children,
249
+ props = __rest(_a, ["children"]);
250
+
251
+ return jsx("tr", Object.assign({}, props, {
252
+ children: children
253
+ }));
254
+ };
255
+
256
+ var CalendarTableDaysItemDay = function CalendarTableDaysItemDay(_a) {
257
+ var day = _a.day,
258
+ dayOutOfTheMonth = _a.dayOutOfTheMonth,
259
+ isToday = _a.isToday,
260
+ emphasis = _a.emphasis,
261
+ selected = _a.selected,
262
+ disabled = _a.disabled,
263
+ props = __rest(_a, ["day", "dayOutOfTheMonth", "isToday", "emphasis", "selected", "disabled"]);
264
+
265
+ return jsx("td", {
266
+ children: jsx(CalendarButton, Object.assign({
267
+ className: clsx('utrecht-calendar__table-days-item-day', {
268
+ 'utrecht-calendar__table-days-item-day--out-of-the-month': dayOutOfTheMonth
269
+ }, {
270
+ 'utrecht-calendar__table-days-item-day--is-today': isToday
271
+ }, {
272
+ 'utrecht-calendar__table-days-item-day--emphasis': emphasis
273
+ }, {
274
+ 'utrecht-calendar__table-days-item-day--selected': selected
275
+ }),
276
+ disabled: disabled
277
+ }, props, {
278
+ children: day
279
+ }))
280
+ });
281
+ };
282
+
283
+ var CalendarTableWeeksContainer = function CalendarTableWeeksContainer(_ref) {
284
+ var children = _ref.children;
285
+ return jsx("thead", Object.assign({
286
+ className: "utrecht-calendar__table-weeks-container"
287
+ }, {
288
+ children: jsx("tr", Object.assign({
289
+ className: "utrecht-calendar__table-weeks-container-content"
290
+ }, {
291
+ children: children
292
+ }))
293
+ }));
294
+ };
295
+
296
+ var CalendarTableWeeksItem = function CalendarTableWeeksItem(_a) {
297
+ var children = _a.children,
298
+ props = __rest(_a, ["children"]);
299
+
300
+ return jsx("th", Object.assign({}, props, {
301
+ className: "utrecht-calendar__table-weeks-item"
302
+ }, {
303
+ children: children
304
+ }));
305
+ };
306
+
307
+ var IconArrowLeft = function IconArrowLeft(_a) {
308
+ var title = _a.title,
309
+ titleId = _a.titleId,
310
+ props = __rest(_a, ["title", "titleId"]);
311
+
312
+ return jsxs("svg", Object.assign({
313
+ width: "100%",
314
+ height: "100%",
315
+ fill: "none",
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ "aria-labelledby": titleId
318
+ }, props, {
319
+ children: [title ? jsx("title", Object.assign({
320
+ id: titleId
321
+ }, {
322
+ children: title
323
+ })) : null, jsx("path", {
324
+ d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z",
325
+ fill: "currentColor"
326
+ })]
327
+ }));
328
+ };
329
+
330
+ var IconArrowLeftDouble = function IconArrowLeftDouble(_a) {
331
+ var title = _a.title,
332
+ titleId = _a.titleId,
333
+ props = __rest(_a, ["title", "titleId"]);
334
+
335
+ return jsxs("svg", Object.assign({
336
+ width: "100%",
337
+ height: "100%",
338
+ fill: "none",
339
+ xmlns: "http://www.w3.org/2000/svg",
340
+ "aria-labelledby": titleId
341
+ }, props, {
342
+ children: [title ? jsx("title", Object.assign({
343
+ id: titleId
344
+ }, {
345
+ children: title
346
+ })) : null, jsx("path", {
347
+ d: "M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6 6 6Z",
348
+ fill: "currentColor"
349
+ }), jsx("path", {
350
+ d: "m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6 6 6Z",
351
+ fill: "currentColor"
352
+ })]
353
+ }));
354
+ };
355
+
356
+ var IconArrowRight = function IconArrowRight(_a) {
357
+ var title = _a.title,
358
+ titleId = _a.titleId,
359
+ props = __rest(_a, ["title", "titleId"]);
360
+
361
+ return jsxs("svg", Object.assign({
362
+ width: "100%",
363
+ height: "100%",
364
+ fill: "none",
365
+ xmlns: "http://www.w3.org/2000/svg",
366
+ "aria-labelledby": titleId
367
+ }, props, {
368
+ children: [title ? jsx("title", Object.assign({
369
+ id: titleId
370
+ }, {
371
+ children: title
372
+ })) : null, jsx("path", {
373
+ d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z",
374
+ fill: "currentColor"
375
+ })]
376
+ }));
377
+ };
378
+
379
+ var IconArrowRightDouble = function IconArrowRightDouble(_a) {
380
+ var title = _a.title,
381
+ titleId = _a.titleId,
382
+ props = __rest(_a, ["title", "titleId"]);
383
+
384
+ return jsxs("svg", Object.assign({
385
+ fill: "none",
386
+ width: "100%",
387
+ height: "100%",
388
+ xmlns: "http://www.w3.org/2000/svg",
389
+ "aria-labelledby": titleId
390
+ }, props, {
391
+ children: [title ? jsx("title", Object.assign({
392
+ id: titleId
393
+ }, {
394
+ children: title
395
+ })) : null, jsx("path", {
396
+ d: "M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6-6-6Z",
397
+ fill: "currentColor"
398
+ }), jsx("path", {
399
+ d: "m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6-6-6Z",
400
+ fill: "currentColor"
401
+ })]
402
+ }));
403
+ };
404
+
405
+ function createCalendar(today) {
406
+ var start = startOfWeek(startOfMonth(today), {
407
+ weekStartsOn: 1
408
+ /* Monday */
409
+
410
+ });
411
+ var end = endOfWeek(addWeeks(start, 5), {
412
+ weekStartsOn: 1
413
+ /* Monday */
414
+
415
+ });
416
+ return eachDayOfInterval({
417
+ start: start,
418
+ end: end
419
+ });
420
+ }
421
+ /**
422
+ * Calendar Component
423
+ * powered by date-fns, so that make it easy to use the `date-fns` date functions & locale
424
+ * */
425
+
426
+
427
+ var Calendar = function Calendar(_ref) {
428
+ var onCalendarClick = _ref.onCalendarClick,
429
+ events = _ref.events,
430
+ currentDate = _ref.currentDate,
431
+ _ref$locale = _ref.locale,
432
+ locale = _ref$locale === void 0 ? enUS : _ref$locale,
433
+ _ref$previousYearButt = _ref.previousYearButtonTitle,
434
+ previousYearButtonTitle = _ref$previousYearButt === void 0 ? 'Previous year' : _ref$previousYearButt,
435
+ _ref$nextYearButtonTi = _ref.nextYearButtonTitle,
436
+ nextYearButtonTitle = _ref$nextYearButtonTi === void 0 ? 'Next year' : _ref$nextYearButtonTi,
437
+ _ref$previousMonthBut = _ref.previousMonthButtonTitle,
438
+ previousMonthButtonTitle = _ref$previousMonthBut === void 0 ? 'Previous month' : _ref$previousMonthBut,
439
+ _ref$nextMonthButtonT = _ref.nextMonthButtonTitle,
440
+ nextMonthButtonTitle = _ref$nextMonthButtonT === void 0 ? 'Next month' : _ref$nextMonthButtonT;
441
+
442
+ var _useState = useState(currentDate || new Date()),
443
+ _useState2 = _slicedToArray(_useState, 2),
444
+ date = _useState2[0],
445
+ setDate$1 = _useState2[1];
446
+
447
+ var calendar = createCalendar(date);
448
+ var start = startOfWeek(date, {
449
+ weekStartsOn: 1
450
+ });
451
+ var end = endOfWeek(date, {
452
+ weekStartsOn: 1
453
+ });
454
+ var currentWeek = eachDayOfInterval({
455
+ start: start,
456
+ end: end
457
+ }).map(function (day) {
458
+ return day;
459
+ });
460
+ var chunksWeeks = chunk(calendar, calendar.length / 6);
461
+ var weeks = chunksWeeks.map(function (week) {
462
+ return week.map(function (date) {
463
+ var currentEvent = events && events.length > 0 && events.find(function (e) {
464
+ return isSameDay(endOfDay(parseISO(e.date)), date);
465
+ });
466
+
467
+ if (currentEvent) {
468
+ return {
469
+ date: date,
470
+ emphasis: currentEvent.emphasis,
471
+ selected: currentEvent.selected,
472
+ disabled: currentEvent.disabled
473
+ };
474
+ } else {
475
+ return {
476
+ date: date,
477
+ emphasis: false,
478
+ selected: false,
479
+ disabled: false
480
+ };
481
+ }
482
+ });
483
+ });
484
+ return jsxs("div", Object.assign({
485
+ className: "utrecht-calendar"
486
+ }, {
487
+ children: [jsx(CalendarNavigation, {
488
+ children: jsx(CalendarNavigationButtons, Object.assign({
489
+ previousIcon: jsx(IconArrowLeftDouble, {
490
+ title: previousYearButtonTitle
491
+ }),
492
+ nextIcon: jsx(IconArrowRightDouble, {
493
+ title: nextYearButtonTitle
494
+ }),
495
+ onPreviousClick: function onPreviousClick() {
496
+ return setDate$1(setYear(date, getYear(date) - 1));
497
+ },
498
+ onNextClick: function onNextClick() {
499
+ return setDate$1(addYears(date, 1));
500
+ }
501
+ }, {
502
+ children: jsx(CalendarNavigationButtons, Object.assign({
503
+ previousIcon: jsx(IconArrowLeft, {
504
+ title: previousMonthButtonTitle
505
+ }),
506
+ nextIcon: jsx(IconArrowRight, {
507
+ title: nextMonthButtonTitle
508
+ }),
509
+ onPreviousClick: function onPreviousClick() {
510
+ return setDate$1(setMonth(date, date.getMonth() - 1));
511
+ },
512
+ onNextClick: function onNextClick() {
513
+ return setDate$1(addMonths(date, 1));
514
+ }
515
+ }, {
516
+ children: jsx(CalendarNavigationLabel, {
517
+ label: format(date, 'LLLL Y', {
518
+ locale: locale
519
+ })
520
+ })
521
+ }))
522
+ }))
523
+ }), jsxs("table", Object.assign({
524
+ className: "utrecht-calendar__table",
525
+ role: "grid"
526
+ }, {
527
+ children: [jsx(CalendarTableWeeksContainer, {
528
+ children: currentWeek && currentWeek.length > 0 && currentWeek.map(function (day, index) {
529
+ return jsx(CalendarTableWeeksItem, Object.assign({
530
+ scope: "col",
531
+ abbr: format(day, 'EEEE', {
532
+ locale: locale
533
+ })
534
+ }, {
535
+ children: format(day, 'EEEEEE', {
536
+ locale: locale
537
+ })
538
+ }), index);
539
+ })
540
+ }), jsx(CalendarTableDaysContainer, {
541
+ children: weeks && weeks.length > 0 && weeks.map(function (week, index) {
542
+ return jsx(CalendarTableDaysItem, {
543
+ children: week.map(function (day, index) {
544
+ return jsx(CalendarTableDaysItemDay, {
545
+ isToday: isSameDay(date, day.date),
546
+ dayOutOfTheMonth: !isSameMonth(day.date, date),
547
+ onClick: function onClick(event) {
548
+ var selectedDay = setDate(date, toNumber(event.target.textContent));
549
+ setDate$1(selectedDay);
550
+ onCalendarClick(formatISO(selectedDay));
551
+ },
552
+ "aria-label": format(day.date, 'eeee dd LLLL Y', {
553
+ locale: locale
554
+ }),
555
+ day: day.date.getDate().toString(),
556
+ emphasis: day.emphasis,
557
+ selected: day.selected,
558
+ disabled: day.disabled
559
+ }, index);
560
+ })
561
+ }, index);
562
+ })
563
+ })]
564
+ }))]
565
+ }));
566
+ };
567
+
568
+ var Checkbox = /*#__PURE__*/forwardRef(function (_a, ref) {
569
+ var disabled = _a.disabled,
570
+ invalid = _a.invalid,
571
+ required = _a.required,
572
+ className = _a.className,
573
+ restProps = __rest(_a, ["disabled", "invalid", "required", "className"]);
574
+
575
+ return jsx("input", Object.assign({}, restProps, {
576
+ ref: ref,
577
+ type: "checkbox",
578
+ className: clsx('utrecht-checkbox', 'utrecht-checkbox--html-input', disabled && 'utrecht-checkbox--disabled', invalid && 'utrecht-checkbox--invalid', required && 'utrecht-checkbox--required', className),
579
+ "aria-invalid": invalid || undefined,
580
+ disabled: disabled,
581
+ required: required
582
+ }));
583
+ });
584
+ Checkbox.displayName = 'Checkbox';
585
+
586
+ var CustomRadioButton = /*#__PURE__*/forwardRef(function (_a, ref) {
587
+ var disabled = _a.disabled,
588
+ required = _a.required,
589
+ className = _a.className,
590
+ invalid = _a.invalid,
591
+ restProps = __rest(_a, ["disabled", "required", "className", "invalid"]);
592
+
593
+ return jsx("input", Object.assign({
594
+ type: "radio",
595
+ "aria-invalid": invalid || undefined,
596
+ disabled: disabled,
597
+ required: required,
598
+ ref: ref,
599
+ className: clsx('utrecht-custom-radio-button', 'utrecht-custom-radio-button--html-input', disabled && 'utrecht-custom-radio-button--disabled', invalid && 'utrecht-custom-radio-button--invalid', className)
600
+ }, restProps));
601
+ });
602
+ CustomRadioButton.displayName = 'CustomRadioButton';
603
+
604
+ var Document = /*#__PURE__*/forwardRef(function (_a, ref) {
605
+ var children = _a.children,
606
+ className = _a.className,
607
+ restProps = __rest(_a, ["children", "className"]);
608
+
609
+ return jsx("div", Object.assign({}, restProps, {
610
+ ref: ref,
611
+ className: clsx('utrecht-document', className)
612
+ }, {
613
+ children: children
614
+ }));
615
+ });
616
+ Document.displayName = 'Document';
617
+
618
+ var DataList = /*#__PURE__*/forwardRef(function (_a, ref) {
619
+ var appearance = _a.appearance,
620
+ children = _a.children,
621
+ className = _a.className,
622
+ restProps = __rest(_a, ["appearance", "children", "className"]);
623
+
624
+ return jsx("dl", Object.assign({}, restProps, {
625
+ className: clsx('utrecht-data-list', 'utrecht-data-list--html-dl', appearance === 'rows' && 'utrecht-data-list--rows', className),
626
+ ref: ref
627
+ }, {
628
+ children: children
629
+ }));
630
+ });
631
+ DataList.displayName = 'DataList';
632
+ var DataListItem = /*#__PURE__*/forwardRef(function (_a, ref) {
633
+ var children = _a.children,
634
+ className = _a.className,
635
+ restProps = __rest(_a, ["children", "className"]);
636
+
637
+ return jsx("div", Object.assign({}, restProps, {
638
+ className: clsx('utrecht-data-list__item', className),
639
+ ref: ref
640
+ }, {
641
+ children: children
642
+ }));
643
+ });
644
+ DataListItem.displayName = 'DataListItem';
645
+ var DataListKey = /*#__PURE__*/forwardRef(function (_a, ref) {
646
+ var children = _a.children,
647
+ className = _a.className,
648
+ restProps = __rest(_a, ["children", "className"]);
649
+
650
+ return jsx("dt", Object.assign({}, restProps, {
651
+ className: clsx('utrecht-data-list__item-key', className),
652
+ ref: ref
653
+ }, {
654
+ children: children
655
+ }));
656
+ });
657
+ DataListKey.displayName = 'DataListKey';
658
+ var DataListValue = /*#__PURE__*/forwardRef(function (_ref, ref) {
659
+ var value = _ref.value,
660
+ children = _ref.children,
661
+ className = _ref.className,
662
+ emptyDescription = _ref.emptyDescription,
663
+ multiline = _ref.multiline,
664
+ notranslate = _ref.notranslate;
665
+ var empty = value === '' || value === null;
666
+ return jsx("dd", Object.assign({
667
+ className: clsx('utrecht-data-list__item-value', 'utrecht-data-list__item-value--html-dd', className, multiline && 'utrecht-data-list__item-value--multiline'),
668
+ translate: typeof notranslate === 'boolean' ? notranslate ? 'no' : 'yes' : undefined,
669
+ ref: ref
670
+ }, {
671
+ children: empty ? jsx("span", Object.assign({
672
+ "aria-label": emptyDescription
673
+ }, {
674
+ children: "-"
675
+ })) : children
676
+ }));
677
+ });
678
+ DataListValue.displayName = 'DataListValue';
679
+ var DataListActions = /*#__PURE__*/forwardRef(function (_a, ref) {
680
+ var children = _a.children,
681
+ className = _a.className,
682
+ restProps = __rest(_a, ["children", "className"]);
683
+
684
+ return jsx("dd", Object.assign({}, restProps, {
685
+ className: clsx('utrecht-data-list__actions', 'utrecht-data-list__actions--html-dd', className),
686
+ ref: ref
687
+ }, {
688
+ children: children
689
+ }));
690
+ });
691
+ DataListActions.displayName = 'DataListActions';
692
+
693
+ var Emphasis = /*#__PURE__*/forwardRef(function (_a, ref) {
694
+ var children = _a.children,
695
+ className = _a.className,
696
+ restProps = __rest(_a, ["children", "className"]);
697
+
698
+ return jsx("em", Object.assign({
699
+ ref: ref,
700
+ className: clsx('utrecht-emphasis', 'utrecht-emphasis--stressed', className)
701
+ }, restProps, {
702
+ children: children
703
+ }));
704
+ });
705
+ Emphasis.displayName = 'Emphasis';
706
+
707
+ var Fieldset = /*#__PURE__*/forwardRef(function (_a, ref) {
708
+ var className = _a.className,
709
+ children = _a.children,
710
+ restProps = __rest(_a, ["className", "children"]);
711
+
712
+ return jsx("fieldset", Object.assign({}, restProps, {
713
+ ref: ref,
714
+ className: clsx('utrecht-form-fieldset', 'utrecht-form-fieldset--html-fieldset', className)
715
+ }, {
716
+ children: children
717
+ }));
718
+ });
719
+ Fieldset.displayName = 'Fieldset';
720
+
721
+ var FieldsetLegend = /*#__PURE__*/forwardRef(function (_a, ref) {
722
+ var className = _a.className,
723
+ children = _a.children,
724
+ restProps = __rest(_a, ["className", "children"]);
725
+
726
+ return jsx("legend", Object.assign({}, restProps, {
727
+ ref: ref,
728
+ className: clsx('utrecht-form-fieldset__legend', 'utrecht-form-fieldset__legend--html-legend', className)
729
+ }, {
730
+ children: children
731
+ }));
732
+ });
733
+ FieldsetLegend.displayName = 'FieldsetLegend';
734
+
735
+ var Figure = /*#__PURE__*/forwardRef(function (_a, ref) {
736
+ var className = _a.className,
737
+ children = _a.children,
738
+ restProps = __rest(_a, ["className", "children"]);
739
+
740
+ return jsx("figure", Object.assign({}, restProps, {
741
+ ref: ref,
742
+ className: clsx('utrecht-figure', className)
743
+ }, {
744
+ children: children
745
+ }));
746
+ });
747
+ Figure.displayName = 'Figure';
748
+
749
+ var FigureCaption = /*#__PURE__*/forwardRef(function (_a, ref) {
750
+ var className = _a.className,
751
+ children = _a.children,
752
+ restProps = __rest(_a, ["className", "children"]);
753
+
754
+ return jsx("figcaption", Object.assign({}, restProps, {
755
+ ref: ref,
756
+ className: clsx('utrecht-figure__caption', className)
757
+ }, {
758
+ children: children
759
+ }));
760
+ });
761
+ FigureCaption.displayName = 'FigureCaption';
762
+
763
+ var FormField = /*#__PURE__*/forwardRef(function (_a, ref) {
764
+ var className = _a.className,
765
+ children = _a.children,
766
+ restProps = __rest(_a, ["className", "children"]);
767
+
768
+ return jsx("div", Object.assign({}, restProps, {
769
+ ref: ref,
770
+ className: clsx('utrecht-form-field', className)
771
+ }, {
772
+ children: children
773
+ }));
774
+ });
775
+ FormField.displayName = 'FormField';
776
+
777
+ var FormFieldDescription = /*#__PURE__*/forwardRef(function (_a, ref) {
778
+ var invalid = _a.invalid,
779
+ valid = _a.valid,
780
+ warning = _a.warning,
781
+ className = _a.className,
782
+ children = _a.children,
783
+ restProps = __rest(_a, ["invalid", "valid", "warning", "className", "children"]);
784
+
785
+ return jsx("div", Object.assign({}, restProps, {
786
+ ref: ref,
787
+ className: clsx('utrecht-form-field-description', invalid && 'utrecht-form-field-description--invalid', valid && 'utrecht-form-field-description--valid', warning && 'utrecht-form-field-description--warning', className)
788
+ }, {
789
+ children: children
790
+ }));
791
+ });
792
+ FormFieldDescription.displayName = 'FormFieldDescription';
793
+
794
+ var FormLabel = /*#__PURE__*/forwardRef(function (_a, ref) {
795
+ var children = _a.children,
796
+ className = _a.className,
797
+ type = _a.type,
798
+ disabled = _a.disabled,
799
+ checked = _a.checked,
800
+ restProps = __rest(_a, ["children", "className", "type", "disabled", "checked"]);
801
+
802
+ return jsx("label", Object.assign({}, restProps, {
803
+ ref: ref,
804
+ className: clsx('utrecht-form-label', type && "utrecht-form-label--".concat(type), disabled && 'utrecht-form-label--disabled', checked && 'utrecht-form-label--checked', className)
805
+ }, {
806
+ children: children
807
+ }));
808
+ });
809
+ FormLabel.displayName = 'FormLabel';
810
+
811
+ var HTMLContent = /*#__PURE__*/forwardRef(function (_a, ref) {
812
+ var children = _a.children,
813
+ className = _a.className,
814
+ restProps = __rest(_a, ["children", "className"]);
815
+
816
+ return jsx("div", Object.assign({}, restProps, {
817
+ ref: ref,
818
+ className: clsx('utrecht-html', className)
819
+ }, {
820
+ children: children
821
+ }));
822
+ });
823
+ HTMLContent.displayName = 'HTMLContent';
824
+
825
+ var Heading1 = /*#__PURE__*/forwardRef(function (_a, ref) {
826
+ var children = _a.children,
827
+ className = _a.className,
828
+ restProps = __rest(_a, ["children", "className"]);
829
+
830
+ return jsx("h1", Object.assign({}, restProps, {
831
+ ref: ref,
832
+ className: clsx('utrecht-heading-1', className)
833
+ }, {
834
+ children: children
835
+ }));
836
+ });
837
+ Heading1.displayName = 'Heading1';
838
+
839
+ var Heading3 = /*#__PURE__*/forwardRef(function (_a, ref) {
840
+ var children = _a.children,
841
+ className = _a.className,
842
+ restProps = __rest(_a, ["children", "className"]);
843
+
844
+ return jsx("h3", Object.assign({}, restProps, {
845
+ ref: ref,
846
+ className: clsx('utrecht-heading-3', className)
847
+ }, {
848
+ children: children
849
+ }));
850
+ });
851
+ Heading3.displayName = 'Heading3';
852
+
853
+ var Heading4 = /*#__PURE__*/forwardRef(function (_a, ref) {
854
+ var children = _a.children,
855
+ className = _a.className,
856
+ restProps = __rest(_a, ["children", "className"]);
857
+
858
+ return jsx("h4", Object.assign({}, restProps, {
859
+ ref: ref,
860
+ className: clsx('utrecht-heading-4', className)
861
+ }, {
862
+ children: children
863
+ }));
864
+ });
865
+ Heading4.displayName = 'Heading4';
866
+
867
+ var Heading5 = /*#__PURE__*/forwardRef(function (_a, ref) {
868
+ var children = _a.children,
869
+ className = _a.className,
870
+ restProps = __rest(_a, ["children", "className"]);
871
+
872
+ return jsx("h5", Object.assign({}, restProps, {
873
+ ref: ref,
874
+ className: clsx('utrecht-heading-5', className)
875
+ }, {
876
+ children: children
877
+ }));
878
+ });
879
+ Heading5.displayName = 'Heading5';
880
+
881
+ var Heading6 = /*#__PURE__*/forwardRef(function (_a, ref) {
882
+ var children = _a.children,
883
+ className = _a.className,
884
+ restProps = __rest(_a, ["children", "className"]);
885
+
886
+ return jsx("h6", Object.assign({}, restProps, {
887
+ ref: ref,
888
+ className: clsx('utrecht-heading-6', className)
889
+ }, {
890
+ children: children
891
+ }));
892
+ });
893
+ Heading6.displayName = 'Heading6';
894
+
895
+ var Heading = /*#__PURE__*/forwardRef(function (_a, ref) {
896
+ var level = _a.level,
897
+ restProps = __rest(_a, ["level"]);
898
+
899
+ var HeadingX = level === 2 ? Heading2 : level === 3 ? Heading3 : level === 4 ? Heading4 : level === 5 ? Heading5 : level === 6 ? Heading6 : Heading1;
900
+ return jsx(HeadingX, Object.assign({}, restProps, {
901
+ ref: ref
902
+ }));
903
+ });
904
+ Heading.displayName = 'Heading';
905
+
906
+ var HeadingGroup = /*#__PURE__*/forwardRef(function (_a, ref) {
907
+ var children = _a.children,
908
+ className = _a.className,
909
+ restProps = __rest(_a, ["children", "className"]);
910
+
911
+ return jsx("hgroup", Object.assign({}, restProps, {
912
+ ref: ref,
913
+ className: clsx('utrecht-heading-group', className)
914
+ }, {
915
+ children: children
916
+ }));
917
+ });
918
+ HeadingGroup.displayName = 'HeadingGroup';
919
+
920
+ var Image = /*#__PURE__*/forwardRef(function (_a, ref) {
921
+ var className = _a.className,
922
+ photo = _a.photo,
923
+ restProps = __rest(_a, ["className", "photo"]);
924
+
925
+ return jsx("img", Object.assign({}, restProps, {
926
+ ref: ref,
927
+ className: clsx('utrecht-img', {
928
+ 'utrecht-img--photo': photo
929
+ }, className)
930
+ }));
931
+ });
932
+ Image.displayName = 'Image';
933
+
934
+ var Link = /*#__PURE__*/forwardRef(function (_a, ref) {
935
+ var boxContent = _a.boxContent,
936
+ children = _a.children,
937
+ className = _a.className,
938
+ external = _a.external,
939
+ href = _a.href,
940
+ placeholder = _a.placeholder,
941
+ role = _a.role,
942
+ restProps = __rest(_a, ["boxContent", "children", "className", "external", "href", "placeholder", "role"]);
943
+
944
+ return (// "utrecht-link--telephone" does not have a corresponding API,
945
+ // since it is primarily a basis for implementing input[href^="tel"].
946
+ // Telephone number rendering in React is best achieved using composition
947
+ // of the TelephoneValue component.
948
+ jsx("a", Object.assign({
949
+ href: placeholder ? undefined : href,
950
+ ref: ref,
951
+ role: role || (placeholder ? 'link' : undefined),
952
+ className: clsx('utrecht-link', {
953
+ 'utrecht-link--box-content': boxContent,
954
+ 'utrecht-link--external': external,
955
+ 'utrecht-link--placeholder': placeholder
956
+ }, className),
957
+ "aria-disabled": placeholder ? 'true' : undefined,
958
+ rel: external ? 'external noopener noreferrer' : undefined
959
+ }, restProps, {
960
+ children: children
961
+ }))
962
+ );
963
+ });
964
+ Link.displayName = 'Link';
965
+
966
+ var LinkButton = /*#__PURE__*/forwardRef(function (_a, ref) {
967
+ var children = _a.children,
968
+ inline = _a.inline,
969
+ className = _a.className,
970
+ restProps = __rest(_a, ["children", "inline", "className"]);
971
+
972
+ return jsx("button", Object.assign({}, restProps, {
973
+ ref: ref,
974
+ className: clsx('utrecht-link-button', 'utrecht-link-button--html-button', {
975
+ 'utrecht-link-button--inline': inline
976
+ }, className)
977
+ }, {
978
+ children: children
979
+ }));
980
+ });
981
+ LinkButton.displayName = 'LinkButton';
982
+
983
+ var LinkSocial = /*#__PURE__*/forwardRef(function (_a, ref) {
984
+ var children = _a.children,
985
+ className = _a.className,
986
+ external = _a.external,
987
+ restProps = __rest(_a, ["children", "className", "external"]);
988
+
989
+ return jsx("a", Object.assign({}, restProps, {
990
+ ref: ref,
991
+ className: clsx('utrecht-link-social', className),
992
+ rel: external ? 'external noopener noreferrer' : undefined
993
+ }, {
994
+ children: children
995
+ }));
996
+ });
997
+ LinkSocial.displayName = 'LinkSocial';
998
+
999
+ var ListSocial = function ListSocial(_ref) {
1000
+ var children = _ref.children;
1001
+ return jsx("ul", Object.assign({
1002
+ className: clsx('utrecht-list-social')
1003
+ }, {
1004
+ children: children
1005
+ }));
1006
+ };
1007
+ var ListSocialItem = function ListSocialItem(_ref2) {
1008
+ var children = _ref2.children;
1009
+ return jsx("li", Object.assign({
1010
+ className: clsx('utrecht-list-social__item')
1011
+ }, {
1012
+ children: children
1013
+ }));
1014
+ };
1015
+
1016
+ var NumberValue = /*#__PURE__*/forwardRef(function (_a, ref) {
1017
+ var children = _a.children,
1018
+ className = _a.className,
1019
+ value = _a.value,
1020
+ restProps = __rest(_a, ["children", "className", "value"]);
1021
+
1022
+ return jsx("data", Object.assign({
1023
+ value: typeof value === 'string' || typeof value === 'number' ? String(value) : undefined
1024
+ }, restProps, {
1025
+ ref: ref,
1026
+ className: clsx('utrecht-value-number', className)
1027
+ }, {
1028
+ children: children
1029
+ }));
1030
+ });
1031
+ NumberValue.displayName = 'NumberValue';
1032
+
1033
+ var OrderedList = /*#__PURE__*/forwardRef(function (_a, ref) {
1034
+ var children = _a.children,
1035
+ className = _a.className,
1036
+ restProps = __rest(_a, ["children", "className"]);
1037
+
1038
+ return jsx("ol", Object.assign({}, restProps, {
1039
+ ref: ref,
1040
+ className: clsx('utrecht-ordered-list', className)
1041
+ }, {
1042
+ children: children
1043
+ }));
1044
+ });
1045
+ OrderedList.displayName = 'OrderedList';
1046
+
1047
+ var OrderedListItem = /*#__PURE__*/forwardRef(function (_a, ref) {
1048
+ var children = _a.children,
1049
+ className = _a.className,
1050
+ restProps = __rest(_a, ["children", "className"]);
1051
+
1052
+ return jsx("li", Object.assign({}, restProps, {
1053
+ ref: ref,
1054
+ className: clsx('utrecht-ordered-list__item', className)
1055
+ }, {
1056
+ children: children
1057
+ }));
1058
+ });
1059
+ OrderedListItem.displayName = 'OrderedListItem';
1060
+
1061
+ var Page = /*#__PURE__*/forwardRef(function (_a, ref) {
1062
+ var children = _a.children,
1063
+ className = _a.className,
1064
+ restProps = __rest(_a, ["children", "className"]);
1065
+
1066
+ return jsx("div", Object.assign({}, restProps, {
1067
+ ref: ref,
1068
+ className: clsx('utrecht-page', className)
1069
+ }, {
1070
+ children: children
1071
+ }));
1072
+ });
1073
+ Page.displayName = 'Page';
1074
+
1075
+ var PageContent = /*#__PURE__*/forwardRef(function (_a, ref) {
1076
+ var children = _a.children,
1077
+ className = _a.className,
1078
+ restProps = __rest(_a, ["children", "className"]);
1079
+
1080
+ return jsx("div", Object.assign({}, restProps, {
1081
+ ref: ref,
1082
+ className: clsx('utrecht-page-content', className)
1083
+ }, {
1084
+ children: children
1085
+ }));
1086
+ });
1087
+ PageContent.displayName = 'PageContent';
1088
+ var PageContentMain = /*#__PURE__*/forwardRef(function (_a, ref) {
1089
+ var children = _a.children,
1090
+ className = _a.className,
1091
+ restProps = __rest(_a, ["children", "className"]);
1092
+
1093
+ return jsx("main", Object.assign({}, restProps, {
1094
+ ref: ref,
1095
+ className: clsx('utrecht-page-content__main', className)
1096
+ }, {
1097
+ children: children
1098
+ }));
1099
+ });
1100
+ PageContentMain.displayName = 'PageContentMain';
1101
+
1102
+ var PageFooter = /*#__PURE__*/forwardRef(function (_a, ref) {
1103
+ var children = _a.children,
1104
+ className = _a.className,
1105
+ restProps = __rest(_a, ["children", "className"]);
1106
+
1107
+ return jsx("footer", Object.assign({}, restProps, {
1108
+ ref: ref,
1109
+ className: clsx('utrecht-page-footer', className)
1110
+ }, {
1111
+ children: children
1112
+ }));
1113
+ });
1114
+ PageFooter.displayName = 'PageFooter';
1115
+
1116
+ var PageHeader = /*#__PURE__*/forwardRef(function (_a, ref) {
1117
+ var children = _a.children,
1118
+ className = _a.className,
1119
+ restProps = __rest(_a, ["children", "className"]);
1120
+
1121
+ return jsx("header", Object.assign({}, restProps, {
1122
+ ref: ref,
1123
+ className: clsx('utrecht-page-header', className)
1124
+ }, {
1125
+ children: children
1126
+ }));
1127
+ });
1128
+ PageHeader.displayName = 'PageHeader';
1129
+
1130
+ var Paragraph = /*#__PURE__*/forwardRef(function (_a, ref) {
1131
+ var children = _a.children,
1132
+ className = _a.className,
1133
+ lead = _a.lead,
1134
+ small = _a.small,
1135
+ restProps = __rest(_a, ["children", "className", "lead", "small"]);
1136
+
1137
+ return jsx("p", Object.assign({}, restProps, {
1138
+ ref: ref,
1139
+ className: clsx('utrecht-paragraph', lead && 'utrecht-paragraph--lead', small && 'utrecht-paragraph--small', className)
1140
+ }, {
1141
+ children: small ? jsx("small", Object.assign({
1142
+ className: "utrecht-paragraph__small"
1143
+ }, {
1144
+ children: children
1145
+ })) : children
1146
+ }));
1147
+ });
1148
+ Paragraph.displayName = 'Paragraph';
1149
+
1150
+ var PreHeading = /*#__PURE__*/forwardRef(function (_a, ref) {
1151
+ var children = _a.children,
1152
+ className = _a.className,
1153
+ restProps = __rest(_a, ["children", "className"]);
1154
+
1155
+ return jsx("p", Object.assign({}, restProps, {
1156
+ ref: ref,
1157
+ className: clsx('utrecht-pre-heading', className)
1158
+ }, {
1159
+ children: children
1160
+ }));
1161
+ });
1162
+ PreHeading.displayName = 'PreHeading';
1163
+
1164
+ var RadioButton = /*#__PURE__*/forwardRef(function (_a, ref) {
1165
+ var invalid = _a.invalid,
1166
+ className = _a.className,
1167
+ restProps = __rest(_a, ["invalid", "className"]);
1168
+
1169
+ return jsx("input", Object.assign({}, restProps, {
1170
+ ref: ref,
1171
+ type: "radio",
1172
+ className: clsx('utrecht-radio-button', 'utrecht-radio-button--html-input', invalid && 'utrecht-radio-button--invalid', className)
1173
+ }));
1174
+ });
1175
+ RadioButton.displayName = 'RadioButton';
1176
+
1177
+ var Select = /*#__PURE__*/forwardRef(function (_a, ref) {
1178
+ var invalid = _a.invalid,
1179
+ required = _a.required,
1180
+ className = _a.className,
1181
+ noscript = _a.noscript,
1182
+ children = _a.children,
1183
+ restProps = __rest(_a, ["invalid", "required", "className", "noscript", "children"]);
1184
+
1185
+ return jsx("select", Object.assign({}, restProps, {
1186
+ ref: ref,
1187
+ "aria-invalid": invalid || undefined,
1188
+ required: noscript ? required : false,
1189
+ "aria-required": noscript ? undefined : required,
1190
+ className: clsx('utrecht-select', 'utrecht-select--html-select', invalid && 'utrecht-select--invalid', required && 'utrecht-select--required', className)
1191
+ }, {
1192
+ children: children
1193
+ }));
1194
+ });
1195
+ Select.displayName = 'Select';
1196
+ var SelectOption = /*#__PURE__*/forwardRef(function (_a, ref) {
1197
+ var disabled = _a.disabled,
1198
+ invalid = _a.invalid,
1199
+ value = _a.value,
1200
+ children = _a.children,
1201
+ className = _a.className,
1202
+ restProps = __rest(_a, ["disabled", "invalid", "value", "children", "className"]);
1203
+
1204
+ return jsx("option", Object.assign({}, restProps, {
1205
+ ref: ref,
1206
+ disabled: disabled,
1207
+ value: value,
1208
+ className: clsx('utrecht-select__option', disabled && 'utrecht-select__option--disabled', invalid && 'utrecht-select__option--invalid', className)
1209
+ }, {
1210
+ children: children
1211
+ }));
1212
+ });
1213
+ SelectOption.displayName = 'SelectOption';
1214
+
1215
+ var Separator = /*#__PURE__*/forwardRef(function (_a, ref) {
1216
+ var className = _a.className;
1217
+ _a.children;
1218
+ var restProps = __rest(_a, ["className", "children"]);
1219
+
1220
+ return jsx("hr", Object.assign({}, restProps, {
1221
+ ref: ref,
1222
+ className: clsx('utrecht-separator', className)
1223
+ }));
1224
+ });
1225
+ Separator.displayName = 'Separator';
1226
+
1227
+ var SkipLink = /*#__PURE__*/forwardRef(function (_a, ref) {
1228
+ var children = _a.children,
1229
+ className = _a.className,
1230
+ restProps = __rest(_a, ["children", "className"]);
1231
+
1232
+ return jsx("p", {
1233
+ children: jsx("a", Object.assign({
1234
+ ref: ref
1235
+ }, restProps, {
1236
+ className: clsx('utrecht-skip-link', 'utrecht-skip-link--visible-on-focus', className)
1237
+ }, {
1238
+ children: children
1239
+ }))
1240
+ });
1241
+ });
1242
+ SkipLink.displayName = 'SkipLink';
1243
+
1244
+ var Strong = /*#__PURE__*/forwardRef(function (_a, ref) {
1245
+ var children = _a.children,
1246
+ className = _a.className,
1247
+ restProps = __rest(_a, ["children", "className"]);
1248
+
1249
+ return jsx("strong", Object.assign({
1250
+ ref: ref,
1251
+ className: clsx('utrecht-emphasis', 'utrecht-emphasis--strong', className)
1252
+ }, restProps, {
1253
+ children: children
1254
+ }));
1255
+ });
1256
+ Strong.displayName = 'Strong';
1257
+
1258
+ var Surface = /*#__PURE__*/forwardRef(function (_a, ref) {
1259
+ var children = _a.children,
1260
+ className = _a.className,
1261
+ restProps = __rest(_a, ["children", "className"]);
1262
+
1263
+ return jsx("div", Object.assign({}, restProps, {
1264
+ ref: ref,
1265
+ className: clsx('utrecht-surface', className)
1266
+ }, {
1267
+ children: children
1268
+ }));
1269
+ });
1270
+ Surface.displayName = 'Surface';
1271
+
1272
+ var Table = /*#__PURE__*/forwardRef(function (_a, ref) {
1273
+ var children = _a.children,
1274
+ className = _a.className,
1275
+ restProps = __rest(_a, ["children", "className"]);
1276
+
1277
+ return jsx("table", Object.assign({}, restProps, {
1278
+ ref: ref,
1279
+ className: clsx('utrecht-table', className)
1280
+ }, {
1281
+ children: children
1282
+ }));
1283
+ });
1284
+ Table.displayName = 'Table';
1285
+
1286
+ var TableBody = /*#__PURE__*/forwardRef(function (_a, ref) {
1287
+ var children = _a.children,
1288
+ className = _a.className,
1289
+ restProps = __rest(_a, ["children", "className"]);
1290
+
1291
+ return jsx("tbody", Object.assign({}, restProps, {
1292
+ ref: ref,
1293
+ className: clsx('utrecht-table__body', className)
1294
+ }, {
1295
+ children: children
1296
+ }));
1297
+ });
1298
+ TableBody.displayName = 'TableBody';
1299
+
1300
+ var TableCaption = /*#__PURE__*/forwardRef(function (_a, ref) {
1301
+ var children = _a.children,
1302
+ className = _a.className,
1303
+ restProps = __rest(_a, ["children", "className"]);
1304
+
1305
+ return jsx("caption", Object.assign({}, restProps, {
1306
+ ref: ref,
1307
+ className: clsx('utrecht-table__caption', className)
1308
+ }, {
1309
+ children: children
1310
+ }));
1311
+ });
1312
+ TableCaption.displayName = 'TableCaption';
1313
+
1314
+ var TableCell = /*#__PURE__*/forwardRef(function (_a, ref) {
1315
+ var children = _a.children,
1316
+ className = _a.className,
1317
+ restProps = __rest(_a, ["children", "className"]);
1318
+
1319
+ return jsx("td", Object.assign({}, restProps, {
1320
+ ref: ref,
1321
+ className: clsx('utrecht-table__cell', className)
1322
+ }, {
1323
+ children: children
1324
+ }));
1325
+ });
1326
+ TableCell.displayName = 'TableCell';
1327
+
1328
+ var TableFooter = /*#__PURE__*/forwardRef(function (_a, ref) {
1329
+ var children = _a.children,
1330
+ className = _a.className,
1331
+ restProps = __rest(_a, ["children", "className"]);
1332
+
1333
+ return jsx("tfoot", Object.assign({}, restProps, {
1334
+ ref: ref,
1335
+ className: clsx('utrecht-table__footer', className)
1336
+ }, {
1337
+ children: children
1338
+ }));
1339
+ });
1340
+ TableFooter.displayName = 'TableFooter';
1341
+
1342
+ var TableHeader = /*#__PURE__*/forwardRef(function (_a, ref) {
1343
+ var children = _a.children,
1344
+ className = _a.className,
1345
+ restProps = __rest(_a, ["children", "className"]);
1346
+
1347
+ return jsx("thead", Object.assign({}, restProps, {
1348
+ ref: ref,
1349
+ className: clsx('utrecht-table__header', className)
1350
+ }, {
1351
+ children: children
1352
+ }));
1353
+ });
1354
+ TableHeader.displayName = 'TableHeader';
1355
+
1356
+ var TableHeaderCell = /*#__PURE__*/forwardRef(function (_a, ref) {
1357
+ var children = _a.children,
1358
+ className = _a.className,
1359
+ restProps = __rest(_a, ["children", "className"]);
1360
+
1361
+ return jsx("th", Object.assign({}, restProps, {
1362
+ ref: ref,
1363
+ className: clsx('utrecht-table__header-cell', className)
1364
+ }, {
1365
+ children: children
1366
+ }));
1367
+ });
1368
+ TableHeaderCell.displayName = 'TableHeaderCell';
1369
+
1370
+ var TableRow = /*#__PURE__*/forwardRef(function (_a, ref) {
1371
+ var children = _a.children,
1372
+ className = _a.className,
1373
+ restProps = __rest(_a, ["children", "className"]);
1374
+
1375
+ return jsx("tr", Object.assign({}, restProps, {
1376
+ ref: ref,
1377
+ className: clsx('utrecht-table__row', className)
1378
+ }, {
1379
+ children: children
1380
+ }));
1381
+ });
1382
+ TableRow.displayName = 'TableRow';
1383
+
1384
+ var Textarea = /*#__PURE__*/forwardRef(function (_a, ref) {
1385
+ var disabled = _a.disabled,
1386
+ invalid = _a.invalid,
1387
+ readOnly = _a.readOnly,
1388
+ required = _a.required,
1389
+ className = _a.className,
1390
+ restProps = __rest(_a, ["disabled", "invalid", "readOnly", "required", "className"]);
1391
+
1392
+ return jsx("textarea", Object.assign({}, restProps, {
1393
+ ref: ref,
1394
+ className: clsx('utrecht-textarea', 'utrecht-textarea--html-textarea', disabled && 'utrecht-textarea--disabled', invalid && 'utrecht-textarea--invalid', readOnly && 'utrecht-textarea--readonly', required && 'utrecht-textarea--required', className),
1395
+ disabled: disabled,
1396
+ readOnly: readOnly,
1397
+ required: required,
1398
+ "aria-invalid": invalid || undefined
1399
+ }));
1400
+ });
1401
+ Textarea.displayName = 'Textarea';
1402
+
1403
+ var Textbox = /*#__PURE__*/forwardRef(function (_a, ref) {
1404
+ var disabled = _a.disabled,
1405
+ invalid = _a.invalid,
1406
+ readOnly = _a.readOnly,
1407
+ required = _a.required,
1408
+ className = _a.className,
1409
+ _a$type = _a.type,
1410
+ type = _a$type === void 0 ? 'text' : _a$type,
1411
+ maxLength = _a.maxLength,
1412
+ inputMode = _a.inputMode,
1413
+ restProps = __rest(_a, ["disabled", "invalid", "readOnly", "required", "className", "type", "maxLength", "inputMode"]);
1414
+
1415
+ return jsx("input", Object.assign({}, restProps, {
1416
+ ref: ref,
1417
+ type: type,
1418
+ className: clsx('utrecht-textbox', 'utrecht-textbox--html-input', disabled && 'utrecht-textbox--disabled', invalid && 'utrecht-textbox--invalid', readOnly && 'utrecht-textbox--readonly', required && 'utrecht-textbox--required', className),
1419
+ maxLength: maxLength,
1420
+ disabled: disabled,
1421
+ readOnly: readOnly,
1422
+ required: required,
1423
+ "aria-invalid": invalid || undefined,
1424
+ inputMode: inputMode || (type === 'number' ? 'numeric' : undefined)
1425
+ }));
1426
+ });
1427
+ Textbox.displayName = 'Textbox';
1428
+
1429
+ var URLValue = /*#__PURE__*/forwardRef(function (_a, ref) {
1430
+ var children = _a.children,
1431
+ className = _a.className,
1432
+ restProps = __rest(_a, ["children", "className"]);
1433
+
1434
+ return jsx("bdi", Object.assign({
1435
+ translate: "no"
1436
+ }, restProps, {
1437
+ ref: ref,
1438
+ className: clsx('utrecht-url', className)
1439
+ }, {
1440
+ children: children
1441
+ }));
1442
+ });
1443
+ URLValue.displayName = 'URLValue';
1444
+
1445
+ var UnorderedList = /*#__PURE__*/forwardRef(function (_a, ref) {
1446
+ var children = _a.children,
1447
+ className = _a.className,
1448
+ restProps = __rest(_a, ["children", "className"]);
1449
+
1450
+ return jsx("ul", Object.assign({}, restProps, {
1451
+ ref: ref,
1452
+ className: clsx('utrecht-unordered-list', className)
1453
+ }, {
1454
+ children: children
1455
+ }));
1456
+ });
1457
+ UnorderedList.displayName = 'UnorderedList';
1458
+
1459
+ var UnorderedListItem = /*#__PURE__*/forwardRef(function (_a, ref) {
1460
+ var children = _a.children,
1461
+ className = _a.className,
1462
+ restProps = __rest(_a, ["children", "className"]);
1463
+
1464
+ return jsx("li", Object.assign({}, restProps, {
1465
+ ref: ref,
1466
+ className: clsx('utrecht-unordered-list__item', className)
1467
+ }, {
1468
+ children: children
1469
+ }));
1470
+ });
1471
+ UnorderedListItem.displayName = 'UnorderedListItem';
1472
+
1473
+ export { Article, Backdrop, Button, ButtonGroup, ButtonLink, Calendar, Checkbox, CustomRadioButton, DataList, DataListActions, DataListItem, DataListKey, DataListValue, Document, Emphasis, Fieldset, FieldsetLegend, Figure, FigureCaption, FormField, FormFieldDescription, FormLabel, HTMLContent, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, HeadingGroup, Image, Link, LinkButton, LinkSocial, ListSocial, ListSocialItem, NumberValue, OrderedList, OrderedListItem, Page, PageContent, PageFooter, PageHeader, Paragraph, PreHeading, PrimaryActionButton, RadioButton, SecondaryActionButton, Select, SelectOption, Separator, SkipLink, Strong, SubtleButton, Surface, Table, TableBody, TableCaption, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Textarea, Textbox, URLValue, UnorderedList, UnorderedListItem };
1474
+ //# sourceMappingURL=index.esm.js.map