@utrecht/component-library-react 1.0.0-alpha.391 → 1.0.0-alpha.393

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 (39) hide show
  1. package/README.md +1 -1
  2. package/dist/.jest-test-results.json +1 -1
  3. package/dist/Calendar/index.d.ts +1 -2
  4. package/dist/Calendar.d.ts +2 -0
  5. package/dist/Calendar.js +459 -0
  6. package/dist/Calendar.js.map +1 -0
  7. package/dist/Calendar.mjs +457 -0
  8. package/dist/Calendar.mjs.map +1 -0
  9. package/dist/{URLValue.d.ts → URLData.d.ts} +2 -2
  10. package/dist/VegaVisualization.js +105 -0
  11. package/dist/VegaVisualization.js.map +1 -0
  12. package/dist/VegaVisualization.mjs +103 -0
  13. package/dist/VegaVisualization.mjs.map +1 -0
  14. package/dist/css-module/Calendar/index.d.ts +1 -2
  15. package/dist/css-module/Calendar.d.ts +2 -6
  16. package/dist/css-module/Calendar.js +489 -0
  17. package/dist/css-module/Calendar.js.map +1 -0
  18. package/dist/css-module/Calendar.mjs +487 -0
  19. package/dist/css-module/Calendar.mjs.map +1 -0
  20. package/dist/css-module/{URLValue.d.ts → URLData.d.ts} +2 -2
  21. package/dist/css-module/VegaVisualization.js +135 -0
  22. package/dist/css-module/VegaVisualization.js.map +1 -0
  23. package/dist/css-module/VegaVisualization.mjs +133 -0
  24. package/dist/css-module/VegaVisualization.mjs.map +1 -0
  25. package/dist/css-module/css-module/Calendar.d.ts +2 -1
  26. package/dist/css-module/css-module/URLData.d.ts +6 -0
  27. package/dist/css-module/css-module/index.d.ts +2 -5
  28. package/dist/css-module/index.d.ts +2 -5
  29. package/dist/css-module/index.js +680 -70240
  30. package/dist/css-module/index.js.map +1 -1
  31. package/dist/css-module/index.mjs +583 -70141
  32. package/dist/css-module/index.mjs.map +1 -1
  33. package/dist/index.cjs.js +545 -70099
  34. package/dist/index.cjs.js.map +1 -1
  35. package/dist/index.d.ts +2 -5
  36. package/dist/index.esm.js +448 -70000
  37. package/dist/index.esm.js.map +1 -1
  38. package/package.json +20 -6
  39. package/dist/css-module/css-module/URLValue.d.ts +0 -6
