@helsenorge/designsystem-react 1.0.0-beta75 → 1.0.0-beta79

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 (75) hide show
  1. package/Button-619210b9.js +2 -0
  2. package/Button-619210b9.js.map +1 -0
  3. package/Loader-084dd998.js +2 -0
  4. package/Loader-084dd998.js.map +1 -0
  5. package/Modal-52971fb1.js +2 -0
  6. package/Modal-52971fb1.js.map +1 -0
  7. package/color-acb834c6.js +2 -0
  8. package/color-acb834c6.js.map +1 -0
  9. package/components/AnchorLink/index.js +1 -1
  10. package/components/Avatar/index.js +1 -1
  11. package/components/Button/Button.d.ts.map +1 -1
  12. package/components/Button/index.js +1 -1
  13. package/components/Button/styles.module.scss +49 -35
  14. package/components/Button/styles.module.scss.d.ts +12 -25
  15. package/components/ButtonWithModal/componentdata.json +3 -0
  16. package/components/ButtonWithModal/index.js +1 -1
  17. package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
  18. package/components/ExpanderList/index.js +1 -1
  19. package/components/ExpanderList/styles.module.scss +35 -19
  20. package/components/ExpanderList/styles.module.scss.d.ts +2 -3
  21. package/components/Icons/Icon.d.ts.map +1 -1
  22. package/components/Icons/Icon.js +1 -1
  23. package/components/Icons/index.d.ts +1 -0
  24. package/components/Icons/index.d.ts.map +1 -1
  25. package/components/Icons/index.js +1 -1
  26. package/components/LinkList/LinkList.d.ts +4 -3
  27. package/components/LinkList/LinkList.d.ts.map +1 -1
  28. package/components/LinkList/componentdata.json +19 -4
  29. package/components/LinkList/index.js +1 -1
  30. package/components/LinkList/styles.module.scss +46 -16
  31. package/components/LinkList/styles.module.scss.d.ts +3 -2
  32. package/components/Loader/Loader.d.ts +8 -0
  33. package/components/Loader/Loader.d.ts.map +1 -1
  34. package/components/Loader/componentdata.json +76 -0
  35. package/components/Loader/index.js +1 -1
  36. package/components/Loader/styles.module.scss +24 -0
  37. package/components/Loader/styles.module.scss.d.ts +3 -0
  38. package/components/Logo/index.js +1 -1
  39. package/components/Modal/Modal.d.ts +2 -1
  40. package/components/Modal/Modal.d.ts.map +1 -1
  41. package/components/Modal/componentdata.json +3 -0
  42. package/components/Modal/index.js +1 -1
  43. package/components/Modal/styles.module.scss +102 -66
  44. package/components/Modal/styles.module.scss.d.ts +19 -11
  45. package/components/NotificationPanel/index.js +1 -1
  46. package/components/Tile/Tile.d.ts.map +1 -1
  47. package/components/Tile/index.js +1 -1
  48. package/constants-d1f48e8e.js +2 -0
  49. package/constants-d1f48e8e.js.map +1 -0
  50. package/grid-11a70eb7.js +2 -0
  51. package/grid-11a70eb7.js.map +1 -0
  52. package/hooks/useBreakpoint.d.ts +9 -0
  53. package/hooks/useBreakpoint.d.ts.map +1 -0
  54. package/index-19b48c51.js +2 -0
  55. package/index-19b48c51.js.map +1 -0
  56. package/index.js +1 -1
  57. package/package.json +1 -1
  58. package/scss/_font-settings.scss +8 -4
  59. package/scss/_palette.scss +2 -0
  60. package/useBreakpoint-a8fa8a61.js +2 -0
  61. package/useBreakpoint-a8fa8a61.js.map +1 -0
  62. package/useWindowSize-c22d7634.js +2 -0
  63. package/useWindowSize-c22d7634.js.map +1 -0
  64. package/Button-f1380b34.js +0 -2
  65. package/Button-f1380b34.js.map +0 -1
  66. package/Icon-43100735.js +0 -2
  67. package/Icon-43100735.js.map +0 -1
  68. package/Loader-ad8bcd78.js +0 -2
  69. package/Loader-ad8bcd78.js.map +0 -1
  70. package/Modal-3353318a.js +0 -2
  71. package/Modal-3353318a.js.map +0 -1
  72. package/color-d7bbcfcc.js +0 -2
  73. package/color-d7bbcfcc.js.map +0 -1
  74. package/index-cf9fa51d.js +0 -2
  75. package/index-cf9fa51d.js.map +0 -1
