@helsenorge/designsystem-react 1.0.0-beta76 → 1.0.0-beta80

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 (89) hide show
  1. package/Button-7200b617.js +2 -0
  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/Button.d.ts.map +1 -1
  17. package/components/Button/index.js +1 -1
  18. package/components/Button/styles.module.scss +49 -35
  19. package/components/Button/styles.module.scss.d.ts +12 -25
  20. package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -1
  21. package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
  22. package/components/ButtonWithModal/componentdata.json +3 -0
  23. package/components/ButtonWithModal/index.js +1 -1
  24. package/components/Checkbox/Checkbox.d.ts +31 -0
  25. package/components/Checkbox/Checkbox.d.ts.map +1 -0
  26. package/components/Checkbox/componentdata.json +259 -0
  27. package/components/Checkbox/index.d.ts +3 -0
  28. package/components/Checkbox/index.d.ts.map +1 -0
  29. package/components/Checkbox/index.js +2 -0
  30. package/components/Checkbox/index.js.map +1 -0
  31. package/components/Checkbox/styles.module.scss +191 -0
  32. package/components/Checkbox/styles.module.scss.d.ts +25 -0
  33. package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
  34. package/components/ExpanderList/index.js +1 -1
  35. package/components/ExpanderList/styles.module.scss +14 -10
  36. package/components/ExpanderList/styles.module.scss.d.ts +2 -2
  37. package/components/FormExample/FormExample.d.ts +13 -0
  38. package/components/FormExample/FormExample.d.ts.map +1 -0
  39. package/components/FormExample/componentdata.json +63 -0
  40. package/components/FormExample/index.d.ts +3 -0
  41. package/components/FormExample/index.d.ts.map +1 -0
  42. package/components/FormExample/index.js +2 -0
  43. package/components/FormExample/index.js.map +1 -0
  44. package/components/FormGroup/FormGroup.d.ts +26 -0
  45. package/components/FormGroup/FormGroup.d.ts.map +1 -0
  46. package/components/FormGroup/componentdata.json +183 -0
  47. package/components/FormGroup/index.d.ts +3 -0
  48. package/components/FormGroup/index.d.ts.map +1 -0
  49. package/components/FormGroup/index.js +2 -0
  50. package/components/FormGroup/index.js.map +1 -0
  51. package/components/FormGroup/styles.module.scss +79 -0
  52. package/components/FormGroup/styles.module.scss.d.ts +22 -0
  53. package/components/LinkList/LinkList.d.ts.map +1 -1
  54. package/components/LinkList/index.js +1 -1
  55. package/components/LinkList/styles.module.scss +13 -10
  56. package/components/LinkList/styles.module.scss.d.ts +1 -1
  57. package/components/Loader/Loader.d.ts +8 -0
  58. package/components/Loader/Loader.d.ts.map +1 -1
  59. package/components/Loader/componentdata.json +76 -0
  60. package/components/Loader/index.js +1 -1
  61. package/components/Loader/styles.module.scss +24 -0
  62. package/components/Loader/styles.module.scss.d.ts +3 -0
  63. package/components/Modal/Modal.d.ts +2 -1
  64. package/components/Modal/Modal.d.ts.map +1 -1
  65. package/components/Modal/componentdata.json +3 -0
  66. package/components/Modal/index.js +1 -1
  67. package/components/Modal/styles.module.scss +102 -66
  68. package/components/Modal/styles.module.scss.d.ts +19 -11
  69. package/components/Validation/Validation.d.ts +17 -0
  70. package/components/Validation/Validation.d.ts.map +1 -0
  71. package/components/Validation/componentdata.json +111 -0
  72. package/components/Validation/index.d.ts +3 -0
  73. package/components/Validation/index.d.ts.map +1 -0
  74. package/components/Validation/index.js +2 -0
  75. package/components/Validation/index.js.map +1 -0
  76. package/components/Validation/styles.module.scss +15 -0
  77. package/components/Validation/styles.module.scss.d.ts +10 -0
  78. package/package.json +3 -4
  79. package/scss/_palette.scss +3 -0
  80. package/utils/uuid.d.ts +2 -0
  81. package/utils/uuid.d.ts.map +1 -0
  82. package/uuid-484288be.js +2 -0
  83. package/uuid-484288be.js.map +1 -0
  84. package/Button-79ff79f4.js +0 -2
  85. package/Button-79ff79f4.js.map +0 -1
  86. package/Loader-ad8bcd78.js +0 -2
  87. package/Loader-ad8bcd78.js.map +0 -1
  88. package/Modal-ab87aab2.js +0 -2
  89. package/Modal-ab87aab2.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 ExpanderList",
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 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";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
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
+
11
+ &--bigform {
12
+ margin-left: getSpacer(l);
13
+ }
14
+ }
15
+ }
@@ -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-beta76",
4
+ "version": "1.0.0-beta80",
5
5
  "description": "The official design system for Helsenorge built with React.",
