@helsenorge/designsystem-react 1.0.0-beta101 → 1.0.0-beta105
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 +2 -0
- package/Button-f26a558e.js.map +1 -0
- package/{Checkbox-cd0b7d68.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-8372d8fb.js → FormGroup-0577b07f.js} +2 -2
- package/FormGroup-0577b07f.js.map +1 -0
- package/{Input-78fb6d0d.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-1bae215e.js +2 -0
- package/Modal-1bae215e.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-56f0e37c.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/components/AnchorLink/index.js +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Button/Button.d.ts +2 -0
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/componentdata.json +19 -0
- 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/index.js +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/FormExample/index.js +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/Input/index.js +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +13 -11
- package/components/NotificationPanel/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/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.d.ts +10 -3
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -6
- package/scss/_input.scss +1 -0
- 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-af3b4953.js +0 -2
- package/Button-af3b4953.js.map +0 -1
- package/Checkbox-cd0b7d68.js.map +0 -1
- package/Close-007fca15.js.map +0 -1
- package/FormGroup-8372d8fb.js.map +0 -1
- package/Input-78fb6d0d.js.map +0 -1
- package/Loader-b7486541.js +0 -2
- package/Loader-b7486541.js.map +0 -1
- package/Modal-99b652f4.js +0 -2
- package/Modal-99b652f4.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-56f0e37c.js.map +0 -1
- package/_rollupPluginBabelHelpers-d0752906.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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-1bae215e.js";export{b as ModalSize,a as ModalVariants,M as default}from"../../Modal-1bae215e.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-f26a558e.js";import"../../_tslib-51c8a283.js";import"../../constants-ad6c82db.js";import"../../color-a10c7892.js";import"../../index-0e78dfa0.js";import"../../grid-11a70eb7.js";import"../../Icon-89da8de4.js";import"../../Loader-fa16a352.js";import"../../uuid-fe7442b7.js";import"../Loader/styles.module.scss";import"../../useHover-9710204a.js";import"../../useWindowSize-750f9b68.js";import"../Button/styles.module.scss";import"./styles.module.scss";import"../../AlertSignFill-e607ff43.js";import"../../useIsVisible-a1f67a11.js";import"../../Title-af53f589.js";import"../Title/styles.module.scss";import"../../Close-35ad7d35.js";import"../Close/styles.module.scss";import"../../useBreakpoint-552af2b9.js";import"react-dom";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -72,13 +72,14 @@
|
|
|
72
72
|
|
|
73
73
|
&--large {
|
|
74
74
|
width: calc(100vw - 0.75rem);
|
|
75
|
+
padding-bottom: getSpacer(l);
|
|
75
76
|
@media (max-width: map-get($grid-breakpoints, sm)) {
|
|
76
77
|
p {
|
|
77
78
|
font-size: 1.125rem;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
|
|
81
81
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
82
|
+
padding-bottom: getSpacer(xl);
|
|
82
83
|
width: 612px;
|
|
83
84
|
}
|
|
84
85
|
@media (min-width: map-get($grid-breakpoints, lg)) {
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
|
|
89
90
|
&--medium {
|
|
90
91
|
width: calc(100vw - 0.75rem);
|
|
91
|
-
|
|
92
|
+
padding-bottom: getSpacer(m);
|
|
92
93
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
93
94
|
width: 335px;
|
|
94
95
|
}
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
&--image {
|
|
102
|
+
padding: 0;
|
|
101
103
|
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
102
104
|
max-height: calc(100vh - 24px);
|
|
103
105
|
max-width: calc(100vw - 24px);
|
|
@@ -158,16 +160,16 @@
|
|
|
158
160
|
|
|
159
161
|
&__scroll {
|
|
160
162
|
&--large {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
padding: getSpacer(xl) getSpacer(m) getSpacer(2xs) getSpacer(m);
|
|
164
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
165
|
+
padding: getSpacer(xl) getSpacer(xl) getSpacer(2xs) getSpacer(xl);
|
|
163
166
|
}
|
|
164
|
-
padding: getSpacer(xl) getSpacer(xl) getSpacer(2xs) getSpacer(xl);
|
|
165
167
|
}
|
|
166
168
|
&--medium {
|
|
167
|
-
|
|
169
|
+
padding: getSpacer(l) getSpacer(m) getSpacer(2xs) getSpacer(m);
|
|
170
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
168
171
|
padding: getSpacer(xl) getSpacer(m) getSpacer(2xs) getSpacer(m);
|
|
169
172
|
}
|
|
170
|
-
padding: getSpacer(l) getSpacer(m) getSpacer(2xs) getSpacer(m);
|
|
171
173
|
}
|
|
172
174
|
&--large#{&}--image {
|
|
173
175
|
padding: getSpacer(xl) getSpacer(2xs) getSpacer(l) getSpacer(2xs);
|
|
@@ -212,13 +214,13 @@
|
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
&--large {
|
|
215
|
-
padding: getSpacer(l) getSpacer(
|
|
216
|
-
@media (
|
|
217
|
-
padding: getSpacer(l) getSpacer(
|
|
217
|
+
padding: getSpacer(l) getSpacer(m) 0 getSpacer(m);
|
|
218
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
219
|
+
padding: getSpacer(l) getSpacer(xl) 0 getSpacer(xl);
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
222
|
&--medium {
|
|
221
|
-
padding: getSpacer(m) getSpacer(m)
|
|
223
|
+
padding: getSpacer(m) getSpacer(m) 0 getSpacer(m);
|
|
222
224
|
}
|
|
223
225
|
}
|
|
224
226
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../_rollupPluginBabelHelpers-
|
|
1
|
+
import{b as a}from"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import e from"react";import{c as t}from"../../index-9b84fabc.js";import{p as o}from"../../palette-f206f488.js";import{I as n}from"../../Icon-89da8de4.js";import{A as i}from"../../constants-ad6c82db.js";import{a as r,A as l}from"../../AlertSignFill-e607ff43.js";import c from"./styles.module.scss";import{C as s}from"../../Close-35ad7d35.js";import"../../_tslib-51c8a283.js";import"../Close/styles.module.scss";import"../../useBreakpoint-552af2b9.js";import"../../grid-11a70eb7.js";var m={info:{color:"kiwi",depth:50},warn:{color:"banana",depth:50},alert:{color:"cherry",depth:100},crisis:{color:"black",depth:0}},p={info:e.createElement(n,{svgIcon:function(a){var t=a.isExtraSmall,o=a.isHovered,n=e.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=e.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=e.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 t?o?e.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:o?i:n},color:o.kiwi900,hoverColor:o.kiwi900}),warn:e.createElement(n,{svgIcon:r,color:"black",hoverColor:"black"}),alert:e.createElement(n,{svgIcon:l,color:o.cherry500,hoverColor:o.cherry500}),alertLabel:e.createElement(n,{svgIcon:r,color:o.cherry500,hoverColor:o.cherry500}),crisis:e.createElement(n,{svgIcon:l,color:o.banana200,hoverColor:o.banana200})},f=e.forwardRef((function(o,n){var r,l,m=o.children,f=o.variant,d=void 0===f?"info":f,v=o.shadow,h=void 0!==v&&v,b=o.dismissable,_=void 0!==b&&b,u=o.onClick,E=o.label,C=o.fluid,w=void 0!==C&&C,g=o.size,j=o.className,y=o.testId;var k;return k=e.createElement("div",{ref:n,"data-testid":y,"data-analyticsid":i.NotificationPanel,className:t(c["notification-panel"],c["notification-panel--"+g],c["notification-panel--"+d],(r={},a(r,c["notification-panel--shadow"],!w&&h),a(r,c["notification-panel--haslabel"],!!E&&!m),a(r,c["notification-panel--dismissable"],_),r),j||"")},e.createElement("span",{className:c["notification-panel__icon"]},p["alert"===d&&E&&!m?"alertLabel":d]),e.createElement("section",{"aria-label":function(){if(m){var a="";return e.Children.map(m,(function(e){"string"==typeof e&&(a+=e)})),a}return""}(),className:t(c["notification-panel__content"],(l={},a(l,c["notification-panel__content--crisis"],"crisis"===d),a(l,c["notification-panel__content--haslabel"],!!E&&!m),a(l,c["notification-panel__content--isred"],"alert"===d&&!!E&&!m),l))},E?e.createElement("h1",{className:c["notification-panel__label"],dangerouslySetInnerHTML:{__html:E}}):null,m),_?e.createElement("span",{className:c["notification-panel__action-column"]},e.createElement(s,{ariaLabel:o.ariaLabelCloseBtn,onClick:u})):null),w?e.createElement("div",{className:t(c["notification-panel__fluidwrapper"],c["notification-panel__fluidwrapper--"+d],a({},c["notification-panel__fluidwrapper--shadow"],h))},k):k}));export default f;export{m as variantToColorMap};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as o}from"../../RadioButton-
|
|
1
|
+
import{R as o}from"../../RadioButton-fe4bbd36.js";export{R as RadioButton,R as default}from"../../RadioButton-fe4bbd36.js";import"../../_rollupPluginBabelHelpers-b8ef6dd9.js";import"react";import"../../index-9b84fabc.js";import"../../uuid-fe7442b7.js";import"./styles.module.scss";import"../../constants-ad6c82db.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_rollupPluginBabelHelpers-
|
|
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-af53f589.js";import c from"./styles.module.scss";import{A as u}from"../../constants-ad6c82db.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{
|
|
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,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"}
|
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-0e78dfa0.js";export{u as useHover}from"./useHover-
|
|
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-beta105",
|
|
5
5
|
"description": "The official design system for Helsenorge built with React.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "tfs",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
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
30
|
"bootstrap": "4.6.1"
|
|
@@ -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
|
@@ -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-af3b4953.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as t,a as e}from"./_rollupPluginBabelHelpers-d0752906.js";import{_ as n}from"./_tslib-51c8a283.js";import o from"react";import{A as r,I as l}from"./constants-ad6c82db.js";import{g as i}from"./color-a10c7892.js";import"./Icon-89da8de4.js";import{L as a}from"./Loader-b7486541.js";import{u as s}from"./useHover-037be19d.js";import{u as d}from"./useWindowSize-73b47451.js";import{b as u}from"./grid-11a70eb7.js";import{c}from"./index-9b84fabc.js";import m from"./components/Button/styles.module.scss";var b={primary:"blueberry",warning:"banana",danger:"cherry"},f=function(t,e){return e&&e<u.md&&t?l.Small:t?l.Medium:l.XSmall},p=o.forwardRef((function(u,p){var v,_,g,h=u.children,j=u.className,w=void 0===j?"":j,E=u.fluid,y=void 0!==E&&E,k=u.intent,N=void 0===k?"primary":k,I=u.inverted,B=void 0!==I&&I,C=u.htmlMarkup,H=void 0===C?"button":C,O=u.onClick,S=u.large,z=void 0!==S&&S,F=u.loading,M=void 0!==F&&F,x=u.variant,A=void 0===x?"fill":x,L=u.disabled,R=void 0!==L&&L,X=u.ellipsis,P=void 0!==X&&X,W=u.testId,q=u.href,D=u.target,G=n(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),J=function(t){var e,n,o,r,l=null,i=null;void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(l=t.shift()),void 0!==(null===(r=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===r?void 0:r.svgIcon)&&(i=t.pop());var a=t.filter((function(t){return t}));return[l,i,a.length>0?a:null]}(o.Children.toArray(h)),K=t(J,3),Q=K[0],T=K[1],U=K[2],V=s(p),Y=V.hoverRef,Z=V.isHovered,$=function(t,e,n,o,r){return e?i("neutral",600):t&&!o||!t&&o?"white":i(b[n],r?700:600)}("fill"===A,R,N,B,Z),tt=d(),et="fill"===A,nt="outline"===A,ot="borderless"===A,rt="warning"===N,lt="danger"===N,it=!(!Q&&!T||M),at=Object.assign({},G),st=c(m.button,(e(v={},m["button--fluid"],y),e(v,m["button--large"],z),e(v,m["button--warning"],rt),e(v,m["button--danger"],lt),e(v,m["button--inverted"],B),e(v,m["button--fill"],et),e(v,m["button--outline"],nt),e(v,m["button--borderless"],ot),e(v,m["button--with-icon"],it),e(v,m["button--ellipsis"],P),v),w),dt=c(m.button__content,(e(_={},m["button__content--warning"],rt),e(_,m["button__content--danger"],lt),e(_,m["button__content--fill"],et),e(_,m["button__content--borderless"],ot),e(_,m["button__content--with-icon"],it),e(_,m["button__content--large"],z),e(_,m["button__content--ellipsis"],P),e(_,m["button__content--inverted"],B),e(_,m["button__content--fluid"],y),_)),ut=c(m["button__left-fluid-content"],(e(g={},m["button__left-fluid-content--with-icon"],it),e(g,m["button__left-fluid-content--large"],z),g));function ct(t,e,n,r){var l=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:l,isHovered:r}):null}var mt=function(){return U?o.createElement("span",{className:dt},U):null},bt=function(){return o.createElement("span",{className:m["content-wrapper"]},M?o.createElement("div",{className:m["button__left-fluid-content"]},o.createElement(a,{testId:"test-id-loader",color:"fill"!==A||B?b[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,y?o.createElement("div",{className:ut},ct(Q,f(z,tt.width),$,Z),mt()):o.createElement(o.Fragment,null,ct(Q,f(z,tt.width),$,Z),mt()),ct(T,l.XSmall,$,Z)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":W,"data-analyticsid":r.Button,className:st,ref:Y},at),bt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":W,"data-analyticsid":r.Button,className:st,href:q,target:D,rel:"_blank"===D?"noopener noreferrer":u.rel,ref:Y},G),bt()))}));export{p as B,b as i};
|
|
2
|
-
//# sourceMappingURL=Button-af3b4953.js.map
|
package/Button-af3b4953.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button-af3b4953.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Checkbox-cd0b7d68.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox-cd0b7d68.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-8372d8fb.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/Input-78fb6d0d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input-78fb6d0d.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-99b652f4.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-af3b4953.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 b}from"react-dom";function y(){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]),b(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),b=a.useRef(null),N=a.useRef(null),C=x(b),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:y()},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:b}),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-99b652f4.js.map
|
package/Modal-99b652f4.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-99b652f4.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-56f0e37c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-d0752906.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":""}
|