@@ -1,20 +1,28 @@
1
1
  export type Styles = {
2
- actions: string;
3
2
  align: string;
4
- close: string;
5
- content: string;
6
- contentWrapper: string;
7
- description: string;
8
- error: string;
9
- large: string;
10
- lukkekryss: string;
11
3
  modal: string;
4
+ modal__actions: string;
5
+ modal__close: string;
6
+ 'modal__close--image': string;
7
+ modal__contentWrapper: string;
8
+ modal__contentWrapper__content: string;
9
+ 'modal__contentWrapper__content--image': string;
10
+ modal__contentWrapper__title: string;
11
+ 'modal__contentWrapper--image': string;
12
+ modal__description: string;
13
+ modal__lukkekryss: string;
14
+ 'modal--error': string;
15
+ 'modal--error__title': string;
16
+ 'modal--image': string;
17
+ 'modal--image__img': string;
18
+ 'modal--image__text': string;
19
+ 'modal--large': string;
20
+ 'modal--normal': string;
21
+ 'modal--warning': string;
22
+ 'modal--warning__title': string;
12
23
  'modal-overlay': string;
13
24
  'modal-overlay--lowerzindex': string;
14
- normal: string;
15
25
  open: string;
16
- title: string;
17
- warning: string;
18
26
  };
19
27
 
20
28
  export type ClassNames = keyof Styles;