@@ -0,0 +1,487 @@
1
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { startOfWeek, endOfWeek, eachDayOfInterval, isSameDay, endOfDay, parseISO, setYear, getYear, addYears, setMonth, addMonths, format, isSameMonth, formatISO, isBefore, startOfDay, isAfter, startOfMonth, addWeeks } from 'date-fns';
4
+ import { enUS } from 'date-fns/locale';
5
+ import chunk from 'lodash.chunk';
6
+ import { forwardRef, useState } from 'react';
7
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
9
+ import clsx, { clsx as clsx$1 } from 'clsx';
10
+ import '@babel/runtime/helpers/objectDestructuringEmpty';
11
+ import '@babel/runtime/helpers/extends';
12
+
13
+ function styleInject(css, ref) {
14
+ if ( ref === void 0 ) ref = {};
15
+ var insertAt = ref.insertAt;
16
+
17
+ if (!css || typeof document === 'undefined') { return; }
18
+
19
+ var head = document.head || document.getElementsByTagName('head')[0];
20
+ var style = document.createElement('style');
21
+ style.type = 'text/css';
22
+
23
+ if (insertAt === 'top') {
24
+ if (head.firstChild) {
25
+ head.insertBefore(style, head.firstChild);
26
+ } else {
27
+ head.appendChild(style);
28
+ }
29
+ } else {
30
+ head.appendChild(style);
31
+ }
32
+
33
+ if (style.styleSheet) {
34
+ style.styleSheet.cssText = css;
35
+ } else {
36
+ style.appendChild(document.createTextNode(css));
37
+ }
38
+ }
39
+
40
+ var css_248z = ".utrecht-calendar{background-color:var(--utrecht-calendar-background-color);inline-size:fit-content}.utrecht-calendar__table{margin-inline:auto;padding-block-end:var(--utrecht-calendar-table-padding-block-end);padding-block-start:var(--utrecht-calendar-table-padding-block-start)}.utrecht-calendar__table-weeks-item{inline-size:var(--utrecht-calendar-table-weeks-item-width);line-height:var(--utrecht-calendar-table-weeks-item-line-height,inherit);padding-block-end:var(--utrecht-calendar-table-weeks-item-padding-block-end);padding-block-start:var(--utrecht-calendar-table-weeks-item-padding-block-start)}.utrecht-calendar__table-days-item-day{--utrecht-calendar-button-border-color:var(--utrecht-calendar-table-days-item-day-border-color);--utrecht-calendar-button-border-width:var(--utrecht-calendar-table-days-item-day-border-width);--utrecht-calendar-button-color:var(--utrecht-calendar-table-days-item-day-color);block-size:var(--utrecht-calendar-table-days-item-day-size);inline-size:var(--utrecht-calendar-table-days-item-day-size)}.utrecht-calendar__table-days-item-day:hover{--utrecht-calendar-button-hover-background-color:var(--utrecht-calendar-table-days-item-day-hover-background-color);--utrecht-calendar-button-hover-border-color:var(--utrecht-calendar-table-days-item-day-hover-border-color);--utrecht-calendar-button-hover-color:var(--utrecht-calendar-table-days-item-day-hover-color)}.utrecht-calendar__table-days-item-day:focus{--utrecht-calendar-button-focus-background-color:var(--utrecht-calendar-table-days-item-day-focus-background-color);--utrecht-calendar-button-focus-border-color:var(--utrecht-calendar-table-days-item-day-focus-border-color);--utrecht-calendar-button-focus-color:var(--utrecht-calendar-table-days-item-day-focus-color)}.utrecht-calendar__table-days-item-day:active{--utrecht-calendar-button-active-background-color:var(\n --utrecht-calendar-table-days-item-day-active-background-color\n );--utrecht-calendar-button-active-border-color:var(--utrecht-calendar-table-days-item-day-active-border-color);--utrecht-calendar-button-active-color:var(--utrecht-calendar-table-days-item-day-active-color)}.utrecht-calendar__table-days-item-day:disabled{--utrecht-calendar-button-disabled-background-color:var(\n --utrecht-calendar-table-days-item-day-disabled-background-color\n );--utrecht-calendar-button-disabled-border-color:var(--utrecht-calendar-table-days-item-day-disabled-border-color);--utrecht-calendar-button-disabled-color:var(--utrecht-calendar-table-days-item-day-disabled-color)}.utrecht-calendar__table-days-item-day--out-of-the-month{--utrecht-calendar-button-background-color:var(\n --utrecht-calendar-table-days-item-day-out-of-the-month-background-color\n );--utrecht-calendar-button-border-color:var(--utrecht-calendar-table-days-item-day-out-of-the-month-border-color);--utrecht-calendar-button-color:var(--utrecht-calendar-table-days-item-day-out-of-the-month-color)}.utrecht-calendar__table-days-item-day--is-today{--utrecht-calendar-button-font-weight:var(--utrecht-calendar-table-days-item-day-is-today-font-weight);--utrecht-calendar-button-background-color:var(--utrecht-calendar-table-days-item-day-is-today-background-color);--utrecht-calendar-button-border-color:var(--utrecht-calendar-table-days-item-day-is-today-border-color);--utrecht-calendar-button-color:var(--utrecht-calendar-table-days-item-day-is-today-color)}.utrecht-calendar__table-days-item-day--emphasis{--utrecht-calendar-button-font-weight:var(--utrecht-calendar-table-days-item-day-emphasis-font-weight);--utrecht-calendar-button-background-color:var(--utrecht-calendar-table-days-item-day-emphasis-background-color);--utrecht-calendar-button-border-color:var(--utrecht-calendar-table-days-item-day-emphasis-border-color);--utrecht-calendar-button-color:var(--utrecht-calendar-table-days-item-day-emphasis-color)}.utrecht-calendar__table-days-item-day--selected{--utrecht-calendar-button-font-weight:var(--utrecht-calendar-table-days-item-day-selected-font-weight);--utrecht-calendar-button-background-color:var(--utrecht-calendar-table-days-item-day-selected-background-color);--utrecht-calendar-button-border-color:var(--utrecht-calendar-table-days-item-day-selected-border-color);--utrecht-calendar-button-color:var(--utrecht-calendar-table-days-item-day-selected-color)}.utrecht-calendar__navigation{background-color:var(--utrecht-calendar-navigation-background-color);color:var(--utrecht-calendar-navigation-color);padding-block-end:var(--utrecht-calendar-navigation-padding-block-end);padding-block-start:var(--utrecht-calendar-navigation-padding-block-start)}.utrecht-calendar__navigation-label{color:var(--utrecht-calendar-navigation-label-color);font-size:var(--utrecht-calendar-navigation-label-font-size);text-align:center}.utrecht-calendar__navigation-buttons{align-items:center;display:flex;flex-grow:1;justify-content:space-between}.utrecht-calendar__button{--utrecht-button-subtle-color:var(--utrecht-calendar-button-color,currentColor);--utrecht-button-subtle-background-color:var(--utrecht-calendar-button-background-color,transparent);--utrecht-button-subtle-border-color:var(--utrecht-calendar-button-border-color,transparent);--utrecht-button-subtle-border-width:var(--utrecht-calendar-button-border-width);--utrecht-button-font-weight:var(--utrecht-calendar-button-font-weight);--utrecht-button-subtle-focus-background-color:var(--utrecht-calendar-button-focus-background-color);--utrecht-button-subtle-focus-border-color:var(--utrecht-calendar-button-focus-border-color);--utrecht-button-subtle-focus-color:var(--utrecht-calendar-button-focus-color);--utrecht-button-subtle-active-background-color:var(--utrecht-calendar-button-active-background-color);--utrecht-button-subtle-active-border-color:var(--utrecht-calendar-button-active-border-color);--utrecht-button-subtle-active-color:var(--utrecht-calendar-button-active-color);--utrecht-button-subtle-hover-background-color:var(--utrecht-calendar-button-hover-background-color);--utrecht-button-subtle-hover-border-color:var(--utrecht-calendar-button-hover-border-color,transparent);--utrecht-button-subtle-hover-color:var(--utrecht-calendar-button-hover-color);--utrecht-button-subtle-disabled-background-color:var(--utrecht-calendar-button-disabled-background-color);--utrecht-button-subtle-disabled-border-color:var(--utrecht-calendar-button-disabled-border-color);--utrecht-button-subtle-disabled-color:var(--utrecht-calendar-button-disabled-color);--utrecht-button-padding-block-end:var(--utrecht-calendar-button-padding-block-end,0);--utrecht-button-padding-block-start:var(--utrecht-calendar-button-padding-block-start,0);--utrecht-button-padding-inline-end:var(--utrecht-calendar-button-padding-inline-end,0);--utrecht-button-padding-inline-start:var(--utrecht-calendar-button-padding-inline-start,0);cursor:pointer}.utrecht-calendar__icon{block-size:var(--utrecht-calendar-icon-size);inline-size:var(--utrecht-calendar-icon-size)}";
41
+ styleInject(css_248z);
42
+
43
+ var _excluded$d = ["children"];
44
+ function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
45
+ function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46
+ var CalendarNavigation = function CalendarNavigation(_ref) {
47
+ var children = _ref.children,
48
+ props = _objectWithoutProperties(_ref, _excluded$d);
49
+ return jsx("div", _objectSpread$d(_objectSpread$d({
50
+ className: "utrecht-calendar__navigation"
51
+ }, props), {}, {
52
+ children: children
53
+ }));
54
+ };
55
+
56
+ var _excluded$c = ["appearance", "busy", "disabled", "children", "className", "hint", "pressed", "type"];
57
+ function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
58
+ function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
59
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
+ var appearance = _ref.appearance,
61
+ busy = _ref.busy,
62
+ disabled = _ref.disabled,
63
+ children = _ref.children,
64
+ className = _ref.className,
65
+ hint = _ref.hint,
66
+ pressed = _ref.pressed,
67
+ type = _ref.type,
68
+ restProps = _objectWithoutProperties(_ref, _excluded$c);
69
+ return jsx("button", _objectSpread$c(_objectSpread$c({
70
+ ref: ref,
71
+ 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', pressed === true && 'utrecht-button--pressed', className),
72
+ "aria-busy": busy || undefined,
73
+ "aria-pressed": typeof pressed === 'boolean' ? pressed : undefined,
74
+ disabled: disabled,
75
+ type: type || 'button'
76
+ }, restProps), {}, {
77
+ children: children
78
+ }));
79
+ });
80
+ Button.displayName = 'Button';
81
+
82
+ var _excluded$b = ["children", "className"];
83
+ function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
84
+ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
85
+ var CalendarButton = function CalendarButton(_ref) {
86
+ var children = _ref.children,
87
+ className = _ref.className,
88
+ props = _objectWithoutProperties(_ref, _excluded$b);
89
+ return jsx(Button, _objectSpread$b(_objectSpread$b({
90
+ appearance: "subtle-button"
91
+ }, props), {}, {
92
+ className: clsx$1('utrecht-calendar__button', className),
93
+ children: children
94
+ }));
95
+ };
96
+
97
+ var _excluded$a = ["children"];
98
+ function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
99
+ function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
100
+ var CalendarIcon = function CalendarIcon(_ref) {
101
+ var children = _ref.children,
102
+ props = _objectWithoutProperties(_ref, _excluded$a);
103
+ return jsx("div", _objectSpread$a(_objectSpread$a({
104
+ className: clsx$1('utrecht-calendar__icon')
105
+ }, props), {}, {
106
+ children: children
107
+ }));
108
+ };
109
+
110
+ var _excluded$9 = ["onPreviousClick", "onNextClick", "previousIcon", "nextIcon", "children"];
111
+ function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
112
+ function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
113
+ var CalendarNavigationButtons = function CalendarNavigationButtons(_ref) {
114
+ var onPreviousClick = _ref.onPreviousClick,
115
+ onNextClick = _ref.onNextClick,
116
+ previousIcon = _ref.previousIcon,
117
+ nextIcon = _ref.nextIcon,
118
+ children = _ref.children,
119
+ props = _objectWithoutProperties(_ref, _excluded$9);
120
+ return jsxs("div", {
121
+ className: "utrecht-calendar__navigation-buttons",
122
+ children: [jsx(CalendarButton, _objectSpread$9(_objectSpread$9({
123
+ onClick: onPreviousClick
124
+ }, props), {}, {
125
+ children: jsx(CalendarIcon, {
126
+ children: previousIcon
127
+ })
128
+ })), children, jsx(CalendarButton, _objectSpread$9(_objectSpread$9({
129
+ onClick: onNextClick
130
+ }, props), {}, {
131
+ children: jsx(CalendarIcon, {
132
+ children: nextIcon
133
+ })
134
+ }))]
135
+ });
136
+ };
137
+
138
+ var _excluded$8 = ["children"];
139
+ function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
140
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
141
+ var CalendarNavigationLabel = function CalendarNavigationLabel(_ref) {
142
+ var children = _ref.children,
143
+ props = _objectWithoutProperties(_ref, _excluded$8);
144
+ return jsx("time", _objectSpread$8(_objectSpread$8({
145
+ className: "utrecht-calendar__navigation-label"
146
+ }, props), {}, {
147
+ children: children
148
+ }));
149
+ };
150
+
151
+ var _excluded$7 = ["children"];
152
+ function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
153
+ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
154
+ var CalendarTableDaysContainer = function CalendarTableDaysContainer(_ref) {
155
+ var children = _ref.children,
156
+ props = _objectWithoutProperties(_ref, _excluded$7);
157
+ return jsx("tbody", _objectSpread$7(_objectSpread$7({}, props), {}, {
158
+ className: "utrecht-calendar__table-days-container",
159
+ children: children
160
+ }));
161
+ };
162
+
163
+ var _excluded$6 = ["children"];
164
+ function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
165
+ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
166
+ var CalendarTableDaysItem = function CalendarTableDaysItem(_ref) {
167
+ var children = _ref.children,
168
+ props = _objectWithoutProperties(_ref, _excluded$6);
169
+ return jsx("tr", _objectSpread$6(_objectSpread$6({}, props), {}, {
170
+ children: children
171
+ }));
172
+ };
173
+
174
+ var _excluded$5 = ["day", "dayOutOfTheMonth", "isToday", "emphasis", "selected", "disabled"];
175
+ function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
176
+ function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
177
+ var CalendarTableDaysItemDay = function CalendarTableDaysItemDay(_ref) {
178
+ var day = _ref.day,
179
+ dayOutOfTheMonth = _ref.dayOutOfTheMonth,
180
+ isToday = _ref.isToday,
181
+ emphasis = _ref.emphasis,
182
+ selected = _ref.selected,
183
+ disabled = _ref.disabled,
184
+ props = _objectWithoutProperties(_ref, _excluded$5);
185
+ return jsx("td", {
186
+ children: jsx(CalendarButton, _objectSpread$5(_objectSpread$5({
187
+ className: clsx('utrecht-calendar__table-days-item-day', {
188
+ 'utrecht-calendar__table-days-item-day--out-of-the-month': dayOutOfTheMonth
189
+ }, {
190
+ 'utrecht-calendar__table-days-item-day--is-today': isToday
191
+ }, {
192
+ 'utrecht-calendar__table-days-item-day--emphasis': emphasis
193
+ }, {
194
+ 'utrecht-calendar__table-days-item-day--selected': selected
195
+ }),
196
+ disabled: disabled
197
+ }, props), {}, {
198
+ children: day
199
+ }))
200
+ });
201
+ };
202
+
203
+ var CalendarTableWeeksContainer = function CalendarTableWeeksContainer(_ref) {
204
+ var children = _ref.children;
205
+ return jsx("thead", {
206
+ className: "utrecht-calendar__table-weeks-container",
207
+ children: jsx("tr", {
208
+ className: "utrecht-calendar__table-weeks-container-content",
209
+ children: children
210
+ })
211
+ });
212
+ };
213
+
214
+ var _excluded$4 = ["children"];
215
+ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
216
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
217
+ var CalendarTableWeeksItem = function CalendarTableWeeksItem(_ref) {
218
+ var children = _ref.children,
219
+ props = _objectWithoutProperties(_ref, _excluded$4);
220
+ return jsx("th", _objectSpread$4(_objectSpread$4({}, props), {}, {
221
+ className: "utrecht-calendar__table-weeks-item",
222
+ children: children
223
+ }));
224
+ };
225
+
226
+ var _excluded$3 = ["title", "titleId"];
227
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
228
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
229
+ var IconArrowLeft = function IconArrowLeft(_ref) {
230
+ var title = _ref.title,
231
+ titleId = _ref.titleId,
232
+ props = _objectWithoutProperties(_ref, _excluded$3);
233
+ return jsxs("svg", _objectSpread$3(_objectSpread$3({
234
+ width: "100%",
235
+ height: "100%",
236
+ fill: "none",
237
+ xmlns: "http://www.w3.org/2000/svg",
238
+ "aria-labelledby": titleId
239
+ }, props), {}, {
240
+ children: [title ? jsx("title", {
241
+ id: titleId,
242
+ children: title
243
+ }) : null, jsx("path", {
244
+ d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41Z",
245
+ fill: "currentColor"
246
+ })]
247
+ }));
248
+ };
249
+
250
+ var _excluded$2 = ["title", "titleId"];
251
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
252
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
253
+ var IconArrowLeftDouble = function IconArrowLeftDouble(_ref) {
254
+ var title = _ref.title,
255
+ titleId = _ref.titleId,
256
+ props = _objectWithoutProperties(_ref, _excluded$2);
257
+ return jsxs("svg", _objectSpread$2(_objectSpread$2({
258
+ width: "100%",
259
+ height: "100%",
260
+ fill: "none",
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ "aria-labelledby": titleId
263
+ }, props), {}, {
264
+ children: [title ? jsx("title", {
265
+ id: titleId,
266
+ children: title
267
+ }) : null, jsx("path", {
268
+ d: "M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6 6 6Z",
269
+ fill: "currentColor"
270
+ }), jsx("path", {
271
+ d: "m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6 6 6Z",
272
+ fill: "currentColor"
273
+ })]
274
+ }));
275
+ };
276
+
277
+ var _excluded$1 = ["title", "titleId"];
278
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
279
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
280
+ var IconArrowRight = function IconArrowRight(_ref) {
281
+ var title = _ref.title,
282
+ titleId = _ref.titleId,
283
+ props = _objectWithoutProperties(_ref, _excluded$1);
284
+ return jsxs("svg", _objectSpread$1(_objectSpread$1({
285
+ width: "100%",
286
+ height: "100%",
287
+ fill: "none",
288
+ xmlns: "http://www.w3.org/2000/svg",
289
+ "aria-labelledby": titleId
290
+ }, props), {}, {
291
+ children: [title ? jsx("title", {
292
+ id: titleId,
293
+ children: title
294
+ }) : null, jsx("path", {
295
+ d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41Z",
296
+ fill: "currentColor"
297
+ })]
298
+ }));
299
+ };
300
+
301
+ var _excluded = ["title", "titleId"];
302
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
303
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
304
+ var IconArrowRightDouble = function IconArrowRightDouble(_ref) {
305
+ var title = _ref.title,
306
+ titleId = _ref.titleId,
307
+ props = _objectWithoutProperties(_ref, _excluded);
308
+ return jsxs("svg", _objectSpread(_objectSpread({
309
+ fill: "none",
310
+ width: "100%",
311
+ height: "100%",
312
+ xmlns: "http://www.w3.org/2000/svg",
313
+ "aria-labelledby": titleId
314
+ }, props), {}, {
315
+ children: [title ? jsx("title", {
316
+ id: titleId,
317
+ children: title
318
+ }) : null, jsx("path", {
319
+ d: "M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6-6-6Z",
320
+ fill: "currentColor"
321
+ }), jsx("path", {
322
+ d: "m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6-6-6Z",
323
+ fill: "currentColor"
324
+ })]
325
+ }));
326
+ };
327
+
328
+ function createCalendar(today) {
329
+ var start = startOfWeek(startOfMonth(today), {
330
+ weekStartsOn: 1 /* Monday */
331
+ });
332
+
333
+ var end = endOfWeek(addWeeks(start, 5), {
334
+ weekStartsOn: 1 /* Monday */
335
+ });
336
+
337
+ return eachDayOfInterval({
338
+ start: start,
339
+ end: end
340
+ });
341
+ }
342
+ /**
343
+ * Calendar Component
344
+ * powered by date-fns, so that make it easy to use the `date-fns` date functions & locale
345
+ * */
346
+ var Calendar = function Calendar(_ref) {
347
+ var onCalendarClick = _ref.onCalendarClick,
348
+ events = _ref.events,
349
+ currentDate = _ref.currentDate,
350
+ _ref$locale = _ref.locale,
351
+ locale = _ref$locale === void 0 ? enUS : _ref$locale,
352
+ _ref$previousYearButt = _ref.previousYearButtonTitle,
353
+ previousYearButtonTitle = _ref$previousYearButt === void 0 ? 'Previous year' : _ref$previousYearButt,
354
+ _ref$nextYearButtonTi = _ref.nextYearButtonTitle,
355
+ nextYearButtonTitle = _ref$nextYearButtonTi === void 0 ? 'Next year' : _ref$nextYearButtonTi,
356
+ _ref$previousMonthBut = _ref.previousMonthButtonTitle,
357
+ previousMonthButtonTitle = _ref$previousMonthBut === void 0 ? 'Previous month' : _ref$previousMonthBut,
358
+ _ref$nextMonthButtonT = _ref.nextMonthButtonTitle,
359
+ nextMonthButtonTitle = _ref$nextMonthButtonT === void 0 ? 'Next month' : _ref$nextMonthButtonT,
360
+ minDate = _ref.minDate,
361
+ maxDate = _ref.maxDate;
362
+ var _useState = useState(currentDate || new Date()),
363
+ _useState2 = _slicedToArray(_useState, 2),
364
+ visibleMonth = _useState2[0],
365
+ setVisibleMonth = _useState2[1];
366
+ var _useState3 = useState(currentDate),
367
+ _useState4 = _slicedToArray(_useState3, 2),
368
+ selectedDate = _useState4[0],
369
+ setSelectedDate = _useState4[1];
370
+ var calendar = createCalendar(visibleMonth);
371
+ var start = startOfWeek(visibleMonth, {
372
+ weekStartsOn: 1
373
+ });
374
+ var end = endOfWeek(visibleMonth, {
375
+ weekStartsOn: 1
376
+ });
377
+ var currentWeek = eachDayOfInterval({
378
+ start: start,
379
+ end: end
380
+ }).map(function (day) {
381
+ return day;
382
+ });
383
+ var chunksWeeks = chunk(calendar, calendar.length / 6);
384
+ var weeks = chunksWeeks.map(function (week) {
385
+ return week.map(function (date) {
386
+ var currentEvent = events && events.length > 0 && events.find(function (e) {
387
+ return isSameDay(endOfDay(parseISO(e.date)), date);
388
+ });
389
+ if (currentEvent) {
390
+ return {
391
+ date: date,
392
+ emphasis: currentEvent.emphasis,
393
+ selected: currentEvent.selected,
394
+ disabled: currentEvent.disabled
395
+ };
396
+ } else {
397
+ return {
398
+ date: date,
399
+ emphasis: false,
400
+ selected: false,
401
+ disabled: false
402
+ };
403
+ }
404
+ });
405
+ });
406
+ return jsxs("div", {
407
+ className: "utrecht-calendar",
408
+ children: [jsx(CalendarNavigation, {
409
+ children: jsx(CalendarNavigationButtons, {
410
+ previousIcon: jsx(IconArrowLeftDouble, {
411
+ title: previousYearButtonTitle
412
+ }),
413
+ nextIcon: jsx(IconArrowRightDouble, {
414
+ title: nextYearButtonTitle
415
+ }),
416
+ onPreviousClick: function onPreviousClick() {
417
+ return setVisibleMonth(setYear(visibleMonth, getYear(visibleMonth) - 1));
418
+ },
419
+ onNextClick: function onNextClick() {
420
+ return setVisibleMonth(addYears(visibleMonth, 1));
421
+ },
422
+ children: jsx(CalendarNavigationButtons, {
423
+ previousIcon: jsx(IconArrowLeft, {
424
+ title: previousMonthButtonTitle
425
+ }),
426
+ nextIcon: jsx(IconArrowRight, {
427
+ title: nextMonthButtonTitle
428
+ }),
429
+ onPreviousClick: function onPreviousClick() {
430
+ return setVisibleMonth(setMonth(visibleMonth, visibleMonth.getMonth() - 1));
431
+ },
432
+ onNextClick: function onNextClick() {
433
+ return setVisibleMonth(addMonths(visibleMonth, 1));
434
+ },
435
+ children: jsx(CalendarNavigationLabel, {
436
+ dateTime: format(visibleMonth, 'yyyy-mm'),
437
+ children: format(visibleMonth, 'LLLL Y', {
438
+ locale: locale
439
+ })
440
+ })
441
+ })
442
+ })
443
+ }), jsxs("table", {
444
+ className: "utrecht-calendar__table",
445
+ role: "grid",
446
+ children: [jsx(CalendarTableWeeksContainer, {
447
+ children: currentWeek && currentWeek.length > 0 && currentWeek.map(function (day, index) {
448
+ return jsx(CalendarTableWeeksItem, {
449
+ scope: "col",
450
+ abbr: format(day, 'EEEE', {
451
+ locale: locale
452
+ }),
453
+ children: format(day, 'EEEEEE', {
454
+ locale: locale
455
+ })
456
+ }, index);
457
+ })
458
+ }), jsx(CalendarTableDaysContainer, {
459
+ children: weeks && weeks.length > 0 && weeks.map(function (week, index) {
460
+ return jsx(CalendarTableDaysItem, {
461
+ children: week.map(function (day, index) {
462
+ return jsx(CalendarTableDaysItemDay, {
463
+ isToday: isSameDay(day.date, Date.now()),
464
+ dayOutOfTheMonth: !isSameMonth(day.date, visibleMonth),
465
+ onClick: function onClick() {
466
+ setVisibleMonth(day.date);
467
+ setSelectedDate(day.date);
468
+ onCalendarClick(formatISO(day.date));
469
+ },
470
+ "aria-label": format(day.date, 'eeee dd LLLL Y', {
471
+ locale: locale
472
+ }),
473
+ day: day.date.getDate().toString(),
474
+ emphasis: day.emphasis,
475
+ selected: day.selected || selectedDate && isSameDay(day.date, selectedDate),
476
+ disabled: day.disabled || minDate && isBefore(day.date, startOfDay(minDate)) || maxDate && isAfter(day.date, endOfDay(maxDate))
477
+ }, index);
478
+ })
479
+ }, index);
480
+ })
481
+ })]
482
+ })]
483
+ });
484
+ };
485
+
486
+ export { Calendar };
487
+ //# sourceMappingURL=Calendar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.mjs","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2021 Robbert Broersma
4
4
  */
