@utrecht/calendar-react 1.0.3 → 1.0.5
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/css.cjs +18 -2
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.ts +2 -2
- package/dist/css.d.ts.map +1 -1
- package/dist/css.mjs +3648 -416
- package/dist/css.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3630 -415
- package/dist/index.mjs.map +1 -1
- package/dist/insert-style.d.ts +2 -0
- package/dist/insert-style.d.ts.map +1 -0
- package/package.json +8 -19
- package/src/css.tsx +6 -2
- package/src/index.tsx +1 -1
- package/src/insert-style.ts +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert-style.d.ts","sourceRoot":"","sources":["../src/insert-style.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAkB,MAAM,SAO/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utrecht/calendar-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"author": "Community for NL Design System",
|
|
5
5
|
"description": "Calendar component for the Municipality of Utrecht based on the NL Design System architecture",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -13,31 +13,20 @@
|
|
|
13
13
|
],
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@babel/plugin-transform-runtime": "7.24.7",
|
|
17
|
-
"@babel/preset-react": "7.24.7",
|
|
18
|
-
"@rollup/plugin-babel": "6.0.4",
|
|
19
|
-
"@rollup/plugin-commonjs": "26.0.1",
|
|
20
|
-
"@rollup/plugin-json": "6.1.0",
|
|
21
|
-
"@rollup/plugin-node-resolve": "15.2.3",
|
|
22
|
-
"@rollup/plugin-typescript": "12.1.0",
|
|
23
16
|
"@testing-library/dom": "8.20.1",
|
|
24
17
|
"@testing-library/jest-dom": "6.5.0",
|
|
25
18
|
"@testing-library/react": "16.0.1",
|
|
26
19
|
"@testing-library/user-event": "14.5.1",
|
|
27
20
|
"@types/jest": "29.5.13",
|
|
28
|
-
"@types/lodash
|
|
21
|
+
"@types/lodash-es": "4.17.12",
|
|
29
22
|
"@types/react": "18.3.3",
|
|
30
23
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
31
24
|
"jest": "29.7.0",
|
|
32
25
|
"jest-environment-jsdom": "29.7.0",
|
|
33
26
|
"react": "18.3.1",
|
|
34
27
|
"rollup": "4.23.0",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
38
|
-
"rollup-plugin-postcss": "4.0.2",
|
|
39
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
40
|
-
"typescript": "5.6.2"
|
|
28
|
+
"typescript": "5.6.2",
|
|
29
|
+
"@utrecht/build-utils-react": "0.0.1"
|
|
41
30
|
},
|
|
42
31
|
"keywords": [
|
|
43
32
|
"nl-design-system"
|
|
@@ -58,14 +47,14 @@
|
|
|
58
47
|
"dependencies": {
|
|
59
48
|
"clsx": "2.1.1",
|
|
60
49
|
"date-fns": "2.30.0",
|
|
61
|
-
"lodash
|
|
62
|
-
"@utrecht/button-react": "2.0.
|
|
63
|
-
"@utrecht/calendar-css": "1.
|
|
50
|
+
"lodash-es": "4.17.21",
|
|
51
|
+
"@utrecht/button-react": "2.0.2",
|
|
52
|
+
"@utrecht/calendar-css": "1.3.0"
|
|
64
53
|
},
|
|
65
54
|
"scripts": {
|
|
66
55
|
"clean": "rimraf dist *.tsbuildinfo .rollup.cache coverage",
|
|
67
56
|
"build": "rollup -c ./rollup.config.mjs",
|
|
68
|
-
"test": "mkdir -p pages && jest --coverage --verbose",
|
|
57
|
+
"disabled-test": "mkdir -p pages && jest --coverage --verbose",
|
|
69
58
|
"typecheck": "tsc --noEmit"
|
|
70
59
|
}
|
|
71
60
|
}
|
package/src/css.tsx
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license EUPL-1.2
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2020-2024 Frameless B.V.
|
|
4
|
+
* Copyright (c) 2021-2024 Gemeente Utrecht
|
|
4
5
|
*/
|
|
5
6
|
|
|
6
|
-
import '@utrecht/calendar-css/
|
|
7
|
+
import css from '@utrecht/calendar-css/dist/index.mjs';
|
|
8
|
+
import { insertStyle } from './insert-style';
|
|
9
|
+
|
|
10
|
+
insertStyle(css);
|
|
7
11
|
|
|
8
12
|
export type { CalendarProps } from './index';
|
|
9
13
|
export { Calendar } from './index';
|
package/src/index.tsx
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
startOfWeek,
|
|
22
22
|
} from 'date-fns';
|
|
23
23
|
import { enUS } from 'date-fns/locale';
|
|
24
|
-
import chunk from 'lodash
|
|
24
|
+
import chunk from 'lodash-es/chunk';
|
|
25
25
|
import { useState } from 'react';
|
|
26
26
|
import { CalendarNavigation } from './CalendarNavigation';
|
|
27
27
|
import { CalendarNavigationButtons } from './CalendarNavigationButtons';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const insertStyle = function (css: string) {
|
|
2
|
+
if (typeof document !== 'undefined') {
|
|
3
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
4
|
+
var style = document.createElement('style');
|
|
5
|
+
style.appendChild(document.createTextNode(css));
|
|
6
|
+
head.appendChild(style);
|
|
7
|
+
}
|
|
8
|
+
};
|