@helsenorge/designsystem-react 1.0.0-beta82 → 1.0.0-beta86

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 (142) hide show
  1. package/Button-3f327b66.js +2 -0
  2. package/Button-3f327b66.js.map +1 -0
  3. package/{Checkbox-ffdd3cb7.js → Checkbox-46666e69.js} +2 -2
  4. package/Checkbox-46666e69.js.map +1 -0
  5. package/FormGroup-b874ae21.js +2 -0
  6. package/FormGroup-b874ae21.js.map +1 -0
  7. package/{Loader-9e099b42.js → Loader-cf365332.js} +2 -2
  8. package/Loader-cf365332.js.map +1 -0
  9. package/Modal-3dc1bb47.js +2 -0
  10. package/Modal-3dc1bb47.js.map +1 -0
  11. package/Title-7c829525.js +2 -0
  12. package/Title-7c829525.js.map +1 -0
  13. package/Validation-b902407e.js +2 -0
  14. package/Validation-b902407e.js.map +1 -0
  15. package/_rollupPluginBabelHelpers-d0752906.js +2 -0
  16. package/_rollupPluginBabelHelpers-d0752906.js.map +1 -0
  17. package/components/AnchorLink/index.js +1 -1
  18. package/components/Avatar/index.js +1 -1
  19. package/components/Badge/index.js +1 -1
  20. package/components/Button/Button.d.ts.map +1 -1
  21. package/components/Button/index.js +1 -1
  22. package/components/ButtonWithModal/componentdata.json +17 -5
  23. package/components/ButtonWithModal/index.js +1 -1
  24. package/components/Checkbox/index.js +1 -1
  25. package/components/Checkbox/styles.module.scss +20 -8
  26. package/components/Checkbox/styles.module.scss.d.ts +1 -0
  27. package/components/ExpanderList/index.js +1 -1
  28. package/components/FormExample/FormExample.d.ts.map +1 -1
  29. package/components/FormExample/index.js +1 -1
  30. package/components/FormGroup/FormGroup.d.ts +1 -1
  31. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  32. package/components/FormGroup/componentdata.json +1 -1
  33. package/components/FormGroup/index.js +1 -1
  34. package/components/FormGroup/styles.module.scss +16 -37
  35. package/components/FormGroup/styles.module.scss.d.ts +4 -10
  36. package/components/Icons/AcupunctureBack.d.ts +5 -0
  37. package/components/Icons/AcupunctureBack.d.ts.map +1 -0
  38. package/components/Icons/AcupunctureBack.js +2 -0
  39. package/components/Icons/AcupunctureBack.js.map +1 -0
  40. package/components/Icons/AdditionalIconInformation.js +6 -0
  41. package/components/Icons/AdditionalIconInformation.js.map +1 -1
  42. package/components/Icons/Icon.d.ts +1 -0
  43. package/components/Icons/Icon.d.ts.map +1 -1
  44. package/components/Icons/Icon.js +1 -1
  45. package/components/Icons/NoEye.d.ts +5 -0
  46. package/components/Icons/NoEye.d.ts.map +1 -0
  47. package/components/Icons/NoEye.js +2 -0
  48. package/components/Icons/NoEye.js.map +1 -0
  49. package/components/Icons/SectionSign.d.ts +5 -0
  50. package/components/Icons/SectionSign.d.ts.map +1 -0
  51. package/components/Icons/SectionSign.js +2 -0
  52. package/components/Icons/SectionSign.js.map +1 -0
  53. package/components/Icons/SpeechBubble.d.ts +5 -0
  54. package/components/Icons/SpeechBubble.d.ts.map +1 -0
  55. package/components/Icons/SpeechBubble.js +2 -0
  56. package/components/Icons/SpeechBubble.js.map +1 -0
  57. package/components/Icons/SupportingPerson.d.ts +5 -0
  58. package/components/Icons/SupportingPerson.d.ts.map +1 -0
  59. package/components/Icons/SupportingPerson.js +2 -0
  60. package/components/Icons/SupportingPerson.js.map +1 -0
  61. package/components/Icons/Syringe.d.ts +5 -0
  62. package/components/Icons/Syringe.d.ts.map +1 -0
  63. package/components/Icons/Syringe.js +2 -0
  64. package/components/Icons/Syringe.js.map +1 -0
  65. package/components/Icons/index.js +1 -1
  66. package/components/LinkList/LinkList.d.ts.map +1 -1
  67. package/components/LinkList/index.js +1 -1
  68. package/components/LinkList/styles.module.scss +1 -4
  69. package/components/LinkList/styles.module.scss.d.ts +0 -1
  70. package/components/Loader/index.js +1 -1
  71. package/components/Modal/Modal.d.ts +17 -4
  72. package/components/Modal/Modal.d.ts.map +1 -1
  73. package/components/Modal/__mocks__/IntersectionObserver.d.ts +6 -0
  74. package/components/Modal/__mocks__/IntersectionObserver.d.ts.map +1 -0
  75. package/components/Modal/componentdata.json +18 -6
  76. package/components/Modal/index.js +1 -1
  77. package/components/Modal/styles.module.scss +103 -67
  78. package/components/Modal/styles.module.scss.d.ts +17 -10
  79. package/components/NotificationPanel/NotificationPanel.d.ts +2 -0
  80. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  81. package/components/NotificationPanel/componentdata.json +19 -0
  82. package/components/NotificationPanel/index.js +1 -1
  83. package/components/NotificationPanel/styles.module.scss +4 -4
  84. package/components/Slider/index.js +1 -1
  85. package/components/Spacer/index.js +1 -1
  86. package/components/Tile/index.js +1 -1
  87. package/components/Title/Title.d.ts +6 -1
  88. package/components/Title/Title.d.ts.map +1 -1
  89. package/components/Title/componentdata.json +1 -145
  90. package/components/Title/index.js +1 -1
  91. package/components/Validation/Validation.d.ts +1 -1
  92. package/components/Validation/Validation.d.ts.map +1 -1
  93. package/components/Validation/componentdata.json +1 -1
  94. package/components/Validation/index.js +1 -1
  95. package/components/Validation/styles.module.scss +6 -3
  96. package/components/Validation/styles.module.scss.d.ts +1 -1
  97. package/components/__mocks__/index.js +2 -0
  98. package/components/__mocks__/index.js.map +1 -0
  99. package/constants-d919236e.js +2 -0
  100. package/constants-d919236e.js.map +1 -0
  101. package/hooks/focus-utils.d.ts +7 -0
  102. package/hooks/focus-utils.d.ts.map +1 -0
  103. package/hooks/useFocusTrap.d.ts +1 -1
  104. package/hooks/useFocusTrap.d.ts.map +1 -1
  105. package/hooks/useVisibility.d.ts +3 -0
  106. package/hooks/useVisibility.d.ts.map +1 -0
  107. package/index.js +1 -1
  108. package/package.json +1 -1
  109. package/useBreakpoint-324a9b14.js +2 -0
  110. package/useBreakpoint-324a9b14.js.map +1 -0
  111. package/useHover-037be19d.js +2 -0
  112. package/useHover-037be19d.js.map +1 -0
  113. package/useWindowSize-73b47451.js +2 -0
  114. package/useWindowSize-73b47451.js.map +1 -0
  115. package/utils/uuid.d.ts +1 -0
  116. package/utils/uuid.d.ts.map +1 -1
  117. package/uuid-8870ab4b.js +2 -0
  118. package/uuid-8870ab4b.js.map +1 -0
  119. package/Button-7200b617.js +0 -2
  120. package/Button-7200b617.js.map +0 -1
  121. package/Checkbox-ffdd3cb7.js.map +0 -1
  122. package/FormGroup-17d2a3d3.js +0 -2
  123. package/FormGroup-17d2a3d3.js.map +0 -1
  124. package/Loader-9e099b42.js.map +0 -1
  125. package/Modal-5c2defa7.js +0 -2
  126. package/Modal-5c2defa7.js.map +0 -1
  127. package/Title-863af332.js +0 -2
  128. package/Title-863af332.js.map +0 -1
  129. package/Validation-e113da7e.js +0 -2
  130. package/Validation-e113da7e.js.map +0 -1
  131. package/_rollupPluginBabelHelpers-e1c7fe69.js +0 -2
  132. package/_rollupPluginBabelHelpers-e1c7fe69.js.map +0 -1
  133. package/constants-d1f48e8e.js +0 -2
  134. package/constants-d1f48e8e.js.map +0 -1
  135. package/useBreakpoint-a8fa8a61.js +0 -2
  136. package/useBreakpoint-a8fa8a61.js.map +0 -1
  137. package/useHover-57ad4df9.js +0 -2
  138. package/useHover-57ad4df9.js.map +0 -1
  139. package/useWindowSize-c22d7634.js +0 -2
  140. package/useWindowSize-c22d7634.js.map +0 -1
  141. package/uuid-484288be.js +0 -2
  142. package/uuid-484288be.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{T as e}from"../../Title-863af332.js";export{T as default}from"../../Title-863af332.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";