@@ -1,2 +1,2 @@
1
- import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as o}from"../../index-9b84fabc.js";import{p as n}from"../../palette-f206f488.js";import{I as t}from"../../Icon-43100735.js";import{u as i}from"../../useHover-57ad4df9.js";import{a as r,A as l,X as c}from"../../AlertSignFill-64bfef57.js";import s from"./styles.module.scss";import"../../_tslib-51c8a283.js";var m={info:a.createElement(t,{svgIcon:function(e){var o=e.isExtraSmall,n=e.isHovered,t=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 10.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),i=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 8.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),r=a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 10.61a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"});return o?n?a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 8.084a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"}):r:n?i:t},color:n.kiwi900,hoverColor:n.kiwi900}),warn:a.createElement(t,{svgIcon:r,color:"black",hoverColor:"black"}),alert:a.createElement(t,{svgIcon:l,color:n.cherry500,hoverColor:n.cherry500}),alertLabel:a.createElement(t,{svgIcon:r,color:n.cherry500,hoverColor:n.cherry500}),crisis:a.createElement(t,{svgIcon:l,color:n.banana200,hoverColor:n.banana200})},f=a.forwardRef((function(r,l){var f,v,p=r.children,d=r.variant,h=void 0===d?"info":d,_=r.shadow,u=void 0!==_&&_,b=r.dismissable,E=void 0!==b&&b,C=r.onClick,w=r.label,g=r.fluid,y=void 0!==g&&g,I=r.size,M=r.className,N=i(void 0,E),j=N.hoverRef,S=N.isHovered,k=o(s["notification-panel__close-button"],"crisis"===h?s["notification-panel__close-button--crisis"]:"");var H;return H=a.createElement("div",{ref:l,className:o(s["notification-panel"],s["notification-panel--"+I],s["notification-panel--"+h],(f={},e(f,s["notification-panel--shadow"],!y&&u),e(f,s["notification-panel--haslabel"],!!w&&!p),e(f,s["notification-panel--dismissable"],E),f),M||"")},a.createElement("span",{className:s["notification-panel__icon"]},m["alert"===h&&w&&!p?"alertLabel":h]),a.createElement("section",{"aria-label":function(){if(p){var e="";return a.Children.map(p,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:o(s["notification-panel__content"],(v={},e(v,s["notification-panel__content--crisis"],"crisis"===h),e(v,s["notification-panel__content--haslabel"],!!w&&!p),e(v,s["notification-panel__content--isred"],"alert"===h&&!!w&&!p),v))},w?a.createElement("h1",{className:s["notification-panel__label"],dangerouslySetInnerHTML:{__html:w}}):null,p),E?a.createElement("span",{className:s["notification-panel__action-column"]},a.createElement("button",{className:k,onClick:C,ref:j},a.createElement(t,{svgIcon:c,isHovered:S,size:38,color:"crisis"===h?n.white:n.blueberry500,hoverColor:"crisis"===h?n.white:n.blueberry700}))):null),y?a.createElement("div",{className:o(s["notification-panel__fluidwrapper"],s["notification-panel__fluidwrapper--"+h],e({},s["notification-panel__fluidwrapper--shadow"],u))},H):H}));export default f;
1
+ import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import a from"react";import{c as o}from"../../index-9b84fabc.js";import{p as t}from"../../palette-f206f488.js";import{I as n,a as i}from"../../constants-d1f48e8e.js";import{u as r}from"../../useHover-57ad4df9.js";import{a as l,A as c,X as s}from"../../AlertSignFill-64bfef57.js";import m from"./styles.module.scss";import"../../_tslib-51c8a283.js";var f={info:a.createElement(n,{svgIcon:function(e){var o=e.isExtraSmall,t=e.isHovered,n=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 10.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),i=a.createElement("path",{d:"M25.672 30.501a.682.682 0 01-.322-.272.835.835 0 01-.11-.443v-7.917l-.112-.112-3.651.194v.544c.148.015.314.05.495.104.18.055.316.112.406.172a.994.994 0 01.299.316.88.88 0 01.119.459v6.337a.879.879 0 01-.098.443.623.623 0 01-.335.257c-.09.035-.197.06-.32.074a8.883 8.883 0 01-.38.038v.544h4.709v-.544a2.45 2.45 0 01-.7-.194M24 37.604c-7.5 0-13.604-6.103-13.604-13.604 0-7.501 6.104-13.603 13.604-13.603 7.502 0 13.602 6.102 13.602 13.603 0 7.501-6.1 13.604-13.601 13.604m0-28.909C15.56 8.695 8.694 15.562 8.694 24c0 8.438 6.867 15.305 15.305 15.305 8.438 0 15.304-6.867 15.304-15.305 0-8.438-6.866-15.305-15.304-15.305m-.274 8.632a1.559 1.559 0 100-3.118 1.559 1.559 0 000 3.118"}),r=a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 10.61a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"});return o?t?a.createElement("path",{d:"M25.668 30.487a.68.68 0 01-.32-.271.833.833 0 01-.111-.442v-7.9l-.112-.112-3.643.193v.543c.148.015.313.05.495.104.18.055.315.112.405.172a.991.991 0 01.297.315.877.877 0 01.119.458v6.324c0 .182-.032.33-.097.442a.622.622 0 01-.334.256c-.09.035-.197.06-.32.074-.124.015-.25.028-.38.038v.543h4.7v-.543a2.445 2.445 0 01-.699-.194M24 37.575c-7.485 0-13.575-6.09-13.575-13.575 0-7.485 6.09-13.574 13.575-13.574 7.486 0 13.574 6.089 13.574 13.574 0 7.485-6.088 13.575-13.574 13.575m0-28.848C15.58 8.727 8.728 15.58 8.728 24S15.579 39.273 24 39.273c8.42 0 15.272-6.853 15.272-15.273S32.421 8.727 24 8.727m-.274 8.084a1.556 1.556 0 100-3.112 1.556 1.556 0 000 3.112"}):r:t?i:n},color:t.kiwi900,hoverColor:t.kiwi900}),warn:a.createElement(n,{svgIcon:l,color:"black",hoverColor:"black"}),alert:a.createElement(n,{svgIcon:c,color:t.cherry500,hoverColor:t.cherry500}),alertLabel:a.createElement(n,{svgIcon:l,color:t.cherry500,hoverColor:t.cherry500}),crisis:a.createElement(n,{svgIcon:c,color:t.banana200,hoverColor:t.banana200})},v=a.forwardRef((function(l,c){var v,p,d=l.children,h=l.variant,_=void 0===h?"info":h,u=l.shadow,b=void 0!==u&&u,E=l.dismissable,C=void 0!==E&&E,w=l.onClick,g=l.label,y=l.fluid,M=void 0!==y&&y,I=l.size,N=l.className,S=r(void 0,C),j=S.hoverRef,k=S.isHovered,H=o(m["notification-panel__close-button"],"crisis"===_?m["notification-panel__close-button--crisis"]:"");var x;return x=a.createElement("div",{ref:c,className:o(m["notification-panel"],m["notification-panel--"+I],m["notification-panel--"+_],(v={},e(v,m["notification-panel--shadow"],!M&&b),e(v,m["notification-panel--haslabel"],!!g&&!d),e(v,m["notification-panel--dismissable"],C),v),N||"")},a.createElement("span",{className:m["notification-panel__icon"]},f["alert"===_&&g&&!d?"alertLabel":_]),a.createElement("section",{"aria-label":function(){if(d){var e="";return a.Children.map(d,(function(a){"string"==typeof a&&(e+=a)})),e}return""}(),className:o(m["notification-panel__content"],(p={},e(p,m["notification-panel__content--crisis"],"crisis"===_),e(p,m["notification-panel__content--haslabel"],!!g&&!d),e(p,m["notification-panel__content--isred"],"alert"===_&&!!g&&!d),p))},g?a.createElement("h1",{className:m["notification-panel__label"],dangerouslySetInnerHTML:{__html:g}}):null,d),C?a.createElement("span",{className:m["notification-panel__action-column"]},a.createElement("button",{className:H,onClick:w,ref:j},a.createElement(n,{svgIcon:s,isHovered:k,size:i.XSmall,color:"crisis"===_?t.white:t.blueberry500,hoverColor:"crisis"===_?t.white:t.blueberry700}))):null),M?a.createElement("div",{className:o(m["notification-panel__fluidwrapper"],m["notification-panel__fluidwrapper--"+_],e({},m["notification-panel__fluidwrapper--shadow"],b))},x):x}));export default v;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,UAAU,SAAU,SAAQ,eAAe;IACzC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAClG;AAqBD,eAAO,MAAM,IAAI,cAkCC,CAAC;AAInB,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,UAAU,SAAU,SAAQ,eAAe;IACzC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvH,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAClG;AAqBD,eAAO,MAAM,IAAI,cAkCC,CAAC;AAInB,eAAe,IAAI,CAAC"}
@@ -1,2 +1,2 @@
1
- import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as i}from"../../_tslib-51c8a283.js";import l,{useState as r}from"react";import{c as o}from"../../index-9b84fabc.js";import a from"./styles.module.scss";var c=l.forwardRef((function(e,i){var r,c=e.children,n=e.className,s=e.htmlMarkup,m=void 0===s?"span":s,d=e.highlighted,f=e.compact,p=o(a.tile__title,(t(r={},a["tile__title--highlighted"],d),t(r,a["tile__title--compact"],f),r),n),u=m;return l.createElement(u,{className:p,ref:i},c)})),n=l.forwardRef((function(c,n){var s,m=c.icon,d=c.title,f=c.className,p=void 0===f?"":f,u=c.description,h=c.fixed,g=void 0!==h&&h,_=c.highlighted,v=void 0!==_&&_,E=i(c,["icon","title","className","description","fixed","highlighted"]),N=r(!1),b=e(N,2),w=b[0],x=b[1],j=!u,M=o(a.tile,(t(s={},a["tile--fixed"],g),t(s,a["tile--compact"],j),t(s,a["tile--highlighted"],v),s),p),k=o(a["title-wrapper"],t({},a["title-wrapper--compact"],j));return l.createElement("a",Object.assign({ref:n,className:M,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)},onFocus:function(){return x(!0)},onBlur:function(){return x(!1)}},E),l.createElement("div",{className:k},l.cloneElement(m,{size:64,isHovered:w,color:v?"white":"black"}),l.cloneElement(d,{highlighted:v,compact:j})),u?l.createElement("p",{className:a.tile__description},u):null)}));n.Title=c;export default n;
1
+ import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as i}from"../../_tslib-51c8a283.js";import r,{useState as l}from"react";import{c as o}from"../../index-9b84fabc.js";import{a}from"../../constants-d1f48e8e.js";import c from"./styles.module.scss";var n=r.forwardRef((function(e,i){var l,a=e.children,n=e.className,s=e.htmlMarkup,m=void 0===s?"span":s,d=e.highlighted,f=e.compact,p=o(c.tile__title,(t(l={},c["tile__title--highlighted"],d),t(l,c["tile__title--compact"],f),l),n),u=m;return r.createElement(u,{className:p,ref:i},a)})),s=r.forwardRef((function(n,s){var m,d=n.icon,f=n.title,p=n.className,u=void 0===p?"":p,h=n.description,g=n.fixed,_=void 0!==g&&g,v=n.highlighted,E=void 0!==v&&v,N=i(n,["icon","title","className","description","fixed","highlighted"]),b=l(!1),j=e(b,2),w=j[0],x=j[1],M=!h,k=o(c.tile,(t(m={},c["tile--fixed"],_),t(m,c["tile--compact"],M),t(m,c["tile--highlighted"],E),m),u),B=o(c["title-wrapper"],t({},c["title-wrapper--compact"],M));return r.createElement("a",Object.assign({ref:s,className:k,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)},onFocus:function(){return x(!0)},onBlur:function(){return x(!1)}},N),r.createElement("div",{className:B},r.cloneElement(d,{size:a.Medium,isHovered:w,color:E?"white":"black"}),r.cloneElement(f,{highlighted:E,compact:M})),h?r.createElement("p",{className:c.tile__description},h):null)}));s.Title=n;export default s;
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-d1f48e8e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ var x={null:0,xs:360,sm:564,md:768,lg:1088,xl:1450},m={xs:"(min-width: ".concat(x.xs,"px)"),sm:"(min-width: ".concat(x.sm,"px)"),md:"(min-width: ".concat(x.md,"px)"),lg:"(min-width: ".concat(x.lg,"px)"),xl:"(min-width: ".concat(x.xl,"px)")};export{x as b,m as s};
2
+ //# sourceMappingURL=grid-11a70eb7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid-11a70eb7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare enum Breakpoint {
2
+ Xs,
3
+ Sm,
4
+ Md,
5
+ Lg,
6
+ Xl
7
+ }
8
+ export declare const useBreakpoint: () => Breakpoint | undefined;
9
+ //# sourceMappingURL=useBreakpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAIA,oBAAY,UAAU;IACpB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED,eAAO,MAAM,aAAa,8BAsBzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{p as s}from"./palette-f206f488.js";import{s as a,b as e}from"./grid-11a70eb7.js";var r={spacer:1,spacers:{0:0,1:1/8,2:1/4,3:.5,4:1,5:1.5,6:2,7:3,8:4,9:5,10:6,11:7,12:8},palette:s,screen:a,breakpoints:e};export{r as t};
2
+ //# sourceMappingURL=index-19b48c51.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-19b48c51.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{t as theme}from"./index-cf9fa51d.js";export{u as useHover}from"./useHover-57ad4df9.js";import"./palette-f206f488.js";import"./_rollupPluginBabelHelpers-e1c7fe69.js";import"react";
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";
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-beta75",
4
+ "version": "1.0.0-beta79",
5
5
  "description": "The official design system for Helsenorge built with React.",
