@helsenorge/designsystem-react 1.0.0-beta81-ModalTest2 → 1.0.0-beta85

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.
Files changed (160) hide show
  1. package/Button-3f327b66.js +2 -0
  2. package/Button-3f327b66.js.map +1 -0
  3. package/Check-6291ad09.js +2 -0
  4. package/Check-6291ad09.js.map +1 -0
  5. package/Checkbox-46666e69.js +2 -0
  6. package/Checkbox-46666e69.js.map +1 -0
  7. package/FormGroup-b874ae21.js +2 -0
  8. package/FormGroup-b874ae21.js.map +1 -0
  9. package/Loader-cf365332.js +2 -0
  10. package/Loader-cf365332.js.map +1 -0
  11. package/Modal-0dd5ce43.js +2 -0
  12. package/Modal-0dd5ce43.js.map +1 -0
  13. package/Title-7c829525.js +2 -0
  14. package/Title-7c829525.js.map +1 -0
  15. package/Validation-b902407e.js +2 -0
  16. package/Validation-b902407e.js.map +1 -0
  17. package/_rollupPluginBabelHelpers-d0752906.js +2 -0
  18. package/_rollupPluginBabelHelpers-d0752906.js.map +1 -0
  19. package/components/AnchorLink/index.js +1 -1
  20. package/components/Avatar/index.js +1 -1
  21. package/components/Badge/index.js +1 -1
  22. package/components/Button/Button.d.ts.map +1 -1
  23. package/components/Button/index.js +1 -1
  24. package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -1
  25. package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
  26. package/components/ButtonWithModal/componentdata.json +18 -6
  27. package/components/ButtonWithModal/index.js +1 -1
  28. package/components/Checkbox/Checkbox.d.ts +31 -0
  29. package/components/Checkbox/Checkbox.d.ts.map +1 -0
  30. package/components/Checkbox/componentdata.json +259 -0
  31. package/components/Checkbox/index.d.ts +3 -0
  32. package/components/Checkbox/index.d.ts.map +1 -0
  33. package/components/Checkbox/index.js +2 -0
  34. package/components/Checkbox/index.js.map +1 -0
  35. package/components/Checkbox/styles.module.scss +203 -0
  36. package/components/Checkbox/styles.module.scss.d.ts +26 -0
  37. package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
  38. package/components/ExpanderList/index.js +1 -1
  39. package/components/FormExample/FormExample.d.ts +13 -0
  40. package/components/FormExample/FormExample.d.ts.map +1 -0
  41. package/components/FormExample/componentdata.json +63 -0
  42. package/components/FormExample/index.d.ts +3 -0
  43. package/components/FormExample/index.d.ts.map +1 -0
  44. package/components/FormExample/index.js +2 -0
  45. package/components/FormExample/index.js.map +1 -0
  46. package/components/FormGroup/FormGroup.d.ts +26 -0
  47. package/components/FormGroup/FormGroup.d.ts.map +1 -0
  48. package/components/FormGroup/componentdata.json +183 -0
  49. package/components/FormGroup/index.d.ts +3 -0
  50. package/components/FormGroup/index.d.ts.map +1 -0
  51. package/components/FormGroup/index.js +2 -0
  52. package/components/FormGroup/index.js.map +1 -0
  53. package/components/FormGroup/styles.module.scss +58 -0
  54. package/components/FormGroup/styles.module.scss.d.ts +16 -0
  55. package/components/Icons/AcupunctureBack.d.ts +5 -0
  56. package/components/Icons/AcupunctureBack.d.ts.map +1 -0
  57. package/components/Icons/AcupunctureBack.js +2 -0
  58. package/components/Icons/AcupunctureBack.js.map +1 -0
  59. package/components/Icons/AdditionalIconInformation.js +6 -0
  60. package/components/Icons/AdditionalIconInformation.js.map +1 -1
  61. package/components/Icons/Icon.d.ts +1 -0
  62. package/components/Icons/Icon.d.ts.map +1 -1
  63. package/components/Icons/Icon.js +1 -1
  64. package/components/Icons/NoEye.d.ts +5 -0
  65. package/components/Icons/NoEye.d.ts.map +1 -0
  66. package/components/Icons/NoEye.js +2 -0
  67. package/components/Icons/NoEye.js.map +1 -0
  68. package/components/Icons/SectionSign.d.ts +5 -0
  69. package/components/Icons/SectionSign.d.ts.map +1 -0
  70. package/components/Icons/SectionSign.js +2 -0
  71. package/components/Icons/SectionSign.js.map +1 -0
  72. package/components/Icons/SpeechBubble.d.ts +5 -0
  73. package/components/Icons/SpeechBubble.d.ts.map +1 -0
  74. package/components/Icons/SpeechBubble.js +2 -0
  75. package/components/Icons/SpeechBubble.js.map +1 -0
  76. package/components/Icons/SupportingPerson.d.ts +5 -0
  77. package/components/Icons/SupportingPerson.d.ts.map +1 -0
  78. package/components/Icons/SupportingPerson.js +2 -0
  79. package/components/Icons/SupportingPerson.js.map +1 -0
  80. package/components/Icons/Syringe.d.ts +5 -0
  81. package/components/Icons/Syringe.d.ts.map +1 -0
  82. package/components/Icons/Syringe.js +2 -0
  83. package/components/Icons/Syringe.js.map +1 -0
  84. package/components/Icons/index.js +1 -1
  85. package/components/LinkList/LinkList.d.ts.map +1 -1
  86. package/components/LinkList/index.js +1 -1
  87. package/components/LinkList/styles.module.scss +1 -4
  88. package/components/LinkList/styles.module.scss.d.ts +0 -1
  89. package/components/Loader/index.js +1 -1
  90. package/components/Modal/Modal.d.ts +19 -6
  91. package/components/Modal/Modal.d.ts.map +1 -1
  92. package/components/Modal/__mocks__/IntersectionObserver.d.ts +6 -0
  93. package/components/Modal/__mocks__/IntersectionObserver.d.ts.map +1 -0
  94. package/components/Modal/componentdata.json +19 -7
  95. package/components/Modal/index.js +1 -1
  96. package/components/Modal/styles.module.scss +103 -67
  97. package/components/Modal/styles.module.scss.d.ts +17 -10
  98. package/components/NotificationPanel/NotificationPanel.d.ts +2 -0
  99. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  100. package/components/NotificationPanel/componentdata.json +19 -0
  101. package/components/NotificationPanel/index.js +1 -1
  102. package/components/NotificationPanel/styles.module.scss +4 -4
  103. package/components/Slider/index.js +1 -1
  104. package/components/Spacer/index.js +1 -1
  105. package/components/Tile/index.js +1 -1
  106. package/components/Title/Title.d.ts +6 -1
  107. package/components/Title/Title.d.ts.map +1 -1
  108. package/components/Title/componentdata.json +1 -145
  109. package/components/Title/index.js +1 -1
  110. package/components/Validation/Validation.d.ts +17 -0
  111. package/components/Validation/Validation.d.ts.map +1 -0
  112. package/components/Validation/componentdata.json +111 -0
  113. package/components/Validation/index.d.ts +3 -0
  114. package/components/Validation/index.d.ts.map +1 -0
  115. package/components/Validation/index.js +2 -0
  116. package/components/Validation/index.js.map +1 -0
  117. package/components/Validation/styles.module.scss +18 -0
  118. package/components/Validation/styles.module.scss.d.ts +10 -0
  119. package/components/__mocks__/index.js +2 -0
  120. package/components/__mocks__/index.js.map +1 -0
  121. package/constants-d919236e.js +2 -0
  122. package/constants-d919236e.js.map +1 -0
  123. package/hooks/focus-utils.d.ts +7 -0
  124. package/hooks/focus-utils.d.ts.map +1 -0
  125. package/hooks/useFocusTrap.d.ts +1 -1
  126. package/hooks/useFocusTrap.d.ts.map +1 -1
  127. package/hooks/useVisibility.d.ts +3 -0
  128. package/hooks/useVisibility.d.ts.map +1 -0
  129. package/index.js +1 -1
  130. package/package.json +2 -1
  131. package/scss/_palette.scss +1 -0
  132. package/useBreakpoint-324a9b14.js +2 -0
  133. package/useBreakpoint-324a9b14.js.map +1 -0
  134. package/useHover-037be19d.js +2 -0
  135. package/useHover-037be19d.js.map +1 -0
  136. package/useWindowSize-73b47451.js +2 -0
  137. package/useWindowSize-73b47451.js.map +1 -0
  138. package/utils/uuid.d.ts +1 -0
  139. package/utils/uuid.d.ts.map +1 -1
  140. package/uuid-8870ab4b.js +2 -0
  141. package/uuid-8870ab4b.js.map +1 -0
  142. package/Button-e2087687.js +0 -2
  143. package/Button-e2087687.js.map +0 -1
  144. package/Loader-3767cb6e.js +0 -2
  145. package/Loader-3767cb6e.js.map +0 -1
  146. package/Modal-459c67d7.js +0 -2
  147. package/Modal-459c67d7.js.map +0 -1
  148. package/Title-863af332.js +0 -2
  149. package/Title-863af332.js.map +0 -1
  150. package/_rollupPluginBabelHelpers-e1c7fe69.js +0 -2
  151. package/_rollupPluginBabelHelpers-e1c7fe69.js.map +0 -1
  152. package/components/Tabs/componentdata.json +0 -3
  153. package/constants-d1f48e8e.js +0 -2
  154. package/constants-d1f48e8e.js.map +0 -1
  155. package/useBreakpoint-a8fa8a61.js +0 -2
  156. package/useBreakpoint-a8fa8a61.js.map +0 -1
  157. package/useHover-57ad4df9.js +0 -2
  158. package/useHover-57ad4df9.js.map +0 -1
  159. package/useWindowSize-c22d7634.js +0 -2
  160. package/useWindowSize-c22d7634.js.map +0 -1
