@utrecht/component-library-react 1.0.0-alpha.196 → 1.0.0-alpha.198
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.
- package/dist/index.cjs.js +4 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -9,12 +9,13 @@ var react = require('react');
|
|
|
9
9
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
10
10
|
var dateFns = require('date-fns');
|
|
11
11
|
var locale = require('date-fns/locale');
|
|
12
|
-
var
|
|
12
|
+
var chunk = require('lodash.chunk');
|
|
13
13
|
|
|
14
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
15
|
|
|
16
16
|
var clsx__default = /*#__PURE__*/_interopDefaultLegacy(clsx);
|
|
17
17
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
18
|
+
var chunk__default = /*#__PURE__*/_interopDefaultLegacy(chunk);
|
|
18
19
|
|
|
19
20
|
var Alert = /*#__PURE__*/react.forwardRef(function (_a, ref) {
|
|
20
21
|
var children = _a.children,
|
|
@@ -526,7 +527,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
526
527
|
}).map(function (day) {
|
|
527
528
|
return day;
|
|
528
529
|
});
|
|
529
|
-
var chunksWeeks =
|
|
530
|
+
var chunksWeeks = chunk__default["default"](calendar, calendar.length / 6);
|
|
530
531
|
var weeks = chunksWeeks.map(function (week) {
|
|
531
532
|
return week.map(function (date) {
|
|
532
533
|
var currentEvent = events && events.length > 0 && events.find(function (e) {
|
|
@@ -614,7 +615,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
614
615
|
isToday: dateFns.isSameDay(date, day.date),
|
|
615
616
|
dayOutOfTheMonth: !dateFns.isSameMonth(day.date, date),
|
|
616
617
|
onClick: function onClick(event) {
|
|
617
|
-
var selectedDay = dateFns.setDate(date,
|
|
618
|
+
var selectedDay = dateFns.setDate(date, Number(event.target.textContent));
|
|
618
619
|
setDate(selectedDay);
|
|
619
620
|
onCalendarClick(dateFns.formatISO(selectedDay));
|
|
620
621
|
},
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 +5,7 @@ import { forwardRef, useState } from 'react';
|
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfDay, parseISO, setYear, getYear, addYears, setMonth, addMonths, format, isSameMonth, setDate, formatISO, startOfMonth, addWeeks } from 'date-fns';
|
|
7
7
|
import { enUS } from 'date-fns/locale';
|
|
8
|
-
import
|
|
8
|
+
import chunk from 'lodash.chunk';
|
|
9
9
|
|
|
10
10
|
var Alert = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
11
11
|
var children = _a.children,
|
|
@@ -605,7 +605,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
605
605
|
isToday: isSameDay(date, day.date),
|
|
606
606
|
dayOutOfTheMonth: !isSameMonth(day.date, date),
|
|
607
607
|
onClick: function onClick(event) {
|
|
608
|
-
var selectedDay = setDate(date,
|
|
608
|
+
var selectedDay = setDate(date, Number(event.target.textContent));
|
|
609
609
|
setDate$1(selectedDay);
|
|
610
610
|
onCalendarClick(formatISO(selectedDay));
|
|
611
611
|
},
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.0-alpha.
|
|
2
|
+
"version": "1.0.0-alpha.198",
|
|
3
3
|
"author": "Community for NL Design System",
|
|
4
4
|
"description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@testing-library/user-event": "14.4.0",
|
|
50
50
|
"@types/date-fns": "2.6.0",
|
|
51
51
|
"@types/jest": "28.1.8",
|
|
52
|
-
"@types/lodash": "4.
|
|
52
|
+
"@types/lodash.chunk": "4.2.7",
|
|
53
53
|
"@types/react": "18.0.17",
|
|
54
54
|
"@types/testing-library__jest-dom": "5.14.5",
|
|
55
55
|
"jest": "28.1.3",
|
|
56
56
|
"jest-environment-jsdom": "28.1.3",
|
|
57
|
-
"lodash": "4.
|
|
57
|
+
"lodash.chunk": "4.2.0",
|
|
58
58
|
"next": "12.2.3",
|
|
59
59
|
"npm-run-all": "4.1.5",
|
|
60
60
|
"react": "18.2.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react": "16 - 18",
|
|
77
77
|
"react-dom": "16 - 18"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "f61c54ed19695db1a148871d275ae02618af7259"
|
|
80
80
|
}
|