@helsenorge/designsystem-react 1.0.0-beta73 → 1.0.0-beta77
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/Button-f5b8067b.js +2 -0
- package/Button-f5b8067b.js.map +1 -0
- package/Loader-084dd998.js +2 -0
- package/Loader-084dd998.js.map +1 -0
- package/Modal-53dee2d3.js +2 -0
- package/Modal-53dee2d3.js.map +1 -0
- package/color-acb834c6.js +2 -0
- package/color-acb834c6.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/componentdata.json +19 -0
- package/components/ButtonWithModal/index.js +1 -1
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/styles.module.scss +27 -15
- package/components/ExpanderList/styles.module.scss.d.ts +1 -2
- package/components/Icons/AdditionalIconInformation.js +4 -4
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/index.d.ts +1 -0
- package/components/Icons/index.d.ts.map +1 -1
- package/components/Icons/index.js +1 -1
- package/components/LinkList/LinkList.d.ts +4 -3
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/componentdata.json +19 -4
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/styles.module.scss +33 -6
- package/components/LinkList/styles.module.scss.d.ts +2 -1
- package/components/Loader/Loader.d.ts +8 -0
- package/components/Loader/Loader.d.ts.map +1 -1
- package/components/Loader/componentdata.json +76 -0
- package/components/Loader/index.js +1 -1
- package/components/Loader/styles.module.scss +24 -0
- package/components/Loader/styles.module.scss.d.ts +3 -0
- package/components/Logo/index.js +1 -1
- package/components/Modal/Modal.d.ts +2 -0
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/componentdata.json +20 -3
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/Tile/Tile.d.ts.map +1 -1
- package/components/Tile/index.js +1 -1
- package/constants-d1f48e8e.js +2 -0
- package/constants-d1f48e8e.js.map +1 -0
- package/grid-11a70eb7.js +2 -0
- package/grid-11a70eb7.js.map +1 -0
- package/hooks/useBreakpoint.d.ts +9 -0
- package/hooks/useBreakpoint.d.ts.map +1 -0
- package/index-19b48c51.js +2 -0
- package/index-19b48c51.js.map +1 -0
- package/index.js +1 -1
- package/package.json +4 -2
- package/scss/_font-settings.scss +8 -4
- package/scss/_palette.scss +2 -0
- package/useBreakpoint-a8fa8a61.js +2 -0
- package/useBreakpoint-a8fa8a61.js.map +1 -0
- package/useWindowSize-c22d7634.js +2 -0
- package/useWindowSize-c22d7634.js.map +1 -0
- package/Button-f1380b34.js +0 -2
- package/Button-f1380b34.js.map +0 -1
- package/Icon-43100735.js +0 -2
- package/Icon-43100735.js.map +0 -1
- package/Loader-ad8bcd78.js +0 -2
- package/Loader-ad8bcd78.js.map +0 -1
- package/Modal-42bec9e1.js +0 -2
- package/Modal-42bec9e1.js.map +0 -1
- package/color-d7bbcfcc.js +0 -2
- package/color-d7bbcfcc.js.map +0 -1
- package/index-cf9fa51d.js +0 -2
- package/index-cf9fa51d.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as
|
|
1
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as l}from"../../_tslib-51c8a283.js";import i from"react";import{c as a}from"../../index-9b84fabc.js";import{a as r,I as n}from"../../constants-d1f48e8e.js";import{u as o,B as s}from"../../useBreakpoint-a8fa8a61.js";import{u as t}from"../../useHover-57ad4df9.js";import c from"./styles.module.scss";import"../../useWindowSize-c22d7634.js";import"../../grid-11a70eb7.js";var m=function(e){var l=e.isExtraSmall,a=e.isHovered,r=i.createElement("path",{d:"M19.171 32.951l1.409 1.42L31.031 24 20.58 13.63l-1.409 1.42 9.02 8.95z"}),n=i.createElement("path",{d:"M24.479 11.63L36.93 23.999 24.479 36.37l-1.409-1.419L33.083 25H13v-2h20.085L23.07 13.049z"}),o=i.createElement("path",{d:"M17.885 32.577l1.779 1.793 10.451-10.371L19.664 13.63l-1.779 1.793 8.644 8.576z"});return l?a?i.createElement("path",{d:"M25.98 11.103l12.977 12.896L25.98 36.897l-1.78-1.794 9.899-9.841-20.204.001v-2.526l20.204-.001-9.899-9.839z"}):o:a?n:r},d=i.forwardRef((function(d,f){var _,p=d.children,v=d.className,h=void 0===v?"":v,u=d.color,k=void 0===u?"neutral":u,E=d.icon,z=d.size,N=void 0===z?"medium":z,b=d.chevron,L=void 0!==b&&b,j=l(d,["children","className","color","icon","size","chevron"]),g=t(),H=g.hoverRef,B=g.isHovered,S=o(),M="small"!==N&&!(!L&&!E);return i.createElement("li",{ref:f},i.createElement("a",Object.assign({className:a(c["link-list__anchor"],c["link-list__anchor--"+k],(_={},e(_,c["link-list__anchor--hasicon"],M),e(_,c["link-list__anchor--small"],"small"===N),e(_,c["link-list__anchor--medium"],"medium"===N),e(_,c["link-list__anchor--large"],"large"===N),_),h),ref:H},j),i.createElement("span",{className:c["link-list__content"]},M&&E&&i.createElement("span",{className:"".concat(c["link-list__icon-container"]," ").concat(c["link-list__icon-container--hasmargin"])},i.cloneElement(E,{className:c["link-list__icon"],size:S===s.Xs?r.XSmall:r.Small,isHovered:B})),p),M&&L&&i.createElement("span",{className:c["link-list__icon-container"]},i.createElement(n,{className:c["link-list__icon"],svgIcon:m,isHovered:B,size:r.XSmall}))))})),f=i.forwardRef((function(l,r){var n,o=l.children,s=l.className,t=void 0===s?"":s,m=l.chevron,f=void 0!==m&&m,_=l.size,p=void 0===_?"medium":_,v=l.color,h=l.topBorder,u=void 0===h||h,k=l.bottomBorder,E=void 0===k||k;return i.createElement("ul",{ref:r,className:a(c["link-list"],(n={},e(n,c["link-list--hastopborder"],u),e(n,c["link-list--nobottomborder"],!E),n),t||"")},i.Children.map(o,(function(e){if(e.type===d)return i.cloneElement(e,{color:v,size:p,chevron:f})})))}));f.Link=d,d.displayName="LinkList.Link";export default f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
&__anchor {
|
|
27
27
|
display: flex;
|
|
28
|
-
padding: getSpacer(xs);
|
|
29
28
|
min-height: 4.5rem;
|
|
30
|
-
font-size: $font-size-md;
|
|
31
|
-
line-height: $lineheight-size-md;
|
|
32
29
|
text-decoration: none;
|
|
33
30
|
justify-content: space-between;
|
|
34
31
|
align-items: center;
|
|
@@ -38,9 +35,40 @@
|
|
|
38
35
|
&--hasicon {
|
|
39
36
|
min-height: unset;
|
|
40
37
|
}
|
|
38
|
+
&--small {
|
|
39
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
40
|
+
font-size: $font-size-xs;
|
|
41
|
+
line-height: $lineheight-size-xs;
|
|
42
|
+
}
|
|
43
|
+
&--medium {
|
|
44
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
45
|
+
font-size: $font-size-sm;
|
|
46
|
+
line-height: $lineheight-size-sm;
|
|
47
|
+
}
|
|
41
48
|
&--large {
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
50
|
+
font-size: $font-size-md;
|
|
51
|
+
line-height: $lineheight-size-md;
|
|
52
|
+
}
|
|
53
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
54
|
+
&--small {
|
|
55
|
+
padding-left: getSpacer(xs);
|
|
56
|
+
padding-right: getSpacer(xs);
|
|
57
|
+
font-size: $font-size-sm;
|
|
58
|
+
line-height: $lineheight-size-sm;
|
|
59
|
+
}
|
|
60
|
+
&--medium {
|
|
61
|
+
padding-left: getSpacer(xs);
|
|
62
|
+
padding-right: getSpacer(xs);
|
|
63
|
+
font-size: $font-size-md;
|
|
64
|
+
line-height: $lineheight-size-md;
|
|
65
|
+
}
|
|
66
|
+
&--large {
|
|
67
|
+
padding-left: getSpacer(xs);
|
|
68
|
+
padding-right: getSpacer(xs);
|
|
69
|
+
font-size: $font-size-lg;
|
|
70
|
+
line-height: $lineheight-size-lg;
|
|
71
|
+
}
|
|
44
72
|
}
|
|
45
73
|
|
|
46
74
|
&--banana {
|
|
@@ -109,7 +137,6 @@
|
|
|
109
137
|
}
|
|
110
138
|
|
|
111
139
|
&__icon-container {
|
|
112
|
-
width: getSpacer(xl);
|
|
113
140
|
&--hasmargin {
|
|
114
141
|
margin-right: getSpacer(xs);
|
|
115
142
|
}
|
|
@@ -8,12 +8,13 @@ export type Styles = {
|
|
|
8
8
|
'link-list__anchor--hasicon': string;
|
|
9
9
|
'link-list__anchor--kiwi': string;
|
|
10
10
|
'link-list__anchor--large': string;
|
|
11
|
+
'link-list__anchor--medium': string;
|
|
11
12
|
'link-list__anchor--neutral': string;
|
|
12
13
|
'link-list__anchor--plum': string;
|
|
14
|
+
'link-list__anchor--small': string;
|
|
13
15
|
'link-list__anchor--white': string;
|
|
14
16
|
'link-list__content': string;
|
|
15
17
|
'link-list__icon': string;
|
|
16
|
-
'link-list__icon-container': string;
|
|
17
18
|
'link-list__icon-container--hasmargin': string;
|
|
18
19
|
'link-list--hastopborder': string;
|
|
19
20
|
'link-list--nobottomborder': string;
|
|
@@ -11,6 +11,14 @@ interface LoaderProps {
|
|
|
11
11
|
size?: LoaderSizes;
|
|
12
12
|
/** Sets the data-testid attribute. */
|
|
13
13
|
testId?: string;
|
|
14
|
+
/** Centers the loader in a container */
|
|
15
|
+
center?: boolean;
|
|
16
|
+
/** Loader is displayed with grey background covering the entire screen */
|
|
17
|
+
overlay?: boolean;
|
|
18
|
+
/** individual id for loading icon (aria-labelledby). */
|
|
19
|
+
ariaLabelledById?: string;
|
|
20
|
+
/** individual id for loading icon (aria-labelledby). */
|
|
21
|
+
ariaLabel?: string;
|
|
14
22
|
}
|
|
15
23
|
declare const Loader: React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<HTMLElement>>;
|
|
16
24
|
export default Loader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../../../src/components/Loader/Loader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,oBAAY,YAAY,GAAG,YAAY,CAAC;AACxC,oBAAY,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE,UAAU,WAAW;IACnB,mCAAmC;IACnC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,iFA0DV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -123,6 +123,82 @@
|
|
|
123
123
|
"type": {
|
|
124
124
|
"name": "string"
|
|
125
125
|
}
|
|
126
|
+
},
|
|
127
|
+
"center": {
|
|
128
|
+
"defaultValue": null,
|
|
129
|
+
"description": "Centers the loader in a container",
|
|
130
|
+
"name": "center",
|
|
131
|
+
"parent": {
|
|
132
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
133
|
+
"name": "LoaderProps"
|
|
134
|
+
},
|
|
135
|
+
"declarations": [
|
|
136
|
+
{
|
|
137
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
138
|
+
"name": "LoaderProps"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"required": false,
|
|
142
|
+
"type": {
|
|
143
|
+
"name": "boolean"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"overlay": {
|
|
147
|
+
"defaultValue": null,
|
|
148
|
+
"description": "Loader is displayed with grey background covering the entire screen",
|
|
149
|
+
"name": "overlay",
|
|
150
|
+
"parent": {
|
|
151
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
152
|
+
"name": "LoaderProps"
|
|
153
|
+
},
|
|
154
|
+
"declarations": [
|
|
155
|
+
{
|
|
156
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
157
|
+
"name": "LoaderProps"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"required": false,
|
|
161
|
+
"type": {
|
|
162
|
+
"name": "boolean"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"ariaLabelledById": {
|
|
166
|
+
"defaultValue": null,
|
|
167
|
+
"description": "individual id for loading icon (aria-labelledby).",
|
|
168
|
+
"name": "ariaLabelledById",
|
|
169
|
+
"parent": {
|
|
170
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
171
|
+
"name": "LoaderProps"
|
|
172
|
+
},
|
|
173
|
+
"declarations": [
|
|
174
|
+
{
|
|
175
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
176
|
+
"name": "LoaderProps"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"required": false,
|
|
180
|
+
"type": {
|
|
181
|
+
"name": "string"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"ariaLabel": {
|
|
185
|
+
"defaultValue": null,
|
|
186
|
+
"description": "individual id for loading icon (aria-labelledby).",
|
|
187
|
+
"name": "ariaLabel",
|
|
188
|
+
"parent": {
|
|
189
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
190
|
+
"name": "LoaderProps"
|
|
191
|
+
},
|
|
192
|
+
"declarations": [
|
|
193
|
+
{
|
|
194
|
+
"fileName": "src/components/Loader/Loader.tsx",
|
|
195
|
+
"name": "LoaderProps"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"required": false,
|
|
199
|
+
"type": {
|
|
200
|
+
"name": "string"
|
|
201
|
+
}
|
|
126
202
|
}
|
|
127
203
|
}
|
|
128
204
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as
|
|
1
|
+
import{L as r}from"../../Loader-084dd998.js";export{L as default}from"../../Loader-084dd998.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"crypto";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '../../scss/_palette.scss';
|
|
2
|
+
@import 'bootstrap/scss/mixins/_screen-reader.scss';
|
|
2
3
|
|
|
3
4
|
@mixin keyframes($name) {
|
|
4
5
|
@keyframes #{$name} {
|
|
@@ -35,6 +36,25 @@
|
|
|
35
36
|
@include animate($name, translate, 0.6s, infinite);
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
.loader-wrapper {
|
|
40
|
+
&--center {
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--overlay {
|
|
45
|
+
z-index: 9999;
|
|
46
|
+
background: $transparentGrey;
|
|
47
|
+
position: fixed;
|
|
48
|
+
top: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
38
58
|
.loader {
|
|
39
59
|
display: inline-block;
|
|
40
60
|
position: relative;
|
|
@@ -56,6 +76,10 @@
|
|
|
56
76
|
height: 24px;
|
|
57
77
|
}
|
|
58
78
|
|
|
79
|
+
&__hidden-text {
|
|
80
|
+
@include sr-only();
|
|
81
|
+
}
|
|
82
|
+
|
|
59
83
|
&__dot {
|
|
60
84
|
position: absolute;
|
|
61
85
|
width: 8px;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
|
+
center: string;
|
|
2
3
|
loader: string;
|
|
3
4
|
loader__dot: string;
|
|
5
|
+
' loader__hidden-text': string;
|
|
4
6
|
'loader__dot--banana': string;
|
|
5
7
|
'loader__dot--black': string;
|
|
6
8
|
'loader__dot--cherry': string;
|
|
@@ -14,6 +16,7 @@ export type Styles = {
|
|
|
14
16
|
'loader--large': string;
|
|
15
17
|
'loader--medium': string;
|
|
16
18
|
'loader--small': string;
|
|
19
|
+
overlay: string;
|
|
17
20
|
scale: string;
|
|
18
21
|
'scale-regular': string;
|
|
19
22
|
'scale-reverse': string;
|
package/components/Logo/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_tslib-51c8a283.js";import c from"react";import{g as l}from"../../color-
|
|
1
|
+
import{_ as e}from"../../_tslib-51c8a283.js";import c from"react";import{g as l}from"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";var t=function(e){var t=e.size,v=void 0===t?300:t,h=e.color,i=void 0===h?"black":h,r=e.className,a=void 0===r?"":r;return c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 502 220",className:a},c.createElement("title",{id:"logo-title"},"Helsenorge"),c.createElement("g",{fill:l(i,500)},c.createElement("path",{d:"M39.8 2.5v26.9H17V2.5H1v69.9h16V43.6h22.8v28.8h16.1V2.5zM250.3 58.6V2.5h-16v69.9h43.5V58.6zM142.9 122.5c-16.1 0-27.4 13.6-27.4 33.1s11.2 33.1 27.4 33.1 27.4-13.6 27.4-33.1-11.3-33.1-27.4-33.1zm19 33.1c0 11.9-5 25.9-19 25.9s-19-13.9-19-25.9c0-11.9 5-25.9 19-25.9s19 14 19 25.9zM501 40c0-19.1-11.1-32.4-27-32.4-16.4 0-27.4 13.3-27.4 33.1 0 19.5 11.5 33.1 28 33.1 12.2 0 21.4-6 24.7-16.2l.5-1.6h-8.3l-.3.7c-2.8 6.2-8.8 9.8-16.6 9.8-12.9 0-18.5-11.5-19.5-22.7H501V40zm-8.3-3.2h-37.6c1-10.8 6.5-21.9 18.9-21.9 13.2 0 18.3 12.6 18.7 21.9zM30.4 122.4c-10.8 0-16.6 6.7-19.5 11.8v-9.9H3.3v62.6h8.1v-31.4c0-8.4 4.4-25.7 18.1-25.7 14 0 15.9 12 15.9 25v32.1h8.1v-32.1c.1-16.1-2.7-32.4-23.1-32.4zM134.3 59V43H157V30h-22.7V15.9H165V2.5h-46.4v69.9h47.3V59zM466.7 173.4v-16h22.7v-13h-22.7v-14.1h30.7v-13.4H451v69.9h47.3v-13.4zM246.7 140.5v-16.3h-7.6v62.6h8.1v-37.6l27.3-19.6v-9zM393.5 120.6l-14.7 10.5c-4.4-5.6-11.2-8.7-18.8-8.7-13.6 0-23.6 9.8-23.6 23.3 0 10.6 6.2 19.1 16 22.2l-16 17.5c-4 4.6-5.7 8.3-5.7 12.7 0 12.6 11.1 20.7 28.2 20.7 16.9 0 28.3-8.3 28.3-20.7 0-12.5-11.1-20.6-28.3-20.6-1.7 0-3.9.2-5.6.5l8-9c12.9-.7 22.2-10.4 22.2-23.3 0-2.8-.4-5.5-1.2-7.8 0-.1-.1-.2-.1-.3l11.2-8.1v-8.9zm-34.4 64.2c12.1 0 20 5.2 20 13.4s-7.8 13.5-20 13.5c-12.1 0-19.9-5.3-19.9-13.5 0-7.8 8.3-13.4 19.9-13.4zm.9-23c-8.8 0-15.2-6.8-15.2-16 0-9.3 6.4-16 15.2-16s15.2 6.7 15.2 16c0 9.2-6.4 16-15.2 16zM366.7 30.3c-6.6-2.3-13.5-4.7-13.5-9.2 0-4.8 4.2-7 9.3-7 5.4 0 9 4.5 9 8.5v.8h16.2v-.6c0-13-10.2-21.7-25.4-21.7-15.3 0-24.9 7.8-24.9 20.4 0 14.7 13.1 18.4 22.9 21.9 6.5 2.4 13.6 4.3 13.6 8.7 0 4.6-3.4 8-10.6 8-6.5 0-10.9-3.8-10.9-9.4v-.8h-16.7v.8c0 14.5 10.3 23.1 27.5 23.1 16.5 0 26-7.6 26-21.5 0-14.4-12.5-18.5-22.5-22z"})))},v=function(e){var t=e.size,v=void 0===t?300:t,h=e.color,i=void 0===h?"black":h,r=e.className,a=void 0===r?"":r;return c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 87 12",className:a},c.createElement("title",{id:"logo-title"},"Helsenorge"),c.createElement("g",{fill:l(i,500)},c.createElement("path",{d:"M5 .8v2.8H2.6V.8H1V8h1.6V5.1H5V8h1.6V.8zM20.9 6.6V.8h-1.6V8h4.5V6.6zM57.9 1.4c-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.8 3.4 2.8-1.4 2.8-3.4-1.1-3.4-2.8-3.4zm2 3.4c0 1.2-.5 2.7-2 2.7-1.4 0-2-1.4-2-2.7s.5-2.7 2-2.7 2 1.5 2 2.7zM86 4.7c0-2-1.1-3.3-2.8-3.3-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.9 3.4c1.2 0 2.2-.6 2.5-1.7l.1-.2H85v.1c-.3.6-.9 1-1.7 1-1.3 0-1.9-1.2-2-2.3H86v-.4zm-.9-.3h-3.9c.1-1.1.7-2.3 1.9-2.3 1.5 0 2 1.3 2 2.3zM49.2 1.4c-1.1 0-1.7.7-2 1.2v-1h-.8V8h.8V4.8c0-.9.5-2.6 1.9-2.6s1.6 1.2 1.6 2.6V8h.8V4.7c0-1.6-.2-3.3-2.3-3.3zM12.1 6.6V5h2.4V3.7h-2.4V2.2h3.2V.8h-4.8V8h4.9V6.6zM38.3 6.6V5h2.3V3.7h-2.3V2.2h3.2V.8h-4.8V8h4.9V6.6zM65.5 3.3V1.6h-.8V8h.8V4.1l2.8-2v-.9zM77.6 1.2l-1.5 1.1c-.5-.6-1.1-.9-1.9-.9-1.4 0-2.4 1-2.4 2.4 0 1.1.6 2 1.6 2.3l-1.6 1.8c-.4.5-.6.9-.6 1.3 0 1.3 1.1 2.1 2.9 2.1 1.7 0 2.9-.9 2.9-2.1 0-1.3-1.1-2.1-2.9-2.1h-.6l.8-.9c1.3-.1 2.3-1.1 2.3-2.4 0-.3 0-.6-.1-.8l1.2-.8v-1zM74 7.8c1.2 0 2.1.5 2.1 1.4 0 .8-.8 1.4-2.1 1.4-1.2 0-2-.5-2-1.4 0-.8.8-1.4 2-1.4zm.1-2.4c-.9 0-1.6-.7-1.6-1.7s.7-1.6 1.6-1.6c.9 0 1.6.7 1.6 1.6 0 1-.7 1.7-1.6 1.7zM30.4 3.7c-.7-.2-1.4-.5-1.4-1s.4-.7 1-.7.9.5.9.9V3h1.7v-.1c0-1.3-1.1-2.2-2.6-2.2-1.6 0-2.6.8-2.6 2.1 0 1.5 1.3 1.9 2.4 2.3.7.2 1.4.4 1.4.9s-.3.8-1.1.8c-.7 0-1.1-.4-1.1-1v-.1h-1.7v.1c0 1.5 1.1 2.4 2.8 2.4 1.7 0 2.7-.8 2.7-2.2-.1-1.5-1.4-2-2.4-2.3z"})))};export default function(l){var h=l.byline,i=void 0!==h&&h,r=e(l,["byline"]);return i?c.createElement(v,Object.assign({},r)):c.createElement(t,Object.assign({},r))}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -7,6 +7,8 @@ export declare enum ModalVariants {
|
|
|
7
7
|
export interface ModalProps {
|
|
8
8
|
/** Title of the modal */
|
|
9
9
|
title: string;
|
|
10
|
+
/** Title of the modal */
|
|
11
|
+
titleId?: string;
|
|
10
12
|
/** Description of the modal */
|
|
11
13
|
description?: string;
|
|
12
14
|
/** Changes the visual representation of the modal. Description will not render if children prop is provided */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAgBzC,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+GAA+G;IAC/G,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAgCD,QAAA,MAAM,KAAK,kFA2FT,CAAC;AAIH,eAAe,KAAK,CAAC"}
|
|
@@ -19,6 +19,25 @@
|
|
|
19
19
|
"name": "string"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"titleId": {
|
|
23
|
+
"defaultValue": null,
|
|
24
|
+
"description": "Title of the modal",
|
|
25
|
+
"name": "titleId",
|
|
26
|
+
"parent": {
|
|
27
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
28
|
+
"name": "ModalProps"
|
|
29
|
+
},
|
|
30
|
+
"declarations": [
|
|
31
|
+
{
|
|
32
|
+
"fileName": "src/components/Modal/Modal.tsx",
|
|
33
|
+
"name": "ModalProps"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"required": false,
|
|
37
|
+
"type": {
|
|
38
|
+
"name": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
22
41
|
"description": {
|
|
23
42
|
"defaultValue": null,
|
|
24
43
|
"description": "Description of the modal",
|
|
@@ -174,9 +193,7 @@
|
|
|
174
193
|
}
|
|
175
194
|
},
|
|
176
195
|
"ariaLabel": {
|
|
177
|
-
"defaultValue":
|
|
178
|
-
"value": "Dialog"
|
|
179
|
-
},
|
|
196
|
+
"defaultValue": null,
|
|
180
197
|
"description": "Sets the aria-label of the modal",
|
|
181
198
|
"name": "ariaLabel",
|
|
182
199
|
"parent": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-53dee2d3.js";export{M as default}from"../../Modal-53dee2d3.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-f5b8067b.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../grid-11a70eb7.js";import"../../constants-d1f48e8e.js";import"../../Loader-084dd998.js";import"../Loader/styles.module.scss";import"crypto";import"../../useHover-57ad4df9.js";import"../../useWindowSize-c22d7634.js";import"../Button/styles.module.scss";import"../../AlertSignFill-64bfef57.js";import"./styles.module.scss";import"../../Title-863af332.js";import"../Title/styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as o}from"../../index-9b84fabc.js";import{p as
|
|
1
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as o}from"../../index-9b84fabc.js";import{p as t}from"../../palette-f206f488.js";import{I as n,a as i}from"../../constants-d1f48e8e.js";import{u as r}from"../../useHover-57ad4df9.js";import{a as l,A as c,X as s}from"../../AlertSignFill-64bfef57.js";import m from"./styles.module.scss";import"../../_tslib-51c8a283.js";var f={info:a.createElement(n,{svgIcon:function(e){var o=e.isExtraSmall,t=e.isHovered,n=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 10.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),i=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 8.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),r=a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 10.61a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"});return o?t?a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 8.084a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"}):r:t?i:n},color:t.kiwi900,hoverColor:t.kiwi900}),warn:a.createElement(n,{svgIcon:l,color:"black",hoverColor:"black"}),alert:a.createElement(n,{svgIcon:c,color:t.cherry500,hoverColor:t.cherry500}),alertLabel:a.createElement(n,{svgIcon:l,color:t.cherry500,hoverColor:t.cherry500}),crisis:a.createElement(n,{svgIcon:c,color:t.banana200,hoverColor:t.banana200})},v=a.forwardRef((function(l,c){var v,p,d=l.children,h=l.variant,_=void 0===h?"info":h,u=l.shadow,b=void 0!==u&&u,E=l.dismissable,C=void 0!==E&&E,w=l.onClick,g=l.label,y=l.fluid,M=void 0!==y&&y,I=l.size,N=l.className,S=r(void 0,C),j=S.hoverRef,k=S.isHovered,H=o(m["notification-panel__close-button"],"crisis"===_?m["notification-panel__close-button--crisis"]:"");var x;return x=a.createElement("div",{ref:c,className:o(m["notification-panel"],m["notification-panel--"+I],m["notification-panel--"+_],(v={},e(v,m["notification-panel--shadow"],!M&&b),e(v,m["notification-panel--haslabel"],!!g&&!d),e(v,m["notification-panel--dismissable"],C),v),N||"")},a.createElement("span",{className:m["notification-panel__icon"]},f["alert"===_&&g&&!d?"alertLabel":_]),a.createElement("section",{"aria-label":function(){if(d){var e="";return a.Children.map(d,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:o(m["notification-panel__content"],(p={},e(p,m["notification-panel__content--crisis"],"crisis"===_),e(p,m["notification-panel__content--haslabel"],!!g&&!d),e(p,m["notification-panel__content--isred"],"alert"===_&&!!g&&!d),p))},g?a.createElement("h1",{className:m["notification-panel__label"],dangerouslySetInnerHTML:{__html:g}}):null,d),C?a.createElement("span",{className:m["notification-panel__action-column"]},a.createElement("button",{className:H,onClick:w,ref:j},a.createElement(n,{svgIcon:s,isHovered:k,size:i.XSmall,color:"crisis"===_?t.white:t.blueberry500,hoverColor:"crisis"===_?t.white:t.blueberry700}))):null),M?a.createElement("div",{className:o(m["notification-panel__fluidwrapper"],m["notification-panel__fluidwrapper--"+_],e({},m["notification-panel__fluidwrapper--shadow"],b))},x):x}));export default v;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,UAAU,SAAU,SAAQ,eAAe;IACzC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAClG;AAqBD,eAAO,MAAM,IAAI,cAkCC,CAAC;AAInB,eAAe,IAAI,CAAC"}
|
package/components/Tile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as i}from"../../_tslib-51c8a283.js";import
|
|
1
|
+
import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as l}from"react";import{c as o}from"../../index-9b84fabc.js";import{a}from"../../constants-d1f48e8e.js";import c from"./styles.module.scss";var n=r.forwardRef((function(e,i){var l,a=e.children,n=e.className,s=e.htmlMarkup,m=void 0===s?"span":s,d=e.highlighted,f=e.compact,p=o(c.tile__title,(t(l={},c["tile__title--highlighted"],d),t(l,c["tile__title--compact"],f),l),n),u=m;return r.createElement(u,{className:p,ref:i},a)})),s=r.forwardRef((function(n,s){var m,d=n.icon,f=n.title,p=n.className,u=void 0===p?"":p,h=n.description,g=n.fixed,_=void 0!==g&&g,v=n.highlighted,E=void 0!==v&&v,N=i(n,["icon","title","className","description","fixed","highlighted"]),b=l(!1),j=e(b,2),w=j[0],x=j[1],M=!h,k=o(c.tile,(t(m={},c["tile--fixed"],_),t(m,c["tile--compact"],M),t(m,c["tile--highlighted"],E),m),u),B=o(c["title-wrapper"],t({},c["title-wrapper--compact"],M));return r.createElement("a",Object.assign({ref:s,className:k,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)},onFocus:function(){return x(!0)},onBlur:function(){return x(!1)}},N),r.createElement("div",{className:B},r.cloneElement(d,{size:a.Medium,isHovered:w,color:E?"white":"black"}),r.cloneElement(f,{highlighted:E,compact:M})),h?r.createElement("p",{className:c.tile__description},h):null)}));s.Title=n;export default s;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-51c8a283.js";import a from"react";var i,l=a.forwardRef((function(l,r){var o=l.svgIcon,t=l.ariaLabel,s=l.id,d=l.className,c=void 0===d?"":d,m=l.size,n=void 0===m?i.Small:m,v=l.color,g=void 0===v?"black":v,b=l.hoverColor,h=void 0===b?g||"black":b,f=l.isHovered,S=void 0!==f&&f,u=l.testId,I=e(l,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),L=a.createElement(o,{isExtraSmall:n<=i.XSmall,isHovered:S}),X=s&&t?"title-".concat(s):void 0;return a.createElement("svg",Object.assign({id:s,"data-testid":u,ref:r,className:"hnds-style-icon ".concat(c),role:"img","aria-label":!s&&t?t:void 0,"aria-labelledby":X,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:n,minHeight:n},width:n,height:n,fill:S?h:g},I),X&&a.createElement("title",{id:X},t),L)}));l.displayName="Icon",function(e){e[e.XSmall=38]="XSmall",e[e.Small=48]="Small",e[e.Medium=64]="Medium",e[e.Large=80]="Large",e[e.XLarge=130]="XLarge"}(i||(i={}));export{l as I,i as a};
|
|
2
|
+
//# sourceMappingURL=constants-d1f48e8e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-d1f48e8e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/grid-11a70eb7.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var x={null:0,xs:360,sm:564,md:768,lg:1088,xl:1450},m={xs:"(min-width: ".concat(x.xs,"px)"),sm:"(min-width: ".concat(x.sm,"px)"),md:"(min-width: ".concat(x.md,"px)"),lg:"(min-width: ".concat(x.lg,"px)"),xl:"(min-width: ".concat(x.xl,"px)")};export{x as b,m as s};
|
|
2
|
+
//# sourceMappingURL=grid-11a70eb7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-11a70eb7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAIA,oBAAY,UAAU;IACpB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED,eAAO,MAAM,aAAa,8BAsBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-19b48c51.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-
|
|
1
|
+
export{t as theme}from"./index-19b48c51.js";export{u as useHover}from"./useHover-57ad4df9.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-e1c7fe69.js";import"react";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helsenorge/designsystem-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.0-
|
|
4
|
+
"version": "1.0.0-beta77",
|
|
5
5
|
"description": "The official design system for Helsenorge built with React.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "tfs",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"styled-components": "^5.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"bootstrap": "4.4.1"
|
|
31
|
+
"bootstrap": "4.4.1",
|
|
32
|
+
"uuid": "8.3.2"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@babel/core": "^7.8.3",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"@types/prettier": "1.19.0",
|
|
57
58
|
"@types/styled-components": "5.0.1",
|
|
58
59
|
"@types/testing-library__react": "^10.0.5",
|
|
60
|
+
"@types/uuid": "8.3.1",
|
|
59
61
|
"async": "^3.1.0",
|
|
60
62
|
"babel-loader": "^8.0.6",
|
|
61
63
|
"classnames": "^2.2.6",
|
package/scss/_font-settings.scss
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
$font-size-
|
|
2
|
-
$font-size-
|
|
3
|
-
$
|
|
4
|
-
$
|
|
1
|
+
$font-size-xs: 1rem; // 16px
|
|
2
|
+
$font-size-sm: 1.125rem; // 18px
|
|
3
|
+
$font-size-md: 1.25rem; // 20px
|
|
4
|
+
$font-size-lg: 1.5rem; // 24px
|
|
5
|
+
$lineheight-size-xs: 1.5rem; // 28px
|
|
6
|
+
$lineheight-size-sm: 1.75rem; // 28px
|
|
7
|
+
$lineheight-size-md: 1.875rem; // 30px
|
|
8
|
+
$lineheight-size-lg: 2rem; // 32px
|
package/scss/_palette.scss
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as r}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{useState as s,useEffect as m}from"react";import{u as o}from"./useWindowSize-c22d7634.js";import{b as i}from"./grid-11a70eb7.js";var a;!function(r){r[r.Xs=i.xs]="Xs",r[r.Sm=i.sm]="Sm",r[r.Md=i.md]="Md",r[r.Lg=i.lg]="Lg",r[r.Xl=i.xl]="Xl"}(a||(a={}));var e=function(){var i=o().width,e=s(),l=r(e,2),t=l[0],d=l[1];return m((function(){i&&(i>=a.Xl?d(a.Xl):i>=a.Lg?d(a.Lg):i>=a.Md?d(a.Md):i>=a.Sm?d(a.Sm):d(a.Xs))}),[i]),t};export{a as B,e as u};
|
|
2
|
+
//# sourceMappingURL=useBreakpoint-a8fa8a61.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint-a8fa8a61.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as n,_ as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{useState as i,useEffect as r}from"react";function t(){var t="object"===("undefined"==typeof window?"undefined":n(window));function o(){return{width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}var d=i(o),u=e(d,2),f=u[0],w=u[1];return r((function(){if(!t)return function(){};function n(){w(o())}return window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}}),[]),f}export{t as u};
|
|
2
|
+
//# sourceMappingURL=useWindowSize-c22d7634.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize-c22d7634.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Button-f1380b34.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as t,_ as n,a as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as o}from"./_tslib-51c8a283.js";import i,{useState as r,useEffect as l}from"react";import{g as a}from"./color-d7bbcfcc.js";import{L as d}from"./Loader-ad8bcd78.js";import{u as s}from"./useHover-57ad4df9.js";import{b as u}from"./index-cf9fa51d.js";import{c}from"./index-9b84fabc.js";import b from"./components/Button/styles.module.scss";var f={primary:"blueberry",warning:"banana",danger:"cherry"};var v=function(t,n){return n&&n<u.md&&t?48:t?64:38},m=i.forwardRef((function(u,m){var g,_,p,w=u.children,h=u.className,E=void 0===h?"":h,j=u.fluid,y=void 0!==j&&j,N=u.intent,k=void 0===N?"primary":N,C=u.inverted,H=void 0!==C&&C,I=u.htmlMarkup,z=void 0===I?"button":I,L=u.onClick,O=u.large,x=void 0!==O&&O,B=u.loading,F=void 0!==B&&B,M=u.variant,R=void 0===M?"fill":M,A=u.disabled,P=void 0!==A&&A,W=u.ellipsis,q=void 0!==W&&W,D=u.testId,G=u.href,J=u.target,K=o(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),Q=function(t){var n,e,o,i,r=null,l=null;return void 0!==(null===(e=null===(n=t[0])||void 0===n?void 0:n.props)||void 0===e?void 0:e.svgIcon)&&(r=t.shift()),void 0!==(null===(i=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===i?void 0:i.svgIcon)&&(l=t.pop()),[r,l,t]}(i.Children.toArray(w)),S=n(Q,3),T=S[0],U=S[1],V=S[2],X=s(m),Y=X.hoverRef,Z=X.isHovered,$=function(t,n,e,o,i){return n?a("neutral",600):t&&!o||!t&&o?"white":a(f[e],i?700:600)}("fill"===R,P,k,H,Z),tt=function(){var e="object"===("undefined"==typeof window?"undefined":t(window));function o(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}var i=r(o),a=n(i,2),d=a[0],s=a[1];return l((function(){if(!e)return function(){};function t(){s(o())}return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),d}(),nt="fill"===R,et="outline"===R,ot="borderless"===R,it="warning"===k,rt="danger"===k,lt=!(!T&&!U),at=lt&&!F&&!ot,dt=lt&&!F&&ot,st=Object.assign({},K),ut=c(b.button,(e(g={},b["button--fluid"],y),e(g,b["button--large"],x),e(g,b["button--fill"],nt),e(g,b["button--fill-warning"],nt&&it),e(g,b["button--fill-danger"],nt&&rt),e(g,b["button--fill-inverted"],nt&&H),e(g,b["button--fill-not-inverted"],nt&&!H),e(g,b["button--outline"],et),e(g,b["button--outline-warning"],et&&it),e(g,b["button--outline-danger"],et&&rt),e(g,b["button--outline-inverted"],et&&H),e(g,b["button--borderless"],ot),e(g,b["button--borderless-warning"],ot&&it),e(g,b["button--borderless-danger"],ot&&rt),e(g,b["button--borderless-inverted"],ot&&H),e(g,b["button--with-icon"],at),e(g,b["button--large-with-icon"],at&&x),e(g,b["button--ellipsis-with-icon"],at&&q),e(g,b["button--borderless-with-icon"],dt),e(g,b["button--large-borderless-with-icon"],dt&&x),g),E),ct=c(b.button__content,(e(_={},b["button__content--fill"],nt),e(_,b["button__content--fill-warning"],nt&&it),e(_,b["button__content--fill-danger"],nt&&rt),e(_,b["button__content--fill-not-inverted"],nt&&!H),e(_,b["button__content--borderless"],ot),e(_,b["button__content--borderless-warning"],ot&&it),e(_,b["button__content--borderless-danger"],ot&&rt),e(_,b["button__content--borderless-inverted"],ot&&H),e(_,b["button__content--with-icon"],at),e(_,b["button__content--large-with-icon"],at&&x),e(_,b["button__content--ellipsis-with-icon"],at&&q),e(_,b["button__content--fluid-with-icon"],at&&y),e(_,b["button__content--large-fluid-with-icon"],at&&y&&x),_)),bt=c(b["button__left-fluid-content"],(e(p={},b["button__left-fluid-content--with-icon"],lt),e(p,b["button__left-fluid-content--large-with-icon"],lt&&x),p));function ft(t,n,e,o){var r=t&&t.props&&t.props.color?t.props.color:e;return t&&Object.keys(t).length>0?i.cloneElement(t,{size:n,color:r,isHovered:o}):null}var vt=function(){return i.createElement("span",{className:ct},V)},mt=function(){return i.createElement("span",{className:b["content-wrapper"]},F?i.createElement("div",{className:b["button__left-fluid-content"]},i.createElement(d,{testId:"test-id-loader",color:"fill"!==R||H?f[k]:"white",size:"tiny"})):i.createElement(i.Fragment,null,y?i.createElement("div",{className:bt},ft(T,v(x,tt.width),$,Z),vt()):i.createElement(i.Fragment,null,ft(T,v(x,tt.width),$,Z),vt()),ft(U,38,$,Z)))};return i.createElement(i.Fragment,null,"button"===z&&i.createElement("button",Object.assign({onClick:L,disabled:P,"data-testid":D,className:ut,ref:Y},st),mt()),"a"===z&&i.createElement("a",Object.assign({onClick:L,"data-testid":D,className:ut,href:G,target:J,ref:Y},K),mt()))}));export{m as B};
|
|
2
|
-
//# sourceMappingURL=Button-f1380b34.js.map
|
package/Button-f1380b34.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-f1380b34.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Icon-43100735.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./_tslib-51c8a283.js";import i from"react";var a=i.forwardRef((function(a,o){var t=a.svgIcon,r=a.ariaLabel,l=a.id,s=a.className,d=void 0===s?"":s,c=a.size,v=void 0===c?48:c,n=a.color,m=void 0===n?"black":n,b=a.hoverColor,h=void 0===b?m||"black":b,f=a.isHovered,g=void 0!==f&&f,I=a.testId,p=e(a,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),y=i.createElement(t,{isExtraSmall:v<=38,isHovered:g}),E=l&&r?"title-".concat(l):void 0;return i.createElement("svg",Object.assign({id:l,"data-testid":I,ref:o,className:"hnds-style-icon ".concat(d),role:"img","aria-label":!l&&r?r:void 0,"aria-labelledby":E,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:v,minHeight:v},width:v,height:v,fill:g?h:m},p),E&&i.createElement("title",{id:E},r),y)}));a.displayName="Icon";export{a as I};
|
|
2
|
-
//# sourceMappingURL=Icon-43100735.js.map
|
package/Icon-43100735.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon-43100735.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Loader-ad8bcd78.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as l}from"./index-9b84fabc.js";import r from"./components/Loader/styles.module.scss";var o=a.forwardRef((function(o,d){var t,m,s=o.color,i=void 0===s?"neutral":s,c=o.size,_=void 0===c?"small":c,n=o.className,u=void 0===n?"":n,v=o.testId,p=void 0===v?"":v,f="small"===_,b="medium"===_,N="large"===_,w=l(r.loader,(e(t={},r["loader--small"],f),e(t,r["loader--medium"],b),e(t,r["loader--large"],N),t),u),E=l(r.loader__dot,(e(m={},r["loader__dot--small"],f),e(m,r["loader__dot--medium"],b),e(m,r["loader__dot--large"],N),e(m,r["loader__dot--banana"],"banana"===i),e(m,r["loader__dot--cherry"],"cherry"===i),e(m,r["loader__dot--kiwi"],"kiwi"===i),e(m,r["loader__dot--neutral"],"neutral"===i),e(m,r["loader__dot--plum"],"plum"===i),e(m,r["loader__dot--black"],"black"===i),e(m,r["loader__dot--white"],"white"===i),m));return a.createElement("div",{"data-testid":p,className:w},a.createElement("div",{className:E}),a.createElement("div",{className:E}),a.createElement("div",{className:E}),a.createElement("div",{className:E}))}));export{o as L};
|
|
2
|
-
//# sourceMappingURL=Loader-ad8bcd78.js.map
|
package/Loader-ad8bcd78.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Loader-ad8bcd78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Modal-42bec9e1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{useRef as t,useEffect as r}from"react";import{c as n}from"./index-9b84fabc.js";import{p as a}from"./palette-f206f488.js";import{B as o}from"./Button-f1380b34.js";import{I as l}from"./Icon-43100735.js";import{X as c,A as i,a as s}from"./AlertSignFill-64bfef57.js";import u from"./components/Modal/styles.module.scss";import{T as m}from"./Title-863af332.js";function d(){var e=t(null);function n(t){var r=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select'),n=r[0],a=1===r.length?n:r[r.length-1];"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(a.focus(),t.preventDefault()):document.activeElement===a&&(n.focus(),t.preventDefault()))}function a(t){var r=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),t.preventDefault())}return r((function(){var t=e.current;return t.addEventListener("keydown",n),t.addEventListener("click",a),function(){t.removeEventListener("keydown",n),t.removeEventListener("click",a)}}),[]),e}var v;!function(e){e.normal="normal",e.warning="warning",e.error="error"}(v||(v={}));var f={variant:v.normal,primaryButtonText:"OK",ariaLabel:"Dialog",large:!1,className:""},p=function(t){return e.createElement("button",{className:u.lukkekryss,"aria-label":t.ariaLabel||"Lukk",onClick:t.onClick,autoFocus:!0,role:"button"},e.createElement(l,{svgIcon:c,color:a.blueberry600,size:42}))},y=e.forwardRef((function(t,c){var f,y;function E(e){"Escape"===e.key&&t.onClose&&(e.stopPropagation(),t.onClose())}function b(e){e.target&&h.current===e.target&&t.onClose&&(e.stopPropagation(),t.onClose())}var k,g=e.useRef(null),h=e.useRef(null),x=t.secondaryButtonText&&(null===(f=t.secondaryButtonText)||void 0===f?void 0:f.length)>0||t.onSuccess;return r((function(){var e=g.current,t=h.current;return document.body.style.overflow="hidden",e&&(e.addEventListener("keydown",E),t.addEventListener("click",b)),function(){document.body.style.removeProperty("overflow"),e.removeEventListener("keydown",E),t.removeEventListener("click",b)}})),e.createElement("div",{ref:g,"data-testid":"dialog-container"},e.createElement("div",{ref:h,className:u["modal-overlay"],"data-testid":t.testId},e.createElement("div",{className:u.align,ref:d()},e.createElement("div",{className:n(t.className,u.modal,u[t.variant],t.large?u.large:""),role:"dialog","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledBy},!t.noCloseButton&&e.createElement("div",{className:u.close},e.createElement(p,{onClick:t.onClose,ariaLabel:t.ariaLabelCloseBtn})),e.createElement("div",{className:u.contentWrapper},e.createElement("div",{className:u.title},t.variant&&((k=t.variant)===v.error?e.createElement("div",null,e.createElement(l,{svgIcon:i,color:a.cherry500,hoverColor:a.cherry500})):k===v.warning?e.createElement("div",null,e.createElement(l,{svgIcon:s,color:a.black,hoverColor:a.black})):null),e.createElement("div",null,e.createElement(m,{htmlMarkup:"h3",appearance:"title3"},t.title))),e.createElement("div",{className:u.content},t.children&&e.createElement("div",null,t.children),t.description&&!t.children&&e.createElement("p",{className:u.description},t.description)),x&&e.createElement("div",{className:u.actions},t.onSuccess&&e.createElement(o,{onClick:t.onSuccess},t.primaryButtonText),t.secondaryButtonText&&(null===(y=t.secondaryButtonText)||void 0===y?void 0:y.length)>0&&e.createElement(o,{variant:"borderless",onClick:t.onClose},t.secondaryButtonText)))))))}));y.defaultProps=f;export{y as M};
|
|
2
|
-
//# sourceMappingURL=Modal-42bec9e1.js.map
|
package/Modal-42bec9e1.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-42bec9e1.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/color-d7bbcfcc.js
DELETED
package/color-d7bbcfcc.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-d7bbcfcc.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index-cf9fa51d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./palette-f206f488.js";var s={null:0,xs:360,sm:564,md:768,lg:1088,xl:1450},a={spacer:1,spacers:{0:0,1:1/8,2:1/4,3:.5,4:1,5:1.5,6:2,7:3,8:4,9:5,10:6,11:7,12:8},palette:t,screen:{xs:"(min-width: ".concat(s.xs,"px)"),sm:"(min-width: ".concat(s.sm,"px)"),md:"(min-width: ".concat(s.md,"px)"),lg:"(min-width: ".concat(s.lg,"px)"),xl:"(min-width: ".concat(s.xl,"px)")},breakpoints:s};export{s as b,a as t};
|
|
2
|
-
//# sourceMappingURL=index-cf9fa51d.js.map
|
package/index-cf9fa51d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-cf9fa51d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|