@@ -0,0 +1,111 @@
1
+ {
2
+ "props": {
3
+ "errorSummary": {
4
+ "defaultValue": null,
5
+ "description": "text placed in the legend tag of the fieldset",
6
+ "name": "errorSummary",
7
+ "parent": {
8
+ "fileName": "src/components/Validation/Validation.tsx",
9
+ "name": "ValidationProps"
10
+ },
11
+ "declarations": [
12
+ {
13
+ "fileName": "src/components/Validation/Validation.tsx",
14
+ "name": "ValidationProps"
15
+ }
16
+ ],
17
+ "required": false,
18
+ "type": {
19
+ "name": "string"
20
+ }
21
+ },
22
+ "children": {
23
+ "defaultValue": null,
24
+ "description": "Items in the Validation compontent",
25
+ "name": "children",
26
+ "parent": {
27
+ "fileName": "src/components/Validation/Validation.tsx",
28
+ "name": "ValidationProps"
29
+ },
30
+ "declarations": [
31
+ {
32
+ "fileName": "src/components/Validation/Validation.tsx",
33
+ "name": "ValidationProps"
34
+ }
35
+ ],
36
+ "required": false,
37
+ "type": {
38
+ "name": "ReactNode"
39
+ }
40
+ },
41
+ "className": {
42
+ "defaultValue": null,
43
+ "description": "Adds custom classes to the element.",
44
+ "name": "className",
45
+ "parent": {
46
+ "fileName": "src/components/Validation/Validation.tsx",
47
+ "name": "ValidationProps"
48
+ },
49
+ "declarations": [
50
+ {
51
+ "fileName": "src/components/Validation/Validation.tsx",
52
+ "name": "ValidationProps"
53
+ }
54
+ ],
55
+ "required": false,
56
+ "type": {
57
+ "name": "string"
58
+ }
59
+ },
60
+ "variant": {
61
+ "defaultValue": null,
62
+ "description": "Changes the visuals of the formgroup",
63
+ "name": "variant",
64
+ "parent": {
65
+ "fileName": "src/components/Validation/Validation.tsx",
66
+ "name": "ValidationProps"
67
+ },
68
+ "declarations": [
69
+ {
70
+ "fileName": "src/components/Validation/Validation.tsx",
71
+ "name": "ValidationProps"
72
+ }
73
+ ],
74
+ "required": false,
75
+ "type": {
76
+ "name": "enum",
77
+ "raw": "\"normal\" | \"bigform\" | undefined",
78
+ "value": [
79
+ {
80
+ "value": "undefined"
81
+ },
82
+ {
83
+ "value": "\"normal\""
84
+ },
85
+ {
86
+ "value": "\"bigform\""
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ "testId": {
92
+ "defaultValue": null,
93
+ "description": "Sets the data-testid attribute.",
94
+ "name": "testId",
95
+ "parent": {
96
+ "fileName": "src/components/Validation/Validation.tsx",
97
+ "name": "ValidationProps"
98
+ },
99
+ "declarations": [
100
+ {
101
+ "fileName": "src/components/Validation/Validation.tsx",
102
+ "name": "ValidationProps"
103
+ }
104
+ ],
105
+ "required": false,
106
+ "type": {
107
+ "name": "string"
108
+ }
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,3 @@
1
+ import Validation from './Validation';
2
+ export default Validation;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,eAAe,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{V as s}from"../../Validation-b902407e.js";export{V as default}from"../../Validation-b902407e.js";import"react";import"../../index-9b84fabc.js";import"../../FormGroup-b874ae21.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"../FormGroup/styles.module.scss";import"../../Checkbox-46666e69.js";import"../../uuid-8870ab4b.js";import"../../Check-6291ad09.js";import"../../constants-d919236e.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../Checkbox/styles.module.scss";import"../../Title-7c829525.js";import"../Title/styles.module.scss";import"./styles.module.scss";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ @import '../../scss/_spacers.scss';
2
+ @import '../../scss/_palette.scss';
3
+ @import '../../scss/font-settings.scss';
4
+
5
+ .validation {
6
+ &__errors {
7
+ font-size: $font-size-sm;
8
+ font-weight: 600;
9
+ color: $cherry500;
10
+ margin: getSpacer(l) 0 getSpacer(s);
11
+ }
12
+ }
13
+
14
+ .form-group-wrapper {
15
+ &--error-sibling {
16
+ padding-bottom: 0 !important;
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ export type Styles = {
2
+ 'form-group-wrapper--error-sibling': string;
3
+ validation__errors: string;
4
+ };
5
+
6
+ export type ClassNames = keyof Styles;
7
+
8
+ declare const styles: Styles;
9
+
10
+ export default styles;
@@ -0,0 +1,2 @@
1
+ import{c as e,d as n}from"../../_rollupPluginBabelHelpers-d0752906.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
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{_ as e}from"./_tslib-51c8a283.js";import a from"react";var i,l=function(e,a,i,l,r,t){return e&&r&&t?a?t:r:a?l:i},r=a.forwardRef((function(l,r){var t=l.svgIcon,o=l.ariaLabel,s=l.id,d=l.className,c=void 0===d?"":d,m=l.size,n=void 0===m?i.Small:m,v=l.color,g=void 0===v?"black":v,b=l.hoverColor,f=void 0===b?g||"black":b,h=l.isHovered,u=void 0!==h&&h,S=l.testId,I=e(l,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),L=a.createElement(t,{isExtraSmall:n<=i.XSmall,isHovered:u}),X=s&&o?"title-".concat(s):void 0;return a.createElement("svg",Object.assign({id:s,"data-testid":S,ref:r,className:"hnds-style-icon ".concat(c),role:"img","aria-label":!s&&o?o:void 0,"aria-labelledby":X,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:n,minHeight:n},width:n,height:n,fill:u?f:g},I),X&&a.createElement("title",{id:X},o),L)}));r.displayName="Icon",function(e){e[e.XSmall=38]="XSmall",e[e.Small=48]="Small",e[e.Medium=64]="Medium",e[e.Large=80]="Large",e[e.XLarge=130]="XLarge"}(i||(i={}));export{r as I,i as a,l as r};
2
+ //# sourceMappingURL=constants-d919236e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-d919236e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Kopi fra core-frontend (focus-utils.tsx)
3
+ * Returnerer document.activeElement (element in focus), uavhengig av om den er i document-dom eller shadow-dom
4
+ * @param element HtmlElement som den skal søke i
5
+ */
6
+ export declare const getDocumentActiveElement: (element: string | HTMLElement) => Element | null;
7
+ //# sourceMappingURL=focus-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-utils.d.ts","sourceRoot":"","sources":["../../src/hooks/focus-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,mDAUpC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export default function useFocusTrap(): React.MutableRefObject<null>;
2
+ export default function useFocusTrap(): React.MutableRefObject<HTMLDivElement | null>;
3
3
  //# 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;AAEjD,MAAM,CAAC,OAAO,UAAU,YAAY,iCAuDnC"}
1
+ {"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CA+DpF"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const useIsVisible: (ref: import("react").RefObject<HTMLElement>, threshold?: number) => boolean;
3
+ //# sourceMappingURL=useVisibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVisibility.d.ts","sourceRoot":"","sources":["../../src/hooks/useVisibility.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,YAAY,8EAwBxB,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{t as theme}from"./index-19b48c51.js";export{u as useHover}from"./useHover-57ad4df9.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-e1c7fe69.js";import"react";
1
+ export{t as theme}from"./index-19b48c51.js";export{u as useHover}from"./useHover-037be19d.js";import"./palette-f206f488.js";import"./grid-11a70eb7.js";import"./_rollupPluginBabelHelpers-d0752906.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-beta81-ModalTest2",
4
+ "version": "1.0.0-beta85",
5
5
  "description": "The official design system for Helsenorge built with React.",
6
6
  "repository": {
7
7
  "type": "tfs",
@@ -74,6 +74,7 @@
74
74
  "react-docgen-typescript": "^1.22.0",
75
75
  "react-docgen-typescript-loader": "^3.3.0",
76
76
  "react-dom": "16.12.0",
77
+ "react-hook-form": "^6.15.8",
77
78
  "resolve-url-loader": "^3.1.1",
78
79
  "rimraf": "^3.0.2",
79
80
  "rollup": "^2.10.9",
@@ -67,6 +67,7 @@ $plum700: #5b22a6;
67
67
  $plum800: #4c1b8c;
68
68
  $plum900: #3c1471;
69
69
 
70
+ $inverted-hover: #ffffff0d;
70
71
  $transparentGrey: rgba(102, 102, 102, 0.75);
71
72
 
72
73
  $palette-map: (
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoint-324a9b14.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{_ as e}from"./_rollupPluginBabelHelpers-d0752906.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-037be19d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHover-037be19d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWindowSize-73b47451.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/utils/uuid.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const uuid: () => string;
2
+ export default uuid;
2
3
  //# sourceMappingURL=uuid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/utils/uuid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,cAMhB,CAAC"}
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/utils/uuid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,cAMhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ var x=function(){return"bxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g,(function(x){var r=16*Math.random()|0;return("x"==x?r:3&r|8).toString(16)}))};export{x as u};
2
+ //# sourceMappingURL=uuid-8870ab4b.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid-8870ab4b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{_ as t,a as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as n}from"./_tslib-51c8a283.js";import o from"react";import{g as r}from"./color-acb834c6.js";import{a as l}from"./constants-d1f48e8e.js";import{L as i}from"./Loader-3767cb6e.js";import{u as a}from"./useHover-57ad4df9.js";import{u as s}from"./useWindowSize-c22d7634.js";import{b as d}from"./grid-11a70eb7.js";import{c as u}from"./index-9b84fabc.js";import c from"./components/Button/styles.module.scss";var m={primary:"blueberry",warning:"banana",danger:"cherry"};var b=function(t,e){return e&&e<d.md&&t?l.Small:t?l.Medium:l.XSmall},f=o.forwardRef((function(d,f){var v,p,_,g=d.children,h=d.className,w=void 0===h?"":h,j=d.fluid,E=void 0!==j&&j,y=d.intent,N=void 0===y?"primary":y,k=d.inverted,C=void 0!==k&&k,I=d.htmlMarkup,H=void 0===I?"button":I,O=d.onClick,S=d.large,z=void 0!==S&&S,B=d.loading,F=void 0!==B&&B,M=d.variant,x=void 0===M?"fill":M,L=d.disabled,R=void 0!==L&&L,X=d.ellipsis,A=void 0!==X&&X,P=d.testId,W=d.href,q=d.target,D=n(d,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),G=function(t){var e,n,o,r,l=null,i=null;return 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()),[l,i,t]}(o.Children.toArray(g)),J=t(G,3),K=J[0],Q=J[1],T=J[2],U=a(f),V=U.hoverRef,Y=U.isHovered,Z=function(t,e,n,o,l){return e?r("neutral",600):t&&!o||!t&&o?"white":r(m[n],l?700:600)}("fill"===x,R,N,C,Y),$=s(),tt="fill"===x,et="outline"===x,nt="borderless"===x,ot="warning"===N,rt="danger"===N,lt=!(!K&&!Q||F),it=Object.assign({},D),at=u(c.button,(e(v={},c["button--fluid"],E),e(v,c["button--large"],z),e(v,c["button--warning"],ot),e(v,c["button--danger"],rt),e(v,c["button--inverted"],C),e(v,c["button--fill"],tt),e(v,c["button--outline"],et),e(v,c["button--borderless"],nt),e(v,c["button--with-icon"],lt),e(v,c["button--ellipsis"],A),v),w),st=u(c.button__content,(e(p={},c["button__content--warning"],ot),e(p,c["button__content--danger"],rt),e(p,c["button__content--fill"],tt),e(p,c["button__content--borderless"],nt),e(p,c["button__content--with-icon"],lt),e(p,c["button__content--large"],z),e(p,c["button__content--ellipsis"],A),e(p,c["button__content--inverted"],C),e(p,c["button__content--fluid"],E),p)),dt=u(c["button__left-fluid-content"],(e(_={},c["button__left-fluid-content--with-icon"],lt),e(_,c["button__left-fluid-content--large"],z),_));function ut(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 ct=function(){return o.createElement("span",{className:st},T)},mt=function(){return o.createElement("span",{className:c["content-wrapper"]},F?o.createElement("div",{className:c["button__left-fluid-content"]},o.createElement(i,{testId:"test-id-loader",color:"fill"!==x||C?m[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,E?o.createElement("div",{className:dt},ut(K,b(z,$.width),Z,Y),ct()):o.createElement(o.Fragment,null,ut(K,b(z,$.width),Z,Y),ct()),ut(Q,l.XSmall,Z,Y)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":P,className:at,ref:V},it),mt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":P,className:at,href:W,target:q,ref:V},D),mt()))}));export{f as B};
2
- //# sourceMappingURL=Button-e2087687.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-e2087687.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{a as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as r}from"./index-9b84fabc.js";import l from"./components/Loader/styles.module.scss";var o=function(){return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var a=16*Math.random()|0;return("x"==e?a:3&a|8).toString(16)}))},d=a.forwardRef((function(d,t){var s,i,m,n=d.overlay,x=d.color,c=void 0===x?n?"black":"neutral":x,_=d.size,p=void 0===_?"small":_,u=d.className,v=void 0===u?"":u,b=d.testId,f=void 0===b?"":b,y=d.center,w=d.ariaLabelledById,N=d.ariaLabel,g=void 0===N?"Laster inn":N,E="small"===p,h="medium"===p,k="large"===p,L=r(l["loader-wrapper"],(e(s={},l["loader-wrapper--center"],y),e(s,l["loader-wrapper--overlay"],n),s)),j=r(l.loader,(e(i={},l["loader--small"],E),e(i,l["loader--medium"],h),e(i,l["loader--large"],k),i),v),B=r(l.loader__dot,(e(m={},l["loader__dot--small"],E),e(m,l["loader__dot--medium"],h),e(m,l["loader__dot--large"],k),e(m,l["loader__dot--banana"],"banana"===c),e(m,l["loader__dot--cherry"],"cherry"===c),e(m,l["loader__dot--kiwi"],"kiwi"===c),e(m,l["loader__dot--neutral"],"neutral"===c),e(m,l["loader__dot--plum"],"plum"===c),e(m,l["loader__dot--black"],"black"===c),e(m,l["loader__dot--white"],"white"===c),m)),I="loader".concat(o());return a.createElement("div",{role:"progressbar",className:L},a.createElement("div",{"data-testid":f,"aria-labelledby":w||I,className:j},a.createElement("div",{className:B}),a.createElement("div",{className:B}),a.createElement("div",{className:B}),a.createElement("div",{className:B}),!w&&a.createElement("span",{id:I,className:l["loader__hidden-text"]},g)))}));export{d as L,o as u};
2
- //# sourceMappingURL=Loader-3767cb6e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader-3767cb6e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/Modal-459c67d7.js DELETED
@@ -1,2 +0,0 @@
1
- import e,{useRef as t,useEffect as a}from"react";import{c as n}from"./index-9b84fabc.js";import{u as r}from"./Loader-3767cb6e.js";import{p as o}from"./palette-f206f488.js";import{B as l}from"./Button-e2087687.js";import{I as c}from"./constants-d1f48e8e.js";import{X as i,A as s,a as m}from"./AlertSignFill-64bfef57.js";import d from"./components/Modal/styles.module.scss";import{T as u}from"./Title-863af332.js";function v(){var e=t(null);function n(t){var a=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select'),n=a[0],r=1===a.length?n:a[a.length-1];"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault()))}function r(t){var a=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===a.length&&(a[0].focus(),t.preventDefault())}return a((function(){var t=e.current;return t.addEventListener("keydown",n),t.addEventListener("click",r),function(){t.removeEventListener("keydown",n),t.removeEventListener("click",r)}}),[]),e}var p;!function(e){e.normal="normal",e.warning="warning",e.error="error",e.image="image"}(p||(p={}));var f={variant:p.normal,primaryButtonText:"OK",large:!1,className:""},y=function(t){return e.createElement("button",{className:d.modal__lukkekryss,"aria-label":t.ariaLabel||"Lukk",onClick:t.onClick,autoFocus:!0,role:"button"},e.createElement(c,{svgIcon:i,color:o.blueberry600,size:42}))},E=e.forwardRef((function(t,i){var f,E,g;function b(e){"Escape"===e.key&&t.onClose&&(e.stopPropagation(),t.onClose())}function _(e){e.target&&C.current===e.target&&t.onClose&&(e.stopPropagation(),t.onClose())}var k,h=t.variant===p.image,L=null!==(f=t.titleId)&&void 0!==f?f:r(),x=e.useRef(null),C=e.useRef(null),B=t.secondaryButtonText&&(null===(E=t.secondaryButtonText)||void 0===E?void 0:E.length)>0||t.onSuccess,N=t.ariaLabelledBy?void 0:t.ariaLabel,w=t.ariaLabelledBy?t.ariaLabelledBy:t.ariaLabel?void 0:L;return a((function(){var e=x.current,t=C.current;return document.body.style.overflow="hidden",e&&(e.addEventListener("keydown",b),t.addEventListener("click",_)),function(){document.body.style.removeProperty("overflow"),e.removeEventListener("keydown",b),t.removeEventListener("click",_)}})),e.createElement("div",{ref:x,"data-testid":"dialog-container"},e.createElement("div",{ref:C,className:d["modal-overlay"],"data-testid":t.testId},e.createElement("div",{className:d.align,ref:v()},e.createElement("div",{className:n(t.className,d.modal,d["modal--".concat(t.variant)],t.large?d["modal--large"]:""),role:"dialog","aria-label":N,"aria-labelledby":w},!t.noCloseButton&&e.createElement("div",{className:h?d["modal__close--image"]:d.modal__close},e.createElement(y,{onClick:t.onClose,ariaLabel:t.ariaLabelCloseBtn})),e.createElement("div",{className:h?d["modal__contentWrapper--image"]:d.modal__contentWrapper},e.createElement("div",{className:d.modal__contentWrapper__title},t.variant&&((k=t.variant)===p.error?e.createElement("div",null,e.createElement(c,{svgIcon:s,color:o.cherry500,hoverColor:o.cherry500})):k===p.warning?e.createElement("div",null,e.createElement(c,{svgIcon:m,color:o.black,hoverColor:o.black})):null),e.createElement("div",null,e.createElement(u,{id:L,htmlMarkup:"h3",appearance:"title3"},t.title))),e.createElement("div",{className:h?d["modal__contentWrapper__content--image"]:d.modal__contentWrapper__content},h?t.children&&e.createElement("div",null,e.createElement("div",{className:d["modal--image__img"]},t.children),e.createElement("span",{className:d["modal--image__text"]},t.description)):t.children&&e.createElement("div",null,t.children),t.description&&!t.children&&e.createElement("p",{className:d.modal__description},t.description)),B&&e.createElement("div",{className:d.modal__actions},t.onSuccess&&e.createElement(l,{onClick:t.onSuccess},t.primaryButtonText),t.secondaryButtonText&&(null===(g=t.secondaryButtonText)||void 0===g?void 0:g.length)>0&&e.createElement(l,{variant:"borderless",onClick:t.onClose},t.secondaryButtonText)))))))}));E.defaultProps=f;export{E as M};
2
- //# sourceMappingURL=Modal-459c67d7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal-459c67d7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/Title-863af332.js DELETED
@@ -1,2 +0,0 @@
1
- import{a as t}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import e from"react";import{c as i}from"./index-9b84fabc.js";import l from"./components/Title/styles.module.scss";var r=e.forwardRef((function(r,a){var o,m=r.id,s=r.children,c=r.className,n=r.htmlMarkup,p=void 0===n?"h1":n,f=r.appearance,d=void 0===f?"title1":f,u=r.margin,v=void 0===u?0:u,g=i(l.title,(t(o={},l["title--feature"],"titleFeature"===d),t(o,l["title--title1"],"title1"===d),t(o,l["title--title2"],"title2"===d),t(o,l["title--title3"],"title3"===d),t(o,l["title--title4"],"title4"===d),t(o,l["title--title5"],"title5"===d),o),c),b=p;return e.createElement(b,{id:m,className:g,style:{marginTop:"".concat(v,"rem"),marginBottom:"".concat(v,"rem")},ref:a},s)}));export{r as T};
2
- //# sourceMappingURL=Title-863af332.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Title-863af332.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],e=!0,o=!1,u=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done)&&(n.push(i.value),!r||n.length!==r);e=!0);}catch(t){o=!0,u=t}finally{try{e||null==a.return||a.return()}finally{if(o)throw u}}return n}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}export{n as _,r as a,t as b};
2
- //# sourceMappingURL=_rollupPluginBabelHelpers-e1c7fe69.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers-e1c7fe69.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- {
2
- "props": {}
3
- }
@@ -1,2 +0,0 @@
1
- import{_ as e}from"./_tslib-51c8a283.js";import a from"react";var i,l=a.forwardRef((function(l,r){var o=l.svgIcon,t=l.ariaLabel,s=l.id,d=l.className,c=void 0===d?"":d,m=l.size,n=void 0===m?i.Small:m,v=l.color,g=void 0===v?"black":v,b=l.hoverColor,h=void 0===b?g||"black":b,f=l.isHovered,S=void 0!==f&&f,u=l.testId,I=e(l,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),L=a.createElement(o,{isExtraSmall:n<=i.XSmall,isHovered:S}),X=s&&t?"title-".concat(s):void 0;return a.createElement("svg",Object.assign({id:s,"data-testid":u,ref:r,className:"hnds-style-icon ".concat(c),role:"img","aria-label":!s&&t?t:void 0,"aria-labelledby":X,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:n,minHeight:n},width:n,height:n,fill:S?h:g},I),X&&a.createElement("title",{id:X},t),L)}));l.displayName="Icon",function(e){e[e.XSmall=38]="XSmall",e[e.Small=48]="Small",e[e.Medium=64]="Medium",e[e.Large=80]="Large",e[e.XLarge=130]="XLarge"}(i||(i={}));export{l as I,i as a};
2
- //# sourceMappingURL=constants-d1f48e8e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants-d1f48e8e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{_ as r}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{useState as s,useEffect as m}from"react";import{u as o}from"./useWindowSize-c22d7634.js";import{b as i}from"./grid-11a70eb7.js";var a;!function(r){r[r.Xs=i.xs]="Xs",r[r.Sm=i.sm]="Sm",r[r.Md=i.md]="Md",r[r.Lg=i.lg]="Lg",r[r.Xl=i.xl]="Xl"}(a||(a={}));var e=function(){var i=o().width,e=s(),l=r(e,2),t=l[0],d=l[1];return m((function(){i&&(i>=a.Xl?d(a.Xl):i>=a.Lg?d(a.Lg):i>=a.Md?d(a.Md):i>=a.Sm?d(a.Sm):d(a.Xs))}),[i]),t};export{a as B,e as u};
2
- //# sourceMappingURL=useBreakpoint-a8fa8a61.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBreakpoint-a8fa8a61.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{_ as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{useRef as r,useState as n,useEffect as t}from"react";var o=function(o,u){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=o||r(null),f=n(!1),a=e(f,2),v=a[0],s=a[1];return t((function(){var e=i.current,r=function(){return s(!0)},n=function(){return s(!1)},t=["mouseenter",c?"focusin":""];t.forEach((function(n){return e&&e.addEventListener(n,r)}));var o=["mouseleave",c?"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)}))}}),[i,u]),{hoverRef:i,isHovered:v}};export{o as u};
2
- //# sourceMappingURL=useHover-57ad4df9.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useHover-57ad4df9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{b as n,_ as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{useState as i,useEffect as r}from"react";function t(){var t="object"===("undefined"==typeof window?"undefined":n(window));function o(){return{width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}var d=i(o),u=e(d,2),f=u[0],w=u[1];return r((function(){if(!t)return function(){};function n(){w(o())}return window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}}),[]),f}export{t as u};
2
- //# sourceMappingURL=useWindowSize-c22d7634.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWindowSize-c22d7634.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}