@utrecht/component-library-react 1.0.0-alpha.15 → 1.0.0-alpha.151

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