@helsenorge/designsystem-react 1.0.0-beta81 → 1.0.0-beta83

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 (77) hide show
  1. package/{Button-e2087687.js → Button-7200b617.js} +2 -2
  2. package/Button-7200b617.js.map +1 -0
  3. package/Check-6291ad09.js +2 -0
  4. package/Check-6291ad09.js.map +1 -0
  5. package/Checkbox-ffdd3cb7.js +2 -0
  6. package/Checkbox-ffdd3cb7.js.map +1 -0
  7. package/FormGroup-17d2a3d3.js +2 -0
  8. package/FormGroup-17d2a3d3.js.map +1 -0
  9. package/Loader-9e099b42.js +2 -0
  10. package/Loader-9e099b42.js.map +1 -0
  11. package/Modal-5c2defa7.js +2 -0
  12. package/Modal-5c2defa7.js.map +1 -0
  13. package/Validation-e113da7e.js +2 -0
  14. package/Validation-e113da7e.js.map +1 -0
  15. package/components/Avatar/index.js +1 -1
  16. package/components/Button/index.js +1 -1
  17. package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -1
  18. package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
  19. package/components/ButtonWithModal/index.js +1 -1
  20. package/components/Checkbox/Checkbox.d.ts +31 -0
  21. package/components/Checkbox/Checkbox.d.ts.map +1 -0
  22. package/components/Checkbox/componentdata.json +259 -0
  23. package/components/Checkbox/index.d.ts +3 -0
  24. package/components/Checkbox/index.d.ts.map +1 -0
  25. package/components/Checkbox/index.js +2 -0
  26. package/components/Checkbox/index.js.map +1 -0
  27. package/components/Checkbox/styles.module.scss +191 -0
  28. package/components/Checkbox/styles.module.scss.d.ts +25 -0
  29. package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
  30. package/components/ExpanderList/index.js +1 -1
  31. package/components/FormExample/FormExample.d.ts +13 -0
  32. package/components/FormExample/FormExample.d.ts.map +1 -0
  33. package/components/FormExample/componentdata.json +63 -0
  34. package/components/FormExample/index.d.ts +3 -0
  35. package/components/FormExample/index.d.ts.map +1 -0
  36. package/components/FormExample/index.js +2 -0
  37. package/components/FormExample/index.js.map +1 -0
  38. package/components/FormGroup/FormGroup.d.ts +26 -0
  39. package/components/FormGroup/FormGroup.d.ts.map +1 -0
  40. package/components/FormGroup/componentdata.json +183 -0
  41. package/components/FormGroup/index.d.ts +3 -0
  42. package/components/FormGroup/index.d.ts.map +1 -0
  43. package/components/FormGroup/index.js +2 -0
  44. package/components/FormGroup/index.js.map +1 -0
  45. package/components/FormGroup/styles.module.scss +79 -0
  46. package/components/FormGroup/styles.module.scss.d.ts +22 -0
  47. package/components/LinkList/LinkList.d.ts.map +1 -1
  48. package/components/LinkList/index.js +1 -1
  49. package/components/LinkList/styles.module.scss +1 -4
  50. package/components/LinkList/styles.module.scss.d.ts +0 -1
  51. package/components/Loader/index.js +1 -1
  52. package/components/Modal/index.js +1 -1
  53. package/components/Modal/styles.module.scss +1 -0
  54. package/components/NotificationPanel/NotificationPanel.d.ts +2 -0
  55. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  56. package/components/NotificationPanel/componentdata.json +19 -0
  57. package/components/NotificationPanel/index.js +1 -1
  58. package/components/NotificationPanel/styles.module.scss +4 -4
  59. package/components/Validation/Validation.d.ts +17 -0
  60. package/components/Validation/Validation.d.ts.map +1 -0
  61. package/components/Validation/componentdata.json +111 -0
  62. package/components/Validation/index.d.ts +3 -0
  63. package/components/Validation/index.d.ts.map +1 -0
  64. package/components/Validation/index.js +2 -0
  65. package/components/Validation/index.js.map +1 -0
  66. package/components/Validation/styles.module.scss +15 -0
  67. package/components/Validation/styles.module.scss.d.ts +10 -0
  68. package/package.json +2 -1
  69. package/scss/_palette.scss +1 -0
  70. package/uuid-484288be.js +2 -0
  71. package/uuid-484288be.js.map +1 -0
  72. package/Button-e2087687.js.map +0 -1
  73. package/Loader-3767cb6e.js +0 -2
  74. package/Loader-3767cb6e.js.map +0 -1
  75. package/Modal-459c67d7.js +0 -2
  76. package/Modal-459c67d7.js.map +0 -1
  77. package/components/Tabs/componentdata.json +0 -3
@@ -0,0 +1,10 @@
1
+ export type Styles = {
2
+ validation__errors: string;
3
+ 'validation__errors--bigform': string;
4
+ };
5
+
6
+ export type ClassNames = keyof Styles;
7
+
8
+ declare const styles: Styles;
9
+
10
+ export default styles;
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",
4
+ "version": "1.0.0-beta83",
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
+ 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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid-484288be.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -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":""}
@@ -1,3 +0,0 @@
1
- {
2
- "props": {}
3
- }