5
5
  import { HTMLAttributes } from 'react';
6
- export type URLValueProps = HTMLAttributes<HTMLElement>;
7
- export declare const URLValue: import("react").ForwardRefExoticComponent<URLValueProps & {
6
+ export type URLDataProps = HTMLAttributes<HTMLElement>;
7
+ export declare const URLData: import("react").ForwardRefExoticComponent<URLDataProps & {
8
8
  children?: import("react").ReactNode;
9
9
  } & import("react").RefAttributes<HTMLElement>>;
@@ -0,0 +1,135 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var clsx = require('clsx');
7
+ var reactVega = require('react-vega');
8
+
9
+ function styleInject(css, ref) {
10
+ if ( ref === void 0 ) ref = {};
11
+ var insertAt = ref.insertAt;
12
+
13
+ if (!css || typeof document === 'undefined') { return; }
14
+
15
+ var head = document.head || document.getElementsByTagName('head')[0];
16
+ var style = document.createElement('style');
17
+ style.type = 'text/css';
18
+
19
+ if (insertAt === 'top') {
20
+ if (head.firstChild) {
21
+ head.insertBefore(style, head.firstChild);
22
+ } else {
23
+ head.appendChild(style);
24
+ }
25
+ } else {
26
+ head.appendChild(style);
27
+ }
28
+
29
+ if (style.styleSheet) {
30
+ style.styleSheet.cssText = css;
31
+ } else {
32
+ style.appendChild(document.createTextNode(css));
33
+ }
34
+ }
35
+
36
+ var css_248z = ".utrecht-vega-visualization{display:inline-block}";
37
+ styleInject(css_248z);
38
+
39
+ var _excluded = ["actions", "className", "config", "label"];
40
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
41
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
42
+ var defaultConfig = {
43
+ font: 'var(--utrecht-vega-visualization-font-family, var(--utrecht-document-font-family))',
44
+ title: {
45
+ fontSize: 20,
46
+ anchor: 'start',
47
+ offset: 32,
48
+ subtitleFontSize: 16
49
+ },
50
+ range: {
51
+ category: {
52
+ scheme: 'set1'
53
+ }
54
+ },
55
+ axis: {
56
+ labelFontSize: 16,
57
+ titleFontSize: 16,
58
+ labelFontWeight: 'bold',
59
+ titleFontWeight: 'normal',
60
+ labelAngle: 0,
61
+ ticks: false,
62
+ labelPadding: 12,
63
+ domainColor: 'var(--utrecht-vega-visualization-axis-domain-color, black)',
64
+ gridColor: 'var(--utrecht-vega-visualization-axis-grid-color, gray)',
65
+ tickColor: 'var(--utrecht-vega-visualization-axis-tick-color, black)'
66
+ },
67
+ axisY: {
68
+ titleAngle: 0,
69
+ titleX: 0,
70
+ titleY: 7,
71
+ titleAlign: 'left',
72
+ titleFontWeight: 'bold',
73
+ domain: false
74
+ },
75
+ legend: {
76
+ labelFontSize: 16,
77
+ titleFontSize: 16
78
+ },
79
+ bar: {
80
+ width: {
81
+ band: 0.85
82
+ }
83
+ },
84
+ view: {
85
+ stroke: null
86
+ },
87
+ padding: {
88
+ left: 20,
89
+ top: 20,
90
+ right: 25,
91
+ bottom: 20
92
+ },
93
+ locale: {
94
+ number: {
95
+ decimal: ',',
96
+ thousands: '.',
97
+ grouping: [3],
98
+ currency: ['', "\xA0\u20AC"]
99
+ },
100
+ time: {
101
+ dateTime: '%a %e %B %Y %X',
102
+ date: '%d-%m-%Y',
103
+ time: '%H:%M:%S',
104
+ periods: ['AM', 'PM'],
105
+ days: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
106
+ shortDays: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
107
+ months: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
108
+ shortMonths: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
109
+ }
110
+ }
111
+ };
112
+ var VegaVisualization = function VegaVisualization(_ref) {
113
+ var _ref$actions = _ref.actions,
114
+ actions = _ref$actions === void 0 ? false : _ref$actions,
115
+ className = _ref.className,
116
+ config = _ref.config,
117
+ label = _ref.label,
118
+ restProps = _objectWithoutProperties(_ref, _excluded);
119
+ return jsxRuntime.jsx("div", {
120
+ className: clsx('utrecht-vega-visualization', className),
121
+ role: "image",
122
+ "aria-label": label,
123
+ children: jsxRuntime.jsx("div", {
124
+ "aria-hidden": true,
125
+ children: jsxRuntime.jsx(reactVega.Vega, _objectSpread(_objectSpread({}, restProps), {}, {
126
+ actions: actions,
127
+ renderer: 'svg',
128
+ config: _objectSpread(_objectSpread({}, defaultConfig), config)
129
+ }))
130
+ })
131
+ });
132
+ };
133
+
134
+ exports.VegaVisualization = VegaVisualization;
135
+ //# sourceMappingURL=VegaVisualization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VegaVisualization.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}