6
6
  "repository": {
7
7
  "type": "tfs",
@@ -1,4 +1,8 @@
1
- $font-size-sm: 1.125rem;
2
- $font-size-md: 1.25rem;
3
- $lineheight-size-sm: 1.75rem;
4
- $lineheight-size-md: 1.875rem;
1
+ $font-size-xs: 1rem; // 16px
2
+ $font-size-sm: 1.125rem; // 18px
3
+ $font-size-md: 1.25rem; // 20px
4
+ $font-size-lg: 1.5rem; // 24px
5
+ $lineheight-size-xs: 1.5rem; // 28px
6
+ $lineheight-size-sm: 1.75rem; // 28px
7
+ $lineheight-size-md: 1.875rem; // 30px
8
+ $lineheight-size-lg: 2rem; // 32px
@@ -67,6 +67,8 @@ $plum700: #5b22a6;
67
67
  $plum800: #4c1b8c;
68
68
  $plum900: #3c1471;
69
69
 
70
+ $transparentGrey: rgba(102, 102, 102, 0.75);
71
+
70
72
  $palette-map: (
71
73
  'banana50': $banana50,
72
74
  'banana100': $banana100,
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBreakpoint-a8fa8a61.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWindowSize-c22d7634.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{b as t,_ as n,a as e}from"./_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as o}from"./_tslib-51c8a283.js";import i,{useState as r,useEffect as l}from"react";import{g as a}from"./color-d7bbcfcc.js";import{L as d}from"./Loader-ad8bcd78.js";import{u as s}from"./useHover-57ad4df9.js";import{b as u}from"./index-cf9fa51d.js";import{c}from"./index-9b84fabc.js";import b from"./components/Button/styles.module.scss";var f={primary:"blueberry",warning:"banana",danger:"cherry"};var v=function(t,n){return n&&n<u.md&&t?48:t?64:38},m=i.forwardRef((function(u,m){var g,_,p,w=u.children,h=u.className,E=void 0===h?"":h,j=u.fluid,y=void 0!==j&&j,N=u.intent,k=void 0===N?"primary":N,C=u.inverted,H=void 0!==C&&C,I=u.htmlMarkup,z=void 0===I?"button":I,L=u.onClick,O=u.large,x=void 0!==O&&O,B=u.loading,F=void 0!==B&&B,M=u.variant,R=void 0===M?"fill":M,A=u.disabled,P=void 0!==A&&A,W=u.ellipsis,q=void 0!==W&&W,D=u.testId,G=u.href,J=u.target,K=o(u,["children","className","fluid","intent","inverted","htmlMarkup","onClick","large","loading","variant","disabled","ellipsis","testId","href","target"]),Q=function(t){var n,e,o,i,r=null,l=null;return void 0!==(null===(e=null===(n=t[0])||void 0===n?void 0:n.props)||void 0===e?void 0:e.svgIcon)&&(r=t.shift()),void 0!==(null===(i=null===(o=t[t.length-1])||void 0===o?void 0:o.props)||void 0===i?void 0:i.svgIcon)&&(l=t.pop()),[r,l,t]}(i.Children.toArray(w)),S=n(Q,3),T=S[0],U=S[1],V=S[2],X=s(m),Y=X.hoverRef,Z=X.isHovered,$=function(t,n,e,o,i){return n?a("neutral",600):t&&!o||!t&&o?"white":a(f[e],i?700:600)}("fill"===R,P,k,H,Z),tt=function(){var e="object"===("undefined"==typeof window?"undefined":t(window));function o(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}var i=r(o),a=n(i,2),d=a[0],s=a[1];return l((function(){if(!e)return function(){};function t(){s(o())}return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),d}(),nt="fill"===R,et="outline"===R,ot="borderless"===R,it="warning"===k,rt="danger"===k,lt=!(!T&&!U),at=lt&&!F&&!ot,dt=lt&&!F&&ot,st=Object.assign({},K),ut=c(b.button,(e(g={},b["button--fluid"],y),e(g,b["button--large"],x),e(g,b["button--fill"],nt),e(g,b["button--fill-warning"],nt&&it),e(g,b["button--fill-danger"],nt&&rt),e(g,b["button--fill-inverted"],nt&&H),e(g,b["button--fill-not-inverted"],nt&&!H),e(g,b["button--outline"],et),e(g,b["button--outline-warning"],et&&it),e(g,b["button--outline-danger"],et&&rt),e(g,b["button--outline-inverted"],et&&H),e(g,b["button--borderless"],ot),e(g,b["button--borderless-warning"],ot&&it),e(g,b["button--borderless-danger"],ot&&rt),e(g,b["button--borderless-inverted"],ot&&H),e(g,b["button--with-icon"],at),e(g,b["button--large-with-icon"],at&&x),e(g,b["button--ellipsis-with-icon"],at&&q),e(g,b["button--borderless-with-icon"],dt),e(g,b["button--large-borderless-with-icon"],dt&&x),g),E),ct=c(b.button__content,(e(_={},b["button__content--fill"],nt),e(_,b["button__content--fill-warning"],nt&&it),e(_,b["button__content--fill-danger"],nt&&rt),e(_,b["button__content--fill-not-inverted"],nt&&!H),e(_,b["button__content--borderless"],ot),e(_,b["button__content--borderless-warning"],ot&&it),e(_,b["button__content--borderless-danger"],ot&&rt),e(_,b["button__content--borderless-inverted"],ot&&H),e(_,b["button__content--with-icon"],at),e(_,b["button__content--large-with-icon"],at&&x),e(_,b["button__content--ellipsis-with-icon"],at&&q),e(_,b["button__content--fluid-with-icon"],at&&y),e(_,b["button__content--large-fluid-with-icon"],at&&y&&x),_)),bt=c(b["button__left-fluid-content"],(e(p={},b["button__left-fluid-content--with-icon"],lt),e(p,b["button__left-fluid-content--large-with-icon"],lt&&x),p));function ft(t,n,e,o){var r=t&&t.props&&t.props.color?t.props.color:e;return t&&Object.keys(t).length>0?i.cloneElement(t,{size:n,color:r,isHovered:o}):null}var vt=function(){return i.createElement("span",{className:ct},V)},mt=function(){return i.createElement("span",{className:b["content-wrapper"]},F?i.createElement("div",{className:b["button__left-fluid-content"]},i.createElement(d,{testId:"test-id-loader",color:"fill"!==R||H?f[k]:"white",size:"tiny"})):i.createElement(i.Fragment,null,y?i.createElement("div",{className:bt},ft(T,v(x,tt.width),$,Z),vt()):i.createElement(i.Fragment,null,ft(T,v(x,tt.width),$,Z),vt()),ft(U,38,$,Z)))};return i.createElement(i.Fragment,null,"button"===z&&i.createElement("button",Object.assign({onClick:L,disabled:P,"data-testid":D,className:ut,ref:Y},st),mt()),"a"===z&&i.createElement("a",Object.assign({onClick:L,"data-testid":D,className:ut,href:G,target:J,ref:Y},K),mt()))}));export{m as B};
2
- //# sourceMappingURL=Button-f1380b34.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button-f1380b34.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/Icon-43100735.js DELETED
@@ -1,2 +0,0 @@
1
- import{_ as e}from"./_tslib-51c8a283.js";import i from"react";var a=i.forwardRef((function(a,o){var t=a.svgIcon,r=a.ariaLabel,l=a.id,s=a.className,d=void 0===s?"":s,c=a.size,v=void 0===c?48:c,n=a.color,m=void 0===n?"black":n,b=a.hoverColor,h=void 0===b?m||"black":b,f=a.isHovered,g=void 0!==f&&f,I=a.testId,p=e(a,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),y=i.createElement(t,{isExtraSmall:v<=38,isHovered:g}),E=l&&r?"title-".concat(l):void 0;return i.createElement("svg",Object.assign({id:l,"data-testid":I,ref:o,className:"hnds-style-icon ".concat(d),role:"img","aria-label":!l&&r?r:void 0,"aria-labelledby":E,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:v,minHeight:v},width:v,height:v,fill:g?h:m},p),E&&i.createElement("title",{id:E},r),y)}));a.displayName="Icon";export{a as I};
2
- //# sourceMappingURL=Icon-43100735.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icon-43100735.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-3353318a.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-f1380b34.js";import{I as l}from"./Icon-43100735.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-3353318a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal-3353318a.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":"oYACAA,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"}
package/color-d7bbcfcc.js DELETED
@@ -1,2 +0,0 @@
1
- import{t}from"./index-cf9fa51d.js";var n=function(n,a){return t.palette["".concat(n).concat(function(t){return"black"===t||"white"===t}(n)?"":a)]};export{n as g};
2
- //# sourceMappingURL=color-d7bbcfcc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color-d7bbcfcc.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/index-cf9fa51d.js DELETED
@@ -1,2 +0,0 @@
1
- import{p as t}from"./palette-f206f488.js";var s={null:0,xs:360,sm:564,md:768,lg:1088,xl:1450},a={spacer:1,spacers:{0:0,1:1/8,2:1/4,3:.5,4:1,5:1.5,6:2,7:3,8:4,9:5,10:6,11:7,12:8},palette:t,screen:{xs:"(min-width: ".concat(s.xs,"px)"),sm:"(min-width: ".concat(s.sm,"px)"),md:"(min-width: ".concat(s.md,"px)"),lg:"(min-width: ".concat(s.lg,"px)"),xl:"(min-width: ".concat(s.xl,"px)")},breakpoints:s};export{s as b,a as t};
2
- //# sourceMappingURL=index-cf9fa51d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-cf9fa51d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}