@bbl-digital/snorre 4.0.34 → 4.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +7 -1
- package/esm/core/Autocomplete/utils/useHandleOptionsHeight.js +16 -0
- package/esm/core/CheckboxController/index.js +22 -0
- package/esm/core/Datepicker/yearMonthForm.js +56 -0
- package/esm/core/EditorOld/config.js +69 -0
- package/esm/core/EditorOld/index.js +147 -0
- package/esm/core/EditorOld/styles.js +65 -0
- package/esm/core/ImageCarousel/index.js +70 -0
- package/esm/core/ImageCarousel/styles.js +58 -0
- package/esm/core/Modal/index.js +7 -1
- package/esm/enums/ModifierKey.js +13 -0
- package/esm/illustrations/Illustration.stories.js +5 -1
- package/esm/illustrations/MySite/IllustrationMySiteBenefits.js +181 -0
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts +7 -0
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts.map +1 -0
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.js +16 -0
- package/lib/core/CheckboxController/index.d.ts +1 -0
- package/lib/core/CheckboxController/index.d.ts.map +1 -0
- package/lib/core/CheckboxController/index.js +22 -0
- package/lib/core/Datepicker/yearMonthForm.d.ts +10 -0
- package/lib/core/Datepicker/yearMonthForm.d.ts.map +1 -0
- package/lib/core/Datepicker/yearMonthForm.js +56 -0
- package/lib/core/EditorOld/config.d.ts +56 -0
- package/lib/core/EditorOld/config.d.ts.map +1 -0
- package/lib/core/EditorOld/config.js +69 -0
- package/lib/core/EditorOld/index.d.ts +39 -0
- package/lib/core/EditorOld/index.d.ts.map +1 -0
- package/lib/core/EditorOld/index.js +147 -0
- package/lib/core/EditorOld/styles.d.ts +23 -0
- package/lib/core/EditorOld/styles.d.ts.map +1 -0
- package/lib/core/EditorOld/styles.js +65 -0
- package/lib/core/ImageCarousel/index.d.ts +11 -0
- package/lib/core/ImageCarousel/index.d.ts.map +1 -0
- package/lib/core/ImageCarousel/index.js +70 -0
- package/lib/core/ImageCarousel/styles.d.ts +26 -0
- package/lib/core/ImageCarousel/styles.d.ts.map +1 -0
- package/lib/core/ImageCarousel/styles.js +58 -0
- package/lib/core/Modal/index.d.ts +3 -1
- package/lib/core/Modal/index.d.ts.map +1 -1
- package/lib/core/Modal/index.js +7 -1
- package/lib/enums/ModifierKey.d.ts +12 -0
- package/lib/enums/ModifierKey.d.ts.map +1 -0
- package/lib/enums/ModifierKey.js +13 -0
- package/lib/illustrations/Illustration.stories.d.ts.map +1 -1
- package/lib/illustrations/Illustration.stories.js +5 -1
- package/lib/illustrations/MySite/IllustrationMySiteBenefits.d.ts +4 -0
- package/lib/illustrations/MySite/IllustrationMySiteBenefits.d.ts.map +1 -0
- package/lib/illustrations/MySite/IllustrationMySiteBenefits.js +181 -0
- package/package.json +1 -1
- package/esm/core/BoxedTable/TableBody/index.js +0 -10
- package/esm/core/BoxedTable/TableBody/styles.js +0 -16
- package/lib/core/BoxedTable/TableBody/index.d.ts +0 -7
- package/lib/core/BoxedTable/TableBody/index.d.ts.map +0 -1
- package/lib/core/BoxedTable/TableBody/index.js +0 -10
- package/lib/core/BoxedTable/TableBody/styles.d.ts +0 -6
- package/lib/core/BoxedTable/TableBody/styles.d.ts.map +0 -1
- package/lib/core/BoxedTable/TableBody/styles.js +0 -16
package/esm/core/Modal/index.js
CHANGED
@@ -29,6 +29,7 @@ function Modal({
|
|
29
29
|
disableFocusTrap,
|
30
30
|
onClose,
|
31
31
|
onCollapse,
|
32
|
+
onFullscreenToggle,
|
32
33
|
...restProps
|
33
34
|
}) {
|
34
35
|
const modalRef = /*#__PURE__*/createRef();
|
@@ -44,6 +45,11 @@ function Modal({
|
|
44
45
|
onClose();
|
45
46
|
}
|
46
47
|
};
|
48
|
+
const handleToggleFullscreen = () => {
|
49
|
+
const newValue = !isFullscreen;
|
50
|
+
setIsFullscreen(newValue);
|
51
|
+
onFullscreenToggle && onFullscreenToggle(newValue);
|
52
|
+
};
|
47
53
|
|
48
54
|
// Capture escape
|
49
55
|
const handleKeyDown = useCallback(event => {
|
@@ -111,7 +117,7 @@ function Modal({
|
|
111
117
|
children: _jsx(IconMinus, {})
|
112
118
|
}), toggleFullscreen && _jsx(Button, {
|
113
119
|
nostyle: true,
|
114
|
-
onClick:
|
120
|
+
onClick: handleToggleFullscreen,
|
115
121
|
focusable: true,
|
116
122
|
"aria-label": isFullscreen ? 'Lukk fullskjerm' : 'Fullskjerm',
|
117
123
|
title: isFullscreen ? 'Lukk fullskjerm' : 'Fullskjerm',
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export let ModifierKey;
|
2
|
+
|
3
|
+
(function (ModifierKey) {
|
4
|
+
ModifierKey["enter"] = "Enter";
|
5
|
+
ModifierKey["tab"] = "Tab";
|
6
|
+
ModifierKey["space"] = " ";
|
7
|
+
ModifierKey["escape"] = "Escape";
|
8
|
+
ModifierKey["shift"] = "Shift";
|
9
|
+
ModifierKey["right"] = "ArrowRight";
|
10
|
+
ModifierKey["left"] = "ArrowLeft";
|
11
|
+
ModifierKey["up"] = "ArrowUp";
|
12
|
+
ModifierKey["down"] = "ArrowDown";
|
13
|
+
})(ModifierKey || (ModifierKey = {}));
|
@@ -32,6 +32,7 @@ import IllustrationMySiteAssociation from './MySite/IllustrationMySiteAssociatio
|
|
32
32
|
import IllustrationMySiteMailbox from './MySite/IllustrationMySiteMailbox';
|
33
33
|
import SbIconGrid from '../shared/components/SbIconGrid';
|
34
34
|
import IllustrationMySiteLetterSent from './MySite/IllustrationMySiteLetterSent';
|
35
|
+
import IllustrationMySiteBenefits from './MySite/IllustrationMySiteBenefits';
|
35
36
|
import { jsx as _jsx } from "react/jsx-runtime";
|
36
37
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
37
38
|
export default {
|
@@ -156,7 +157,10 @@ export const MySiteIllustration = {
|
|
156
157
|
}), /*#__PURE__*/_jsx(IllustrationMySiteLetterSent, {
|
157
158
|
width: "120px",
|
158
159
|
height: "120px"
|
159
|
-
}), /*#__PURE__*/_jsx(
|
160
|
+
}), /*#__PURE__*/_jsx(IllustrationMySiteBenefits, {
|
161
|
+
width: "120px",
|
162
|
+
height: "120px"
|
163
|
+
})]
|
160
164
|
})]
|
161
165
|
}),
|
162
166
|
name: 'MySite Illustrations'
|
@@ -0,0 +1,181 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import withIllustration from '../withIllustration';
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
const IllustrationHouse = props => {
|
6
|
+
return /*#__PURE__*/_jsxs("svg", {
|
7
|
+
viewBox: " 0 0 125 85",
|
8
|
+
...props,
|
9
|
+
children: [/*#__PURE__*/_jsx("path", {
|
10
|
+
fill: "#E6EDFB",
|
11
|
+
className: "fill-primary10",
|
12
|
+
d: "M72.698 14.015c-8.069-.282-15.755-2.911-23.093-5.787C42.267 5.353 34.996 2.166 27.121.642c-5.066-.98-10.86-1.118-14.94 1.621-3.93 2.633-5.198 7.19-5.88 11.41-.513 3.182-.815 6.523.59 9.498.978 2.066 2.712 3.802 3.912 5.78 4.171 6.885 1.225 15.374-3.3 22.096-2.116 3.154-4.581 6.162-6.217 9.518-1.637 3.356-2.394 7.203-.963 10.627 1.42 3.395 4.802 5.943 8.466 7.736C16.23 82.57 25 83.613 33.552 84.203c18.93 1.307 37.96.74 56.94.174 7.024-.21 14.078-.422 20.988-1.518 3.837-.609 7.798-1.574 10.582-3.907 3.537-2.962 4.414-7.973 2.043-11.684-3.971-6.224-14.962-7.77-17.74-14.453-1.529-3.678.042-7.774 2.264-11.19 4.767-7.318 12.758-13.737 13.179-22.102.29-5.744-3.552-11.498-9.491-14.215-6.227-2.853-14.86-2.49-19.453 2.225-4.73 4.863-13.041 6.732-20.166 6.482z"
|
13
|
+
}), /*#__PURE__*/_jsx("path", {
|
14
|
+
fill: "#C4D4F8",
|
15
|
+
className: "fill-primary40",
|
16
|
+
fillRule: "evenodd",
|
17
|
+
d: "M23.947 34h77.107l-3.97 18.133H27.916L23.947 34z",
|
18
|
+
clipRule: "evenodd"
|
19
|
+
}), /*#__PURE__*/_jsx("path", {
|
20
|
+
fill: "#88A9F0",
|
21
|
+
className: "fill-primary",
|
22
|
+
fillRule: "evenodd",
|
23
|
+
d: "M31.884 36.267h61.232l-3.151 19.266h-54.93l-3.151-19.266z",
|
24
|
+
clipRule: "evenodd"
|
25
|
+
}), /*#__PURE__*/_jsx("path", {
|
26
|
+
fill: "#FDD33F",
|
27
|
+
d: "M34.791 40.578h10.87v16.655h-10.87V40.578z"
|
28
|
+
}), /*#__PURE__*/_jsx("path", {
|
29
|
+
fill: "#F7B523",
|
30
|
+
d: "M42.515 40.578h3.146v16.655h-3.146V40.578z"
|
31
|
+
}), /*#__PURE__*/_jsx("path", {
|
32
|
+
fill: "#FFE168",
|
33
|
+
d: "M36.508 40.578h1.716v16.655h-1.716V40.578z"
|
34
|
+
}), /*#__PURE__*/_jsx("path", {
|
35
|
+
fill: "#F7B523",
|
36
|
+
d: "M41.084 45.172h1.717v2.872h-1.717v-2.871zm0 9.19h1.717v2.871h-1.717v-2.871z"
|
37
|
+
}), /*#__PURE__*/_jsx("path", {
|
38
|
+
fill: "#F7B523",
|
39
|
+
d: "M34.791 43.45h10.87v1.722h-10.87V43.45zm0 4.594h10.87v1.723h-10.87v-1.723zm0 4.595h10.87v1.723h-10.87v-1.723z"
|
40
|
+
}), /*#__PURE__*/_jsx("path", {
|
41
|
+
fill: "#FDD33F",
|
42
|
+
d: "M27.354 45.172h10.87v12.061h-10.87v-12.06z"
|
43
|
+
}), /*#__PURE__*/_jsx("path", {
|
44
|
+
fill: "#F7B523",
|
45
|
+
d: "M35.077 43.45h3.147v13.783h-3.147V43.45z"
|
46
|
+
}), /*#__PURE__*/_jsx("path", {
|
47
|
+
fill: "#FFE168",
|
48
|
+
d: "M29.07 45.172h1.43v12.061h-1.43v-12.06z"
|
49
|
+
}), /*#__PURE__*/_jsx("path", {
|
50
|
+
fill: "#F7B523",
|
51
|
+
d: "M33.647 49.767h1.716v2.872h-1.716v-2.872zm-6.293-1.723h10.87v1.723h-10.87v-1.723zm0 4.595h10.87v1.723h-10.87v-1.723z"
|
52
|
+
}), /*#__PURE__*/_jsx("path", {
|
53
|
+
fill: "#FDD33F",
|
54
|
+
d: "M76.18 40.578h10.87v16.655H76.18V40.578z"
|
55
|
+
}), /*#__PURE__*/_jsx("path", {
|
56
|
+
fill: "#F7B523",
|
57
|
+
d: "M83.903 40.578h3.147v16.655h-3.147V40.578z"
|
58
|
+
}), /*#__PURE__*/_jsx("path", {
|
59
|
+
fill: "#FFE168",
|
60
|
+
d: "M77.896 40.578h1.716v16.655h-1.716V40.578z"
|
61
|
+
}), /*#__PURE__*/_jsx("path", {
|
62
|
+
fill: "#F7B523",
|
63
|
+
d: "M82.473 45.172h1.716v2.872h-1.716v-2.871zm0 9.19h1.716v2.871h-1.716v-2.871z"
|
64
|
+
}), /*#__PURE__*/_jsx("path", {
|
65
|
+
fill: "#F7B523",
|
66
|
+
d: "M76.18 43.45h10.87v1.722H76.18V43.45zm0 4.594h10.87v1.723H76.18v-1.723zm0 4.595h10.87v1.723H76.18v-1.723z"
|
67
|
+
}), /*#__PURE__*/_jsx("path", {
|
68
|
+
fill: "#FDD33F",
|
69
|
+
d: "M85.818 41.711h10.87v16.656h-10.87V41.71z"
|
70
|
+
}), /*#__PURE__*/_jsx("path", {
|
71
|
+
fill: "#F7B523",
|
72
|
+
d: "M93.541 41.711h3.147v16.656h-3.147V41.71z"
|
73
|
+
}), /*#__PURE__*/_jsx("path", {
|
74
|
+
fill: "#FFE168",
|
75
|
+
d: "M87.534 41.711h1.716v16.656h-1.716V41.71z"
|
76
|
+
}), /*#__PURE__*/_jsx("path", {
|
77
|
+
fill: "#F7B523",
|
78
|
+
d: "M92.111 46.306h1.716v2.871h-1.716v-2.871zm0 9.189h1.716v2.872h-1.716v-2.872zm-6.293-10.912h10.87v1.723h-10.87v-1.723zm0 4.594h10.87V50.9h-10.87v-1.723zm0 4.595h10.87v1.723h-10.87v-1.723z"
|
79
|
+
}), /*#__PURE__*/_jsx("path", {
|
80
|
+
fill: "#FDD33F",
|
81
|
+
d: "M69.974 40.578h-10.87v16.655h10.87V40.578z"
|
82
|
+
}), /*#__PURE__*/_jsx("path", {
|
83
|
+
fill: "#F7B523",
|
84
|
+
d: "M62.25 40.578h-3.147v16.655h3.147V40.578z"
|
85
|
+
}), /*#__PURE__*/_jsx("path", {
|
86
|
+
fill: "#FFE168",
|
87
|
+
d: "M68.257 40.578h-1.716v16.655h1.716V40.578z"
|
88
|
+
}), /*#__PURE__*/_jsx("path", {
|
89
|
+
fill: "#F7B523",
|
90
|
+
d: "M63.68 45.172h-1.716v2.872h1.717v-2.871zm0 9.19h-1.716v2.871h1.717v-2.871z"
|
91
|
+
}), /*#__PURE__*/_jsx("path", {
|
92
|
+
fill: "#F7B523",
|
93
|
+
d: "M69.974 43.45h-10.87v1.722h10.87V43.45zm0 4.594h-10.87v1.723h10.87v-1.723zm0 4.595h-10.87v1.723h10.87v-1.723z"
|
94
|
+
}), /*#__PURE__*/_jsx("path", {
|
95
|
+
fill: "#FDD33F",
|
96
|
+
d: "M77.411 45.172h-10.87v12.061h10.87v-12.06z"
|
97
|
+
}), /*#__PURE__*/_jsx("path", {
|
98
|
+
fill: "#F7B523",
|
99
|
+
d: "M69.688 43.45H66.54v13.783h3.147V43.45z"
|
100
|
+
}), /*#__PURE__*/_jsx("path", {
|
101
|
+
fill: "#FFE168",
|
102
|
+
d: "M75.695 45.172h-1.43v12.061h1.43v-12.06z"
|
103
|
+
}), /*#__PURE__*/_jsx("path", {
|
104
|
+
fill: "#F7B523",
|
105
|
+
d: "M71.118 49.767h-1.716v2.872h1.716v-2.872zm6.293-1.723h-10.87v1.723h10.87v-1.723zm0 4.595h-10.87v1.723h10.87v-1.723z"
|
106
|
+
}), /*#__PURE__*/_jsx("path", {
|
107
|
+
fill: "#FDD33F",
|
108
|
+
d: "M54.666 40.011h-10.87v16.656h10.87V40.01z"
|
109
|
+
}), /*#__PURE__*/_jsx("path", {
|
110
|
+
fill: "#F7B523",
|
111
|
+
d: "M46.942 40.011h-3.147v16.656h3.147V40.01z"
|
112
|
+
}), /*#__PURE__*/_jsx("path", {
|
113
|
+
fill: "#FFE168",
|
114
|
+
d: "M52.95 40.011h-1.717v16.656h1.716V40.01z"
|
115
|
+
}), /*#__PURE__*/_jsx("path", {
|
116
|
+
fill: "#F7B523",
|
117
|
+
d: "M48.373 44.606h-1.717v2.871h1.717v-2.871zm0 9.189h-1.717v2.872h1.717v-2.872zm6.293-10.912h-10.87v1.723h10.87v-1.723z"
|
118
|
+
}), /*#__PURE__*/_jsx("path", {
|
119
|
+
fill: "#F7B523",
|
120
|
+
d: "M54.666 47.477h-10.87V49.2h10.87v-1.723zm0 4.595h-10.87v1.723h10.87v-1.723z"
|
121
|
+
}), /*#__PURE__*/_jsx("path", {
|
122
|
+
fill: "#FDD33F",
|
123
|
+
d: "M62.103 45.173h-10.87v12.06h10.87v-12.06z"
|
124
|
+
}), /*#__PURE__*/_jsx("path", {
|
125
|
+
fill: "#F7B523",
|
126
|
+
d: "M54.38 43.45h-3.147v13.783h3.147V43.45z"
|
127
|
+
}), /*#__PURE__*/_jsx("path", {
|
128
|
+
fill: "#FFE168",
|
129
|
+
d: "M60.387 45.173h-1.43v12.06h1.43v-12.06z"
|
130
|
+
}), /*#__PURE__*/_jsx("path", {
|
131
|
+
fill: "#F7B523",
|
132
|
+
d: "M55.81 49.767h-1.716v2.872h1.716v-2.872zm6.293-1.723h-10.87v1.723h10.87v-1.723zm0 4.595h-10.87v1.723h10.87v-1.723z"
|
133
|
+
}), /*#__PURE__*/_jsx("path", {
|
134
|
+
fill: "#C4D4F8",
|
135
|
+
className: "fill-primary40",
|
136
|
+
fillRule: "evenodd",
|
137
|
+
d: "M23.947 34h77.107l-5.64-9.664a7.938 7.938 0 00-6.857-3.936H36.443a7.938 7.938 0 00-6.856 3.936L23.947 34z",
|
138
|
+
clipRule: "evenodd"
|
139
|
+
}), /*#__PURE__*/_jsx("path", {
|
140
|
+
fill: "#1657E2",
|
141
|
+
className: "fill-primary",
|
142
|
+
fillRule: "evenodd",
|
143
|
+
d: "M37.554 20.4h11.339l-2.268 10.292H31.884l5.67-10.292zm38.553 0h11.34l5.67 10.292H78.374L76.107 20.4zm-22.111 0h17.009l2.267 10.292H51.728L53.996 20.4z",
|
144
|
+
clipRule: "evenodd"
|
145
|
+
}), /*#__PURE__*/_jsx("path", {
|
146
|
+
fill: "#C4D4F8",
|
147
|
+
className: "fill-primary40",
|
148
|
+
d: "M101.054 48.733H23.946v36.834h77.108V48.733z"
|
149
|
+
}), /*#__PURE__*/_jsx("path", {
|
150
|
+
fill: "#1657E2",
|
151
|
+
className: "fill-primary",
|
152
|
+
d: "M46.625 53.267H29.05v27.766h17.576V53.267zm49.326 0H78.375v27.766h17.576V53.267zm-22.679 0H51.728v27.766h21.544V53.267z"
|
153
|
+
}), /*#__PURE__*/_jsx("path", {
|
154
|
+
fill: "#88A9F0",
|
155
|
+
className: "fill-primary",
|
156
|
+
fillRule: "evenodd",
|
157
|
+
d: "M57.398 48.733h10.205V54.4a1.7 1.7 0 01-1.701 1.7h-6.804a1.7 1.7 0 01-1.7-1.7v-5.667zm0-18.041h10.205v1.7a1.7 1.7 0 01-1.701 1.7h-6.804a1.7 1.7 0 01-1.7-1.7v-1.7z",
|
158
|
+
clipRule: "evenodd"
|
159
|
+
}), /*#__PURE__*/_jsx("path", {
|
160
|
+
fill: "#C4D4F8",
|
161
|
+
className: "fill-primary40",
|
162
|
+
d: "M64.201 48.733h-3.402V56.1h3.402v-7.367z"
|
163
|
+
}), /*#__PURE__*/_jsx("path", {
|
164
|
+
fill: "#88A9F0",
|
165
|
+
className: "fill-primary",
|
166
|
+
d: "M98.502 54.683a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zM95.668 31.45a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zM75.824 54.683a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm0-23.233a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zM49.176 54.683a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm0-23.233a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zM26.498 54.683a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm2.835-23.233a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm69.169 32.3a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm-26.648 0a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm72.004 9.067a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm-26.648 0a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm72.004 9.066a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834zm-26.648 0a1.417 1.417 0 10.001-2.834 1.417 1.417 0 000 2.834zm-22.678 0a1.417 1.417 0 100-2.834 1.417 1.417 0 000 2.834z"
|
167
|
+
}), /*#__PURE__*/_jsx("path", {
|
168
|
+
fill: "#1245B4",
|
169
|
+
d: "M62.5 53.267a1.134 1.134 0 100-2.268 1.134 1.134 0 000 2.268z"
|
170
|
+
}), /*#__PURE__*/_jsx("path", {
|
171
|
+
fill: "#1245B4",
|
172
|
+
d: "M63.067 51.567h-1.134V54.4h1.134v-2.833z"
|
173
|
+
}), /*#__PURE__*/_jsx("path", {
|
174
|
+
fill: "#FDD33F",
|
175
|
+
fillRule: "evenodd",
|
176
|
+
d: "M108.776 9.995c2.57-.113 4.251-.565 5.041-1.355.791-.79 1.24-2.719 1.348-5.784.137 3.011.628 4.94 1.473 5.784.845.844 2.441 1.296 4.79 1.355-2.395.137-3.991.605-4.79 1.404-.799.798-1.29 2.758-1.473 5.879-.03-3.052-.48-5.012-1.348-5.88-.868-.867-2.548-1.335-5.041-1.403zm-11.698 8.323c2.015-.089 3.333-.443 3.953-1.063.62-.62.972-2.13 1.056-4.534.108 2.36.492 3.872 1.155 4.534.662.663 1.914 1.017 3.756 1.063-1.878.107-3.13.474-3.756 1.1-.627.627-1.011 2.163-1.155 4.61-.023-2.393-.376-3.93-1.056-4.61-.681-.68-1.999-1.047-3.953-1.1zm11.065 9.994c2.015-.088 3.333-.443 3.953-1.062.62-.62.972-2.131 1.057-4.535.107 2.361.492 3.873 1.154 4.535.663.662 1.914 1.016 3.756 1.062-1.878.108-3.129.475-3.756 1.1-.626.627-1.011 2.164-1.154 4.61-.024-2.392-.377-3.929-1.057-4.61-.681-.68-1.998-1.046-3.953-1.1zM14.785 9.995c-2.57-.113-4.25-.565-5.042-1.355-.79-.79-1.24-2.719-1.347-5.784-.137 3.011-.628 4.94-1.473 5.784-.845.844-2.442 1.296-4.79 1.355 2.394.137 3.991.605 4.79 1.404.799.798 1.29 2.758 1.473 5.879.03-3.052.48-5.012 1.347-5.88.868-.867 2.549-1.335 5.042-1.403zm12.832 8.323c-2.015-.089-3.333-.443-3.953-1.063-.62-.62-.972-2.13-1.057-4.534-.107 2.36-.492 3.872-1.154 4.534-.663.663-1.915 1.017-3.756 1.063 1.878.107 3.13.474 3.756 1.1.626.627 1.011 2.163 1.154 4.61.024-2.393.377-3.93 1.057-4.61.68-.68 1.998-1.047 3.953-1.1zm-11.065 9.994c-2.015-.088-3.333-.443-3.953-1.062-.62-.62-.972-2.131-1.057-4.535-.107 2.361-.492 3.873-1.154 4.535-.663.662-1.915 1.016-3.756 1.062 1.877.108 3.13.475 3.756 1.1.626.627 1.011 2.164 1.154 4.61.024-2.392.376-3.929 1.057-4.61.68-.68 1.998-1.046 3.953-1.1z",
|
177
|
+
clipRule: "evenodd"
|
178
|
+
})]
|
179
|
+
});
|
180
|
+
};
|
181
|
+
export default withIllustration('IllustrationHouse')(IllustrationHouse);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useHandleOptionsHeight.d.ts","sourceRoot":"","sources":["../../../../src/packages/core/Autocomplete/utils/useHandleOptionsHeight.ts"],"names":[],"mappings":";AAEA,QAAA,MAAM,sBAAsB;;;CAW3B,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { createRef, useEffect, useState } from 'react';
|
2
|
+
|
3
|
+
const useHandleOptionsHeight = () => {
|
4
|
+
const [optionsHeight, setOptionsHeight] = useState(0);
|
5
|
+
const optionsRef = /*#__PURE__*/createRef();
|
6
|
+
useEffect(() => {
|
7
|
+
const rect = optionsRef.current?.getBoundingClientRect();
|
8
|
+
setOptionsHeight(rect?.height || 0); // eslint-disable-next-line react-hooks/exhaustive-deps
|
9
|
+
}, [optionsRef.current]);
|
10
|
+
return {
|
11
|
+
optionsHeight,
|
12
|
+
optionsRef
|
13
|
+
};
|
14
|
+
};
|
15
|
+
|
16
|
+
export default useHandleOptionsHeight;
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/CheckboxController/index.tsx"],"names":[],"mappings":""}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// import React from 'react'
|
2
|
+
// interface IProps {
|
3
|
+
// /** Function children in which CheckBox components can be rendered. */
|
4
|
+
// children: (component: React.ComponentType, values: string[], id: string) => void;
|
5
|
+
// /** Unique name of the field. */
|
6
|
+
// name: string,;
|
7
|
+
// /** Callback that is triggered when a child CheckBox is clicked. */
|
8
|
+
// onChange: (values: string[], event: React.ChangeEvent<HTMLInputElement>) => void;
|
9
|
+
// /** Default checked values. */
|
10
|
+
// value?: string,[];
|
11
|
+
// }
|
12
|
+
// const CheckboxController: React.FC<IProps> = props => {
|
13
|
+
// const type: string = 'checkbox'
|
14
|
+
// const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
15
|
+
// if (props.onChange) {
|
16
|
+
// props.onChange(e.target.checked)
|
17
|
+
// }
|
18
|
+
// }
|
19
|
+
// return (
|
20
|
+
// )
|
21
|
+
// }
|
22
|
+
// export default Checkbox
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"yearMonthForm.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Datepicker/yearMonthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,UAAU,MAAM;IACd,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;IACd,MAAM,EAAE,IAAI,CAAA;CACb;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAmDnC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { MONTHS } from '../../utils/dates';
|
3
|
+
import { StyledSelect, Div } from './styles';
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
|
7
|
+
const YearMonthForm = ({
|
8
|
+
onChange,
|
9
|
+
date,
|
10
|
+
fromDate,
|
11
|
+
toDate
|
12
|
+
}) => {
|
13
|
+
const months = MONTHS;
|
14
|
+
const years = [];
|
15
|
+
|
16
|
+
for (let i = fromDate.getFullYear(); i <= toDate.getFullYear(); i += 1) {
|
17
|
+
years.push(i);
|
18
|
+
}
|
19
|
+
|
20
|
+
const changeMonth = e => {
|
21
|
+
let newDate = date;
|
22
|
+
newDate.setMonth(e.target.value);
|
23
|
+
if (newDate > toDate) newDate = toDate;
|
24
|
+
onChange(newDate);
|
25
|
+
};
|
26
|
+
|
27
|
+
const changeYear = e => {
|
28
|
+
let newDate = date;
|
29
|
+
newDate.setFullYear(e.target.value);
|
30
|
+
if (newDate > toDate) newDate = toDate;
|
31
|
+
onChange(newDate);
|
32
|
+
};
|
33
|
+
|
34
|
+
return /*#__PURE__*/_jsxs(Div, {
|
35
|
+
className: "DayPicker-Caption",
|
36
|
+
children: [/*#__PURE__*/_jsx(StyledSelect, {
|
37
|
+
name: "month",
|
38
|
+
onChange: changeMonth,
|
39
|
+
value: date.getMonth(),
|
40
|
+
children: months.map((month, i) => /*#__PURE__*/_jsx("option", {
|
41
|
+
value: i,
|
42
|
+
children: month
|
43
|
+
}, month))
|
44
|
+
}), /*#__PURE__*/_jsx(StyledSelect, {
|
45
|
+
name: "year",
|
46
|
+
onChange: changeYear,
|
47
|
+
value: date.getFullYear(),
|
48
|
+
children: years.map(year => /*#__PURE__*/_jsx("option", {
|
49
|
+
value: year,
|
50
|
+
children: year
|
51
|
+
}, year))
|
52
|
+
})]
|
53
|
+
});
|
54
|
+
};
|
55
|
+
|
56
|
+
export default YearMonthForm;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { ExtendedHTMLElement } from 'draft-convert';
|
2
|
+
export declare const basicToolbar: {
|
3
|
+
options: string[];
|
4
|
+
inline: {
|
5
|
+
options: string[];
|
6
|
+
};
|
7
|
+
};
|
8
|
+
export declare const richToolbar: {
|
9
|
+
options: string[];
|
10
|
+
inline: {
|
11
|
+
options: string[];
|
12
|
+
};
|
13
|
+
textAlign: {
|
14
|
+
options: string[];
|
15
|
+
};
|
16
|
+
blockType: {
|
17
|
+
inDropdown: boolean;
|
18
|
+
options: string[];
|
19
|
+
};
|
20
|
+
link: {
|
21
|
+
showOpenOptionOnHover: boolean;
|
22
|
+
defaultTargetOption: string;
|
23
|
+
options: string[];
|
24
|
+
};
|
25
|
+
};
|
26
|
+
export declare const htmlToEntity: (nodeName: string, node: ExtendedHTMLElement<DOMStringMap>, createEntity: any) => any;
|
27
|
+
export declare const getStrippedHtml: (html: string) => string;
|
28
|
+
export declare const editorLabels: {
|
29
|
+
'generic.add': string;
|
30
|
+
'generic.cancel': string;
|
31
|
+
'components.controls.inline.bold': string;
|
32
|
+
'components.controls.inline.italic': string;
|
33
|
+
'components.controls.inline.underline': string;
|
34
|
+
'components.controls.list.unordered': string;
|
35
|
+
'components.controls.list.ordered': string;
|
36
|
+
'components.controls.list.indent': string;
|
37
|
+
'components.controls.list.outdent': string;
|
38
|
+
'components.controls.textAlign.left': string;
|
39
|
+
'components.controls.textAlign.center': string;
|
40
|
+
'components.controls.textAlign.right': string;
|
41
|
+
'components.controls.textAlign.justify': string;
|
42
|
+
'components.controls.blocktype.normal': string;
|
43
|
+
'components.controls.blocktype.h1': string;
|
44
|
+
'components.controls.blocktype.h2': string;
|
45
|
+
'components.controls.blocktype.h3': string;
|
46
|
+
'components.controls.blocktype.h4': string;
|
47
|
+
'components.controls.blocktype.h5': string;
|
48
|
+
'components.controls.blocktype.h6': string;
|
49
|
+
'components.controls.link.linkTitle': string;
|
50
|
+
'components.controls.link.linkTarget': string;
|
51
|
+
'components.controls.link.linkTargetOption': string;
|
52
|
+
'components.controls.link.link': string;
|
53
|
+
'components.controls.link.unlink': string;
|
54
|
+
'components.controls.remove.remove': string;
|
55
|
+
};
|
56
|
+
//# sourceMappingURL=config.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/packages/core/EditorOld/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,eAAO,MAAM,YAAY;;;;;CAKxB,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBvB,CAAA;AAED,eAAO,MAAM,YAAY,aACb,MAAM,QACV,oBAAoB,YAAY,CAAC,gBACzB,GAAG,QAKlB,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,WAE3C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCxB,CAAA"}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
export const basicToolbar = {
|
2
|
+
options: ['inline', 'list'],
|
3
|
+
inline: {
|
4
|
+
options: ['bold', 'italic', 'underline']
|
5
|
+
}
|
6
|
+
};
|
7
|
+
export const richToolbar = {
|
8
|
+
options: ['blockType', 'inline', 'list', 'textAlign', 'link'],
|
9
|
+
inline: {
|
10
|
+
options: ['bold', 'italic', 'underline']
|
11
|
+
},
|
12
|
+
textAlign: {
|
13
|
+
options: ['left', 'center', 'right', 'justify']
|
14
|
+
},
|
15
|
+
blockType: {
|
16
|
+
inDropdown: true,
|
17
|
+
options: ['Normal', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6']
|
18
|
+
},
|
19
|
+
link: {
|
20
|
+
showOpenOptionOnHover: true,
|
21
|
+
defaultTargetOption: '_blank',
|
22
|
+
options: ['link', 'unlink']
|
23
|
+
}
|
24
|
+
};
|
25
|
+
export const htmlToEntity = (nodeName, node, createEntity) => {
|
26
|
+
if (nodeName === 'a') {
|
27
|
+
return createEntity('LINK', 'MUTABLE', {
|
28
|
+
url: node.href
|
29
|
+
});
|
30
|
+
}
|
31
|
+
};
|
32
|
+
export const getStrippedHtml = html => {
|
33
|
+
return html.replace(/<img[^>]*>/g, '');
|
34
|
+
};
|
35
|
+
export const editorLabels = {
|
36
|
+
// Generic
|
37
|
+
'generic.add': 'Legg til',
|
38
|
+
'generic.cancel': 'Avbryt',
|
39
|
+
// Inline
|
40
|
+
'components.controls.inline.bold': 'Fet',
|
41
|
+
'components.controls.inline.italic': 'Kursiv',
|
42
|
+
'components.controls.inline.underline': 'Understrek',
|
43
|
+
// List
|
44
|
+
'components.controls.list.unordered': 'Punktliste',
|
45
|
+
'components.controls.list.ordered': 'Nummerliste',
|
46
|
+
'components.controls.list.indent': 'Innrykk',
|
47
|
+
'components.controls.list.outdent': 'Utrykk',
|
48
|
+
// Text align
|
49
|
+
'components.controls.textAlign.left': 'Venstrejuster',
|
50
|
+
'components.controls.textAlign.center': 'Midtstill',
|
51
|
+
'components.controls.textAlign.right': 'Høyrejuster',
|
52
|
+
'components.controls.textAlign.justify': 'Blokkjuster',
|
53
|
+
// Block type
|
54
|
+
'components.controls.blocktype.normal': 'Avsnitt',
|
55
|
+
'components.controls.blocktype.h1': 'Overskrift 1',
|
56
|
+
'components.controls.blocktype.h2': 'Overskrift 2',
|
57
|
+
'components.controls.blocktype.h3': 'Overskrift 3',
|
58
|
+
'components.controls.blocktype.h4': 'Overskrift 4',
|
59
|
+
'components.controls.blocktype.h5': 'Overskrift 5',
|
60
|
+
'components.controls.blocktype.h6': 'Overskrift 6',
|
61
|
+
// Link
|
62
|
+
'components.controls.link.linkTitle': 'Tittel',
|
63
|
+
'components.controls.link.linkTarget': 'URL',
|
64
|
+
'components.controls.link.linkTargetOption': 'Åpne i ny fane',
|
65
|
+
'components.controls.link.link': 'Legg til lenke',
|
66
|
+
'components.controls.link.unlink': 'Fjern lenke',
|
67
|
+
// Remove
|
68
|
+
'components.controls.remove.remove': 'Fjern'
|
69
|
+
};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
2
|
+
import React from 'react';
|
3
|
+
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
|
4
|
+
interface IProps {
|
5
|
+
/** Input text */
|
6
|
+
initialValue?: string;
|
7
|
+
/** Editor type, defaults to basic */
|
8
|
+
type?: 'basic' | 'rich' | 'custom';
|
9
|
+
/** Adds a custom toolbar if type is set to custom */
|
10
|
+
customToolbar?: object;
|
11
|
+
/** Height of textarea */
|
12
|
+
label?: string;
|
13
|
+
/** Deafult height of texteditor */
|
14
|
+
height?: number;
|
15
|
+
/** Max resize height of texteditor */
|
16
|
+
maxHeight?: number;
|
17
|
+
/** Maxlength of input */
|
18
|
+
maxlength?: number;
|
19
|
+
/** Specifies whether maxlength should include html or not, defaults to 'plaintext' */
|
20
|
+
maxlengthType?: 'plaintext' | 'html';
|
21
|
+
/** Adds an error message if text is too long */
|
22
|
+
maxlengthText?: string;
|
23
|
+
/** Adds a counter of characters compared to maxlength, if maxlength is specified */
|
24
|
+
withCounter?: boolean;
|
25
|
+
/** Error message */
|
26
|
+
invalidMessage?: string;
|
27
|
+
/** Cb on blur */
|
28
|
+
onBlur?: () => void;
|
29
|
+
/** Cb on change */
|
30
|
+
onChange: (value: string) => void;
|
31
|
+
}
|
32
|
+
/**
|
33
|
+
*
|
34
|
+
* TODO: REMOVE AND CLEANUP PACKAGES
|
35
|
+
*
|
36
|
+
*/
|
37
|
+
declare const EditorOld: React.FC<IProps>;
|
38
|
+
export default EditorOld;
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/EditorOld/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAmB,MAAM,OAAO,CAAA;AAIvC,OAAO,kDAAkD,CAAA;AAqBzD,UAAU,MAAM;IACd,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sFAAsF;IACtF,aAAa,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IACpC,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAED;;;;GAIG;AAEH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA8I/B,CAAA;AAED,eAAe,SAAS,CAAA"}
|