1
+ import{T as s}from"../../Title-7c829525.js";export{T as default}from"../../Title-7c829525.js";import"../../_rollupPluginBabelHelpers-d0752906.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";
2
2
  //# sourceMappingURL=index.js.map
@@ -3,7 +3,7 @@ import { FormVariant } from '../FormGroup/FormGroup';
3
3
  interface ValidationProps {
4
4
  /** text placed in the legend tag of the fieldset */
5
5
  errorSummary?: string;
6
- /** Items in the ExpanderList */
6
+ /** Items in the Validation compontent */
7
7
  children?: React.ReactNode;
8
8
  /** Adds custom classes to the element. */
9
9
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIrD,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAgBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAkB,EAAkB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAIhF,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAoBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "children": {
23
23
  "defaultValue": null,
24
- "description": "Items in the ExpanderList",
24
+ "description": "Items in the Validation compontent",
25
25
  "name": "children",
26
26
  "parent": {
27
27
  "fileName": "src/components/Validation/Validation.tsx",
@@ -1,2 +1,2 @@
1
- import{V as e}from"../../Validation-e113da7e.js";export{V as default}from"../../Validation-e113da7e.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"react";import"../../index-9b84fabc.js";import"./styles.module.scss";
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
2
  //# sourceMappingURL=index.js.map
@@ -7,9 +7,12 @@
7
7
  font-size: $font-size-sm;
8
8
  font-weight: 600;
9
9
  color: $cherry500;
10
+ margin: getSpacer(l) 0 getSpacer(s);
11
+ }
12
+ }
10
13
 
11
- &--bigform {
12
- margin-left: getSpacer(l);
13
- }
14
+ .form-group-wrapper {
15
+ &--error-sibling {
16
+ padding-bottom: 0 !important;
14
17
  }
15
18
  }
@@ -1,6 +1,6 @@
1
1
  export type Styles = {
2
+ 'form-group-wrapper--error-sibling': string;
2
3
  validation__errors: string;
3
- 'validation__errors--bigform': string;
4
4
  };
5
5
 
6
6
  export type ClassNames = keyof 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-beta82",
4
+ "version": "1.0.0-beta86",
5
5
  "description": "The official design system for Helsenorge built with React.",
6
6
  "repository": {
7
7
  "type": "tfs",
@@ -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-9e099b42.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-7200b617.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-7200b617.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Checkbox-ffdd3cb7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{a as r}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import e from"react";import{c as o}from"./index-9b84fabc.js";import a from"./components/FormGroup/styles.module.scss";import{C as m}from"./Checkbox-ffdd3cb7.js";import{T as p}from"./Title-863af332.js";var t=e.forwardRef((function(t,l){var n,f,i,s=t.className,d=t.mode,g=void 0===d?"on-white":d,u=t.variant,c=void 0===u?"normal":u,_=t.error,b="on-dark"===g,w="on-blueberry"===g,v="bigform"===c,h=o(a["form-group-wrapper"],(r(n={},a["form-group-wrapper--on-blueberry"],w),r(n,a["form-group-wrapper--on-dark"],b),r(n,a["form-group-wrapper--bigform"],v),r(n,a["form-group-wrapper--invalid"],_),n),s),k=o(a["form-group-wrapper__title"],(r(f={},a["form-group-wrapper__title--on-dark"],b&&!_),r(f,a["form-group-wrapper__title--bigform"],v),f)),E=o(a["form-group-wrapper__errors"],r({},a["form-group-wrapper__errors--bigform"],v)),N=o(a["form-group__legend"],(r(i={},a["form-group__legend--on-dark"],b&&!_),r(i,a["form-group__legend--bigform"],v),i));return e.createElement("div",{"data-testid":t.testId,className:h},t.title&&e.createElement(p,{className:k,htmlMarkup:"h4",appearance:"title4"},t.title),_&&e.createElement("p",{className:E},_),e.createElement("fieldset",{name:t.title,className:a["form-group"]},t.legend&&e.createElement("legend",{className:N},t.legend),e.Children.map(t.children,(function(r){return r.type===m?e.cloneElement(r,{mode:g,variant:c,error:!!_}):r}))))}));export{t as F};
2
- //# sourceMappingURL=FormGroup-17d2a3d3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormGroup-17d2a3d3.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader-9e099b42.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/Modal-5c2defa7.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"./uuid-484288be.js";import{p as o}from"./palette-f206f488.js";import{B as l}from"./Button-7200b617.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,b;function g(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",g),t.addEventListener("click",_)),function(){document.body.style.removeProperty("overflow"),e.removeEventListener("keydown",g),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===(b=t.secondaryButtonText)||void 0===b?void 0:b.length)>0&&e.createElement(l,{variant:"borderless",onClick:t.onClose},t.secondaryButtonText)))))))}));E.defaultProps=f;export{E as M};
2
- //# sourceMappingURL=Modal-5c2defa7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal-5c2defa7.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
- import{a as r}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import e from"react";import{c as a}from"./index-9b84fabc.js";import t from"./components/Validation/styles.module.scss";var o=e.forwardRef((function(o,s){var i=o.errorSummary,m=o.className,l="bigform"===o.variant,n=a(t.validation,m),c=a(t.validation__errors,r({},t["validation__errors--bigform"],l));return e.createElement(e.Fragment,null,e.createElement("div",{"data-testid":o.testId,className:n},o.children),i&&e.createElement("p",{className:c},i))}));export{o as V};
2
- //# sourceMappingURL=Validation-e113da7e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Validation-e113da7e.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,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":""}
package/uuid-484288be.js DELETED
@@ -1,2 +0,0 @@
1
- var x=function(){return"xxxxxxxx-xxxx-xxxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/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-484288be.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid-484288be.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}