@helsenorge/designsystem-react 1.0.0-beta75 → 1.0.0-beta76
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.
- package/Button-79ff79f4.js +2 -0
- package/Button-79ff79f4.js.map +1 -0
- package/Modal-ab87aab2.js +2 -0
- package/{Modal-3353318a.js.map → Modal-ab87aab2.js.map} +1 -1
- package/color-acb834c6.js +2 -0
- package/color-acb834c6.js.map +1 -0
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/ButtonWithModal/index.js +1 -1
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/styles.module.scss +27 -15
- package/components/ExpanderList/styles.module.scss.d.ts +1 -2
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/index.d.ts +1 -0
- package/components/Icons/index.d.ts.map +1 -1
- package/components/Icons/index.js +1 -1
- package/components/LinkList/LinkList.d.ts +4 -3
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/componentdata.json +19 -4
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/styles.module.scss +33 -6
- package/components/LinkList/styles.module.scss.d.ts +2 -1
- package/components/Logo/index.js +1 -1
- package/components/Modal/index.js +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/Tile/Tile.d.ts.map +1 -1
- package/components/Tile/index.js +1 -1
- package/constants-d1f48e8e.js +2 -0
- package/constants-d1f48e8e.js.map +1 -0
- package/grid-11a70eb7.js +2 -0
- package/grid-11a70eb7.js.map +1 -0
- package/hooks/useBreakpoint.d.ts +9 -0
- package/hooks/useBreakpoint.d.ts.map +1 -0
- package/index-19b48c51.js +2 -0
- package/index-19b48c51.js.map +1 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/scss/_font-settings.scss +8 -4
- package/useBreakpoint-a8fa8a61.js +2 -0
- package/useBreakpoint-a8fa8a61.js.map +1 -0
- package/useWindowSize-c22d7634.js +2 -0
- package/useWindowSize-c22d7634.js.map +1 -0
- package/Button-f1380b34.js +0 -2
- package/Button-f1380b34.js.map +0 -1
- package/Icon-43100735.js +0 -2
- package/Icon-43100735.js.map +0 -1
- package/Modal-3353318a.js +0 -2
- package/color-d7bbcfcc.js +0 -2
- package/color-d7bbcfcc.js.map +0 -1
- package/index-cf9fa51d.js +0 -2
- package/index-cf9fa51d.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button-79ff79f4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal-
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-acb834c6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{I as r}from"../../
|
|
1
|
+
import e from"react";import{I as r,a}from"../../constants-d1f48e8e.js";import{g as t}from"../../color-acb834c6.js";import{u as o}from"../../useHover-57ad4df9.js";import l from"./styles.module.scss";import{c as s}from"../../index-9b84fabc.js";import"../../_tslib-51c8a283.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";var i=function(r){var a=r.isExtraSmall,t=r.isHovered,o=e.createElement("path",{d:"M33.305 14.659v14.546h-1.3V16.948L15.804 33.149l-.919-.92 16.27-16.27-12.394.001v-1.301z"}),l=e.createElement("path",{d:"M36.52 11.537v14.545h-1.3l-.001-12.347-19.415 19.414-.919-.92 19.393-19.392-12.302.001v-1.301z"}),s=e.createElement("path",{d:"M18.76 14.426v1.768h11.83L14.719 32.065l1.251 1.25 15.801-15.801v11.691h1.768V14.426z"});return a?t?e.createElement("path",{d:"M22.076 11.122v1.769h11.736L14.819 31.884l1.252 1.25 19.015-19.015v11.782h1.769V11.122z"}):s:t?l:o},m=e.forwardRef((function(m,c){var n=m.id,f=m.href,d=m.children,v=m.className,p=m.target,h=void 0===p?"_self":p,u="_blank"===h,b=o(c,void 0,!1),j=b.hoverRef,E=b.isHovered,g=s(l.anchorlink,null!=v?v:"");return e.createElement("a",{id:n,href:f,className:g,target:h,ref:j},d,u&&e.createElement(r,{className:l.anchorlink__icon,svgIcon:i,color:t("blueberry",600),hoverColor:t("blueberry",700),size:a.XSmall,isHovered:E}))}));export default m;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{I as a}from"../../
|
|
1
|
+
import e from"react";import{I as a,a as t}from"../../constants-d1f48e8e.js";import{c as r}from"../../index-9b84fabc.js";import l from"./styles.module.scss";import{p as s}from"../../palette-f206f488.js";import"../../_tslib-51c8a283.js";var o=function(a){var t=a.isExtraSmall,r=a.isHovered,l=e.createElement("path",{d:"M22.504 31.198l-9.59-9.966 1.441-1.387 8.149 8.468 14.455-15.016 1.441 1.386z"}),s=e.createElement("path",{d:"M22.504 31.198l-7.816-8.121 1.441-1.387 6.375 6.623 15.859-16.474 1.44 1.386z"}),o=e.createElement("path",{d:"M22.504 31.578l-9.781-10.162 1.822-1.752 7.959 8.269 14.265-14.819 1.821 1.752z"});return t?r?e.createElement("path",{d:"M22.504 31.578l-7.816-8.124 1.82-1.75 5.996 6.229 16.321-16.956 1.821 1.752z"}):o:r?s:l},c=e.forwardRef((function(c,m){var n=c.children,i=c.className,d=void 0===i?"":i,p=c.selected,f=void 0!==p&&p,v=c.variant,b=void 0===v?"normal":v,u=n.charAt(0).toLocaleUpperCase()+n.substring(1,2);return e.createElement("span",{className:r(l.avatar,f&&l["avatar--selected"],"black"===b&&l["avatar--black"],d),ref:m},f?e.createElement(a,{svgIcon:o,size:t.Small,color:"black"===b?s.neutral900:s.blueberry600}):u)}));export default c;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s}from"../../Button-79ff79f4.js";export{B as default}from"../../Button-79ff79f4.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"../../_tslib-51c8a283.js";import"react";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../constants-d1f48e8e.js";import"../../Loader-ad8bcd78.js";import"../../index-9b84fabc.js";import"../Loader/styles.module.scss";import"../../useHover-57ad4df9.js";import"../../useWindowSize-c22d7634.js";import"./styles.module.scss";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import
|
|
1
|
+
import{_ as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import e,{useState as o}from"react";import{B as r}from"../../Button-79ff79f4.js";import{M as s}from"../../Modal-ab87aab2.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";import"../../constants-d1f48e8e.js";import"../../Loader-ad8bcd78.js";import"../../index-9b84fabc.js";import"../Loader/styles.module.scss";import"../../useHover-57ad4df9.js";import"../../useWindowSize-c22d7634.js";import"../Button/styles.module.scss";import"../../AlertSignFill-64bfef57.js";import"../Modal/styles.module.scss";import"../../Title-863af332.js";import"../Title/styles.module.scss";import"crypto";var i=e.forwardRef((function(i){var m=o(!1),l=t(m,2),a=l[0],n=l[1];return e.createElement("div",null,e.createElement(r,{onClick:function(){return n(!0)}},i.buttonText),a&&e.createElement(s,Object.assign({},i,{onClose:function(){return n(!1)}})))}));export default i;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpanderList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpanderList/ExpanderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpanderList.d.ts","sourceRoot":"","sources":["../../../src/components/ExpanderList/ExpanderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYnD,oBAAY,kBAAkB,GAAG,YAAY,CAAC;AAC9C,oBAAY,YAAY,GAAG,KAAK,CAAC,yBAAyB,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;AAE/G,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACtI,QAAQ,EAAE,YAAY,CAAC;CACxB;AAMD,UAAU,iBAAiB;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,aAAK,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AAEzC,aAAK,aAAa,GAAG,MAAM,CACzB,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,EACvC;IACE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClF,CACF,CAAC;AAmEF,eAAO,MAAM,YAAY,sBA8DC,CAAC;AAK3B,eAAe,YAAY,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,a as n}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import t,{useState as a,useEffect as r}from"react";import{I as
|
|
1
|
+
import{_ as e,a as n}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import t,{useState as a,useEffect as r}from"react";import{a as i,I as l}from"../../constants-d1f48e8e.js";import{u as o}from"../../useHover-57ad4df9.js";import{u as d,B as s}from"../../useBreakpoint-a8fa8a61.js";import{c}from"../../index-9b84fabc.js";import m from"./styles.module.scss";import"../../_tslib-51c8a283.js";import"../../useWindowSize-c22d7634.js";import"../../grid-11a70eb7.js";var p=function(e){var n=e.isExtraSmall,a=e.isHovered,r=t.createElement("path",{d:"M15.049 30.277l-1.419-1.409 10.371-10.451L34.37 28.868l-1.419 1.409L24 21.257z"}),i=t.createElement("path",{d:"M24.001 10.14L36.37 22.591 34.951 24 25 13.985V35h-2V13.985L13.049 24l-1.419-1.409z"}),l=t.createElement("path",{d:"M32.577 30.115l1.793-1.779-10.371-10.451L13.63 28.336l1.793 1.779 8.576-8.644z"});return n?a?t.createElement("path",{d:"M23.999 9.043L36.897 22.02l-1.794 1.78-9.841-9.9.001 20.205h-2.526L22.736 13.9l-9.839 9.9-1.794-1.78z"}):l:a?i:r},u=function(e){var n=e.isExtraSmall,a=e.isHovered,r=t.createElement("path",{d:"M32.951 18.788l1.419 1.409-10.371 10.451L13.63 20.197l1.419-1.409L24 27.809z"}),i=t.createElement("path",{d:"M25 13v20.083l9.951-10.013 1.419 1.409L23.999 36.93 11.63 24.479l1.419-1.409L23 33.085V13z"}),l=t.createElement("path",{d:"M32.577 17.885l1.793 1.779-10.371 10.451L13.63 19.664l1.793-1.779 8.576 8.644z"});return n?a?t.createElement("path",{d:"M25 13v20.083l9.951-10.013 1.419 1.409L23.999 36.93 11.63 24.479l1.419-1.409L23 33.085V13z"}):l:a?i:r},v=t.forwardRef((function(e,a){var r,v=e.id,f=e.children,x=e.padding,E=void 0===x||x,h=e.color,_=void 0===h?"neutral":h,g=e.className,k=void 0===g?"":g,L=e.icon,N=e.large,b=void 0!==N&&N,z=e.title,j=e.isExpanded,H=void 0!==j&&j,w=e.testId,M=void 0===w?"":w,B=e.handleExpanderClick,C=o(),S=C.hoverRef,V=C.isHovered,y=d(),I=c(m["expander-list-link"],m["expander-list-link--".concat(_)],(n(r={},m["expander-list-link--closed"],!H),n(r,m["expander-list-link--large"],b),r)),O=c(m["expander-list-link__main-content"],E?m["expander-list-link__main-content--padding"]:""),P=c(m["expander-list-link__icon-container"],m["expander-list-link__icon-container--hasmargin"]);return t.createElement("li",{className:k,ref:a},t.createElement("button",{id:v,onClick:B,"data-testid":M,className:I,ref:S},t.createElement("span",{className:m["expander-list-link__link-content"]},L?t.createElement("span",{className:P},t.cloneElement(L,{className:m["expander-list-link__icon"],size:y===s.Xs?i.XSmall:i.Small,isHovered:V})):null,z),t.createElement("span",{className:m["expander-list-link__icon-container"]},t.createElement(l,{className:m["expander-list-link__icon"],size:i.XSmall,svgIcon:H?p:u,isHovered:V}))),H?t.createElement("div",{className:O},f):null)}));var f=t.forwardRef((function(i,l){var o=i.children,d=i.childPadding,s=void 0===d||d,p=i.large,u=i.isOpen,f=void 0!==u&&u,x=i.color,E=i.className,h=void 0===E?"":E,_=i.accordion,g=void 0!==_&&_,k=i.topBorder,L=void 0===k||k,N=i.bottomBorder,b=void 0===N||N,z=a({}),j=e(z,2),H=j[0],w=j[1],M=a(),B=e(M,2),C=B[0],S=B[1],V=t.Children.count(o),y=c(m["expander-list"],h);function I(e){var t,a=(null===(t=e.currentTarget)||void 0===t?void 0:t.id)||function(e,n){var t=(e.path||e.composedPath&&e.composedPath()).find((function(e){return e.tagName===n}));return t?t.id:""}(e,"BUTTON");f||(w((function(e){return g?n({},a,!e[a]):Object.assign(Object.assign({},e),n({},a,!e[a]))})),S(e.currentTarget))}return r((function(){var e,n,t,a,r;!g||!C||(e=C.getBoundingClientRect(),n=e.top,t=e.left,a=e.bottom,r=e.right,n>=0&&t>=0&&a<=(window.innerHeight||document.documentElement.clientHeight)&&r<=(window.innerWidth||document.documentElement.clientWidth))||C.scrollIntoView()}),[g,C]),t.createElement("ul",{className:y,ref:l},t.Children.map(o,(function(e,a){if(e.type===v){var r=f||H["expander-".concat(a)],i=function(e){var t;return c(m["expander-list__item"],(n(t={},m["expander-list__item--top"],0===e&&L),n(t,m["expander-list__item--no-bottom"],e===V-1&&!b),t))}(a);return t.cloneElement(e,{id:"expander-".concat(a),key:"expander-".concat(a),isExpanded:r,padding:s,color:x,large:p,"aria-expanded":r,className:i,handleExpanderClick:I})}return e})))}));f.Expander=v,v.displayName="ExpanderList.Expander";export default f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@import '../../scss/_spacers.scss';
|
|
2
|
+
@import '../../scss/_breakpoints.scss';
|
|
3
|
+
@import '../../scss/_font-settings.scss';
|
|
1
4
|
@import '../../scss/_palette.scss';
|
|
2
5
|
|
|
3
6
|
.expander-list {
|
|
@@ -21,11 +24,19 @@
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.expander-list-link {
|
|
24
|
-
padding: 0
|
|
27
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
28
|
+
font-size: $font-size-sm;
|
|
29
|
+
line-height: $lineheight-size-sm;
|
|
30
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
31
|
+
padding-left: getSpacer(xs);
|
|
32
|
+
padding-right: getSpacer(xs);
|
|
33
|
+
font-size: $font-size-md;
|
|
34
|
+
line-height: $lineheight-size-md;
|
|
35
|
+
}
|
|
25
36
|
display: flex;
|
|
26
37
|
cursor: pointer;
|
|
27
|
-
font-
|
|
28
|
-
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
font-family: inherit;
|
|
29
40
|
text-decoration: none;
|
|
30
41
|
justify-content: space-between;
|
|
31
42
|
align-items: center;
|
|
@@ -101,8 +112,8 @@
|
|
|
101
112
|
}
|
|
102
113
|
|
|
103
114
|
&--large {
|
|
104
|
-
font-size:
|
|
105
|
-
line-height:
|
|
115
|
+
font-size: $font-size-lg;
|
|
116
|
+
line-height: $lineheight-size-lg;
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
&__link-content {
|
|
@@ -121,19 +132,20 @@
|
|
|
121
132
|
padding: 0;
|
|
122
133
|
|
|
123
134
|
&--padding {
|
|
124
|
-
padding:
|
|
135
|
+
padding: getSpacer(m) 0 getSpacer(m) 0;
|
|
136
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
137
|
+
padding-left: getSpacer(xs);
|
|
138
|
+
padding-right: getSpacer(xs);
|
|
139
|
+
}
|
|
125
140
|
}
|
|
126
141
|
}
|
|
127
142
|
|
|
128
|
-
&__icon {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.hnds-style-icon {
|
|
132
|
-
vertical-align: middle;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&--margin-right {
|
|
136
|
-
margin-right: 0.5rem;
|
|
143
|
+
&__icon-container {
|
|
144
|
+
&--hasmargin {
|
|
145
|
+
margin-right: getSpacer(xs);
|
|
137
146
|
}
|
|
138
147
|
}
|
|
148
|
+
&__icon {
|
|
149
|
+
vertical-align: middle;
|
|
150
|
+
}
|
|
139
151
|
}
|
|
@@ -5,7 +5,7 @@ export type Styles = {
|
|
|
5
5
|
'expander-list__item--top': string;
|
|
6
6
|
'expander-list-link': string;
|
|
7
7
|
'expander-list-link__icon': string;
|
|
8
|
-
'expander-list-link__icon--
|
|
8
|
+
'expander-list-link__icon-container--hasmargin': string;
|
|
9
9
|
'expander-list-link__link-content': string;
|
|
10
10
|
'expander-list-link__main-content': string;
|
|
11
11
|
'expander-list-link__main-content--padding': string;
|
|
@@ -18,7 +18,6 @@ export type Styles = {
|
|
|
18
18
|
'expander-list-link--neutral': string;
|
|
19
19
|
'expander-list-link--plum': string;
|
|
20
20
|
'expander-list-link--white': string;
|
|
21
|
-
'hnds-style-icon': string;
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
export type ClassNames = keyof Styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,aAAK,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;AAEtC,UAAU,SAAS;IAEjB,OAAO,EAAE,OAAO,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,YAAY;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,IAAI,iFA0CR,CAAC;AAIH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC"}
|
package/components/Icons/Icon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_tslib-51c8a283.js";import
|
|
1
|
+
import{_ as e}from"../../_tslib-51c8a283.js";import a from"react";import{a as i}from"../../constants-d1f48e8e.js";var o=a.forwardRef((function(o,t){var r=o.svgIcon,l=o.ariaLabel,s=o.id,d=o.className,c=void 0===d?"":d,m=o.size,n=void 0===m?i.Small:m,v=o.color,b=void 0===v?"black":v,f=o.hoverColor,h=void 0===f?b||"black":f,g=o.isHovered,p=void 0!==g&&g,I=o.testId,y=e(o,["svgIcon","ariaLabel","id","className","size","color","hoverColor","isHovered","testId"]),E=a.createElement(r,{isExtraSmall:n<=i.XSmall,isHovered:p}),H=s&&l?"title-".concat(s):void 0;return a.createElement("svg",Object.assign({id:s,"data-testid":I,ref:t,className:"hnds-style-icon ".concat(c),role:"img","aria-label":!s&&l?l:void 0,"aria-labelledby":H,"aria-hidden":"true",viewBox:"0 0 48 48",style:{minWidth:n,minHeight:n},width:n,height:n,fill:p?h:b},y),H&&a.createElement("title",{id:H},l),E)}));o.displayName="Icon";export{o as Icon};
|
|
2
2
|
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,eAAe,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as
|
|
1
|
+
import{I as s}from"../../constants-d1f48e8e.js";export{I as Icon,a as IconSize,I as default}from"../../constants-d1f48e8e.js";import"../../_tslib-51c8a283.js";import"react";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PaletteNames } from '../../theme/palette';
|
|
3
|
+
export declare type LinkListSize = 'small' | 'medium' | 'large';
|
|
3
4
|
export declare type LinkListColors = PaletteNames;
|
|
4
5
|
export declare type LinkType = React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLLIElement>>;
|
|
5
6
|
export interface CompoundComponent extends React.ForwardRefExoticComponent<LinkListProps & React.RefAttributes<HTMLUListElement>> {
|
|
@@ -18,13 +19,13 @@ interface LinkListProps {
|
|
|
18
19
|
bottomBorder?: boolean;
|
|
19
20
|
/** Toggles the top border of the first child element. */
|
|
20
21
|
topBorder?: boolean;
|
|
21
|
-
/** Changes the
|
|
22
|
-
|
|
22
|
+
/** Changes size of the LinkList. */
|
|
23
|
+
size?: LinkListSize;
|
|
23
24
|
}
|
|
24
25
|
export interface LinkProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
25
26
|
children: React.ReactNode;
|
|
26
27
|
color?: LinkListColors;
|
|
27
|
-
|
|
28
|
+
size?: LinkListSize;
|
|
28
29
|
chevron?: boolean;
|
|
29
30
|
className?: string;
|
|
30
31
|
icon?: React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.d.ts","sourceRoot":"","sources":["../../../src/components/LinkList/LinkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"LinkList.d.ts","sourceRoot":"","sources":["../../../src/components/LinkList/LinkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQnD,oBAAY,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAExD,oBAAY,cAAc,GAAG,YAAY,CAAC;AAC1C,oBAAY,QAAQ,GAAG,KAAK,CAAC,yBAAyB,CAAC,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;AACvG,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,yBAAyB,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC/H,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,4BAA4B;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,KAAK,EAAE,cAAc,CAAC;IACtB,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IACxE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAgDD,eAAO,MAAM,QAAQ,mBAqBE,CAAC;AAKxB,eAAe,QAAQ,CAAC"}
|
|
@@ -141,10 +141,10 @@
|
|
|
141
141
|
"name": "boolean"
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
-
"
|
|
144
|
+
"size": {
|
|
145
145
|
"defaultValue": null,
|
|
146
|
-
"description": "Changes the
|
|
147
|
-
"name": "
|
|
146
|
+
"description": "Changes size of the LinkList.",
|
|
147
|
+
"name": "size",
|
|
148
148
|
"parent": {
|
|
149
149
|
"fileName": "src/components/LinkList/LinkList.tsx",
|
|
150
150
|
"name": "LinkListProps"
|
|
@@ -157,7 +157,22 @@
|
|
|
157
157
|
],
|
|
158
158
|
"required": false,
|
|
159
159
|
"type": {
|
|
160
|
-
"name": "
|
|
160
|
+
"name": "enum",
|
|
161
|
+
"raw": "\"small\" | \"medium\" | \"large\" | undefined",
|
|
162
|
+
"value": [
|
|
163
|
+
{
|
|
164
|
+
"value": "undefined"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"value": "\"small\""
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"value": "\"medium\""
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"value": "\"large\""
|
|
174
|
+
}
|
|
175
|
+
]
|
|
161
176
|
}
|
|
162
177
|
}
|
|
163
178
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as
|
|
1
|
+
import{a as e}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as l}from"../../_tslib-51c8a283.js";import i from"react";import{c as a}from"../../index-9b84fabc.js";import{a as r,I as n}from"../../constants-d1f48e8e.js";import{u as o,B as s}from"../../useBreakpoint-a8fa8a61.js";import{u as t}from"../../useHover-57ad4df9.js";import c from"./styles.module.scss";import"../../useWindowSize-c22d7634.js";import"../../grid-11a70eb7.js";var m=function(e){var l=e.isExtraSmall,a=e.isHovered,r=i.createElement("path",{d:"M19.171 32.951l1.409 1.42L31.031 24 20.58 13.63l-1.409 1.42 9.02 8.95z"}),n=i.createElement("path",{d:"M24.479 11.63L36.93 23.999 24.479 36.37l-1.409-1.419L33.083 25H13v-2h20.085L23.07 13.049z"}),o=i.createElement("path",{d:"M17.885 32.577l1.779 1.793 10.451-10.371L19.664 13.63l-1.779 1.793 8.644 8.576z"});return l?a?i.createElement("path",{d:"M25.98 11.103l12.977 12.896L25.98 36.897l-1.78-1.794 9.899-9.841-20.204.001v-2.526l20.204-.001-9.899-9.839z"}):o:a?n:r},d=i.forwardRef((function(d,f){var _,p=d.children,v=d.className,h=void 0===v?"":v,u=d.color,k=void 0===u?"neutral":u,E=d.icon,z=d.size,N=void 0===z?"medium":z,b=d.chevron,L=void 0!==b&&b,j=l(d,["children","className","color","icon","size","chevron"]),g=t(),H=g.hoverRef,B=g.isHovered,S=o(),M="small"!==N&&!(!L&&!E);return i.createElement("li",{ref:f},i.createElement("a",Object.assign({className:a(c["link-list__anchor"],c["link-list__anchor--"+k],(_={},e(_,c["link-list__anchor--hasicon"],M),e(_,c["link-list__anchor--small"],"small"===N),e(_,c["link-list__anchor--medium"],"medium"===N),e(_,c["link-list__anchor--large"],"large"===N),_),h),ref:H},j),i.createElement("span",{className:c["link-list__content"]},M&&E&&i.createElement("span",{className:"".concat(c["link-list__icon-container"]," ").concat(c["link-list__icon-container--hasmargin"])},i.cloneElement(E,{className:c["link-list__icon"],size:S===s.Xs?r.XSmall:r.Small,isHovered:B})),p),M&&L&&i.createElement("span",{className:c["link-list__icon-container"]},i.createElement(n,{className:c["link-list__icon"],svgIcon:m,isHovered:B,size:r.XSmall}))))})),f=i.forwardRef((function(l,r){var n,o=l.children,s=l.className,t=void 0===s?"":s,m=l.chevron,f=void 0!==m&&m,_=l.size,p=void 0===_?"medium":_,v=l.color,h=l.topBorder,u=void 0===h||h,k=l.bottomBorder,E=void 0===k||k;return i.createElement("ul",{ref:r,className:a(c["link-list"],(n={},e(n,c["link-list--hastopborder"],u),e(n,c["link-list--nobottomborder"],!E),n),t||"")},i.Children.map(o,(function(e){if(e.type===d)return i.cloneElement(e,{color:v,size:p,chevron:f})})))}));f.Link=d,d.displayName="LinkList.Link";export default f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -25,10 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
&__anchor {
|
|
27
27
|
display: flex;
|
|
28
|
-
padding: getSpacer(xs);
|
|
29
28
|
min-height: 4.5rem;
|
|
30
|
-
font-size: $font-size-md;
|
|
31
|
-
line-height: $lineheight-size-md;
|
|
32
29
|
text-decoration: none;
|
|
33
30
|
justify-content: space-between;
|
|
34
31
|
align-items: center;
|
|
@@ -38,9 +35,40 @@
|
|
|
38
35
|
&--hasicon {
|
|
39
36
|
min-height: unset;
|
|
40
37
|
}
|
|
38
|
+
&--small {
|
|
39
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
40
|
+
font-size: $font-size-xs;
|
|
41
|
+
line-height: $lineheight-size-xs;
|
|
42
|
+
}
|
|
43
|
+
&--medium {
|
|
44
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
45
|
+
font-size: $font-size-sm;
|
|
46
|
+
line-height: $lineheight-size-sm;
|
|
47
|
+
}
|
|
41
48
|
&--large {
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
padding: getSpacer(xs) 0 getSpacer(xs) 0;
|
|
50
|
+
font-size: $font-size-md;
|
|
51
|
+
line-height: $lineheight-size-md;
|
|
52
|
+
}
|
|
53
|
+
@media (min-width: map-get($grid-breakpoints, md)) {
|
|
54
|
+
&--small {
|
|
55
|
+
padding-left: getSpacer(xs);
|
|
56
|
+
padding-right: getSpacer(xs);
|
|
57
|
+
font-size: $font-size-sm;
|
|
58
|
+
line-height: $lineheight-size-sm;
|
|
59
|
+
}
|
|
60
|
+
&--medium {
|
|
61
|
+
padding-left: getSpacer(xs);
|
|
62
|
+
padding-right: getSpacer(xs);
|
|
63
|
+
font-size: $font-size-md;
|
|
64
|
+
line-height: $lineheight-size-md;
|
|
65
|
+
}
|
|
66
|
+
&--large {
|
|
67
|
+
padding-left: getSpacer(xs);
|
|
68
|
+
padding-right: getSpacer(xs);
|
|
69
|
+
font-size: $font-size-lg;
|
|
70
|
+
line-height: $lineheight-size-lg;
|
|
71
|
+
}
|
|
44
72
|
}
|
|
45
73
|
|
|
46
74
|
&--banana {
|
|
@@ -109,7 +137,6 @@
|
|
|
109
137
|
}
|
|
110
138
|
|
|
111
139
|
&__icon-container {
|
|
112
|
-
width: getSpacer(xl);
|
|
113
140
|
&--hasmargin {
|
|
114
141
|
margin-right: getSpacer(xs);
|
|
115
142
|
}
|
|
@@ -8,12 +8,13 @@ export type Styles = {
|
|
|
8
8
|
'link-list__anchor--hasicon': string;
|
|
9
9
|
'link-list__anchor--kiwi': string;
|
|
10
10
|
'link-list__anchor--large': string;
|
|
11
|
+
'link-list__anchor--medium': string;
|
|
11
12
|
'link-list__anchor--neutral': string;
|
|
12
13
|
'link-list__anchor--plum': string;
|
|
14
|
+
'link-list__anchor--small': string;
|
|
13
15
|
'link-list__anchor--white': string;
|
|
14
16
|
'link-list__content': string;
|
|
15
17
|
'link-list__icon': string;
|
|
16
|
-
'link-list__icon-container': string;
|
|
17
18
|
'link-list__icon-container--hasmargin': string;
|
|
18
19
|
'link-list--hastopborder': string;
|
|
19
20
|
'link-list--nobottomborder': string;
|
package/components/Logo/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"../../_tslib-51c8a283.js";import c from"react";import{g as l}from"../../color-
|
|
1
|
+
import{_ as e}from"../../_tslib-51c8a283.js";import c from"react";import{g as l}from"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../palette-f206f488.js";import"../../grid-11a70eb7.js";var t=function(e){var t=e.size,v=void 0===t?300:t,h=e.color,i=void 0===h?"black":h,r=e.className,a=void 0===r?"":r;return c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 502 220",className:a},c.createElement("title",{id:"logo-title"},"Helsenorge"),c.createElement("g",{fill:l(i,500)},c.createElement("path",{d:"M39.8 2.5v26.9H17V2.5H1v69.9h16V43.6h22.8v28.8h16.1V2.5zM250.3 58.6V2.5h-16v69.9h43.5V58.6zM142.9 122.5c-16.1 0-27.4 13.6-27.4 33.1s11.2 33.1 27.4 33.1 27.4-13.6 27.4-33.1-11.3-33.1-27.4-33.1zm19 33.1c0 11.9-5 25.9-19 25.9s-19-13.9-19-25.9c0-11.9 5-25.9 19-25.9s19 14 19 25.9zM501 40c0-19.1-11.1-32.4-27-32.4-16.4 0-27.4 13.3-27.4 33.1 0 19.5 11.5 33.1 28 33.1 12.2 0 21.4-6 24.7-16.2l.5-1.6h-8.3l-.3.7c-2.8 6.2-8.8 9.8-16.6 9.8-12.9 0-18.5-11.5-19.5-22.7H501V40zm-8.3-3.2h-37.6c1-10.8 6.5-21.9 18.9-21.9 13.2 0 18.3 12.6 18.7 21.9zM30.4 122.4c-10.8 0-16.6 6.7-19.5 11.8v-9.9H3.3v62.6h8.1v-31.4c0-8.4 4.4-25.7 18.1-25.7 14 0 15.9 12 15.9 25v32.1h8.1v-32.1c.1-16.1-2.7-32.4-23.1-32.4zM134.3 59V43H157V30h-22.7V15.9H165V2.5h-46.4v69.9h47.3V59zM466.7 173.4v-16h22.7v-13h-22.7v-14.1h30.7v-13.4H451v69.9h47.3v-13.4zM246.7 140.5v-16.3h-7.6v62.6h8.1v-37.6l27.3-19.6v-9zM393.5 120.6l-14.7 10.5c-4.4-5.6-11.2-8.7-18.8-8.7-13.6 0-23.6 9.8-23.6 23.3 0 10.6 6.2 19.1 16 22.2l-16 17.5c-4 4.6-5.7 8.3-5.7 12.7 0 12.6 11.1 20.7 28.2 20.7 16.9 0 28.3-8.3 28.3-20.7 0-12.5-11.1-20.6-28.3-20.6-1.7 0-3.9.2-5.6.5l8-9c12.9-.7 22.2-10.4 22.2-23.3 0-2.8-.4-5.5-1.2-7.8 0-.1-.1-.2-.1-.3l11.2-8.1v-8.9zm-34.4 64.2c12.1 0 20 5.2 20 13.4s-7.8 13.5-20 13.5c-12.1 0-19.9-5.3-19.9-13.5 0-7.8 8.3-13.4 19.9-13.4zm.9-23c-8.8 0-15.2-6.8-15.2-16 0-9.3 6.4-16 15.2-16s15.2 6.7 15.2 16c0 9.2-6.4 16-15.2 16zM366.7 30.3c-6.6-2.3-13.5-4.7-13.5-9.2 0-4.8 4.2-7 9.3-7 5.4 0 9 4.5 9 8.5v.8h16.2v-.6c0-13-10.2-21.7-25.4-21.7-15.3 0-24.9 7.8-24.9 20.4 0 14.7 13.1 18.4 22.9 21.9 6.5 2.4 13.6 4.3 13.6 8.7 0 4.6-3.4 8-10.6 8-6.5 0-10.9-3.8-10.9-9.4v-.8h-16.7v.8c0 14.5 10.3 23.1 27.5 23.1 16.5 0 26-7.6 26-21.5 0-14.4-12.5-18.5-22.5-22z"})))},v=function(e){var t=e.size,v=void 0===t?300:t,h=e.color,i=void 0===h?"black":h,r=e.className,a=void 0===r?"":r;return c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:v,role:"img","aria-labelledby":"logo-title",viewBox:"0 0 87 12",className:a},c.createElement("title",{id:"logo-title"},"Helsenorge"),c.createElement("g",{fill:l(i,500)},c.createElement("path",{d:"M5 .8v2.8H2.6V.8H1V8h1.6V5.1H5V8h1.6V.8zM20.9 6.6V.8h-1.6V8h4.5V6.6zM57.9 1.4c-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.8 3.4 2.8-1.4 2.8-3.4-1.1-3.4-2.8-3.4zm2 3.4c0 1.2-.5 2.7-2 2.7-1.4 0-2-1.4-2-2.7s.5-2.7 2-2.7 2 1.5 2 2.7zM86 4.7c0-2-1.1-3.3-2.8-3.3-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.9 3.4c1.2 0 2.2-.6 2.5-1.7l.1-.2H85v.1c-.3.6-.9 1-1.7 1-1.3 0-1.9-1.2-2-2.3H86v-.4zm-.9-.3h-3.9c.1-1.1.7-2.3 1.9-2.3 1.5 0 2 1.3 2 2.3zM49.2 1.4c-1.1 0-1.7.7-2 1.2v-1h-.8V8h.8V4.8c0-.9.5-2.6 1.9-2.6s1.6 1.2 1.6 2.6V8h.8V4.7c0-1.6-.2-3.3-2.3-3.3zM12.1 6.6V5h2.4V3.7h-2.4V2.2h3.2V.8h-4.8V8h4.9V6.6zM38.3 6.6V5h2.3V3.7h-2.3V2.2h3.2V.8h-4.8V8h4.9V6.6zM65.5 3.3V1.6h-.8V8h.8V4.1l2.8-2v-.9zM77.6 1.2l-1.5 1.1c-.5-.6-1.1-.9-1.9-.9-1.4 0-2.4 1-2.4 2.4 0 1.1.6 2 1.6 2.3l-1.6 1.8c-.4.5-.6.9-.6 1.3 0 1.3 1.1 2.1 2.9 2.1 1.7 0 2.9-.9 2.9-2.1 0-1.3-1.1-2.1-2.9-2.1h-.6l.8-.9c1.3-.1 2.3-1.1 2.3-2.4 0-.3 0-.6-.1-.8l1.2-.8v-1zM74 7.8c1.2 0 2.1.5 2.1 1.4 0 .8-.8 1.4-2.1 1.4-1.2 0-2-.5-2-1.4 0-.8.8-1.4 2-1.4zm.1-2.4c-.9 0-1.6-.7-1.6-1.7s.7-1.6 1.6-1.6c.9 0 1.6.7 1.6 1.6 0 1-.7 1.7-1.6 1.7zM30.4 3.7c-.7-.2-1.4-.5-1.4-1s.4-.7 1-.7.9.5.9.9V3h1.7v-.1c0-1.3-1.1-2.2-2.6-2.2-1.6 0-2.6.8-2.6 2.1 0 1.5 1.3 1.9 2.4 2.3.7.2 1.4.4 1.4.9s-.3.8-1.1.8c-.7 0-1.1-.4-1.1-1v-.1h-1.7v.1c0 1.5 1.1 2.4 2.8 2.4 1.7 0 2.7-.8 2.7-2.2-.1-1.5-1.4-2-2.4-2.3z"})))};export default function(l){var h=l.byline,i=void 0!==h&&h,r=e(l,["byline"]);return i?c.createElement(v,Object.assign({},r)):c.createElement(t,Object.assign({},r))}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as s}from"../../Modal-
|
|
1
|
+
import{M as s}from"../../Modal-ab87aab2.js";export{M as default}from"../../Modal-ab87aab2.js";import"react";import"../../index-9b84fabc.js";import"../../palette-f206f488.js";import"../../Button-79ff79f4.js";import"../../_rollupPluginBabelHelpers-e1c7fe69.js";import"../../_tslib-51c8a283.js";import"../../color-acb834c6.js";import"../../index-19b48c51.js";import"../../grid-11a70eb7.js";import"../../constants-d1f48e8e.js";import"../../Loader-ad8bcd78.js";import"../Loader/styles.module.scss";import"../../useHover-57ad4df9.js";import"../../useWindowSize-c22d7634.js";import"../Button/styles.module.scss";import"../../AlertSignFill-64bfef57.js";import"./styles.module.scss";import"../../Title-863af332.js";import"../Title/styles.module.scss";import"crypto";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -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
|
|
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;
|
|
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"}
|
package/components/Tile/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,a as t}from"../../_rollupPluginBabelHelpers-e1c7fe69.js";import{_ as i}from"../../_tslib-51c8a283.js";import
|
|
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":""}
|
package/grid-11a70eb7.js
ADDED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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-
|
|
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
package/scss/_font-settings.scss
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
$font-size-
|
|
2
|
-
$font-size-
|
|
3
|
-
$
|
|
4
|
-
$
|
|
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
|
|
@@ -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":""}
|
package/Button-f1380b34.js
DELETED
|
@@ -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
|
package/Button-f1380b34.js.map
DELETED
|
@@ -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
|
package/Icon-43100735.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon-43100735.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
|
package/color-d7bbcfcc.js
DELETED
package/color-d7bbcfcc.js.map
DELETED
|
@@ -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
|
package/index-cf9fa51d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-cf9fa51d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|