6
6
  "repository": {
7
7
  "type": "tfs",
@@ -28,8 +28,7 @@
28
28
  "styled-components": "^5.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "bootstrap": "4.4.1",
32
- "uuid": "8.3.2"
31
+ "bootstrap": "4.4.1"
33
32
  },
34
33
  "devDependencies": {
35
34
  "@babel/core": "^7.8.3",
@@ -57,7 +56,6 @@
57
56
  "@types/prettier": "1.19.0",
58
57
  "@types/styled-components": "5.0.1",
59
58
  "@types/testing-library__react": "^10.0.5",
60
- "@types/uuid": "8.3.1",
61
59
  "async": "^3.1.0",
62
60
  "babel-loader": "^8.0.6",
63
61
  "classnames": "^2.2.6",
@@ -76,6 +74,7 @@
76
74
  "react-docgen-typescript": "^1.22.0",
77
75
  "react-docgen-typescript-loader": "^3.3.0",
78
76
  "react-dom": "16.12.0",
77
+ "react-hook-form": "^6.15.8",
79
78
  "resolve-url-loader": "^3.1.1",
80
79
  "rimraf": "^3.0.2",
81
80
  "rollup": "^2.10.9",
@@ -67,6 +67,9 @@ $plum700: #5b22a6;
67
67
  $plum800: #4c1b8c;
68
68
  $plum900: #3c1471;
69
69
 
70
+ $inverted-hover: #ffffff0d;
71
+ $transparentGrey: rgba(102, 102, 102, 0.75);
72
+
70
73
  $palette-map: (
71
74
  'banana50': $banana50,
72
75
  'banana100': $banana100,
@@ -0,0 +1,2 @@
1
+ export declare const uuid: () => string;
2
+ //# sourceMappingURL=uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/utils/uuid.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,cAMhB,CAAC"}
@@ -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,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 i}from"./constants-d1f48e8e.js";import{L as l}from"./Loader-ad8bcd78.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 b={primary:"blueberry",warning:"banana",danger:"cherry"};var f=function(t,e){return e&&e<d.md&&t?i.Small:t?i.Medium:i.XSmall},m=o.forwardRef((function(d,m){var v,g,_,p=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,i=null,l=null;return void 0!==(null===(n=null===(e=t[0])||void 0===e?void 0:e.props)||void 0===n?void 0:n.svgIcon)&&(i=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)&&(l=t.pop()),[i,l,t]}(o.Children.toArray(p)),J=t(G,3),K=J[0],Q=J[1],T=J[2],U=a(m),V=U.hoverRef,Y=U.isHovered,Z=function(t,e,n,o,i){return e?r("neutral",600):t&&!o||!t&&o?"white":r(b[n],i?700:600)}("fill"===x,R,N,C,Y),$=s(),tt="fill"===x,et="outline"===x,nt="borderless"===x,ot="warning"===N,rt="danger"===N,it=!(!K&&!Q),lt=it&&!F&&!nt,at=it&&!F&&nt,st=Object.assign({},D),dt=u(c.button,(e(v={},c["button--fluid"],E),e(v,c["button--large"],z),e(v,c["button--fill"],tt),e(v,c["button--fill-warning"],tt&&ot),e(v,c["button--fill-danger"],tt&&rt),e(v,c["button--fill-inverted"],tt&&C),e(v,c["button--fill-not-inverted"],tt&&!C),e(v,c["button--outline"],et),e(v,c["button--outline-warning"],et&&ot),e(v,c["button--outline-danger"],et&&rt),e(v,c["button--outline-inverted"],et&&C),e(v,c["button--borderless"],nt),e(v,c["button--borderless-warning"],nt&&ot),e(v,c["button--borderless-danger"],nt&&rt),e(v,c["button--borderless-inverted"],nt&&C),e(v,c["button--with-icon"],lt),e(v,c["button--large-with-icon"],lt&&z),e(v,c["button--ellipsis-with-icon"],lt&&A),e(v,c["button--borderless-with-icon"],at),e(v,c["button--large-borderless-with-icon"],at&&z),v),w),ut=u(c.button__content,(e(g={},c["button__content--fill"],tt),e(g,c["button__content--fill-warning"],tt&&ot),e(g,c["button__content--fill-danger"],tt&&rt),e(g,c["button__content--fill-not-inverted"],tt&&!C),e(g,c["button__content--borderless"],nt),e(g,c["button__content--borderless-warning"],nt&&ot),e(g,c["button__content--borderless-danger"],nt&&rt),e(g,c["button__content--borderless-inverted"],nt&&C),e(g,c["button__content--with-icon"],lt),e(g,c["button__content--large-with-icon"],lt&&z),e(g,c["button__content--ellipsis-with-icon"],lt&&A),e(g,c["button__content--fluid-with-icon"],lt&&E),e(g,c["button__content--large-fluid-with-icon"],lt&&E&&z),g)),ct=u(c["button__left-fluid-content"],(e(_={},c["button__left-fluid-content--with-icon"],it),e(_,c["button__left-fluid-content--large-with-icon"],it&&z),_));function bt(t,e,n,r){var i=t&&t.props&&t.props.color?t.props.color:n;return t&&Object.keys(t).length>0?o.cloneElement(t,{size:e,color:i,isHovered:r}):null}var ft=function(){return o.createElement("span",{className:ut},T)},mt=function(){return o.createElement("span",{className:c["content-wrapper"]},F?o.createElement("div",{className:c["button__left-fluid-content"]},o.createElement(l,{testId:"test-id-loader",color:"fill"!==x||C?b[N]:"white",size:"tiny"})):o.createElement(o.Fragment,null,E?o.createElement("div",{className:ct},bt(K,f(z,$.width),Z,Y),ft()):o.createElement(o.Fragment,null,bt(K,f(z,$.width),Z,Y),ft()),bt(Q,i.XSmall,Z,Y)))};return o.createElement(o.Fragment,null,"button"===H&&o.createElement("button",Object.assign({onClick:O,disabled:R,"data-testid":P,className:dt,ref:V},st),mt()),"a"===H&&o.createElement("a",Object.assign({onClick:O,"data-testid":P,className:dt,href:W,target:q,ref:V},D),mt()))}));export{m as B};
2
- //# sourceMappingURL=Button-79ff79f4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-79ff79f4.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 l}from"./index-9b84fabc.js";import r from"./components/Loader/styles.module.scss";var o=a.forwardRef((function(o,d){var t,m,s=o.color,i=void 0===s?"neutral":s,c=o.size,_=void 0===c?"small":c,n=o.className,u=void 0===n?"":n,v=o.testId,p=void 0===v?"":v,f="small"===_,b="medium"===_,N="large"===_,w=l(r.loader,(e(t={},r["loader--small"],f),e(t,r["loader--medium"],b),e(t,r["loader--large"],N),t),u),E=l(r.loader__dot,(e(m={},r["loader__dot--small"],f),e(m,r["loader__dot--medium"],b),e(m,r["loader__dot--large"],N),e(m,r["loader__dot--banana"],"banana"===i),e(m,r["loader__dot--cherry"],"cherry"===i),e(m,r["loader__dot--kiwi"],"kiwi"===i),e(m,r["loader__dot--neutral"],"neutral"===i),e(m,r["loader__dot--plum"],"plum"===i),e(m,r["loader__dot--black"],"black"===i),e(m,r["loader__dot--white"],"white"===i),m));return a.createElement("div",{"data-testid":p,className:w},a.createElement("div",{className:E}),a.createElement("div",{className:E}),a.createElement("div",{className:E}),a.createElement("div",{className:E}))}));export{o as L};
2
- //# sourceMappingURL=Loader-ad8bcd78.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loader-ad8bcd78.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/Modal-ab87aab2.js DELETED
@@ -1,2 +0,0 @@
1
- import e,{useRef as t,useEffect as r}from"react";import{c as n}from"./index-9b84fabc.js";import{p as a}from"./palette-f206f488.js";import{B as o}from"./Button-79ff79f4.js";import{I as l}from"./constants-d1f48e8e.js";import{X as i,A as c,a as s}from"./AlertSignFill-64bfef57.js";import u from"./components/Modal/styles.module.scss";import{T as d}from"./Title-863af332.js";import m from"crypto";var v=new Uint8Array(256),f=v.length;function p(){return f>v.length-16&&(m.randomFillSync(v),f=0),v.slice(f,f+=16)}var y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var E,b=[],g=0;g<256;++g)b.push((g+256).toString(16).substr(1));function k(e,t){void 0===t&&(t=0);var r=(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&y.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}function h(e,t,r){var n=(e=e||{}).random||(e.rng||p)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return k(n)}function L(){var e=t(null);function n(t){var r=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select'),n=r[0],a=1===r.length?n:r[r.length-1];"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(a.focus(),t.preventDefault()):document.activeElement===a&&(n.focus(),t.preventDefault()))}function a(t){var r=e.current.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select');1===r.length&&(r[0].focus(),t.preventDefault())}return r((function(){var t=e.current;return t.addEventListener("keydown",n),t.addEventListener("click",a),function(){t.removeEventListener("keydown",n),t.removeEventListener("click",a)}}),[]),e}!function(e){e.normal="normal",e.warning="warning",e.error="error"}(E||(E={}));var C={variant:E.normal,primaryButtonText:"OK",large:!1,className:""},x=function(t){return e.createElement("button",{className:u.lukkekryss,"aria-label":t.ariaLabel||"Lukk",onClick:t.onClick,autoFocus:!0,role:"button"},e.createElement(l,{svgIcon:i,color:a.blueberry600,size:42}))},B=e.forwardRef((function(t,i){var m,v,f;function p(e){"Escape"===e.key&&t.onClose&&(e.stopPropagation(),t.onClose())}function y(e){e.target&&C.current===e.target&&t.onClose&&(e.stopPropagation(),t.onClose())}var b,g=null!==(m=t.titleId)&&void 0!==m?m:h(),k=e.useRef(null),C=e.useRef(null),B=t.secondaryButtonText&&(null===(v=t.secondaryButtonText)||void 0===v?void 0:v.length)>0||t.onSuccess,w=t.ariaLabelledBy?void 0:t.ariaLabel,N=t.ariaLabelledBy?t.ariaLabelledBy:t.ariaLabel?void 0:g;return r((function(){var e=k.current,t=C.current;return document.body.style.overflow="hidden",e&&(e.addEventListener("keydown",p),t.addEventListener("click",y)),function(){document.body.style.removeProperty("overflow"),e.removeEventListener("keydown",p),t.removeEventListener("click",y)}})),e.createElement("div",{ref:k,"data-testid":"dialog-container"},e.createElement("div",{ref:C,className:u["modal-overlay"],"data-testid":t.testId},e.createElement("div",{className:u.align,ref:L()},e.createElement("div",{className:n(t.className,u.modal,u[t.variant],t.large?u.large:""),role:"dialog","aria-label":w,"aria-labelledby":N},!t.noCloseButton&&e.createElement("div",{className:u.close},e.createElement(x,{onClick:t.onClose,ariaLabel:t.ariaLabelCloseBtn})),e.createElement("div",{className:u.contentWrapper},e.createElement("div",{className:u.title},t.variant&&((b=t.variant)===E.error?e.createElement("div",null,e.createElement(l,{svgIcon:c,color:a.cherry500,hoverColor:a.cherry500})):b===E.warning?e.createElement("div",null,e.createElement(l,{svgIcon:s,color:a.black,hoverColor:a.black})):null),e.createElement("div",null,e.createElement(d,{id:g,htmlMarkup:"h3",appearance:"title3"},t.title))),e.createElement("div",{className:u.content},t.children&&e.createElement("div",null,t.children),t.description&&!t.children&&e.createElement("p",{className:u.description},t.description)),B&&e.createElement("div",{className:u.actions},t.onSuccess&&e.createElement(o,{onClick:t.onSuccess},t.primaryButtonText),t.secondaryButtonText&&(null===(f=t.secondaryButtonText)||void 0===f?void 0:f.length)>0&&e.createElement(o,{variant:"borderless",onClick:t.onClose},t.secondaryButtonText)))))))}));B.defaultProps=C;export{B as M};
2
- //# sourceMappingURL=Modal-ab87aab2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal-ab87aab2.js","sources":["../node_modules/uuid/dist/esm-node/rng.js","../node_modules/uuid/dist/esm-node/regex.js","../node_modules/uuid/dist/esm-node/stringify.js","../node_modules/uuid/dist/esm-node/validate.js","../node_modules/uuid/dist/esm-node/v4.js"],"sourcesContent":["import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;"],"names":["const","rnds8Pool","Uint8Array","poolPtr","length","rng","crypto","randomFillSync","slice","byteToHex","i","push","toString","substr","stringify","arr","offset","uuid","toLowerCase","REGEX","test","validate","TypeError","v4","options","buf","rnds","random","let"],"mappings":"yYACAA,IAAMC,EAAY,IAAIC,WAAW,KAE7BC,EAAUF,EAAUG,OACT,SAASC,IAMtB,OALIF,EAAUF,EAAUG,OAAS,KAC/BE,EAAOC,eAAeN,GACtBE,EAAU,GAGLF,EAAUO,MAAML,EAASA,GAAW,ICV7C,MAAe,sHCQf,IAFAH,MAAMS,EAAY,GAETC,EAAI,EAAGA,EAAI,MAAOA,EACzBD,EAAUE,MAAMD,EAAI,KAAOE,SAAS,IAAIC,OAAO,IAGjD,SAASC,EAAUC,EAAKC,kBAAS,GAG/BhB,IAAMiB,GAAQR,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAM,IAAMP,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAM,IAAMP,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAM,IAAMP,EAAUM,EAAIC,EAAS,IAAMP,EAAUM,EAAIC,EAAS,IAAM,IAAMP,EAAUM,EAAIC,EAAS,KAAOP,EAAUM,EAAIC,EAAS,KAAOP,EAAUM,EAAIC,EAAS,KAAOP,EAAUM,EAAIC,EAAS,KAAOP,EAAUM,EAAIC,EAAS,KAAOP,EAAUM,EAAIC,EAAS,MAAME,cAM3f,ICnBF,SAAkBD,GAChB,MAAuB,iBAATA,GAAqBE,EAAMC,KAAKH,GDkBzCI,CAASJ,GACZ,MAAMK,UAAU,+BAGlB,OAAOL,EEtBT,SAASM,EAAGC,EAASC,EAAKT,GAExBhB,IAAM0B,GADNF,EAAUA,GAAW,IACAG,SAAWH,EAAQnB,KAAOA,KAK/C,GAHAqB,EAAK,GAAe,GAAVA,EAAK,GAAY,GAC3BA,EAAK,GAAe,GAAVA,EAAK,GAAY,IAEvBD,EAAK,CACPT,EAASA,GAAU,EAEnB,IAAKY,IAAIlB,EAAI,EAAGA,EAAI,KAAMA,EACxBe,EAAIT,EAASN,GAAKgB,EAAKhB,GAGzB,OAAOe,EAGT,OAAOX,EAAUY"}