@helsenorge/designsystem-react 1.0.0-beta100 → 1.0.0-beta104
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-a0423474.js → Button-d5147e38.js} +2 -2
- package/Button-d5147e38.js.map +1 -0
- package/{Checkbox-9e4f3440.js → Checkbox-798282e4.js} +2 -2
- package/Checkbox-798282e4.js.map +1 -0
- package/{Close-007fca15.js → Close-35ad7d35.js} +2 -2
- package/Close-35ad7d35.js.map +1 -0
- package/{FormGroup-8d31ac79.js → FormGroup-0577b07f.js} +2 -2
- package/FormGroup-0577b07f.js.map +1 -0
- package/{Input-de356c23.js → Input-19650c24.js} +2 -2
- package/Input-19650c24.js.map +1 -0
- package/Loader-fa16a352.js +2 -0
- package/Loader-fa16a352.js.map +1 -0
- package/Modal-ad02991b.js +2 -0
- package/Modal-ad02991b.js.map +1 -0
- package/RadioButton-fe4bbd36.js +2 -0
- package/RadioButton-fe4bbd36.js.map +1 -0
- package/Textarea-e1d1144c.js +2 -0
- package/Textarea-e1d1144c.js.map +1 -0
- package/Title-af53f589.js +2 -0
- package/Title-af53f589.js.map +1 -0
- package/{Validation-f096092a.js → Validation-fd3f7f58.js} +2 -2
- package/Validation-fd3f7f58.js.map +1 -0
- package/{_rollupPluginBabelHelpers-d0752906.js → _rollupPluginBabelHelpers-b8ef6dd9.js} +2 -2
- package/_rollupPluginBabelHelpers-b8ef6dd9.js.map +1 -0
- package/color-a10c7892.js +2 -0
- package/color-a10c7892.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button/styles.module.scss +14 -3
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Checkbox/styles.module.scss +8 -8
- package/components/Close/index.js +1 -1
- package/components/Expander/index.js +1 -1
- package/components/Expander/styles.module.scss +5 -5
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/styles.module.scss +7 -7
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormGroup/styles.module.scss +7 -7
- package/components/Input/index.js +1 -1
- package/components/Input/styles.module.scss +4 -0
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/styles.module.scss +11 -11
- package/components/Loader/index.js +1 -1
- package/components/Loader/styles.module.scss +2 -1
- package/components/Logo/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +19 -17
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/styles.module.scss +3 -3
- package/components/RadioButton/index.js +1 -1
- package/components/RadioButton/styles.module.scss +10 -10
- package/components/Slider/index.js +1 -1
- package/components/Spacer/Spacer.d.ts.map +1 -1
- package/components/Spacer/componentdata.json +4 -1
- package/components/Spacer/index.js +1 -1
- package/components/Spacer/styles.module.scss +19 -11
- package/components/Spacer/styles.module.scss.d.ts +2 -0
- package/components/Textarea/index.js +1 -1
- package/components/Textarea/styles.module.scss +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/index.js +1 -1
- package/components/Validation/index.js +1 -1
- package/components/__mocks__/index.js +1 -1
- package/hooks/useBreakpoint.d.ts +9 -5
- package/hooks/useBreakpoint.d.ts.map +1 -1
- package/hooks/useFocusTrap.d.ts +2 -1
- package/hooks/useFocusTrap.d.ts.map +1 -1
- package/index-0e78dfa0.js +2 -0
- package/index-0e78dfa0.js.map +1 -0
- package/index.d.ts +10 -3
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +4 -8
- package/scss/_input.scss +5 -4
- package/scss/_spacers.scss +26 -24
- package/theme/currys/spacing.d.ts.map +1 -1
- package/theme/index.d.ts +1 -0
- package/theme/index.d.ts.map +1 -1
- package/theme/spacers.d.ts +2 -1
- package/theme/spacers.d.ts.map +1 -1
- package/useBreakpoint-552af2b9.js +2 -0
- package/useBreakpoint-552af2b9.js.map +1 -0
- package/{useHover-037be19d.js → useHover-9710204a.js} +2 -2
- package/useHover-9710204a.js.map +1 -0
- package/useIsVisible-a1f67a11.js +2 -0
- package/useIsVisible-a1f67a11.js.map +1 -0
- package/useSticky-194f2b78.js +2 -0
- package/useSticky-194f2b78.js.map +1 -0
- package/useWindowSize-750f9b68.js +2 -0
- package/useWindowSize-750f9b68.js.map +1 -0
- package/Button-a0423474.js.map +0 -1
- package/Checkbox-9e4f3440.js.map +0 -1
- package/Close-007fca15.js.map +0 -1
- package/FormGroup-8d31ac79.js.map +0 -1
- package/Input-de356c23.js.map +0 -1
- package/Loader-b7486541.js +0 -2
- package/Loader-b7486541.js.map +0 -1
- package/Modal-8ba60dd4.js +0 -2
- package/Modal-8ba60dd4.js.map +0 -1
- package/RadioButton-d3ed3858.js +0 -2
- package/RadioButton-d3ed3858.js.map +0 -1
- package/Textarea-e48685fc.js +0 -2
- package/Textarea-e48685fc.js.map +0 -1
- package/Title-fab4097d.js +0 -2
- package/Title-fab4097d.js.map +0 -1
- package/Validation-f096092a.js.map +0 -1
- package/_rollupPluginBabelHelpers-d0752906.js.map +0 -1
- package/color-acb834c6.js +0 -2
- package/color-acb834c6.js.map +0 -1
- package/index-19b48c51.js +0 -2
- package/index-19b48c51.js.map +0 -1
- package/useBreakpoint-324a9b14.js +0 -2
- package/useBreakpoint-324a9b14.js.map +0 -1
- package/useHover-037be19d.js.map +0 -1
- package/useWindowSize-73b47451.js +0 -2
- package/useWindowSize-73b47451.js.map +0 -1
|
@@ -17,11 +17,14 @@
|
|
|
17
17
|
"required": false,
|
|
18
18
|
"type": {
|
|
19
19
|
"name": "enum",
|
|
20
|
-
"raw": "\"3xs\" | \"2xs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\" | \"3xl\" | \"4xl\" | \"5xl\" | \"6xl\" | undefined",
|
|
20
|
+
"raw": "\"4xs\" | \"3xs\" | \"2xs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\" | \"3xl\" | \"4xl\" | \"5xl\" | \"6xl\" | undefined",
|
|
21
21
|
"value": [
|
|
22
22
|
{
|
|
23
23
|
"value": "undefined"
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
"value": "\"4xs\""
|
|
27
|
+
},
|
|
25
28
|
{
|
|
26
29
|
"value": "\"3xs\""
|
|
27
30
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as s}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import a from"react";import{c as e}from"../../index-9b84fabc.js";import r from"./styles.module.scss";import{A as c}from"../../constants-ad6c82db.js";var l=a.forwardRef((function(l,p){var t,x=l.size,o=void 0===x?"s":x,m=l.className,d=l.testId,i=e(r.spacer,(s(t={},r["spacer--4xs"],"4xs"===o),s(t,r["spacer--3xs"],"3xs"===o),s(t,r["spacer--2xs"],"2xs"===o),s(t,r["spacer--xs"],"xs"===o),s(t,r["spacer--s"],"s"===o),s(t,r["spacer--m"],"m"===o),s(t,r["spacer--l"],"l"===o),s(t,r["spacer--xl"],"xl"===o),s(t,r["spacer--2xl"],"2xl"===o),s(t,r["spacer--3xl"],"3xl"===o),s(t,r["spacer--4xl"],"4xl"===o),s(t,r["spacer--5xl"],"5xl"===o),s(t,r["spacer--6xl"],"6xl"===o),t),m);return a.createElement("span",{className:i,ref:p,"data-testid":d,"data-analyticsid":c.Spacer})}));export default l;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,39 +1,47 @@
|
|
|
1
|
+
@import '../../scss/spacers.scss';
|
|
2
|
+
|
|
1
3
|
.spacer {
|
|
2
4
|
display: block;
|
|
3
5
|
width: 100%;
|
|
4
6
|
height: 0.125rem;
|
|
5
7
|
|
|
8
|
+
&--4xs {
|
|
9
|
+
height: getSpacer(4xs);
|
|
10
|
+
}
|
|
11
|
+
&--3xs {
|
|
12
|
+
height: getSpacer(3xs);
|
|
13
|
+
}
|
|
6
14
|
&--2xs {
|
|
7
|
-
height:
|
|
15
|
+
height: getSpacer(2xs);
|
|
8
16
|
}
|
|
9
17
|
&--xs {
|
|
10
|
-
height:
|
|
18
|
+
height: getSpacer(xs);
|
|
11
19
|
}
|
|
12
20
|
&--s {
|
|
13
|
-
height:
|
|
21
|
+
height: getSpacer(s);
|
|
14
22
|
}
|
|
15
23
|
&--m {
|
|
16
|
-
height:
|
|
24
|
+
height: getSpacer(m);
|
|
17
25
|
}
|
|
18
26
|
&--l {
|
|
19
|
-
height:
|
|
27
|
+
height: getSpacer(l);
|
|
20
28
|
}
|
|
21
29
|
&--xl {
|
|
22
|
-
height:
|
|
30
|
+
height: getSpacer(xl);
|
|
23
31
|
}
|
|
24
32
|
&--2xl {
|
|
25
|
-
height:
|
|
33
|
+
height: getSpacer(2xl);
|
|
26
34
|
}
|
|
27
35
|
&--3xl {
|
|
28
|
-
height:
|
|
36
|
+
height: getSpacer(3xl);
|
|
29
37
|
}
|
|
30
38
|
&--4xl {
|
|
31
|
-
height:
|
|
39
|
+
height: getSpacer(4xl);
|
|
32
40
|
}
|
|
33
41
|
&--5xl {
|
|
34
|
-
height:
|
|
42
|
+
height: getSpacer(5xl);
|
|
35
43
|
}
|
|
36
44
|
&--6xl {
|
|
37
|
-
height:
|
|
45
|
+
height: getSpacer(6xl);
|
|
38
46
|
}
|
|
39
47
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Textarea-
|
|
1
|
+
import{T as s}from"../../Textarea-e1d1144c.js";export{T as default}from"../../Textarea-e1d1144c.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../../_tslib-51c8a283.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-ad6c82db.js";import"../../uuid-fe7442b7.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/components/Tile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,
|
|
1
|
+
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as a}from"react";import{c as l}from"../../index-9b84fabc.js";import{A as o,I as n}from"../../constants-ad6c82db.js";import"../../Icon-89da8de4.js";import s from"./styles.module.scss";var c=r.forwardRef((function(e,i){var a,o=e.children,n=e.className,c=e.htmlMarkup,d=void 0===c?"span":c,m=e.highlighted,p=e.compact,f=l(s.tile__title,(t(a={},s["tile__title--highlighted"],m),t(a,s["tile__title--compact"],p),a),n),u=d;return r.createElement(u,{className:f,ref:i},o)})),d=r.forwardRef((function(c,d){var m,p=c.icon,f=c.title,u=c.className,h=void 0===u?"":u,g=c.description,_=c.fixed,b=void 0!==_&&_,v=c.highlighted,E=void 0!==v&&v,N=c.testId,j=i(c,["icon","title","className","description","fixed","highlighted","testId"]),x=a(!1),w=e(x,2),I=w[0],M=w[1],k=!g,y=l(s.tile,(t(m={},s["tile--fixed"],b),t(m,s["tile--compact"],k),t(m,s["tile--highlighted"],E),m),h),B=l(s["title-wrapper"],t({},s["title-wrapper--compact"],k));return r.createElement("a",Object.assign({ref:d,className:y,onMouseEnter:function(){return M(!0)},onMouseLeave:function(){return M(!1)},onFocus:function(){return M(!0)},onBlur:function(){return M(!1)},"data-testid":N,"data-analyticsid":o.Tile,rel:"_blank"===c.target?"noopener noreferrer":c.rel},j),r.createElement("div",{className:B},r.cloneElement(p,{size:n.Medium,isHovered:I,color:E?"white":"black"}),r.cloneElement(f,{highlighted:E,compact:k})),g?r.createElement("p",{className:s.tile__description},g):null)}));d.Title=c;export default d;export{d as Tile};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as s}from"../../Title-
|
|
1
|
+
import{T as s}from"../../Title-af53f589.js";export{T as default,i as instanceOfTitleMargin}from"../../Title-af53f589.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-ad6c82db.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as s}from"../../Validation-
|
|
1
|
+
import{V as s}from"../../Validation-fd3f7f58.js";export{V as Validation,V as default}from"../../Validation-fd3f7f58.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-0577b07f.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-798282e4.js";import"../../uuid-fe7442b7.js";import"../../Check-6291ad09.js";import"../../Icon-89da8de4.js";import"../../_tslib-51c8a283.js";import"../../constants-ad6c82db.js";import"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../Checkbox/styles.module.scss";import"../../RadioButton-fe4bbd36.js";import"../RadioButton/styles.module.scss";import"../../Input-19650c24.js";import"../../useBreakpoint-552af2b9.js";import"../Input/styles.module.scss";import"../../Title-af53f589.js";import"../Title/styles.module.scss";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,d as n}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{c as e,d as n}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";var r=function(){function r(){n(this,r)}return e(r,[{key:"observe",value:function(){}},{key:"unobserve",value:function(){}}]),r}();Object.defineProperty(window,"IntersectionObserver",{value:r});export default r;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/hooks/useBreakpoint.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export declare enum Breakpoint {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
xs,
|
|
3
|
+
sm,
|
|
4
|
+
md,
|
|
5
|
+
lg,
|
|
6
|
+
xl
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Lytt på endringer i breakpoint basert på media queries. Trigger re-render bare når breakpoint er endret.
|
|
10
|
+
* @returns Gjeldende breakpoint
|
|
11
|
+
*/
|
|
8
12
|
export declare const useBreakpoint: () => Breakpoint | undefined;
|
|
9
13
|
//# sourceMappingURL=useBreakpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAGA,oBAAY,UAAU;IACpB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,8BA0CzB,CAAC"}
|
package/hooks/useFocusTrap.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export declare function useFocusTrap(): React.MutableRefObject<HTMLDivElement | null>;
|
|
3
|
+
export default useFocusTrap;
|
|
3
4
|
//# sourceMappingURL=useFocusTrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,wBAAgB,YAAY,IAAI,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CA2D5E;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-0e78dfa0.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
export { theme } from './theme';
|
|
2
|
+
export { useBreakpoint, Breakpoint } from './hooks/useBreakpoint';
|
|
3
|
+
export { useFocusToggle } from './hooks/useFocusToggle';
|
|
4
|
+
export { useFocusTrap } from './hooks/useFocusTrap';
|
|
5
|
+
export { useHover } from './hooks/useHover';
|
|
6
|
+
export { useIntersectionObserver } from './hooks/useIntersectionObserver';
|
|
7
|
+
export { useIsVisible } from './hooks/useIsVisible';
|
|
8
|
+
export { useLayoutEvent } from './hooks/useLayoutEvent';
|
|
9
|
+
export { useSticky } from './hooks/useSticky';
|
|
10
|
+
export { useWindowSize } from './hooks/useWindowSize';
|
|
4
11
|
export * from './constants';
|
|
5
12
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,aAAa,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-
|
|
1
|
+
export{t as theme}from"./index-0e78dfa0.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-552af2b9.js";export{u as useFocusToggle,a as useLayoutEvent,b as useSticky}from"./useSticky-194f2b78.js";export{u as useFocusTrap,a as useIntersectionObserver,b as useIsVisible}from"./useIsVisible-a1f67a11.js";export{u as useHover}from"./useHover-9710204a.js";export{u as useWindowSize}from"./useWindowSize-750f9b68.js";export{A as AnalyticsId,F as FormMode,a as FormVariant,I as IconSize,Z as ZIndex}from"./constants-ad6c82db.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-b8ef6dd9.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-beta104",
|
|
5
5
|
"description": "The official design system for Helsenorge built with React.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "tfs",
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
"source": "src/index.ts",
|
|
22
22
|
"scripts": {},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"bootstrap": "4.
|
|
24
|
+
"bootstrap": "4.6.1",
|
|
25
25
|
"normalize.css": "8.0.1",
|
|
26
26
|
"react": ">= 16.12.0",
|
|
27
|
-
"react-dom": ">= 16.12.0"
|
|
28
|
-
"styled-components": "^5.0.0"
|
|
27
|
+
"react-dom": ">= 16.12.0"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
|
-
"bootstrap": "4.
|
|
30
|
+
"bootstrap": "4.6.1"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@babel/core": "^7.8.3",
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
"@types/jest": "^25.2.3",
|
|
56
55
|
"@types/prettier": "1.19.0",
|
|
57
56
|
"@types/react-dom": "16.9.8",
|
|
58
|
-
"@types/styled-components": "5.0.1",
|
|
59
57
|
"@types/testing-library__react": "^10.0.5",
|
|
60
58
|
"async": "^3.1.0",
|
|
61
59
|
"babel-loader": "^8.0.6",
|
|
@@ -65,7 +63,6 @@
|
|
|
65
63
|
"file-loader": "^4.2.0",
|
|
66
64
|
"identity-obj-proxy": "^3.0.0",
|
|
67
65
|
"jest": "^26.0.1",
|
|
68
|
-
"jest-styled-components": "^7.0.0",
|
|
69
66
|
"jest-watch-typeahead": "^0.4.2",
|
|
70
67
|
"node-sass": "^4.13.0",
|
|
71
68
|
"normalize.css": "8.0.1",
|
|
@@ -91,7 +88,6 @@
|
|
|
91
88
|
"rollup-plugin-typescript2": "^0.29.0",
|
|
92
89
|
"sass-loader": "^8.0.0",
|
|
93
90
|
"style-loader": "^1.0.0",
|
|
94
|
-
"styled-components": "5.0.1",
|
|
95
91
|
"svg-parser": "^2.0.2",
|
|
96
92
|
"svgo": "^1.3.2",
|
|
97
93
|
"ts-loader": "^6.2.1",
|
package/scss/_input.scss
CHANGED
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&--bigform {
|
|
44
|
-
padding: getSpacer(
|
|
44
|
+
padding: getSpacer(2xs) 0;
|
|
45
45
|
|
|
46
46
|
svg:first-child {
|
|
47
|
-
padding-left: getSpacer(
|
|
47
|
+
padding-left: getSpacer(2xs);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
svg:last-child {
|
|
51
|
-
padding-right: getSpacer(
|
|
51
|
+
padding-right: getSpacer(2xs);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -145,8 +145,9 @@
|
|
|
145
145
|
|
|
146
146
|
&__input {
|
|
147
147
|
line-height: 1.625rem;
|
|
148
|
+
font-family: inherit;
|
|
148
149
|
font-size: $font-size-sm;
|
|
149
|
-
padding: 0 getSpacer(
|
|
150
|
+
padding: 0 getSpacer(2xs);
|
|
150
151
|
border: none;
|
|
151
152
|
outline: none;
|
|
152
153
|
background-color: transparent;
|
package/scss/_spacers.scss
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
$spacer: 1rem;
|
|
2
2
|
$spacers: (
|
|
3
3
|
0: 0,
|
|
4
|
-
1: $spacer
|
|
5
|
-
2: $spacer
|
|
6
|
-
3: $spacer
|
|
7
|
-
4: $spacer *
|
|
8
|
-
5: $spacer * 1
|
|
9
|
-
6: $spacer *
|
|
10
|
-
7: $spacer *
|
|
11
|
-
8: $spacer *
|
|
12
|
-
9: $spacer *
|
|
13
|
-
10: $spacer *
|
|
14
|
-
11: $spacer *
|
|
15
|
-
12: $spacer *
|
|
4
|
+
1: $spacer * 0.125,
|
|
5
|
+
2: $spacer * 0.25,
|
|
6
|
+
3: $spacer * 0.5,
|
|
7
|
+
4: $spacer * 0.75,
|
|
8
|
+
5: $spacer * 1,
|
|
9
|
+
6: $spacer * 1.5,
|
|
10
|
+
7: $spacer * 2,
|
|
11
|
+
8: $spacer * 3,
|
|
12
|
+
9: $spacer * 4,
|
|
13
|
+
10: $spacer * 5,
|
|
14
|
+
11: $spacer * 6,
|
|
15
|
+
12: $spacer * 7,
|
|
16
|
+
13: $spacer * 8,
|
|
16
17
|
);
|
|
17
18
|
|
|
18
19
|
@function getSpacer($spacerSize) {
|
|
19
20
|
$spacerValue: map-get(
|
|
20
21
|
(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
4xs: map-get($spacers, 1),
|
|
23
|
+
3xs: map-get($spacers, 2),
|
|
24
|
+
2xs: map-get($spacers, 3),
|
|
25
|
+
xs: map-get($spacers, 4),
|
|
26
|
+
s: map-get($spacers, 5),
|
|
27
|
+
m: map-get($spacers, 6),
|
|
28
|
+
l: map-get($spacers, 7),
|
|
29
|
+
xl: map-get($spacers, 8),
|
|
30
|
+
2xl: map-get($spacers, 9),
|
|
31
|
+
3xl: map-get($spacers, 10),
|
|
32
|
+
4xl: map-get($spacers, 11),
|
|
33
|
+
5xl: map-get($spacers, 12),
|
|
34
|
+
6xl: map-get($spacers, 13),
|
|
33
35
|
),
|
|
34
36
|
$spacerSize
|
|
35
37
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../src/theme/currys/spacing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../../src/theme/currys/spacing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,cAAc,qCA+B1B,CAAC;AAEF,eAAO,MAAM,SAAS,qCAGrB,CAAC"}
|
package/theme/index.d.ts
CHANGED
package/theme/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjB,CAAC"}
|
package/theme/spacers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type SpacerSizes = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
1
|
+
export declare type SpacerSizes = '4xs' | '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
2
2
|
export declare const spacer = 1;
|
|
3
3
|
export declare const spacers: {
|
|
4
4
|
0: number;
|
|
@@ -14,5 +14,6 @@ export declare const spacers: {
|
|
|
14
14
|
10: number;
|
|
15
15
|
11: number;
|
|
16
16
|
12: number;
|
|
17
|
+
13: number;
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=spacers.d.ts.map
|
package/theme/spacers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacers.d.ts","sourceRoot":"","sources":["../../src/theme/spacers.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"spacers.d.ts","sourceRoot":"","sources":["../../src/theme/spacers.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAExH,eAAO,MAAM,MAAM,IAAI,CAAC;AAExB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAenB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useState as r,useEffect as n}from"react";import{b as t,s as a}from"./grid-11a70eb7.js";var i;!function(e){e[e.xs=t.xs]="xs",e[e.sm=t.sm]="sm",e[e.md=t.md]="md",e[e.lg=t.lg]="lg",e[e.xl=t.xl]="xl"}(i||(i={}));var s=function(){var t=r(),s=e(t,2),m=s[0],o=s[1];return n((function(){var r,n,t=function(e){switch(e.media){case a.xl:return void o(e.matches?i.xl:i.lg);case a.lg:return void o(e.matches?i.lg:i.md);case a.md:return void o(e.matches?i.md:i.sm);case a.sm:return void o(e.matches?i.sm:i.xs);default:return void o(i.xs)}},s=Object.entries(a).reverse().map((function(r){var n=e(r,2),t=n[0],a=n[1];return{breakpoint:i[t],mediaQuery:window.matchMedia(a)}}));s.forEach((function(e){return e.mediaQuery.addEventListener("change",t)}));var m=null!==(n=null===(r=s.find((function(e){return e.mediaQuery.matches})))||void 0===r?void 0:r.breakpoint)&&void 0!==n?n:i.xs;return o(m),function(){s.forEach((function(e){return e.mediaQuery.removeEventListener("change",t)}))}}),[]),m};export{i as B,s as u};
|
|
2
|
+
//# sourceMappingURL=useBreakpoint-552af2b9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint-552af2b9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"./_rollupPluginBabelHelpers-
|
|
2
|
-
//# sourceMappingURL=useHover-
|
|
1
|
+
import{_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useRef as r,useState as n,useEffect as t}from"react";var o=function(o,u){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=o||r(null),f=n(!1),a=e(f,2),v=a[0],s=a[1];return t((function(){var e=c.current,r=function(){return s(!0)},n=function(){return s(!1)},t=["mouseenter",i?"focusin":""];t.forEach((function(n){return e&&e.addEventListener(n,r)}));var o=["mouseleave",i?"focusout":""];return o.forEach((function(r){return e&&e.addEventListener(r,n)})),function(){[].concat(t,o).forEach((function(t){return e&&e.removeEventListener(t,r)&&e.removeEventListener(t,n)}))}}),[c,u]),{hoverRef:c,isHovered:v}};export{o as u};
|
|
2
|
+
//# sourceMappingURL=useHover-9710204a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHover-9710204a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useRef as e,useEffect as t,useState as n}from"react";import{_ as r}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";function o(){var n=e(null);function r(e){var t=n.current,r="Tab"===e.key;if(t&&r){var o=function(e){try{return("string"==typeof e?document.querySelector(e):e).getRootNode().activeElement}catch(t){return console.error("Feil ved å ta tak i active element basert på angitt node: ",e,t),null}}(t),u=null==t?void 0:t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),i=u[0],c=1===u.length?i:u[u.length-1];e.shiftKey?o===i&&(c.focus(),e.preventDefault()):o===c&&(i.focus(),e.preventDefault())}}function o(e){var t=n.current;if(t){var r=t.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),e.preventDefault())}}return t((function(){var e=n.current;return e.addEventListener("keydown",r),e.addEventListener("click",o),function(){e.removeEventListener("keydown",r),e.removeEventListener("click",o)}}),[]),n}var u=function(e,n,r){t((function(){var t=new IntersectionObserver(n,r);return(null==e?void 0:e.current)&&t.observe(e.current),function(){(null==e?void 0:e.current)&&t.unobserve(e.current)}}),[e])},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=n(!1),i=r(o,2),c=i[0],a=i[1],l=function(e){a(e[0].intersectionRatio>=t)};return u(e,l,{threshold:t}),c};export{u as a,i as b,o as u};
|
|
2
|
+
//# sourceMappingURL=useIsVisible-a1f67a11.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsVisible-a1f67a11.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as t}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useState as n,useEffect as e}from"react";var i=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),o=function(o,r){var a=n(),d=t(a,2),u=d[0],c=d[1];return e((function(){var t=function(){var t,n=null===(t=o.current)||void 0===t?void 0:t.querySelectorAll(i);c(n)},n=new MutationObserver(t);return(null==o?void 0:o.current)&&n.observe(o.current,{subtree:!0,childList:!0}),t(),function(){n.disconnect()}}),[o]),e((function(){r?null==u||u.forEach((function(t){var n=t.getAttribute("data-tabindex");n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})):null==u||u.forEach((function(t){t.hasAttribute("tabindex")&&t.setAttribute("data-tabindex","".concat(t.tabIndex)),t.tabIndex=-1}))}),[r,u]),u};function r(t,n,e){var i;return function(){var o=this,r=arguments,a=function(){i=null,e||t.apply(o,r)},d=e&&!i;i&&clearTimeout(i),i=setTimeout(a,n),d&&t.apply(o,r)}}var a=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["layoutchange","resize","orientationchange"],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;e((function(){var e=r(t,i);return n.forEach((function(t){return window.addEventListener(t,e)})),e(),function(){n.forEach((function(t){return window.removeEventListener(t,e)}))}}),[])},d=function(e,i){var o=n(!1),r=t(o,2),d=r[0],u=r[1],c=n(!1),l=t(c,2),b=l[0],s=l[1],v=n(),f=t(v,2),x=f[0],h=f[1],p=n(),g=t(p,2),m=g[0],w=g[1];return a((function(){var t,n,o,r=(null===(t=e.current)||void 0===t?void 0:t.getBoundingClientRect())||{},a=r.top,d=void 0===a?0:a,c=r.width,l=void 0===c?0:c,b=r.bottom,v=void 0===b?0:b,f=null!==(o=null===(n=i.current)||void 0===n?void 0:n.getBoundingClientRect().height)&&void 0!==o?o:0;u(d<=0),s(v<=f),w(l),h(f)}),["resize","scroll"]),{isOutsideWindow:d,isLeavingWindow:b,offsetHeight:x,contentWidth:m}};export{a,d as b,o as u};
|
|
2
|
+
//# sourceMappingURL=useSticky-194f2b78.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSticky-194f2b78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n,_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.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-750f9b68.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize-750f9b68.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Button-a0423474.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-a0423474.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Checkbox-9e4f3440.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-9e4f3440.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Close-007fca15.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Close-007fca15.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup-8d31ac79.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Input-de356c23.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input-de356c23.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Loader-b7486541.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a}from"./_rollupPluginBabelHelpers-d0752906.js";import r,{useState as l,useRef as t,useEffect as o}from"react";import{c as d}from"./index-9b84fabc.js";import{u as n}from"./uuid-fe7442b7.js";import i from"./components/Loader/styles.module.scss";import{A as s}from"./constants-ad6c82db.js";var m;!function(e){e.screen="screen",e.parent="parent"}(m||(m={}));var c=r.forwardRef((function(c,p){var v,u,_,b=c.overlay,f=c.color,y=void 0===f?b?"black":"neutral":f,w=c.size,E=void 0===w?"small":w,N=c.className,L=void 0===N?"":N,g=c.labelId,h=void 0===g?n():g,k=c.testId,j=c.center,x=c.inline,I=c.ariaLabelledById,B=c.ariaLabel,z=void 0===B?"Laster inn":B,A=l(b!==m.parent&&!x),H=e(A,2),O=H[0],P=H[1],R="small"===E,q="medium"===E,C="large"===E,D=d(i["loader-wrapper"],(a(v={},i["loader-wrapper--center"],j),a(v,i["loader-wrapper--overlay"],b),a(v,i["loader-wrapper--overlay-screen"],b===m.screen),a(v,i["loader-wrapper--overlay-parent"],b===m.parent&&O),a(v,i["loader-wrapper--inline"],x&&O),v)),F=d(i.loader,(a(u={},i["loader--small"],R),a(u,i["loader--medium"],q),a(u,i["loader--large"],C),u),L),G=d(i.loader__dot,(a(_={},i["loader__dot--small"],R),a(_,i["loader__dot--medium"],q),a(_,i["loader__dot--large"],C),a(_,i["loader__dot--banana"],"banana"===y),a(_,i["loader__dot--cherry"],"cherry"===y),a(_,i["loader__dot--kiwi"],"kiwi"===y),a(_,i["loader__dot--neutral"],"neutral"===y),a(_,i["loader__dot--plum"],"plum"===y),a(_,i["loader__dot--black"],"black"===y),a(_,i["loader__dot--white"],"white"===y),_)),J=t(null);return o((function(){var e,a,r,l;b===m.parent&&(null===(a=null===(e=J.current)||void 0===e?void 0:e.parentElement)||void 0===a?void 0:a.style)&&(J.current.parentElement.style.position="relative",P(!0)),x&&(null===(l=null===(r=J.current)||void 0===r?void 0:r.parentElement)||void 0===l?void 0:l.style)&&(J.current.parentElement.style.display="flex",P(!0))}),[]),r.createElement("div",{role:"progressbar",className:D,ref:J},O&&r.createElement("div",{"data-testid":k,"data-analyticsid":s.Loader,"aria-labelledby":I||h,className:F},r.createElement("div",{className:G}),r.createElement("div",{className:G}),r.createElement("div",{className:G}),r.createElement("div",{className:G}),!I&&r.createElement("span",{id:h,className:i["loader__hidden-text"]},z)))}));export{c as L,m as O};
|
|
2
|
-
//# sourceMappingURL=Loader-b7486541.js.map
|
package/Loader-b7486541.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Loader-b7486541.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Modal-8ba60dd4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import a,{useRef as r,useEffect as n,useState as l}from"react";import{c as o}from"./index-9b84fabc.js";import{p as i}from"./palette-f206f488.js";import{B as c}from"./Button-a0423474.js";import{I as s}from"./Icon-89da8de4.js";import{A as d,Z as m,I as u}from"./constants-ad6c82db.js";import v from"./components/Modal/styles.module.scss";import{A as p,a as f}from"./AlertSignFill-e607ff43.js";import{T as _}from"./Title-fab4097d.js";import{u as E}from"./uuid-fe7442b7.js";import{C as h}from"./Close-007fca15.js";import{createPortal as y}from"react-dom";function b(){var e=r(null);function t(t){var a=e.current,r="Tab"===t.key;if(a&&r){var n=function(e){try{return("string"==typeof e?document.querySelector(e):e).getRootNode().activeElement}catch(t){return console.error("Feil ved å ta tak i active element basert på angitt node: ",e,t),null}}(a),l=null==a?void 0:a.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=l[0],i=1===l.length?o:l[l.length-1];t.shiftKey?n===o&&(i.focus(),t.preventDefault()):n===i&&(o.focus(),t.preventDefault())}}function a(t){var a=e.current;if(a){var r=a.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),t.preventDefault())}}return n((function(){var r=e.current;return r.addEventListener("keydown",t),r.addEventListener("click",a),function(){r.removeEventListener("keydown",t),r.removeEventListener("click",a)}}),[]),e}var g,N,C=function(e,t,a){n((function(){var r=new IntersectionObserver(t,a);return(null==e?void 0:e.current)&&r.observe(e.current),function(){(null==e?void 0:e.current)&&r.unobserve(e.current)}}),[e])},x=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=l(!1),n=e(r,2),o=n[0],i=n[1],c=function(e){i(e[0].intersectionRatio>=a)};return C(t,c,{threshold:a}),o},w=function(e){e.isExtraSmall;var t=e.isHovered,r=a.createElement("path",{d:"m9.16 23.421 2.883-2.773 8.262 8.584L35.958 12.97l2.882 2.774-18.536 19.257-11.143-11.58zm26.744-13.279-15.6 16.206-8.206-8.529-5.766 5.547 13.973 14.518 21.362-22.193-5.764-5.549z","fill-rule":"evenodd"});return t?a.createElement("path",{d:"m11.128 25.394 2.88-2.771 6.291 6.613 17.071-17.68 2.882 2.775-19.944 20.668-9.18-9.605zM37.318 8.73 20.31 26.345l-6.239-6.558-5.766 5.548 11.996 12.552 22.781-23.609-5.764-5.548z","fill-rule":"evenodd"}):r};function k(e){var t=e.children,r=e.parent,n=e.className,l=e.testId,o=a.useMemo((function(){return document.createElement("div")}),[]);return o.setAttribute("data-analyticsid",d.Portal),l&&o.setAttribute("data-testid",l),a.useEffect((function(){var e=r&&r.appendChild?r:document.body,t=["portal-container"];return n&&n.split(" ").forEach((function(e){return t.push(e)})),t.forEach((function(e){return o.classList.add(e)})),e.appendChild(o),function(){e.removeChild(o)}}),[o,r,n]),y(t,o)}!function(e){e.normal="normal",e.warning="warning",e.error="error",e.success="success",e.image="image"}(g||(g={})),function(e){e.large="large",e.medium="medium"}(N||(N={}));var L={variant:g.normal,primaryButtonText:"OK",titleId:E(),className:"",size:N.large,zIndex:m.Modal},B=function(e,t){var r=function(e){return e===g.error?a.createElement(s,{size:u.Small,svgIcon:p,color:i.cherry500}):e===g.warning?a.createElement(s,{size:u.Small,svgIcon:f,color:i.black}):e===g.success?a.createElement(s,{size:u.Small,svgIcon:w,color:i.kiwi900}):null}(e);return r?a.createElement("div",{className:v.modal__iconWrapper},r):t?a.createElement("div",{className:v.modal__iconWrapper},a.cloneElement(t,{size:u.Small})):null},I=function(r){var l,i,s,m=a.useState(0),u=e(m,2),p=u[0],f=u[1],E=a.useRef(null),y=a.useRef(null),N=a.useRef(null),C=x(y),w=a.useRef(null),L=x(w),I=N.current&&N.current.scrollHeight>N.current.clientHeight;function z(e){"Escape"===e.key&&r.onClose&&(e.stopPropagation(),r.onClose())}function S(e){e.target&&W.current===e.target&&r.onClose&&(e.stopPropagation(),r.onClose())}var T=r.variant===g.image,W=a.useRef(null),j=r.secondaryButtonText&&(null===(i=r.secondaryButtonText)||void 0===i?void 0:i.length)>0||r.onSuccess,A=r.ariaLabelledBy?void 0:r.ariaLabel,M=r.ariaLabelledBy?r.ariaLabelledBy:r.ariaLabel?void 0:r.titleId;n((function(){var e,t=W.current;return null===(e=E.current)||void 0===e||e.focus(),document.body.style.overflow="hidden",r.disableCloseEvents||!t||j||(t.addEventListener("keydown",z),t.addEventListener("click",S)),function(){document.body.style.removeProperty("overflow"),r.disableCloseEvents||!t||j||(t.removeEventListener("keydown",z),t.removeEventListener("click",S))}}),[]);var R=o((t(l={},v["modal__title--error"],r.variant===g.error),t(l,v["modal__title--success"],r.variant===g.success),l)),P=a.createElement("div",{"data-testid":"dialog-container"},a.createElement("div",{ref:W,className:v["modal-overlay"],"data-testid":r.testId,"data-analyticsid":d.Modal,style:{zIndex:r.zIndex}},a.createElement("div",{className:v.align,ref:b()},a.createElement("div",{className:o(r.className,v.modal,v["modal--".concat(r.variant)],v["modal--".concat(r.size)]),role:"dialog","aria-label":A,"aria-labelledby":M},a.createElement("div",{tabIndex:p,ref:E,onBlur:function(){return f(-1)}}),a.createElement("div",{className:o(v.modal__shadow,v["modal__shadow--top"],t({},v["modal__shadow--show"],!C&&I))}),a.createElement("div",{className:o(v.modal__contentWrapper,t({},v["modal__contentWrapper--image"],T)),ref:N},!r.noCloseButton&&a.createElement("div",{className:v.modal__closeWrapper},a.createElement("div",{className:o(v.modal__closeWrapper__close)},a.createElement(h,{onClick:r.onClose,ariaLabel:r.ariaLabelCloseBtn}))),a.createElement("div",{className:o(v["modal__contentWrapper__scroll--".concat(r.size)],t({},v["modal__contentWrapper__scroll--image"],T))},a.createElement("div",{ref:y}),a.createElement("div",{className:v.modal__contentWrapper__title},B(r.variant,r.icon),a.createElement(_,{id:M,htmlMarkup:"h3",appearance:"title3",className:R},r.title),r.afterTitleChildren&&a.createElement("div",{className:v.modal__afterTitleChildren},r.afterTitleChildren)),T&&a.createElement("div",null,a.createElement("div",{className:v.modal__contentWrapper__imageWrapper},r.children),a.createElement("span",{className:v.modal__contentWrapper__imageDescription},r.description)),!T&&r.children&&a.createElement("div",null,r.children),!T&&!r.children&&a.createElement("p",{className:v.modal__description},r.description),a.createElement("div",{ref:w}))),a.createElement("div",{className:o(v.modal__shadow,v["modal__shadow--bottom"],t({},v["modal__shadow--show"],!L&&I))}),j&&a.createElement("div",{className:o(v["modal__call-to-action"],v["modal__call-to-action--".concat(r.size)])},r.onSuccess&&a.createElement(c,{onClick:r.onSuccess},r.primaryButtonText),r.secondaryButtonText&&(null===(s=r.secondaryButtonText)||void 0===s?void 0:s.length)>0&&a.createElement(c,{variant:"borderless",onClick:r.onClose},r.secondaryButtonText))))));if(r.printable){return a.createElement(k,{className:"print-modal",testId:"print-modal"},a.createElement("style",{media:"print"},"body > *:not(.".concat("print-modal",") {display: none;}")),P)}return P};I.defaultProps=L;export{I as M,g as a,N as b};
|
|
2
|
-
//# sourceMappingURL=Modal-8ba60dd4.js.map
|
package/Modal-8ba60dd4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-8ba60dd4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/RadioButton-d3ed3858.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./_rollupPluginBabelHelpers-d0752906.js";import r from"react";import{c as o}from"./index-9b84fabc.js";import{u as e}from"./uuid-fe7442b7.js";import t from"./components/RadioButton/styles.module.scss";import{F as i,a as d,A as l}from"./constants-ad6c82db.js";var n=r.forwardRef((function(n,b){var s,u,m,c=n.className,p=n.defaultChecked,f=void 0!==p&&p,v=n.disabled,y=n.label,g=n.inputId,k=void 0===g?e():g,w=n.mode,N=n.name,h=void 0===N?k:N,j=n.variant,E=n.errorText,R=n.error,x=void 0===R?!!E:R,B=n.value,C=void 0===B?y:B,F=x||w===i.oninvalid,I=w===i.ondark,A=w===i.onblueberry,H=j===d.bigform,P=o(t["radio-button-wrapper"],(a(s={},t["radio-button-wrapper--with-error"],E),a(s,t["radio-button-wrapper--bigform"],H),s)),T=o(t["radio-button-label"],(a(u={},t["radio-button-label--disabled"],v),a(u,t["radio-button-label--on-dark"],I),a(u,t["radio-button-label--on-blueberry"],A),a(u,t["radio-button-label--invalid"],F),a(u,t["radio-button-label--bigform"],H),u)),_=o(t["radio-button"],(a(m={},t["radio-button--on-dark"],I),a(m,t["radio-button--disabled"],v),a(m,t["radio-button--on-blueberry"],A),a(m,t["radio-button--invalid"],F),m),c),q=o(t["radio-button-errors"],a({},t["radio-button-errors--bigform"],H));return r.createElement("div",{"data-testid":n.testId,"data-analyticsid":l.RadioButton,className:P},E&&r.createElement("p",{className:q},E),r.createElement("label",{htmlFor:k,className:T},r.createElement("input",{id:k,name:h,className:_,type:"radio",disabled:v,value:C,ref:b,"aria-invalid":x,defaultChecked:f}),y))}));export{n as R};
|
|
2
|
-
//# sourceMappingURL=RadioButton-d3ed3858.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton-d3ed3858.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Textarea-e48685fc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,a}from"./_rollupPluginBabelHelpers-d0752906.js";import{_ as r}from"./_tslib-51c8a283.js";import t,{useState as n,useRef as l,useEffect as o}from"react";import{c as i}from"./index-9b84fabc.js";import s from"./components/Textarea/styles.module.scss";import{F as d,A as c}from"./constants-ad6c82db.js";import{u as m}from"./uuid-fe7442b7.js";var p=t.forwardRef((function(p,u){var b,v,w,x=p.maxCharacters,f=p.maxText,_=p.testId,h=p.defaultValue,g=p.marginBottom,E=p.transparent,T=p.mode,C=p.label,j=p.textareaId,N=void 0===j?m():j,R=p.minRows,k=void 0===R?3:R,y=p.maxRows,B=void 0===y?10:y,I=p.grow,L=p.errorText,H=p.afterLabelChildren,V=p.belowLabelChildren,F=r(p,["maxCharacters","maxText","testId","defaultValue","marginBottom","transparent","mode","label","textareaId","minRows","maxRows","grow","errorText","afterLabelChildren","belowLabelChildren"]),A=n(k),M=e(A,2),O=M[0],P=M[1],q=n(h||""),z=e(q,2),D=z[0],G=z[1],J=l(null),K=function(e){var a=e.rows;e.rows=k;var r=Math.floor((e.scrollHeight-16)/28);r===a&&(e.rows=r),r>=B&&(e.rows=B,e.scrollTop=e.scrollHeight),P(r<B?r:B)},Q=T===d.ondark,S=T===d.onblueberry,U=x&&D.length>x,W=T===d.oninvalid||L||U,X=i(s.textarea,(a(b={},s["textarea--gutterBottom"],g),a(b,s["textarea--invalid"],L),b)),Y=i(s["textarea__label-wrapper"],a({},s["textarea__label-wrapper--on-dark"],Q)),Z=i(s["content-wrapper"],(a(v={},s["content-wrapper--transparent"],E),a(v,s["content-wrapper--on-blueberry"],S),a(v,s["content-wrapper--on-dark"],Q),a(v,s["content-wrapper--invalid"],W),a(v,s["content-wrapper--disabled"],p.disabled),v)),$=i(s["content-wrapper__input"],a({},s["content-wrapper__input--disabled"],p.disabled)),ee=i(s["textarea__counter-wrapper"],(a(w={},s["textarea__counter-wrapper--on-dark"],Q),a(w,s["textarea__counter-wrapper--invalid"],W),w));return o((function(){var e,a,r;if(I&&(null===(e=J.current)||void 0===e?void 0:e.children)&&(null===(a=J.current)||void 0===a?void 0:a.children[0])){var t=null===(r=J.current)||void 0===r?void 0:r.children[0];K(t)}}),[]),t.createElement("div",{"data-testid":_,"data-analyticsid":c.Textarea,className:X},C&&t.createElement("div",{className:Y},t.createElement("label",{htmlFor:N},C),H&&t.createElement("div",{className:s["textarea__after-label-children"]},H)),V&&t.createElement("div",null,V),t.createElement("div",{className:Z,ref:J},t.createElement("textarea",Object.assign({rows:O,defaultValue:h,id:N,className:$,ref:u,onChange:function(e){I&&K(e.target),G(e.target.value)},"aria-invalid":!!W},F))),x&&t.createElement("div",{className:ee},t.createElement("p",null,"".concat(D.length,"/").concat(x," ").concat(f||"tegn"))))}));export{p as T};
|
|
2
|
-
//# sourceMappingURL=Textarea-e48685fc.js.map
|
package/Textarea-e48685fc.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea-e48685fc.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Title-fab4097d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./_rollupPluginBabelHelpers-d0752906.js";import e from"react";import{c as i}from"./index-9b84fabc.js";import a from"./components/Title/styles.module.scss";import{A as r}from"./constants-ad6c82db.js";var o=function(t){return Object.prototype.hasOwnProperty.call(t,"marginTop")&&Object.prototype.hasOwnProperty.call(t,"marginBottom")},l=e.forwardRef((function(l,m){var n,c=l.id,s=l.children,p=l.className,d=l.htmlMarkup,f=void 0===d?"h1":d,g=l.appearance,u=void 0===g?"title1":g,y=l.margin,T=void 0===y?0:y,b=l.testId,h=i(a.title,(t(n={},a["title--feature"],"titleFeature"===u),t(n,a["title--title1"],"title1"===u),t(n,a["title--title2"],"title2"===u),t(n,a["title--title3"],"title3"===u),t(n,a["title--title4"],"title4"===u),t(n,a["title--title5"],"title5"===u),n),p),j=f,v=o(T)?{marginTop:"".concat(T.marginTop,"rem"),marginBottom:"".concat(T.marginBottom,"rem")}:{marginTop:"".concat(T,"rem"),marginBottom:"".concat(T,"rem")};return e.createElement(j,{id:c,className:h,style:v,ref:m,"data-testid":b,"data-analyticsid":r.Title},s)}));export{l as T,o as i};
|
|
2
|
-
//# sourceMappingURL=Title-fab4097d.js.map
|
package/Title-fab4097d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Title-fab4097d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validation-f096092a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-d0752906.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/color-acb834c6.js
DELETED
package/color-acb834c6.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-acb834c6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index-19b48c51.js
DELETED
package/index-19b48c51.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-19b48c51.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"./_rollupPluginBabelHelpers-d0752906.js";import{useState as s,useEffect as m}from"react";import{u as o}from"./useWindowSize-73b47451.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 l=function(){var i=o().width,l=s(),t=r(l,2),d=t[0],e=t[1];return m((function(){i&&(i>=a.Xl?e(a.Xl):i>=a.Lg?e(a.Lg):i>=a.Md?e(a.Md):i>=a.Sm?e(a.Sm):e(a.Xs))}),[i]),d};export{a as B,l as u};
|
|
2
|
-
//# sourceMappingURL=useBreakpoint-324a9b14.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint-324a9b14.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/useHover-037be19d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHover-037be19d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as n,_ as e}from"./_rollupPluginBabelHelpers-d0752906.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),w=u[0],f=u[1];return r((function(){if(!t)return function(){};function n(){f(o())}return window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}}),[]),w}export{t as u};
|
|
2
|
-
//# sourceMappingURL=useWindowSize-73b47451.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowSize-73b47451.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|