@helsenorge/designsystem-react 1.0.0-beta105 → 1.0.0-beta106
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-f26a558e.js → Button-397ff5a8.js} +2 -2
- package/Button-397ff5a8.js.map +1 -0
- package/Checkbox-acd12b0c.js +2 -0
- package/Checkbox-acd12b0c.js.map +1 -0
- package/{Close-35ad7d35.js → Close-060173de.js} +2 -2
- package/Close-060173de.js.map +1 -0
- package/FormGroup-b2b6efe0.js +2 -0
- package/FormGroup-b2b6efe0.js.map +1 -0
- package/{Icon-89da8de4.js → Icon-537c6b21.js} +2 -2
- package/Icon-537c6b21.js.map +1 -0
- package/{Input-19650c24.js → Input-59ca2467.js} +2 -2
- package/Input-59ca2467.js.map +1 -0
- package/{Loader-fa16a352.js → Loader-bc13d060.js} +2 -2
- package/Loader-bc13d060.js.map +1 -0
- package/{Modal-1bae215e.js → Modal-3c7f9f93.js} +2 -2
- package/Modal-3c7f9f93.js.map +1 -0
- package/{RadioButton-fe4bbd36.js → RadioButton-c173d440.js} +2 -2
- package/RadioButton-c173d440.js.map +1 -0
- package/{Textarea-e1d1144c.js → Textarea-78e20c9a.js} +2 -2
- package/Textarea-78e20c9a.js.map +1 -0
- package/{Title-af53f589.js → Title-9df559dd.js} +2 -2
- package/Title-9df559dd.js.map +1 -0
- package/Validation-16a8bdcd.js +2 -0
- package/Validation-16a8bdcd.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/index.js +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Close/index.js +1 -1
- package/components/Expander/Expander.d.ts.map +1 -1
- package/components/Expander/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 +5 -0
- package/components/ExpanderList/styles.module.scss.d.ts +1 -0
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/HighlightBox/HighlightBox.d.ts +3 -0
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
- package/components/HighlightBox/componentdata.json +19 -0
- package/components/HighlightBox/index.js +1 -1
- package/components/HighlightBox/styles.module.scss +118 -33
- package/components/Icons/AcupunctureBack.js +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/NoEye.js +1 -1
- package/components/Icons/SectionSign.js +1 -1
- package/components/Icons/SpeechBubble.js +1 -1
- package/components/Icons/SupportingPerson.js +1 -1
- package/components/Icons/Syringe.js +1 -1
- package/components/Icons/index.js +1 -1
- package/components/Input/index.js +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/List/index.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Logo/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/NotificationPanel.d.ts +1 -1
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/styles.module.scss +66 -51
- package/components/NotificationPanel/styles.module.scss.d.ts +9 -10
- package/components/Portal/index.js +1 -1
- package/components/RadioButton/index.js +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Spacer/index.js +1 -1
- package/components/Textarea/index.js +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Title/index.js +1 -1
- package/components/Validation/index.js +1 -1
- package/constants-eb74321e.js +2 -0
- package/constants-eb74321e.js.map +1 -0
- package/constants.d.ts +1 -0
- package/constants.d.ts.map +1 -1
- package/hooks/useSize.d.ts +9 -0
- package/hooks/useSize.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/useSticky-d61d1f0b.js +2 -0
- package/useSticky-d61d1f0b.js.map +1 -0
- package/Button-f26a558e.js.map +0 -1
- package/Checkbox-798282e4.js +0 -2
- package/Checkbox-798282e4.js.map +0 -1
- package/Close-35ad7d35.js.map +0 -1
- package/FormGroup-0577b07f.js +0 -2
- package/FormGroup-0577b07f.js.map +0 -1
- package/Icon-89da8de4.js.map +0 -1
- package/Input-19650c24.js.map +0 -1
- package/Loader-fa16a352.js.map +0 -1
- package/Modal-1bae215e.js.map +0 -1
- package/RadioButton-fe4bbd36.js.map +0 -1
- package/Textarea-e1d1144c.js.map +0 -1
- package/Title-af53f589.js.map +0 -1
- package/Validation-fd3f7f58.js +0 -2
- package/Validation-fd3f7f58.js.map +0 -1
- package/constants-ad6c82db.js +0 -2
- package/constants-ad6c82db.js.map +0 -1
- package/useSticky-194f2b78.js +0 -2
- package/useSticky-194f2b78.js.map +0 -1
|
@@ -5,16 +5,46 @@
|
|
|
5
5
|
@import '../AnchorLink/styles.module.scss';
|
|
6
6
|
|
|
7
7
|
.notification-panel {
|
|
8
|
-
|
|
8
|
+
$panel: &;
|
|
9
|
+
display: flex;
|
|
9
10
|
width: inherit;
|
|
10
|
-
padding: $spacer;
|
|
11
|
-
grid-template-areas: 'icon' 'content';
|
|
12
|
-
grid-template-columns: 48px auto;
|
|
13
|
-
grid-template-rows: 1fr;
|
|
14
11
|
|
|
12
|
+
&--has-children {
|
|
13
|
+
padding: getSpacer(2xs) getSpacer(s) getSpacer(m) getSpacer(2xs);
|
|
14
|
+
#{$panel}__icon {
|
|
15
|
+
margin-top: getSpacer(2xs);
|
|
16
|
+
margin-right: getSpacer(2xs);
|
|
17
|
+
}
|
|
18
|
+
#{$panel}__content {
|
|
19
|
+
margin-top: getSpacer(s);
|
|
20
|
+
}
|
|
21
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
22
|
+
padding-left: getSpacer(s);
|
|
23
|
+
padding-right: getSpacer(m);
|
|
24
|
+
#{$panel}__icon {
|
|
25
|
+
margin-right: getSpacer(m);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
&--label-only {
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding: getSpacer(m) getSpacer(s) getSpacer(m) getSpacer(2xs);
|
|
32
|
+
#{$panel}__icon {
|
|
33
|
+
display: flex;
|
|
34
|
+
margin-right: getSpacer(2xs);
|
|
35
|
+
}
|
|
36
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
37
|
+
padding: getSpacer(l) getSpacer(m) getSpacer(l) getSpacer(s);
|
|
38
|
+
#{$panel}__icon {
|
|
39
|
+
margin-right: getSpacer(s);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
15
43
|
&--dismissable {
|
|
16
|
-
|
|
17
|
-
|
|
44
|
+
padding: getSpacer(2xs) getSpacer(2xs) getSpacer(m) getSpacer(2xs);
|
|
45
|
+
}
|
|
46
|
+
&--dismissable#{&}--has-children {
|
|
47
|
+
padding-left: getSpacer(s);
|
|
18
48
|
}
|
|
19
49
|
&--small {
|
|
20
50
|
max-width: map-get($grid-breakpoints, sm);
|
|
@@ -34,46 +64,23 @@
|
|
|
34
64
|
&--alert {
|
|
35
65
|
background-color: $cherry100;
|
|
36
66
|
}
|
|
67
|
+
&--alert#{&}--label-only {
|
|
68
|
+
color: $cherry500;
|
|
69
|
+
}
|
|
37
70
|
&--crisis {
|
|
38
71
|
background-color: $black;
|
|
39
72
|
}
|
|
40
73
|
&--shadow {
|
|
41
74
|
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
42
75
|
}
|
|
43
|
-
&--haslabel {
|
|
44
|
-
padding: getSpacer(l) $spacer;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&__fluidwrapper {
|
|
48
|
-
display: flex;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
width: 100%;
|
|
51
|
-
|
|
52
|
-
&--info {
|
|
53
|
-
background-color: $kiwi50;
|
|
54
|
-
}
|
|
55
|
-
&--warn {
|
|
56
|
-
background-color: $banana50;
|
|
57
|
-
}
|
|
58
|
-
&--alert {
|
|
59
|
-
background-color: $cherry100;
|
|
60
|
-
}
|
|
61
|
-
&--crisis {
|
|
62
|
-
background-color: $black;
|
|
63
|
-
}
|
|
64
|
-
&--shadow {
|
|
65
|
-
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
76
|
|
|
69
|
-
&
|
|
70
|
-
|
|
77
|
+
&__close {
|
|
78
|
+
margin-left: auto;
|
|
79
|
+
padding-left: getSpacer(2xs);
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
&__content {
|
|
74
|
-
|
|
75
|
-
margin: getSpacer(2xs) getSpacer(m);
|
|
76
|
-
|
|
83
|
+
max-width: 772px;
|
|
77
84
|
p {
|
|
78
85
|
margin: 0;
|
|
79
86
|
}
|
|
@@ -103,27 +110,17 @@
|
|
|
103
110
|
|
|
104
111
|
&:focus {
|
|
105
112
|
&:after {
|
|
106
|
-
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'
|
|
113
|
+
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='38px' height='38px' viewBox='0 0 48 48'><polygon points='33.305,14.659,33.305,29.205,32.005,29.205,32.005,16.948,15.804,33.149,14.885,32.229,31.155,15.959,18.761,15.96,18.761,14.659' /></svg>");
|
|
107
114
|
}
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
}
|
|
111
118
|
}
|
|
112
|
-
|
|
113
|
-
&--isred {
|
|
114
|
-
color: $cherry500;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&--haslabel {
|
|
118
|
-
display: flex;
|
|
119
|
-
align-items: center;
|
|
120
|
-
margin: 0 1rem;
|
|
121
|
-
}
|
|
122
119
|
}
|
|
123
120
|
|
|
124
121
|
&__label {
|
|
125
122
|
font-size: $font-size-sm;
|
|
126
|
-
line-height:
|
|
123
|
+
line-height: $lineheight-size-xs;
|
|
127
124
|
font-weight: 600;
|
|
128
125
|
margin: 0;
|
|
129
126
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
@@ -131,8 +128,26 @@
|
|
|
131
128
|
line-height: $lineheight-size-md;
|
|
132
129
|
}
|
|
133
130
|
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.fluid-wrapper {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
width: 100%;
|
|
134
137
|
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
&--info {
|
|
139
|
+
background-color: $kiwi50;
|
|
140
|
+
}
|
|
141
|
+
&--warn {
|
|
142
|
+
background-color: $banana50;
|
|
143
|
+
}
|
|
144
|
+
&--alert {
|
|
145
|
+
background-color: $cherry100;
|
|
146
|
+
}
|
|
147
|
+
&--crisis {
|
|
148
|
+
background-color: $black;
|
|
149
|
+
}
|
|
150
|
+
&--shadow {
|
|
151
|
+
box-shadow: 0 0.3rem getSpacer(2xs) -0.1rem rgba(0, 0, 0, 0.15);
|
|
137
152
|
}
|
|
138
153
|
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
anchorlink: string;
|
|
3
3
|
anchorlink__icon: string;
|
|
4
|
+
'fluid-wrapper': string;
|
|
5
|
+
'fluid-wrapper--alert': string;
|
|
6
|
+
'fluid-wrapper--crisis': string;
|
|
7
|
+
'fluid-wrapper--info': string;
|
|
8
|
+
'fluid-wrapper--shadow': string;
|
|
9
|
+
'fluid-wrapper--warn': string;
|
|
4
10
|
'notification-panel': string;
|
|
5
|
-
'notification-
|
|
11
|
+
'notification-panel__close': string;
|
|
6
12
|
'notification-panel__content': string;
|
|
7
13
|
'notification-panel__content--crisis': string;
|
|
8
|
-
'notification-panel__content--haslabel': string;
|
|
9
|
-
'notification-panel__content--isred': string;
|
|
10
|
-
'notification-panel__fluidwrapper': string;
|
|
11
|
-
'notification-panel__fluidwrapper--alert': string;
|
|
12
|
-
'notification-panel__fluidwrapper--crisis': string;
|
|
13
|
-
'notification-panel__fluidwrapper--info': string;
|
|
14
|
-
'notification-panel__fluidwrapper--shadow': string;
|
|
15
|
-
'notification-panel__fluidwrapper--warn': string;
|
|
16
14
|
'notification-panel__icon': string;
|
|
17
15
|
'notification-panel__label': string;
|
|
18
16
|
'notification-panel--alert': string;
|
|
19
17
|
'notification-panel--crisis': string;
|
|
20
18
|
'notification-panel--dismissable': string;
|
|
21
|
-
'notification-panel--
|
|
19
|
+
'notification-panel--has-children': string;
|
|
22
20
|
'notification-panel--info': string;
|
|
21
|
+
'notification-panel--label-only': string;
|
|
23
22
|
'notification-panel--large': string;
|
|
24
23
|
'notification-panel--medium': string;
|
|
25
24
|
'notification-panel--shadow': string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{createPortal as e}from"react-dom";import{A as r}from"../../constants-
|
|
1
|
+
import t from"react";import{createPortal as e}from"react-dom";import{A as r}from"../../constants-eb74321e.js";export default function(n){var a=n.children,o=n.parent,i=n.className,c=n.testId,d=t.useMemo((function(){return document.createElement("div")}),[]);return d.setAttribute("data-analyticsid",r.Portal),c&&d.setAttribute("data-testid",c),t.useEffect((function(){var t=o&&o.appendChild?o:document.body,e=["portal-container"];return i&&i.split(" ").forEach((function(t){return e.push(t)})),e.forEach((function(t){return d.classList.add(t)})),t.appendChild(d),function(){t.removeChild(d)}}),[d,o,i]),e(a,d)}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as o}from"../../RadioButton-
|
|
1
|
+
import{R as o}from"../../RadioButton-c173d440.js";export{R as RadioButton,R as default}from"../../RadioButton-c173d440.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-fe7442b7.js";import"./styles.module.scss";import"../../constants-eb74321e.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import t,{useState as n,useRef as r,useEffect as a}from"react";import{c as o}from"../../index-9b84fabc.js";import{T as i}from"../../Title-
|
|
1
|
+
import{_ as e}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import t,{useState as n,useRef as r,useEffect as a}from"react";import{c as o}from"../../index-9b84fabc.js";import{T as i}from"../../Title-9df559dd.js";import c from"./styles.module.scss";import{A as u}from"../../constants-eb74321e.js";import"../Title/styles.module.scss";var s=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1},l=function(e){return m(e)?e.touches[0].pageX:e.pageX},d=function(e){var t=e?e.getBoundingClientRect():void 0;return t?t.right-t.left:0},m=function(e){return("touchcancel"===e.type||"touchend"===e.type||"touchenter"===e.type||"touchleave"===e.type||"touchmove"===e.type||"touchstart"===e.type)&&!(0===e.touches.length)},f=function(e,t,n){var r=e-e%t,a=Math.floor(n/t)*t;e>a&&(e>a+(n-a)/2&&(r=n));return Math.round(r)},v=t.forwardRef((function(m,v){var p=m.title,h=m.labelLeft,_=m.labelRight,g=m.disabled,E=void 0!==g&&g,y=m.step,b=void 0===y?1:y,w=m.onChange,k=m.testId,L=n(50),x=e(L,2),N=x[0],A=x[1],D=n(!1),M=e(D,2),R=M[0],j=M[1],T=n(0),B=e(T,2),C=B[0],P=B[1],I=n(0),S=e(I,2),X=S[0],H=S[1],K=n(0),U=e(K,2),q=U[0],z=U[1],F=n(0),G=e(F,2),J=G[0],O=G[1],Q=v||r(null),V=r(null),W=function(e){ne(e)},Y=function(e){te(e)},Z=function(e){ne(e)},$=function(e){te(e)};a((function(){var e=d(Q.current),t=d(V.current);z(function(e,t,n,r,a){return(t-n)/(a-r)*e}(N,e,t,0,100)),P(e),H(t)}),[]),a((function(){R&&(function(e,t){document.addEventListener("mousemove",e,!1),document.addEventListener("mouseup",t,!1)}(W,Y),function(e,t){document.addEventListener("touchmove",e,!1),document.addEventListener("touchend",t,!1)}(Z,$))}),[R]),a((function(){!E&&w&&w(N)}),[N]);var ee=function(e){var t;if(!E){var n=d(Q.current),r=d(V.current),a=l(e);!function(e,t,n,r){var a=t?t.getBoundingClientRect():void 0,o=a?a.left:0;r(o?e-(o+n/2):0)}(a,V.current,r,re),j(!0),O(a),P(n),H(r),null===(t=V.current)||void 0===t||t.focus(),s(e)}},te=function(e){E||(j(!1),function(e,t){document.removeEventListener("mousemove",e,!1),document.removeEventListener("mouseup",t,!1)}(W,Y),function(e,t){document.removeEventListener("touchmove",e,!1),document.removeEventListener("touchend",t,!1)}(Z,$),s(e))},ne=function(e){if(!E&&R){var t=l(e);re(t-J),s(e)}},re=function(e){if(0!==e){var t=function(e,t,n,r){var a=r+e;return a<0&&(a=0),a>t-n&&(a=t-n),a}(e,C,X,q);z(t),O(t+e),A(function(e,t,n,r,a,o){var i=(t-n)/(o-a),c=Math.round(e/i);return f(c,r,o)}(t,C,X,b,0,100))}};return t.createElement("div",{className:c.slider,"data-testid":k,"data-analyticsid":u.Slider},p&&t.createElement(i,{htmlMarkup:"h3",margin:1.5,appearance:"title3"},p),t.createElement("div",{ref:Q,className:o(c["slider__track-wrapper"],E?c["slider__track-wrapper--disabled"]:""),onMouseDown:ee,onTouchStart:ee,"data-testid":"tracker"},t.createElement("div",{className:o(c.slider__track,E?c["slider__track--disabled"]:"")}),t.createElement("div",{ref:V,className:o(c.slider__trigger,E?c["slider__trigger--disabled"]:""),style:{left:"".concat(q,"px")},onKeyDown:function(e){if(!E){var t=(C-X)/100;"ArrowRight"!==e.key&&"ArrowDown"!==e.key||re(b*t),"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||re(-b*t)}},role:"slider","aria-valuenow":N,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"".concat(p?p+" ":"").concat(h?h+" ":"").concat(_?_+" ":""),tabIndex:E?-1:0},t.createElement("div",{className:o(c["slider__trigger-inner"],E?c["slider__trigger-inner--disabled"]:"")}))),(h||_)&&t.createElement("span",{className:c.slider__options},t.createElement("p",{className:c.slider__text,"aria-hidden":!0},h),t.createElement("p",{className:c.slider__text,"aria-hidden":!0},_)))}));export default v;export{v as Slider};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import
|
|
1
|
+
import{b as s}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import e from"react";import{c as a}from"../../index-9b84fabc.js";import r from"./styles.module.scss";import{A as l}from"../../constants-eb74321e.js";var c=e.forwardRef((function(c,p){var t,x=c.size,o=void 0===x?"s":x,m=c.className,i=c.testId,d=a(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 e.createElement("span",{className:d,ref:p,"data-testid":i,"data-analyticsid":l.Spacer})}));export default c;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as
|
|
1
|
+
import{T as e}from"../../Textarea-78e20c9a.js";export{T as default}from"../../Textarea-78e20c9a.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../../_tslib-51c8a283.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-eb74321e.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,b as t}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as
|
|
1
|
+
import{_ as e,b as t}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as l}from"react";import{c as a}from"../../index-9b84fabc.js";import{A as o,I as n}from"../../constants-eb74321e.js";import"../../Icon-537c6b21.js";import s from"./styles.module.scss";var c=r.forwardRef((function(e,i){var l,o=e.children,n=e.className,c=e.htmlMarkup,m=void 0===c?"span":c,d=e.highlighted,p=e.compact,f=a(s.tile__title,(t(l={},s["tile__title--highlighted"],d),t(l,s["tile__title--compact"],p),l),n),u=m;return r.createElement(u,{className:f,ref:i},o)})),m=r.forwardRef((function(c,m){var d,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=l(!1),w=e(x,2),I=w[0],M=w[1],k=!g,y=a(s.tile,(t(d={},s["tile--fixed"],b),t(d,s["tile--compact"],k),t(d,s["tile--highlighted"],E),d),h),B=a(s["title-wrapper"],t({},s["title-wrapper--compact"],k));return r.createElement("a",Object.assign({ref:m,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)}));m.Title=c;export default m;export{m 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-9df559dd.js";export{T as default,i as instanceOfTitleMargin}from"../../Title-9df559dd.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";import"../../constants-eb74321e.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-16a8bdcd.js";export{V as Validation,V as default}from"../../Validation-16a8bdcd.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-b2b6efe0.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-acd12b0c.js";import"../../uuid-fe7442b7.js";import"../../Check-6291ad09.js";import"../../Icon-537c6b21.js";import"../../_tslib-51c8a283.js";import"../../constants-eb74321e.js";import"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../Checkbox/styles.module.scss";import"../../RadioButton-c173d440.js";import"../RadioButton/styles.module.scss";import"../../Input-59ca2467.js";import"../../useBreakpoint-552af2b9.js";import"../Input/styles.module.scss";import"../../Title-9df559dd.js";import"../Title/styles.module.scss";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a,o,n,e,i;!function(a){a[a.XSmall=38]="XSmall",a[a.Small=48]="Small",a[a.Medium=64]="Medium",a[a.Large=80]="Large",a[a.XLarge=130]="XLarge"}(a||(a={})),function(a){a[a.Modal=13e5]="Modal",a[a.ExpanderTrigger=1e4]="ExpanderTrigger"}(o||(o={})),function(a){a.onwhite="onwhite",a.ongrey="ongrey",a.onblueberry="onblueberry",a.ondark="ondark",a.oninvalid="oninvalid"}(n||(n={})),function(a){a.normal="normal",a.bigform="bigform"}(e||(e={})),function(a){a.AnchorLink="anchor-link",a.Avatar="avatar",a.Badge="badge",a.Button="button",a.Checkbox="checkbox",a.Close="close",a.Expander="expander",a.ExpanderList="expander-list",a.ExpanderListExpander="expander-list-expander",a.FormGroup="form-group",a.HighlightBox="highlight-box",a.Icon="icon",a.Input="input",a.Link="link",a.LinkList="link-list",a.List="list",a.Loader="loader",a.Logo="logo",a.Modal="modal",a.NotificationPanel="notification-panel",a.Portal="portal",a.RadioButton="radio-button",a.Slider="slider",a.Spacer="spacer",a.Textarea="textarea",a.Tile="tile",a.Title="title",a.Validation="validation"}(i||(i={}));export{i as A,n as F,a as I,o as Z,e as a};
|
|
2
|
+
//# sourceMappingURL=constants-eb74321e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-eb74321e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants.d.ts
CHANGED
package/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,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Y;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,oBAAoB,2BAA2B;IAC/C,SAAS,eAAe;IACxB,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Lytt på endringer i størrelse på et element
|
|
4
|
+
*
|
|
5
|
+
* @param ref Element som skal observeres.
|
|
6
|
+
* @returns Object med høyde, bredde, x og y til elementet
|
|
7
|
+
*/
|
|
8
|
+
export declare const useSize: (ref?: import("react").RefObject<HTMLElement> | undefined) => DOMRect | undefined;
|
|
9
|
+
//# sourceMappingURL=useSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,mFAanB,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export { useIsVisible } from './hooks/useIsVisible';
|
|
|
8
8
|
export { useLayoutEvent } from './hooks/useLayoutEvent';
|
|
9
9
|
export { useSticky } from './hooks/useSticky';
|
|
10
10
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
11
|
+
export { useSize } from './hooks/useSize';
|
|
11
12
|
export * from './constants';
|
|
12
13
|
//# 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,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"}
|
|
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,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,cAAc,aAAa,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{t as theme}from"./index-0e78dfa0.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-552af2b9.js";
|
|
1
|
+
export{t as theme}from"./index-0e78dfa0.js";export{B as Breakpoint,u as useBreakpoint}from"./useBreakpoint-552af2b9.js";import{_ as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useState as n,useEffect as o}from"react";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 useLayoutEvent,a as useSticky}from"./useSticky-d61d1f0b.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-eb74321e.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";var r=['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(","),i=function(t,a){var i=n(),s=e(i,2),d=s[0],u=s[1];return o((function(){var e=function(){var e,n=null===(e=t.current)||void 0===e?void 0:e.querySelectorAll(r);u(n)},n=new MutationObserver(e);return(null==t?void 0:t.current)&&n.observe(t.current,{subtree:!0,childList:!0}),e(),function(){n.disconnect()}}),[t]),o((function(){a?null==d||d.forEach((function(t){var e=t.getAttribute("data-tabindex");e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})):null==d||d.forEach((function(t){t.hasAttribute("tabindex")&&t.setAttribute("data-tabindex","".concat(t.tabIndex)),t.tabIndex=-1}))}),[a,d]),d},s=function(t){var a=n(),r=e(a,2),i=r[0],s=r[1];return o((function(){var e=new ResizeObserver((function(t){s(t[0].target.getBoundingClientRect())}));return(null==t?void 0:t.current)&&e.observe(null==t?void 0:t.current),e.disconnect}),[t]),i};export{i as useFocusToggle,s as useSize};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as n}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import{useEffect as t,useState as i}from"react";function e(n,t,i){var e;return function(){var o=this,r=arguments,u=function(){e=null,i||n.apply(o,r)},a=i&&!e;e&&clearTimeout(e),e=setTimeout(u,t),a&&n.apply(o,r)}}var o=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["layoutchange","resize","orientationchange"],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;t((function(){var t=e(n,o);return i.forEach((function(n){return window.addEventListener(n,t)})),t(),function(){i.forEach((function(n){return window.removeEventListener(n,t)}))}}),[])},r=function(t,e){var r=i(!1),u=n(r,2),a=u[0],d=u[1],l=i(!1),c=n(l,2),v=c[0],f=c[1],s=i(),g=n(s,2),h=g[0],p=g[1],m=i(),w=n(m,2),E=w[0],b=w[1];return o((function(){var n,i,o,r=(null===(n=t.current)||void 0===n?void 0:n.getBoundingClientRect())||{},u=r.top,a=void 0===u?0:u,l=r.width,c=void 0===l?0:l,v=r.bottom,s=void 0===v?0:v,g=null!==(o=null===(i=e.current)||void 0===i?void 0:i.getBoundingClientRect().height)&&void 0!==o?o:0;d(a<=0),f(s<=g),b(c),p(g)}),["resize","scroll"]),{isOutsideWindow:a,isLeavingWindow:v,offsetHeight:h,contentWidth:E}};export{r as a,o as u};
|
|
2
|
+
//# sourceMappingURL=useSticky-d61d1f0b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSticky-d61d1f0b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Button-f26a558e.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-f26a558e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Checkbox-798282e4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,b as r}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import a,{useState as o,useEffect as c}from"react";import{c as l}from"./index-9b84fabc.js";import{u as b}from"./uuid-fe7442b7.js";import{C as i}from"./Check-6291ad09.js";import{I as s}from"./Icon-89da8de4.js";import{F as n,a as t,A as d}from"./constants-ad6c82db.js";import{g as m}from"./color-a10c7892.js";import p from"./components/Checkbox/styles.module.scss";var h=a.forwardRef((function(h,k){var x,f,u,v=h.className,_=h.checked,w=void 0!==_&&_,y=h.disabled,g=h.label,j=h.inputId,N=void 0===j?b():j,C=h.mode,E=h.name,I=void 0===E?N:E,F=h.variant,z=h.errorText,A=h.error,B=void 0===A?!!z:A,H=h.value,P=void 0===H?g:H,R=o(w),T=e(R,2),q=T[0],D=T[1],G=B||C===n.oninvalid,J=C===n.ondark,K=C===n.onblueberry,L=F===t.bigform,M=l(p["checkbox-wrapper"],(r(x={},p["checkbox-wrapper--with-error"],z),r(x,p["checkbox-wrapper--bigform"],L),x)),O=l(p["checkbox-label"],(r(f={},p["checkbox-label--disabled"],y),r(f,p["checkbox-label--on-dark"],J),r(f,p["checkbox-label--on-blueberry"],K),r(f,p["checkbox-label--invalid"],G),r(f,p["checkbox-label--bigform"],L),f)),Q=l(p.checkbox,v),S=l(p["checkbox__icon-wrapper"],(r(u={},p["checkbox__icon-wrapper--checked"],q),r(u,p["checkbox__icon-wrapper--disabled"],y),r(u,p["checkbox__icon-wrapper--on-dark"],J),r(u,p["checkbox__icon-wrapper--on-blueberry"],K),r(u,p["checkbox__icon-wrapper--invalid"],G),u)),U=l(p["checkbox-errors"],r({},p["checkbox-errors--bigform"],L)),V=m("blueberry",500);return y&&(V=m("neutral",400)),J&&(V=m("blueberry",200)),G&&(V=m("cherry",500)),c((function(){D(w)}),[w]),a.createElement("div",{"data-testid":h.testId,"data-analyticsid":d.Checkbox,className:M},z&&a.createElement("p",{className:U},z),a.createElement("label",{htmlFor:N,className:O},a.createElement("input",{id:N,name:I,className:Q,type:"checkbox",checked:q,disabled:y,onChange:function(){D(!q)},value:P,ref:k,"aria-invalid":B}),a.createElement("span",{className:S},q&&a.createElement(s,{color:V,className:p.checkbox__icon,svgIcon:i,size:38})),g))}));export{h as C};
|
|
2
|
-
//# sourceMappingURL=Checkbox-798282e4.js.map
|
package/Checkbox-798282e4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-798282e4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Close-35ad7d35.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Close-35ad7d35.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/FormGroup-0577b07f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./_rollupPluginBabelHelpers-b8ef6dd9.js";import r from"react";import{c as a}from"./index-9b84fabc.js";import o from"./components/FormGroup/styles.module.scss";import{C as t}from"./Checkbox-798282e4.js";import{F as m,a as n,A as l}from"./constants-ad6c82db.js";import{R as i}from"./RadioButton-fe4bbd36.js";import{I as p}from"./Input-19650c24.js";import{T as s}from"./Title-af53f589.js";var f=r.forwardRef((function(f,d){var u,c,g,v=f.className,_=f.mode,b=void 0===_?m.onwhite:_,w=f.variant,E=void 0===w?n.normal:w,y=f.error,j=f.name,N=b===m.ondark,h=E===n.bigform,k=a(o["form-group-wrapper"],(e(u={},o["form-group-wrapper--on-dark"],N),e(u,o["form-group-wrapper--invalid"],y),u),v),F=a(o["form-group-wrapper__title"],(e(c={},o["form-group-wrapper__title--on-dark"],N&&!y),e(c,o["form-group-wrapper__title--bigform"],h),c)),x=a(o["form-group"],e({},o["form-group--invalid"],y)),B=a(o["form-group-wrapper__errors"],e({},o["form-group-wrapper__errors--bigform"],h)),C=a(o["field-set__legend"],(e(g={},o["field-set__legend--on-dark"],N&&!y),e(g,o["field-set__legend--bigform"],h),g));return r.createElement("div",{"data-testid":f.testId,"data-analyticsid":l.FormGroup,className:k},f.title&&r.createElement(s,{className:F,htmlMarkup:"h4",appearance:"title4",margin:{marginTop:0,marginBottom:2}},f.title),r.createElement("div",{className:x},y&&r.createElement("p",{className:B},y),r.createElement("fieldset",{name:f.title,className:o["field-set"]},f.legend&&r.createElement("legend",{className:C},f.legend),r.Children.map(f.children,(function(e){if(e.type===t){var a=e.type===t;return r.cloneElement(e,{name:null!=j?j:a.valueOf.name,mode:b,variant:E,error:!!y})}if(e.type===i){var o=e.type===i;return r.cloneElement(e,{name:null!=j?j:o.valueOf.name,mode:b,variant:E,error:!!y})}if(e.type===p){var m=e.type===p;return r.cloneElement(e,{name:null!=j?j:m.valueOf.name,mode:b,variant:E,error:!!y})}return e})))))}));export{f as F};
|
|
2
|
-
//# sourceMappingURL=FormGroup-0577b07f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup-0577b07f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Icon-89da8de4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon-89da8de4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Input-19650c24.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input-19650c24.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Loader-fa16a352.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Loader-fa16a352.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Modal-1bae215e.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-1bae215e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton-fe4bbd36.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Textarea-e1d1144c.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea-e1d1144c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Title-af53f589.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Title-af53f589.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Validation-fd3f7f58.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r from"react";import{c as a}from"./index-9b84fabc.js";import{F as e}from"./FormGroup-0577b07f.js";import t from"./components/Validation/styles.module.scss";import{A as o}from"./constants-ad6c82db.js";var s=r.forwardRef((function(s,m){var n=s.errorSummary,i=s.className,l=a(t.validation,i);return r.createElement(r.Fragment,null,r.createElement("div",{"data-testid":s.testId,"data-analyticsid":o.Validation,className:l},r.Children.map(s.children,(function(a){return a.type===e?r.cloneElement(a,{className:n?t["form-group-wrapper--error-sibling"]:""}):a}))),n&&r.createElement("p",{className:t.validation__errors},n))}));export{s as V};
|
|
2
|
-
//# sourceMappingURL=Validation-fd3f7f58.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validation-fd3f7f58.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/constants-ad6c82db.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a,o,i,n,e;!function(a){a[a.XSmall=38]="XSmall",a[a.Small=48]="Small",a[a.Medium=64]="Medium",a[a.Large=80]="Large",a[a.XLarge=130]="XLarge"}(a||(a={})),function(a){a[a.Modal=13e5]="Modal",a[a.ExpanderTrigger=1e4]="ExpanderTrigger"}(o||(o={})),function(a){a.onwhite="onwhite",a.ongrey="ongrey",a.onblueberry="onblueberry",a.ondark="ondark",a.oninvalid="oninvalid"}(i||(i={})),function(a){a.normal="normal",a.bigform="bigform"}(n||(n={})),function(a){a.AnchorLink="anchor-link",a.Avatar="avatar",a.Badge="badge",a.Button="button",a.Checkbox="checkbox",a.Close="close",a.Expander="expander",a.ExpanderList="expander-list",a.FormGroup="form-group",a.HighlightBox="highlight-box",a.Icon="icon",a.Input="input",a.Link="link",a.LinkList="link-list",a.List="list",a.Loader="loader",a.Logo="logo",a.Modal="modal",a.NotificationPanel="notification-panel",a.Portal="portal",a.RadioButton="radio-button",a.Slider="slider",a.Spacer="spacer",a.Textarea="textarea",a.Tile="tile",a.Title="title",a.Validation="validation"}(e||(e={}));export{e as A,i as F,a as I,o as Z,n as a};
|
|
2
|
-
//# sourceMappingURL=constants-ad6c82db.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-ad6c82db.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/useSticky-194f2b78.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSticky-194f2b78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|