@leafygreen-ui/typography
Advanced tools
Comparing version 15.2.1 to 15.3.0
# @leafygreen-ui/typography | ||
## 15.3.0 | ||
### Minor Changes | ||
- 53d77f55d: Introduces Error component to Typography package | ||
## 15.2.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import e,{useState as n,useEffect as r,useMemo as t}from"react";import a from"@leafygreen-ui/box";import{css as o,cx as i}from"@leafygreen-ui/emotion";import{useBaseFontSize as l,useDarkMode as s,useUsingKeyboardContext as d}from"@leafygreen-ui/leafygreen-provider";import{Theme as c,createUniqueClassName as h,getNodeTextContent as f}from"@leafygreen-ui/lib";import{palette as m}from"@leafygreen-ui/palette";import{fontFamilies as u,typeScales as g,BaseFontSize as p,focusRing as y}from"@leafygreen-ui/tokens";import b from"prop-types";import x from"@leafygreen-ui/icon/dist/ArrowRight";import v from"@leafygreen-ui/icon/dist/OpenNewTab";function k(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function N(){return N=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},N.apply(this,arguments)}function w(e,n){if(null==e)return{};var r,t,a=function(e,n){if(null==e)return{};var r,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function z(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function F(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return D(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}var E,S,M,O,B,L,j,H,A,I,C,P,W,R,T,_,K,U,$,q,G,J=o(E||(E=z(["\n margin: unset;\n font-family: ",";\n color: ",";\n"])),u.default,m.black),Q=(k(O={},p.Body1,o(S||(S=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.body1.fontSize,g.body1.lineHeight)),k(O,p.Body2,o(M||(M=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.body2.fontSize,g.body2.lineHeight)),O),V=(k(j={},p.Body1,o(B||(B=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.code1.fontSize,g.code1.lineHeight)),k(j,p.Body2,o(L||(L=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.code2.fontSize,g.code2.lineHeight)),j),X=(k(I={},c.Light,o(H||(H=z(["\n color: ",";\n "])),m.black)),k(I,c.Dark,o(A||(A=z(["\n color: ",";\n "])),m.gray.light2)),I),Y=function(e){var n=l();return e?16===e?p.Body2:p.Body1:16===n?p.Body2:p.Body1},Z=["baseFontSize","darkMode","className","weight","as"],ee={default:{regular:400,medium:500},strong:{regular:700,medium:700}};function ne(n){var r=n.baseFontSize,t=n.darkMode,l=n.className,d=n.weight,c=void 0===d?"regular":d,h=n.as,f=void 0===h?"p":h,m=w(n,Z),u=s(t).theme,g=Y(r),p=o(C||(C=z(["\n font-weight: ",";\n strong,\n b {\n font-weight: ",";\n }\n "])),ee.default[c],ee.strong[c]);return e.createElement(a,N({as:f,className:i(J,Q[g],X[u],p,l)},m))}ne.displayName="Body";var re,te,ae,oe,ie=o(P||(P=z(["\n font-family: ",";\n font-weight: normal;\n margin-top: 0;\n margin-bottom: 0;\n"])),u.default),le=(k(T={},c.Light,o(W||(W=z(["\n color: ",";\n "])),m.gray.dark1)),k(T,c.Dark,o(R||(R=z(["\n color: ",";\n "])),m.gray.light1)),T),se=(k(U={},c.Light,o(_||(_=z(["\n color: ",";\n "])),m.gray.dark1)),k(U,c.Dark,o(K||(K=z(["\n color: ",";\n "])),m.gray.base)),U),de=(k(G={},p.Body1,o($||($=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.body1.fontSize,g.body1.lineHeight)),k(G,p.Body2,o(q||(q=z(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),g.body2.fontSize)),G),ce=["baseFontSize","darkMode","disabled","children","className"],he=function(n){var r=n.baseFontSize,t=n.darkMode,a=n.disabled,o=void 0!==a&&a,l=n.children,d=n.className,c=w(n,ce),h=s(t).theme,f=Y(r);return e.createElement("p",N({className:i(ie,le[h],de[f],k({},se[h],o),d)},c),l)};he.displayName="Description";var fe,me,ue,ge,pe=(k(ae={},c.Light,o(re||(re=z(["\n color: ",";\n "])),m.gray.dark1)),k(ae,c.Dark,o(te||(te=z(["\n color: ",";\n "])),m.gray.light1)),ae),ye=o(oe||(oe=z(["\n display: block;\n font-size: 11px;\n line-height: 16px;\n letter-spacing: 0.2px;\n"]))),be=["darkMode","children","className"];function xe(n){var r=n.darkMode,t=n.children,a=n.className,o=w(n,be),l=s(r).theme;return e.createElement("small",N({},o,{className:i(J,ye,pe[l],a)}),t)}xe.displayName="Disclaimer";var ve,ke,Ne,we,ze=o(fe||(fe=z(["\n font-weight: 400;\n font-size: 48px;\n line-height: 62px;\n font-family: ",";\n"])),u.serif),Fe=(k(ge={},c.Light,o(me||(me=z(["\n color: ",";\n "])),m.green.dark2)),k(ge,c.Dark,o(ue||(ue=z(["\n color: ",";\n "])),m.green.light1)),ge),De=["darkMode","className"],Ee=function(n){var r=n.darkMode,t=n.className,o=w(n,De),l=s(r).theme;return e.createElement(a,N({as:"h1",className:i(J,ze,Fe[l],t)},o))};Ee.displayName="H1";var Se,Me=o(ve||(ve=z(["\n font-size: 32px;\n line-height: 40px;\n font-weight: 400;\n font-family: ",";\n"])),u.serif),Oe=(k(we={},c.Light,o(ke||(ke=z(["\n color: ",";\n "])),m.green.dark2)),k(we,c.Dark,o(Ne||(Ne=z(["\n color: ",";\n "])),m.green.light1)),we),Be=["darkMode","className"],Le=function(n){var r=n.darkMode,t=n.className,o=w(n,Be),l=s(r).theme;return e.createElement(a,N({as:"h2",className:i(J,Me,Oe[l],t)},o))};Le.displayName="H2";var je,He,Ae,Ie,Ce,Pe,We,Re,Te,_e,Ke,Ue,$e,qe=o(Se||(Se=z(["\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n"]))),Ge=["darkMode","className"],Je=function(n){var r=n.darkMode,t=n.className,o=w(n,Ge),l=s(r).theme;return e.createElement(a,N({as:"h3",className:i(J,qe,X[l],t)},o))};Je.displayName="H3";var Qe,Ve,Xe,Ye,Ze=h(),en=o(je||(je=z(["\n display: inline;\n transition: all 0.15s ease-in-out;\n border-radius: 3px;\n font-family: ",";\n line-height: 20px;\n\n .",":hover > & {\n text-decoration: none;\n }\n"])),u.code,Ze),nn=(k(Ie={},c.Light,o(He||(He=z(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),m.gray.light3,m.gray.light2,m.gray.dark3,Ze,m.gray.light2,m.gray.light1)),k(Ie,c.Dark,o(Ae||(Ae=z(["\n background-color: transparent;\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),m.gray.dark2,m.gray.light1,Ze,m.gray.dark2,m.gray.dark1)),Ie),rn=(k(We={},c.Light,o(Ce||(Ce=z(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),Ze,y[c.Light].default,m.blue.base)),k(We,c.Dark,o(Pe||(Pe=z(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),Ze,y[c.Dark].default,m.blue.base)),We),tn=(k(_e={},c.Light,o(Re||(Re=z(["\n color: ",";\n "])),m.blue.base)),k(_e,c.Dark,o(Te||(Te=z(["\n color: ",";\n "])),m.blue.light1)),_e),an=o(Ke||(Ke=z(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n line-height: 20px;\n\n &:focus {\n outline: none;\n }\n"]))),on=o(Ue||(Ue=z(["\n white-space: nowrap;\n"]))),ln=o($e||($e=z(["\n white-space: normal;\n"]))),sn=["children","className","darkMode","baseFontSize"],dn=e.forwardRef((function(n,r){var t,a,o,l=n.children,c=n.className,h=n.darkMode,f=n.baseFontSize,m=w(n,sn),u=d().usingKeyboard,g=s(h).theme,p=Y(f),y=(null!==(t="string"==typeof l&&(null===(a=l.match(/(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g))||void 0===a?void 0:a.length))&&void 0!==t?t:0)<=30?on:ln,b=void 0!==(null==m?void 0:m.href)||void 0!==m.onClick,x=e.createElement("code",{ref:r,className:i(V[p],en,nn[g],y,(o={},k(o,tn[g],b),k(o,rn[g],u),o),c)},l);return b?e.createElement("a",N({className:i(Ze,an,c)},m),x):e.cloneElement(x,m)}));dn.displayName="InlineCode",dn.propTypes={children:b.node,className:b.string,darkMode:b.bool,baseFontSize:b.oneOf(Object.values(p))};var cn,hn,fn,mn,un,gn,pn,yn,bn,xn,vn=o(Qe||(Qe=z(["\n font-family: ",";\n border: 1px solid;\n border-radius: 3px;\n padding-left: 5px;\n padding-right: 5px;\n"])),u.code),kn=(k(Ye={},c.Light,o(Ve||(Ve=z(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),m.black,m.gray.dark3,m.white)),k(Ye,c.Dark,o(Xe||(Xe=z(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),m.gray.light2,m.gray.base,m.gray.dark3)),Ye),Nn=["baseFontSize","darkMode","children","className"];function wn(n){var r=n.baseFontSize,t=n.darkMode,a=n.children,o=n.className,l=w(n,Nn),d=Y(r),c=s(t).theme;return e.createElement("code",N({className:i(vn,kn[c],V[d],o)},l),a)}wn.displayName="InlineKeyCode";var zn,Fn,Dn,En,Sn,Mn,On,Bn,Ln,jn,Hn,An=o(cn||(cn=z(["\n font-family: ",";\n font-weight: bold;\n"])),u.default),In=(k(mn={},c.Light,o(hn||(hn=z(["\n color: ",";\n "])),m.black)),k(mn,c.Dark,o(fn||(fn=z(["\n color: ",";\n "])),m.gray.light2)),mn),Cn=(k(pn={},c.Light,o(un||(un=z(["\n color: ",";\n "])),m.gray.dark1)),k(pn,c.Dark,o(gn||(gn=z(["\n color: ",";\n "])),m.gray.base)),pn),Pn=(k(xn={},p.Body1,o(yn||(yn=z(["\n font-size: ","px;\n line-height: ","px;\n "])),g.body1.fontSize,g.body1.lineHeight)),k(xn,p.Body2,o(bn||(bn=z(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),g.body2.fontSize)),xn),Wn=["baseFontSize","darkMode","className","children","disabled"],Rn=function(n){var r=n.baseFontSize,t=n.darkMode,a=n.className,o=n.children,l=n.disabled,d=void 0!==l&&l,c=w(n,Wn),h=Y(r),f=s(t).theme;return e.createElement("label",N({className:i(An,In[f],Pn[h],k({},Cn[f],d),a)},c),o)};Rn.displayName="Label";var Tn,_n,Kn=h(),Un=o(zn||(zn=z(["\n font-family: ",";\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n line-height: 13px;\n\n &:focus {\n outline: none;\n }\n"])),u.default),$n=(k(En={},c.Light,o(Fn||(Fn=z(["\n color: ",";\n font-weight: 400;\n "])),m.blue.base)),k(En,c.Dark,o(Dn||(Dn=z(["\n color: ",";\n font-weight: 700;\n "])),m.blue.light1)),En),qn=o(Sn||(Sn=z(["\n position: relative;\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 2px;\n bottom: -4px;\n left: 0;\n border-radius: 2px;\n }\n\n .",":focus & {\n &::after {\n background-color: ",";\n }\n }\n"])),Kn,m.blue.light1),Gn=(k(Bn={},c.Light,o(Mn||(Mn=z(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),Kn,m.gray.light2)),k(Bn,c.Dark,o(On||(On=z(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),Kn,m.gray.dark2)),Bn),Jn=o(Ln||(Ln=z(["\n transform: translate3d(3px, 0, 0);\n"]))),Qn=o(jn||(jn=z(["\n opacity: 0;\n transform: translate3d(-3px, 0, 0);\n transition: all 100ms ease-in;\n\n .",":hover & {\n opacity: 1;\n transform: translate3d(3px, 0, 0);\n }\n"])),Kn),Vn=o(Hn||(Hn=z(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]))),Xn="hover",Yn="persist",Zn="none",er=["href","children","className","arrowAppearance","hideExternalIcon","baseFontSize","target","darkMode"],nr=function(o){var l=o.href,d=o.children,c=o.className,h=o.arrowAppearance,f=void 0===h?Zn:h,m=o.hideExternalIcon,u=void 0!==m&&m,g=o.baseFontSize,p=o.target,y=o.darkMode,b=w(o,er),z=F(n(""),2),D=z[0],E=z[1];r((function(){E(window.location.hostname)}),[]);var S,M,O,B=s(y).theme,L=t((function(){if(l){return/^http(s)?:\/\//.test(l)?new URL(l).hostname:D}}),[l,D]),j=Y(g);if(p?S=p:L===D?S="_self":(S="_blank",O="noopener noreferrer"),"_blank"!==S||u){if(f!==Zn){var H;M=e.createElement(x,{role:"presentation",size:12,className:i((H={},k(H,Qn,f===Xn),k(H,Jn,f===Yn),H))})}}else M=e.createElement(v,{role:"presentation",className:Vn});var A=l?{as:"a",href:l,target:S,rel:O}:{as:"span"};return e.createElement(a,N({className:i(Kn,Q[j],Un,$n[B],c)},A,b),e.createElement("span",{className:i(qn,Gn[B])},d),M)},rr=o(Tn||(Tn=z(["\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n line-height: 20px;\n letter-spacing: 0.4px;\n"]))),tr=["darkMode","className"],ar=function(n){var r=n.darkMode,t=n.className,o=w(n,tr),l=s(r).theme;return e.createElement(a,N({className:i(J,rr,X[l],t)},o))};ar.displayName="Overline";var or=o(_n||(_n=z(["\n font-size: 18px;\n line-height: 24px;\n font-weight: 700;\n"]))),ir=["darkMode","className"],lr=function(n){var r=n.darkMode,t=n.className,o=w(n,ir),l=s(r).theme;return e.createElement(a,N({as:"h6",className:i(J,or,X[l],t)},o))};lr.displayName="Subtitle";var sr,dr,cr=["as","children","maxFontWeight","pseudoElement","className"],hr=function(e){var n=e.pseudoElement,r=e.maxFontWeight,t="&:".concat(n);return o(sr||(sr=z(["\n /* Inherit relevant properties from the parent */\n font-weight: inherit;\n font-size: inherit;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n text-decoration: none;\n min-width: 0;\n max-width: 100%;\n\n "," {\n content: attr(data-text);\n height: 0;\n font-weight: ",";\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n }\n "])),t,r)},fr=o(dr||(dr=z(["\n flex: 1;\n min-width: 0;\n max-width: 100%;\n\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n"])));function mr(n){var r=n.as,t=void 0===r?"span":r,o=n.children,l=n.maxFontWeight,s=void 0===l?700:l,d=n.pseudoElement,c=void 0===d?"after":d,h=n.className,m=w(n,cr),u=f(o);return e.createElement(a,N({className:i(hr({pseudoElement:c,maxFontWeight:s}),h),as:t,"data-text":u},m),e.createElement("span",{className:fr},o))}export{ne as Body,he as Description,xe as Disclaimer,Ee as H1,Le as H2,Je as H3,dn as InlineCode,wn as InlineKeyCode,Rn as Label,nr as Link,ar as Overline,mr as StaticWidthText,lr as Subtitle,Kn as anchorClassName,Q as bodyTypeScaleStyles,Pn as labelTypeScaleStyles,Y as useUpdatedBaseFontSize}; | ||
import e,{useState as n,useEffect as r,useMemo as t}from"react";import a from"@leafygreen-ui/box";import{css as o,cx as i}from"@leafygreen-ui/emotion";import{useBaseFontSize as l,useDarkMode as s,useUsingKeyboardContext as d}from"@leafygreen-ui/leafygreen-provider";import{Theme as c,createUniqueClassName as h,getNodeTextContent as f}from"@leafygreen-ui/lib";import{palette as m}from"@leafygreen-ui/palette";import{fontFamilies as g,typeScales as u,BaseFontSize as p,focusRing as b}from"@leafygreen-ui/tokens";import y from"prop-types";import x from"@leafygreen-ui/icon/dist/ArrowRight";import v from"@leafygreen-ui/icon/dist/OpenNewTab";function k(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function N(){return N=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},N.apply(this,arguments)}function w(e,n){if(null==e)return{};var r,t,a=function(e,n){if(null==e)return{};var r,t,a={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function z(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function F(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,a,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw a}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return D(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}var E,S,M,O,L,B,j,H,A,I,C,P,W,R,T,U,_,K,$,q,G,J=o(E||(E=z(["\n margin: unset;\n font-family: ",";\n color: ",";\n"])),g.default,m.black),Q=(k(O={},p.Body1,o(S||(S=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.body1.fontSize,u.body1.lineHeight)),k(O,p.Body2,o(M||(M=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.body2.fontSize,u.body2.lineHeight)),O),V=(k(j={},p.Body1,o(L||(L=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.code1.fontSize,u.code1.lineHeight)),k(j,p.Body2,o(B||(B=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.code2.fontSize,u.code2.lineHeight)),j),X=(k(I={},c.Light,o(H||(H=z(["\n color: ",";\n "])),m.black)),k(I,c.Dark,o(A||(A=z(["\n color: ",";\n "])),m.gray.light2)),I),Y=function(e){var n=l();return e?16===e?p.Body2:p.Body1:16===n?p.Body2:p.Body1},Z=["baseFontSize","darkMode","className","weight","as"],ee={default:{regular:400,medium:500},strong:{regular:700,medium:700}};function ne(n){var r=n.baseFontSize,t=n.darkMode,l=n.className,d=n.weight,c=void 0===d?"regular":d,h=n.as,f=void 0===h?"p":h,m=w(n,Z),g=s(t).theme,u=Y(r),p=o(C||(C=z(["\n font-weight: ",";\n strong,\n b {\n font-weight: ",";\n }\n "])),ee.default[c],ee.strong[c]);return e.createElement(a,N({as:f,className:i(J,Q[u],X[g],p,l)},m))}ne.displayName="Body";var re,te,ae,oe,ie=o(P||(P=z(["\n font-family: ",";\n font-weight: normal;\n margin-top: 0;\n margin-bottom: 0;\n"])),g.default),le=(k(T={},c.Light,o(W||(W=z(["\n color: ",";\n "])),m.gray.dark1)),k(T,c.Dark,o(R||(R=z(["\n color: ",";\n "])),m.gray.light1)),T),se=(k(K={},c.Light,o(U||(U=z(["\n color: ",";\n "])),m.gray.dark1)),k(K,c.Dark,o(_||(_=z(["\n color: ",";\n "])),m.gray.base)),K),de=(k(G={},p.Body1,o($||($=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.body1.fontSize,u.body1.lineHeight)),k(G,p.Body2,o(q||(q=z(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),u.body2.fontSize)),G),ce=["baseFontSize","darkMode","disabled","children","className"],he=function(n){var r=n.baseFontSize,t=n.darkMode,a=n.disabled,o=void 0!==a&&a,l=n.children,d=n.className,c=w(n,ce),h=s(t).theme,f=Y(r);return e.createElement("p",N({className:i(ie,le[h],de[f],k({},se[h],o),d)},c),l)};he.displayName="Description";var fe,me,ge,ue,pe=(k(ae={},c.Light,o(re||(re=z(["\n color: ",";\n "])),m.gray.dark1)),k(ae,c.Dark,o(te||(te=z(["\n color: ",";\n "])),m.gray.light1)),ae),be=o(oe||(oe=z(["\n display: block;\n font-size: 11px;\n line-height: 16px;\n letter-spacing: 0.2px;\n"]))),ye=["darkMode","children","className"];function xe(n){var r=n.darkMode,t=n.children,a=n.className,o=w(n,ye),l=s(r).theme;return e.createElement("small",N({},o,{className:i(J,be,pe[l],a)}),t)}xe.displayName="Disclaimer";var ve,ke,Ne,we,ze,Fe,De,Ee,Se=o(fe||(fe=z(["\n font-family: ",";\n font-weight: normal;\n font-size: inherit;\n line-height: inherit;\n\n // Unsets browser default margins\n margin-block-start: 0;\n margin-block-end: 0;\n"])),g.default),Me=(k(ue={},c.Light,o(me||(me=z(["\n color: ",";\n "])),m.red.base)),k(ue,c.Dark,o(ge||(ge=z(["\n color: ",";\n "])),m.red.light1)),ue),Oe=["children","darkMode","className"],Le=function(n){var r=n.children,t=n.darkMode,a=n.className,o=w(n,Oe),l=s(t).theme;return e.createElement("p",N({},o,{className:i(Se,Me[l],a)}),r)},Be=o(ve||(ve=z(["\n font-weight: 400;\n font-size: 48px;\n line-height: 62px;\n font-family: ",";\n"])),g.serif),je=(k(we={},c.Light,o(ke||(ke=z(["\n color: ",";\n "])),m.green.dark2)),k(we,c.Dark,o(Ne||(Ne=z(["\n color: ",";\n "])),m.green.light1)),we),He=["darkMode","className"],Ae=function(n){var r=n.darkMode,t=n.className,o=w(n,He),l=s(r).theme;return e.createElement(a,N({as:"h1",className:i(J,Be,je[l],t)},o))};Ae.displayName="H1";var Ie,Ce=o(ze||(ze=z(["\n font-size: 32px;\n line-height: 40px;\n font-weight: 400;\n font-family: ",";\n"])),g.serif),Pe=(k(Ee={},c.Light,o(Fe||(Fe=z(["\n color: ",";\n "])),m.green.dark2)),k(Ee,c.Dark,o(De||(De=z(["\n color: ",";\n "])),m.green.light1)),Ee),We=["darkMode","className"],Re=function(n){var r=n.darkMode,t=n.className,o=w(n,We),l=s(r).theme;return e.createElement(a,N({as:"h2",className:i(J,Ce,Pe[l],t)},o))};Re.displayName="H2";var Te,Ue,_e,Ke,$e,qe,Ge,Je,Qe,Ve,Xe,Ye,Ze,en=o(Ie||(Ie=z(["\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n"]))),nn=["darkMode","className"],rn=function(n){var r=n.darkMode,t=n.className,o=w(n,nn),l=s(r).theme;return e.createElement(a,N({as:"h3",className:i(J,en,X[l],t)},o))};rn.displayName="H3";var tn,an,on,ln,sn=h(),dn=o(Te||(Te=z(["\n display: inline;\n transition: all 0.15s ease-in-out;\n border-radius: 3px;\n font-family: ",";\n line-height: 20px;\n\n .",":hover > & {\n text-decoration: none;\n }\n"])),g.code,sn),cn=(k(Ke={},c.Light,o(Ue||(Ue=z(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),m.gray.light3,m.gray.light2,m.gray.dark3,sn,m.gray.light2,m.gray.light1)),k(Ke,c.Dark,o(_e||(_e=z(["\n background-color: transparent;\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),m.gray.dark2,m.gray.light1,sn,m.gray.dark2,m.gray.dark1)),Ke),hn=(k(Ge={},c.Light,o($e||($e=z(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),sn,b[c.Light].default,m.blue.base)),k(Ge,c.Dark,o(qe||(qe=z(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),sn,b[c.Dark].default,m.blue.base)),Ge),fn=(k(Ve={},c.Light,o(Je||(Je=z(["\n color: ",";\n "])),m.blue.base)),k(Ve,c.Dark,o(Qe||(Qe=z(["\n color: ",";\n "])),m.blue.light1)),Ve),mn=o(Xe||(Xe=z(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n line-height: 20px;\n\n &:focus {\n outline: none;\n }\n"]))),gn=o(Ye||(Ye=z(["\n white-space: nowrap;\n"]))),un=o(Ze||(Ze=z(["\n white-space: normal;\n"]))),pn=["children","className","darkMode","baseFontSize"],bn=e.forwardRef((function(n,r){var t,a,o,l=n.children,c=n.className,h=n.darkMode,f=n.baseFontSize,m=w(n,pn),g=d().usingKeyboard,u=s(h).theme,p=Y(f),b=(null!==(t="string"==typeof l&&(null===(a=l.match(/(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g))||void 0===a?void 0:a.length))&&void 0!==t?t:0)<=30?gn:un,y=void 0!==(null==m?void 0:m.href)||void 0!==m.onClick,x=e.createElement("code",{ref:r,className:i(V[p],dn,cn[u],b,(o={},k(o,fn[u],y),k(o,hn[u],g),o),c)},l);return y?e.createElement("a",N({className:i(sn,mn,c)},m),x):e.cloneElement(x,m)}));bn.displayName="InlineCode",bn.propTypes={children:y.node,className:y.string,darkMode:y.bool,baseFontSize:y.oneOf(Object.values(p))};var yn,xn,vn,kn,Nn,wn,zn,Fn,Dn,En,Sn=o(tn||(tn=z(["\n font-family: ",";\n border: 1px solid;\n border-radius: 3px;\n padding-left: 5px;\n padding-right: 5px;\n"])),g.code),Mn=(k(ln={},c.Light,o(an||(an=z(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),m.black,m.gray.dark3,m.white)),k(ln,c.Dark,o(on||(on=z(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),m.gray.light2,m.gray.base,m.gray.dark3)),ln),On=["baseFontSize","darkMode","children","className"];function Ln(n){var r=n.baseFontSize,t=n.darkMode,a=n.children,o=n.className,l=w(n,On),d=Y(r),c=s(t).theme;return e.createElement("code",N({className:i(Sn,Mn[c],V[d],o)},l),a)}Ln.displayName="InlineKeyCode";var Bn,jn,Hn,An,In,Cn,Pn,Wn,Rn,Tn,Un,_n=o(yn||(yn=z(["\n font-family: ",";\n font-weight: bold;\n"])),g.default),Kn=(k(kn={},c.Light,o(xn||(xn=z(["\n color: ",";\n "])),m.black)),k(kn,c.Dark,o(vn||(vn=z(["\n color: ",";\n "])),m.gray.light2)),kn),$n=(k(zn={},c.Light,o(Nn||(Nn=z(["\n color: ",";\n "])),m.gray.dark1)),k(zn,c.Dark,o(wn||(wn=z(["\n color: ",";\n "])),m.gray.base)),zn),qn=(k(En={},p.Body1,o(Fn||(Fn=z(["\n font-size: ","px;\n line-height: ","px;\n "])),u.body1.fontSize,u.body1.lineHeight)),k(En,p.Body2,o(Dn||(Dn=z(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),u.body2.fontSize)),En),Gn=["baseFontSize","darkMode","className","children","disabled"],Jn=function(n){var r=n.baseFontSize,t=n.darkMode,a=n.className,o=n.children,l=n.disabled,d=void 0!==l&&l,c=w(n,Gn),h=Y(r),f=s(t).theme;return e.createElement("label",N({className:i(_n,Kn[f],qn[h],k({},$n[f],d),a)},c),o)};Jn.displayName="Label";var Qn,Vn,Xn=h(),Yn=o(Bn||(Bn=z(["\n font-family: ",";\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n line-height: 13px;\n\n &:focus {\n outline: none;\n }\n"])),g.default),Zn=(k(An={},c.Light,o(jn||(jn=z(["\n color: ",";\n font-weight: 400;\n "])),m.blue.base)),k(An,c.Dark,o(Hn||(Hn=z(["\n color: ",";\n font-weight: 700;\n "])),m.blue.light1)),An),er=o(In||(In=z(["\n position: relative;\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 2px;\n bottom: -4px;\n left: 0;\n border-radius: 2px;\n }\n\n .",":focus & {\n &::after {\n background-color: ",";\n }\n }\n"])),Xn,m.blue.light1),nr=(k(Wn={},c.Light,o(Cn||(Cn=z(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),Xn,m.gray.light2)),k(Wn,c.Dark,o(Pn||(Pn=z(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),Xn,m.gray.dark2)),Wn),rr=o(Rn||(Rn=z(["\n transform: translate3d(3px, 0, 0);\n"]))),tr=o(Tn||(Tn=z(["\n opacity: 0;\n transform: translate3d(-3px, 0, 0);\n transition: all 100ms ease-in;\n\n .",":hover & {\n opacity: 1;\n transform: translate3d(3px, 0, 0);\n }\n"])),Xn),ar=o(Un||(Un=z(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]))),or="hover",ir="persist",lr="none",sr=["href","children","className","arrowAppearance","hideExternalIcon","baseFontSize","target","darkMode"],dr=function(o){var l=o.href,d=o.children,c=o.className,h=o.arrowAppearance,f=void 0===h?lr:h,m=o.hideExternalIcon,g=void 0!==m&&m,u=o.baseFontSize,p=o.target,b=o.darkMode,y=w(o,sr),z=F(n(""),2),D=z[0],E=z[1];r((function(){E(window.location.hostname)}),[]);var S,M,O,L=s(b).theme,B=t((function(){if(l){return/^http(s)?:\/\//.test(l)?new URL(l).hostname:D}}),[l,D]),j=Y(u);if(p?S=p:B===D?S="_self":(S="_blank",O="noopener noreferrer"),"_blank"!==S||g){if(f!==lr){var H;M=e.createElement(x,{role:"presentation",size:12,className:i((H={},k(H,tr,f===or),k(H,rr,f===ir),H))})}}else M=e.createElement(v,{role:"presentation",className:ar});var A=l?{as:"a",href:l,target:S,rel:O}:{as:"span"};return e.createElement(a,N({className:i(Xn,Q[j],Yn,Zn[L],c)},A,y),e.createElement("span",{className:i(er,nr[L])},d),M)},cr=o(Qn||(Qn=z(["\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n line-height: 20px;\n letter-spacing: 0.4px;\n"]))),hr=["darkMode","className"],fr=function(n){var r=n.darkMode,t=n.className,o=w(n,hr),l=s(r).theme;return e.createElement(a,N({className:i(J,cr,X[l],t)},o))};fr.displayName="Overline";var mr=o(Vn||(Vn=z(["\n font-size: 18px;\n line-height: 24px;\n font-weight: 700;\n"]))),gr=["darkMode","className"],ur=function(n){var r=n.darkMode,t=n.className,o=w(n,gr),l=s(r).theme;return e.createElement(a,N({as:"h6",className:i(J,mr,X[l],t)},o))};ur.displayName="Subtitle";var pr,br,yr=["as","children","maxFontWeight","pseudoElement","className"],xr=function(e){var n=e.pseudoElement,r=e.maxFontWeight,t="&:".concat(n);return o(pr||(pr=z(["\n /* Inherit relevant properties from the parent */\n font-weight: inherit;\n font-size: inherit;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n text-decoration: none;\n min-width: 0;\n max-width: 100%;\n\n "," {\n content: attr(data-text);\n height: 0;\n font-weight: ",";\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n }\n "])),t,r)},vr=o(br||(br=z(["\n flex: 1;\n min-width: 0;\n max-width: 100%;\n\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n"])));function kr(n){var r=n.as,t=void 0===r?"span":r,o=n.children,l=n.maxFontWeight,s=void 0===l?700:l,d=n.pseudoElement,c=void 0===d?"after":d,h=n.className,m=w(n,yr),g=f(o);return e.createElement(a,N({className:i(xr({pseudoElement:c,maxFontWeight:s}),h),as:t,"data-text":g},m),e.createElement("span",{className:vr},o))}export{ne as Body,he as Description,xe as Disclaimer,Le as Error,Ae as H1,Re as H2,rn as H3,bn as InlineCode,Ln as InlineKeyCode,Jn as Label,dr as Link,fr as Overline,kr as StaticWidthText,ur as Subtitle,Xn as anchorClassName,Q as bodyTypeScaleStyles,qn as labelTypeScaleStyles,Y as useUpdatedBaseFontSize}; | ||
//# sourceMappingURL=index.js.map |
export { default as Body } from './Body/Body'; | ||
export { default as Description } from './Description/Description'; | ||
export { default as Disclaimer } from './Disclaimer/Disclaimer'; | ||
export { default as Error } from './Error/Error'; | ||
export { default as H1 } from './H1/H1'; | ||
@@ -5,0 +6,0 @@ export { default as H2 } from './H2/H2'; |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/leafygreen-provider"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("prop-types"),require("@leafygreen-ui/icon/dist/ArrowRight"),require("@leafygreen-ui/icon/dist/OpenNewTab")):"function"==typeof define&&define.amd?define(["exports","react","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/leafygreen-provider","@leafygreen-ui/lib","@leafygreen-ui/palette","@leafygreen-ui/tokens","prop-types","@leafygreen-ui/icon/dist/ArrowRight","@leafygreen-ui/icon/dist/OpenNewTab"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/typography"]={},e.React,e["@leafygreen-ui/box"],e["@leafygreen-ui/emotion"],e["@leafygreen-ui/leafygreen-provider"],e["@leafygreen-ui/lib"],e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e.PropTypes,e.ArrowRight,e.OpenNewTab)}(this,(function(e,n,t,a,r,o,i,l,s,c,d){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f,p,h,m,g,y,b,x,v,k,S=u(n),N=u(t),F=u(s),w=u(c),z=u(d);function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function T(){return T=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},T.apply(this,arguments)}function M(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function B(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function E(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var a,r,o=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==t.return||t.return()}finally{if(l)throw r}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return O(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}var L,j,H,C,q,A,I,R,P,U,W,_=a.css(f||(f=B(["\n margin: unset;\n font-family: ",";\n color: ",";\n"])),l.fontFamilies.default,i.palette.black),K=(D(m={},l.BaseFontSize.Body1,a.css(p||(p=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(m,l.BaseFontSize.Body2,a.css(h||(h=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body2.fontSize,l.typeScales.body2.lineHeight)),m),$=(D(b={},l.BaseFontSize.Body1,a.css(g||(g=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.code1.fontSize,l.typeScales.code1.lineHeight)),D(b,l.BaseFontSize.Body2,a.css(y||(y=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.code2.fontSize,l.typeScales.code2.lineHeight)),b),G=(D(k={},o.Theme.Light,a.css(x||(x=B(["\n color: ",";\n "])),i.palette.black)),D(k,o.Theme.Dark,a.css(v||(v=B(["\n color: ",";\n "])),i.palette.gray.light2)),k),J=function(e){var n=r.useBaseFontSize();return e?16===e?l.BaseFontSize.Body2:l.BaseFontSize.Body1:16===n?l.BaseFontSize.Body2:l.BaseFontSize.Body1},Q=["baseFontSize","darkMode","className","weight","as"],V={default:{regular:400,medium:500},strong:{regular:700,medium:700}};function X(e){var n=e.baseFontSize,t=e.darkMode,o=e.className,i=e.weight,l=void 0===i?"regular":i,s=e.as,c=void 0===s?"p":s,d=M(e,Q),u=r.useDarkMode(t).theme,f=J(n),p=a.css(L||(L=B(["\n font-weight: ",";\n strong,\n b {\n font-weight: ",";\n }\n "])),V.default[l],V.strong[l]);return S.default.createElement(N.default,T({as:c,className:a.cx(_,K[f],G[u],p,o)},d))}X.displayName="Body";var Y,Z,ee,ne,te=a.css(j||(j=B(["\n font-family: ",";\n font-weight: normal;\n margin-top: 0;\n margin-bottom: 0;\n"])),l.fontFamilies.default),ae=(D(q={},o.Theme.Light,a.css(H||(H=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(q,o.Theme.Dark,a.css(C||(C=B(["\n color: ",";\n "])),i.palette.gray.light1)),q),re=(D(R={},o.Theme.Light,a.css(A||(A=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(R,o.Theme.Dark,a.css(I||(I=B(["\n color: ",";\n "])),i.palette.gray.base)),R),oe=(D(W={},l.BaseFontSize.Body1,a.css(P||(P=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(W,l.BaseFontSize.Body2,a.css(U||(U=B(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),l.typeScales.body2.fontSize)),W),ie=["baseFontSize","darkMode","disabled","children","className"],le=function(e){var n=e.baseFontSize,t=e.darkMode,o=e.disabled,i=void 0!==o&&o,l=e.children,s=e.className,c=M(e,ie),d=r.useDarkMode(t).theme,u=J(n);return S.default.createElement("p",T({className:a.cx(te,ae[d],oe[u],D({},re[d],i),s)},c),l)};le.displayName="Description";var se,ce,de,ue,fe=(D(ee={},o.Theme.Light,a.css(Y||(Y=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(ee,o.Theme.Dark,a.css(Z||(Z=B(["\n color: ",";\n "])),i.palette.gray.light1)),ee),pe=a.css(ne||(ne=B(["\n display: block;\n font-size: 11px;\n line-height: 16px;\n letter-spacing: 0.2px;\n"]))),he=["darkMode","children","className"];function me(e){var n=e.darkMode,t=e.children,o=e.className,i=M(e,he),l=r.useDarkMode(n).theme;return S.default.createElement("small",T({},i,{className:a.cx(_,pe,fe[l],o)}),t)}me.displayName="Disclaimer";var ge,ye,be,xe,ve=a.css(se||(se=B(["\n font-weight: 400;\n font-size: 48px;\n line-height: 62px;\n font-family: ",";\n"])),l.fontFamilies.serif),ke=(D(ue={},o.Theme.Light,a.css(ce||(ce=B(["\n color: ",";\n "])),i.palette.green.dark2)),D(ue,o.Theme.Dark,a.css(de||(de=B(["\n color: ",";\n "])),i.palette.green.light1)),ue),Se=["darkMode","className"],Ne=function(e){var n=e.darkMode,t=e.className,o=M(e,Se),i=r.useDarkMode(n).theme;return S.default.createElement(N.default,T({as:"h1",className:a.cx(_,ve,ke[i],t)},o))};Ne.displayName="H1";var Fe,we=a.css(ge||(ge=B(["\n font-size: 32px;\n line-height: 40px;\n font-weight: 400;\n font-family: ",";\n"])),l.fontFamilies.serif),ze=(D(xe={},o.Theme.Light,a.css(ye||(ye=B(["\n color: ",";\n "])),i.palette.green.dark2)),D(xe,o.Theme.Dark,a.css(be||(be=B(["\n color: ",";\n "])),i.palette.green.light1)),xe),De=["darkMode","className"],Te=function(e){var n=e.darkMode,t=e.className,o=M(e,De),i=r.useDarkMode(n).theme;return S.default.createElement(N.default,T({as:"h2",className:a.cx(_,we,ze[i],t)},o))};Te.displayName="H2";var Me,Be,Ee,Oe,Le,je,He,Ce,qe,Ae,Ie,Re,Pe,Ue=a.css(Fe||(Fe=B(["\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n"]))),We=["darkMode","className"],_e=function(e){var n=e.darkMode,t=e.className,o=M(e,We),i=r.useDarkMode(n).theme;return S.default.createElement(N.default,T({as:"h3",className:a.cx(_,Ue,G[i],t)},o))};_e.displayName="H3";var Ke,$e,Ge,Je,Qe=o.createUniqueClassName(),Ve=a.css(Me||(Me=B(["\n display: inline;\n transition: all 0.15s ease-in-out;\n border-radius: 3px;\n font-family: ",";\n line-height: 20px;\n\n .",":hover > & {\n text-decoration: none;\n }\n"])),l.fontFamilies.code,Qe),Xe=(D(Oe={},o.Theme.Light,a.css(Be||(Be=B(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),i.palette.gray.light3,i.palette.gray.light2,i.palette.gray.dark3,Qe,i.palette.gray.light2,i.palette.gray.light1)),D(Oe,o.Theme.Dark,a.css(Ee||(Ee=B(["\n background-color: transparent;\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),i.palette.gray.dark2,i.palette.gray.light1,Qe,i.palette.gray.dark2,i.palette.gray.dark1)),Oe),Ye=(D(He={},o.Theme.Light,a.css(Le||(Le=B(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),Qe,l.focusRing[o.Theme.Light].default,i.palette.blue.base)),D(He,o.Theme.Dark,a.css(je||(je=B(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),Qe,l.focusRing[o.Theme.Dark].default,i.palette.blue.base)),He),Ze=(D(Ae={},o.Theme.Light,a.css(Ce||(Ce=B(["\n color: ",";\n "])),i.palette.blue.base)),D(Ae,o.Theme.Dark,a.css(qe||(qe=B(["\n color: ",";\n "])),i.palette.blue.light1)),Ae),en=a.css(Ie||(Ie=B(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n line-height: 20px;\n\n &:focus {\n outline: none;\n }\n"]))),nn=a.css(Re||(Re=B(["\n white-space: nowrap;\n"]))),tn=a.css(Pe||(Pe=B(["\n white-space: normal;\n"]))),an=["children","className","darkMode","baseFontSize"],rn=S.default.forwardRef((function(e,n){var t,o,i,l=e.children,s=e.className,c=e.darkMode,d=e.baseFontSize,u=M(e,an),f=r.useUsingKeyboardContext().usingKeyboard,p=r.useDarkMode(c).theme,h=J(d),m=(null!==(t="string"==typeof l&&(null===(o=l.match(/(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g))||void 0===o?void 0:o.length))&&void 0!==t?t:0)<=30?nn:tn,g=void 0!==(null==u?void 0:u.href)||void 0!==u.onClick,y=S.default.createElement("code",{ref:n,className:a.cx($[h],Ve,Xe[p],m,(i={},D(i,Ze[p],g),D(i,Ye[p],f),i),s)},l);return g?S.default.createElement("a",T({className:a.cx(Qe,en,s)},u),y):S.default.cloneElement(y,u)}));rn.displayName="InlineCode",rn.propTypes={children:F.default.node,className:F.default.string,darkMode:F.default.bool,baseFontSize:F.default.oneOf(Object.values(l.BaseFontSize))};var on,ln,sn,cn,dn,un,fn,pn,hn,mn,gn=a.css(Ke||(Ke=B(["\n font-family: ",";\n border: 1px solid;\n border-radius: 3px;\n padding-left: 5px;\n padding-right: 5px;\n"])),l.fontFamilies.code),yn=(D(Je={},o.Theme.Light,a.css($e||($e=B(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),i.palette.black,i.palette.gray.dark3,i.palette.white)),D(Je,o.Theme.Dark,a.css(Ge||(Ge=B(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),i.palette.gray.light2,i.palette.gray.base,i.palette.gray.dark3)),Je),bn=["baseFontSize","darkMode","children","className"];function xn(e){var n=e.baseFontSize,t=e.darkMode,o=e.children,i=e.className,l=M(e,bn),s=J(n),c=r.useDarkMode(t).theme;return S.default.createElement("code",T({className:a.cx(gn,yn[c],$[s],i)},l),o)}xn.displayName="InlineKeyCode";var vn,kn,Sn,Nn,Fn,wn,zn,Dn,Tn,Mn,Bn,En=a.css(on||(on=B(["\n font-family: ",";\n font-weight: bold;\n"])),l.fontFamilies.default),On=(D(cn={},o.Theme.Light,a.css(ln||(ln=B(["\n color: ",";\n "])),i.palette.black)),D(cn,o.Theme.Dark,a.css(sn||(sn=B(["\n color: ",";\n "])),i.palette.gray.light2)),cn),Ln=(D(fn={},o.Theme.Light,a.css(dn||(dn=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(fn,o.Theme.Dark,a.css(un||(un=B(["\n color: ",";\n "])),i.palette.gray.base)),fn),jn=(D(mn={},l.BaseFontSize.Body1,a.css(pn||(pn=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(mn,l.BaseFontSize.Body2,a.css(hn||(hn=B(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),l.typeScales.body2.fontSize)),mn),Hn=["baseFontSize","darkMode","className","children","disabled"],Cn=function(e){var n=e.baseFontSize,t=e.darkMode,o=e.className,i=e.children,l=e.disabled,s=void 0!==l&&l,c=M(e,Hn),d=J(n),u=r.useDarkMode(t).theme;return S.default.createElement("label",T({className:a.cx(En,On[u],jn[d],D({},Ln[u],s),o)},c),i)};Cn.displayName="Label";var qn,An,In=o.createUniqueClassName(),Rn=a.css(vn||(vn=B(["\n font-family: ",";\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n line-height: 13px;\n\n &:focus {\n outline: none;\n }\n"])),l.fontFamilies.default),Pn=(D(Nn={},o.Theme.Light,a.css(kn||(kn=B(["\n color: ",";\n font-weight: 400;\n "])),i.palette.blue.base)),D(Nn,o.Theme.Dark,a.css(Sn||(Sn=B(["\n color: ",";\n font-weight: 700;\n "])),i.palette.blue.light1)),Nn),Un=a.css(Fn||(Fn=B(["\n position: relative;\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 2px;\n bottom: -4px;\n left: 0;\n border-radius: 2px;\n }\n\n .",":focus & {\n &::after {\n background-color: ",";\n }\n }\n"])),In,i.palette.blue.light1),Wn=(D(Dn={},o.Theme.Light,a.css(wn||(wn=B(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),In,i.palette.gray.light2)),D(Dn,o.Theme.Dark,a.css(zn||(zn=B(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),In,i.palette.gray.dark2)),Dn),_n=a.css(Tn||(Tn=B(["\n transform: translate3d(3px, 0, 0);\n"]))),Kn=a.css(Mn||(Mn=B(["\n opacity: 0;\n transform: translate3d(-3px, 0, 0);\n transition: all 100ms ease-in;\n\n .",":hover & {\n opacity: 1;\n transform: translate3d(3px, 0, 0);\n }\n"])),In),$n=a.css(Bn||(Bn=B(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]))),Gn="hover",Jn="persist",Qn="none",Vn=["href","children","className","arrowAppearance","hideExternalIcon","baseFontSize","target","darkMode"],Xn=a.css(qn||(qn=B(["\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n line-height: 20px;\n letter-spacing: 0.4px;\n"]))),Yn=["darkMode","className"],Zn=function(e){var n=e.darkMode,t=e.className,o=M(e,Yn),i=r.useDarkMode(n).theme;return S.default.createElement(N.default,T({className:a.cx(_,Xn,G[i],t)},o))};Zn.displayName="Overline";var et=a.css(An||(An=B(["\n font-size: 18px;\n line-height: 24px;\n font-weight: 700;\n"]))),nt=["darkMode","className"],tt=function(e){var n=e.darkMode,t=e.className,o=M(e,nt),i=r.useDarkMode(n).theme;return S.default.createElement(N.default,T({as:"h6",className:a.cx(_,et,G[i],t)},o))};tt.displayName="Subtitle";var at,rt,ot=["as","children","maxFontWeight","pseudoElement","className"],it=function(e){var n=e.pseudoElement,t=e.maxFontWeight,r="&:".concat(n);return a.css(at||(at=B(["\n /* Inherit relevant properties from the parent */\n font-weight: inherit;\n font-size: inherit;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n text-decoration: none;\n min-width: 0;\n max-width: 100%;\n\n "," {\n content: attr(data-text);\n height: 0;\n font-weight: ",";\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n }\n "])),r,t)},lt=a.css(rt||(rt=B(["\n flex: 1;\n min-width: 0;\n max-width: 100%;\n\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n"])));e.Body=X,e.Description=le,e.Disclaimer=me,e.H1=Ne,e.H2=Te,e.H3=_e,e.InlineCode=rn,e.InlineKeyCode=xn,e.Label=Cn,e.Link=function(e){var t=e.href,o=e.children,i=e.className,l=e.arrowAppearance,s=void 0===l?Qn:l,c=e.hideExternalIcon,d=void 0!==c&&c,u=e.baseFontSize,f=e.target,p=e.darkMode,h=M(e,Vn),m=E(n.useState(""),2),g=m[0],y=m[1];n.useEffect((function(){y(window.location.hostname)}),[]);var b,x,v,k=r.useDarkMode(p).theme,F=n.useMemo((function(){if(t){return/^http(s)?:\/\//.test(t)?new URL(t).hostname:g}}),[t,g]),B=J(u);if(f?b=f:F===g?b="_self":(b="_blank",v="noopener noreferrer"),"_blank"!==b||d){if(s!==Qn){var O;x=S.default.createElement(w.default,{role:"presentation",size:12,className:a.cx((O={},D(O,Kn,s===Gn),D(O,_n,s===Jn),O))})}}else x=S.default.createElement(z.default,{role:"presentation",className:$n});var L=t?{as:"a",href:t,target:b,rel:v}:{as:"span"};return S.default.createElement(N.default,T({className:a.cx(In,K[B],Rn,Pn[k],i)},L,h),S.default.createElement("span",{className:a.cx(Un,Wn[k])},o),x)},e.Overline=Zn,e.StaticWidthText=function(e){var n=e.as,t=void 0===n?"span":n,r=e.children,i=e.maxFontWeight,l=void 0===i?700:i,s=e.pseudoElement,c=void 0===s?"after":s,d=e.className,u=M(e,ot),f=o.getNodeTextContent(r);return S.default.createElement(N.default,T({className:a.cx(it({pseudoElement:c,maxFontWeight:l}),d),as:t,"data-text":f},u),S.default.createElement("span",{className:lt},r))},e.Subtitle=tt,e.anchorClassName=In,e.bodyTypeScaleStyles=K,e.labelTypeScaleStyles=jn,e.useUpdatedBaseFontSize=J,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/leafygreen-provider"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("prop-types"),require("@leafygreen-ui/icon/dist/ArrowRight"),require("@leafygreen-ui/icon/dist/OpenNewTab")):"function"==typeof define&&define.amd?define(["exports","react","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/leafygreen-provider","@leafygreen-ui/lib","@leafygreen-ui/palette","@leafygreen-ui/tokens","prop-types","@leafygreen-ui/icon/dist/ArrowRight","@leafygreen-ui/icon/dist/OpenNewTab"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/typography"]={},e.React,e["@leafygreen-ui/box"],e["@leafygreen-ui/emotion"],e["@leafygreen-ui/leafygreen-provider"],e["@leafygreen-ui/lib"],e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e.PropTypes,e.ArrowRight,e.OpenNewTab)}(this,(function(e,n,t,a,r,o,i,l,s,c,d){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f,h,p,m,g,y,b,x,k,v,N=u(n),S=u(t),F=u(s),w=u(c),z=u(d);function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function T(){return T=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},T.apply(this,arguments)}function M(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function B(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function E(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var a,r,o=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);i=!0);}catch(e){l=!0,r=e}finally{try{i||null==t.return||t.return()}finally{if(l)throw r}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return O(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}var L,j,H,C,q,A,I,R,P,U,W,_=a.css(f||(f=B(["\n margin: unset;\n font-family: ",";\n color: ",";\n"])),l.fontFamilies.default,i.palette.black),K=(D(m={},l.BaseFontSize.Body1,a.css(h||(h=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(m,l.BaseFontSize.Body2,a.css(p||(p=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body2.fontSize,l.typeScales.body2.lineHeight)),m),$=(D(b={},l.BaseFontSize.Body1,a.css(g||(g=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.code1.fontSize,l.typeScales.code1.lineHeight)),D(b,l.BaseFontSize.Body2,a.css(y||(y=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.code2.fontSize,l.typeScales.code2.lineHeight)),b),G=(D(v={},o.Theme.Light,a.css(x||(x=B(["\n color: ",";\n "])),i.palette.black)),D(v,o.Theme.Dark,a.css(k||(k=B(["\n color: ",";\n "])),i.palette.gray.light2)),v),J=function(e){var n=r.useBaseFontSize();return e?16===e?l.BaseFontSize.Body2:l.BaseFontSize.Body1:16===n?l.BaseFontSize.Body2:l.BaseFontSize.Body1},Q=["baseFontSize","darkMode","className","weight","as"],V={default:{regular:400,medium:500},strong:{regular:700,medium:700}};function X(e){var n=e.baseFontSize,t=e.darkMode,o=e.className,i=e.weight,l=void 0===i?"regular":i,s=e.as,c=void 0===s?"p":s,d=M(e,Q),u=r.useDarkMode(t).theme,f=J(n),h=a.css(L||(L=B(["\n font-weight: ",";\n strong,\n b {\n font-weight: ",";\n }\n "])),V.default[l],V.strong[l]);return N.default.createElement(S.default,T({as:c,className:a.cx(_,K[f],G[u],h,o)},d))}X.displayName="Body";var Y,Z,ee,ne,te=a.css(j||(j=B(["\n font-family: ",";\n font-weight: normal;\n margin-top: 0;\n margin-bottom: 0;\n"])),l.fontFamilies.default),ae=(D(q={},o.Theme.Light,a.css(H||(H=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(q,o.Theme.Dark,a.css(C||(C=B(["\n color: ",";\n "])),i.palette.gray.light1)),q),re=(D(R={},o.Theme.Light,a.css(A||(A=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(R,o.Theme.Dark,a.css(I||(I=B(["\n color: ",";\n "])),i.palette.gray.base)),R),oe=(D(W={},l.BaseFontSize.Body1,a.css(P||(P=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(W,l.BaseFontSize.Body2,a.css(U||(U=B(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),l.typeScales.body2.fontSize)),W),ie=["baseFontSize","darkMode","disabled","children","className"],le=function(e){var n=e.baseFontSize,t=e.darkMode,o=e.disabled,i=void 0!==o&&o,l=e.children,s=e.className,c=M(e,ie),d=r.useDarkMode(t).theme,u=J(n);return N.default.createElement("p",T({className:a.cx(te,ae[d],oe[u],D({},re[d],i),s)},c),l)};le.displayName="Description";var se,ce,de,ue,fe=(D(ee={},o.Theme.Light,a.css(Y||(Y=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(ee,o.Theme.Dark,a.css(Z||(Z=B(["\n color: ",";\n "])),i.palette.gray.light1)),ee),he=a.css(ne||(ne=B(["\n display: block;\n font-size: 11px;\n line-height: 16px;\n letter-spacing: 0.2px;\n"]))),pe=["darkMode","children","className"];function me(e){var n=e.darkMode,t=e.children,o=e.className,i=M(e,pe),l=r.useDarkMode(n).theme;return N.default.createElement("small",T({},i,{className:a.cx(_,he,fe[l],o)}),t)}me.displayName="Disclaimer";var ge,ye,be,xe,ke,ve,Ne,Se,Fe=a.css(se||(se=B(["\n font-family: ",";\n font-weight: normal;\n font-size: inherit;\n line-height: inherit;\n\n // Unsets browser default margins\n margin-block-start: 0;\n margin-block-end: 0;\n"])),l.fontFamilies.default),we=(D(ue={},o.Theme.Light,a.css(ce||(ce=B(["\n color: ",";\n "])),i.palette.red.base)),D(ue,o.Theme.Dark,a.css(de||(de=B(["\n color: ",";\n "])),i.palette.red.light1)),ue),ze=["children","darkMode","className"],De=a.css(ge||(ge=B(["\n font-weight: 400;\n font-size: 48px;\n line-height: 62px;\n font-family: ",";\n"])),l.fontFamilies.serif),Te=(D(xe={},o.Theme.Light,a.css(ye||(ye=B(["\n color: ",";\n "])),i.palette.green.dark2)),D(xe,o.Theme.Dark,a.css(be||(be=B(["\n color: ",";\n "])),i.palette.green.light1)),xe),Me=["darkMode","className"],Be=function(e){var n=e.darkMode,t=e.className,o=M(e,Me),i=r.useDarkMode(n).theme;return N.default.createElement(S.default,T({as:"h1",className:a.cx(_,De,Te[i],t)},o))};Be.displayName="H1";var Ee,Oe=a.css(ke||(ke=B(["\n font-size: 32px;\n line-height: 40px;\n font-weight: 400;\n font-family: ",";\n"])),l.fontFamilies.serif),Le=(D(Se={},o.Theme.Light,a.css(ve||(ve=B(["\n color: ",";\n "])),i.palette.green.dark2)),D(Se,o.Theme.Dark,a.css(Ne||(Ne=B(["\n color: ",";\n "])),i.palette.green.light1)),Se),je=["darkMode","className"],He=function(e){var n=e.darkMode,t=e.className,o=M(e,je),i=r.useDarkMode(n).theme;return N.default.createElement(S.default,T({as:"h2",className:a.cx(_,Oe,Le[i],t)},o))};He.displayName="H2";var Ce,qe,Ae,Ie,Re,Pe,Ue,We,_e,Ke,$e,Ge,Je,Qe=a.css(Ee||(Ee=B(["\n font-size: 24px;\n line-height: 32px;\n font-weight: 500;\n"]))),Ve=["darkMode","className"],Xe=function(e){var n=e.darkMode,t=e.className,o=M(e,Ve),i=r.useDarkMode(n).theme;return N.default.createElement(S.default,T({as:"h3",className:a.cx(_,Qe,G[i],t)},o))};Xe.displayName="H3";var Ye,Ze,en,nn,tn=o.createUniqueClassName(),an=a.css(Ce||(Ce=B(["\n display: inline;\n transition: all 0.15s ease-in-out;\n border-radius: 3px;\n font-family: ",";\n line-height: 20px;\n\n .",":hover > & {\n text-decoration: none;\n }\n"])),l.fontFamilies.code,tn),rn=(D(Ie={},o.Theme.Light,a.css(qe||(qe=B(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),i.palette.gray.light3,i.palette.gray.light2,i.palette.gray.dark3,tn,i.palette.gray.light2,i.palette.gray.light1)),D(Ie,o.Theme.Dark,a.css(Ae||(Ae=B(["\n background-color: transparent;\n border: 1px solid ",";\n color: ",";\n\n .",":hover > & {\n box-shadow: 0 0 0 3px ",";\n border: 1px solid ",";\n }\n "])),i.palette.gray.dark2,i.palette.gray.light1,tn,i.palette.gray.dark2,i.palette.gray.dark1)),Ie),on=(D(Ue={},o.Theme.Light,a.css(Re||(Re=B(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),tn,l.focusRing[o.Theme.Light].default,i.palette.blue.base)),D(Ue,o.Theme.Dark,a.css(Pe||(Pe=B(["\n .",":focus > & {\n box-shadow: ",";\n border: 1px solid ",";\n }\n "])),tn,l.focusRing[o.Theme.Dark].default,i.palette.blue.base)),Ue),ln=(D(Ke={},o.Theme.Light,a.css(We||(We=B(["\n color: ",";\n "])),i.palette.blue.base)),D(Ke,o.Theme.Dark,a.css(_e||(_e=B(["\n color: ",";\n "])),i.palette.blue.light1)),Ke),sn=a.css($e||($e=B(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n line-height: 20px;\n\n &:focus {\n outline: none;\n }\n"]))),cn=a.css(Ge||(Ge=B(["\n white-space: nowrap;\n"]))),dn=a.css(Je||(Je=B(["\n white-space: normal;\n"]))),un=["children","className","darkMode","baseFontSize"],fn=N.default.forwardRef((function(e,n){var t,o,i,l=e.children,s=e.className,c=e.darkMode,d=e.baseFontSize,u=M(e,un),f=r.useUsingKeyboardContext().usingKeyboard,h=r.useDarkMode(c).theme,p=J(d),m=(null!==(t="string"==typeof l&&(null===(o=l.match(/(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g))||void 0===o?void 0:o.length))&&void 0!==t?t:0)<=30?cn:dn,g=void 0!==(null==u?void 0:u.href)||void 0!==u.onClick,y=N.default.createElement("code",{ref:n,className:a.cx($[p],an,rn[h],m,(i={},D(i,ln[h],g),D(i,on[h],f),i),s)},l);return g?N.default.createElement("a",T({className:a.cx(tn,sn,s)},u),y):N.default.cloneElement(y,u)}));fn.displayName="InlineCode",fn.propTypes={children:F.default.node,className:F.default.string,darkMode:F.default.bool,baseFontSize:F.default.oneOf(Object.values(l.BaseFontSize))};var hn,pn,mn,gn,yn,bn,xn,kn,vn,Nn,Sn=a.css(Ye||(Ye=B(["\n font-family: ",";\n border: 1px solid;\n border-radius: 3px;\n padding-left: 5px;\n padding-right: 5px;\n"])),l.fontFamilies.code),Fn=(D(nn={},o.Theme.Light,a.css(Ze||(Ze=B(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),i.palette.black,i.palette.gray.dark3,i.palette.white)),D(nn,o.Theme.Dark,a.css(en||(en=B(["\n color: ",";\n border-color: ",";\n background-color: ",";\n "])),i.palette.gray.light2,i.palette.gray.base,i.palette.gray.dark3)),nn),wn=["baseFontSize","darkMode","children","className"];function zn(e){var n=e.baseFontSize,t=e.darkMode,o=e.children,i=e.className,l=M(e,wn),s=J(n),c=r.useDarkMode(t).theme;return N.default.createElement("code",T({className:a.cx(Sn,Fn[c],$[s],i)},l),o)}zn.displayName="InlineKeyCode";var Dn,Tn,Mn,Bn,En,On,Ln,jn,Hn,Cn,qn,An=a.css(hn||(hn=B(["\n font-family: ",";\n font-weight: bold;\n"])),l.fontFamilies.default),In=(D(gn={},o.Theme.Light,a.css(pn||(pn=B(["\n color: ",";\n "])),i.palette.black)),D(gn,o.Theme.Dark,a.css(mn||(mn=B(["\n color: ",";\n "])),i.palette.gray.light2)),gn),Rn=(D(xn={},o.Theme.Light,a.css(yn||(yn=B(["\n color: ",";\n "])),i.palette.gray.dark1)),D(xn,o.Theme.Dark,a.css(bn||(bn=B(["\n color: ",";\n "])),i.palette.gray.base)),xn),Pn=(D(Nn={},l.BaseFontSize.Body1,a.css(kn||(kn=B(["\n font-size: ","px;\n line-height: ","px;\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),D(Nn,l.BaseFontSize.Body2,a.css(vn||(vn=B(["\n font-size: ","px;\n line-height: 20px; // Hardcoding because it does not match body2 lineHeight\n "])),l.typeScales.body2.fontSize)),Nn),Un=["baseFontSize","darkMode","className","children","disabled"],Wn=function(e){var n=e.baseFontSize,t=e.darkMode,o=e.className,i=e.children,l=e.disabled,s=void 0!==l&&l,c=M(e,Un),d=J(n),u=r.useDarkMode(t).theme;return N.default.createElement("label",T({className:a.cx(An,In[u],Pn[d],D({},Rn[u],s),o)},c),i)};Wn.displayName="Label";var _n,Kn,$n=o.createUniqueClassName(),Gn=a.css(Dn||(Dn=B(["\n font-family: ",";\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n line-height: 13px;\n\n &:focus {\n outline: none;\n }\n"])),l.fontFamilies.default),Jn=(D(Bn={},o.Theme.Light,a.css(Tn||(Tn=B(["\n color: ",";\n font-weight: 400;\n "])),i.palette.blue.base)),D(Bn,o.Theme.Dark,a.css(Mn||(Mn=B(["\n color: ",";\n font-weight: 700;\n "])),i.palette.blue.light1)),Bn),Qn=a.css(En||(En=B(["\n position: relative;\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 2px;\n bottom: -4px;\n left: 0;\n border-radius: 2px;\n }\n\n .",":focus & {\n &::after {\n background-color: ",";\n }\n }\n"])),$n,i.palette.blue.light1),Vn=(D(jn={},o.Theme.Light,a.css(On||(On=B(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),$n,i.palette.gray.light2)),D(jn,o.Theme.Dark,a.css(Ln||(Ln=B(["\n .",":hover & {\n &::after {\n background-color: ",";\n }\n }\n "])),$n,i.palette.gray.dark2)),jn),Xn=a.css(Hn||(Hn=B(["\n transform: translate3d(3px, 0, 0);\n"]))),Yn=a.css(Cn||(Cn=B(["\n opacity: 0;\n transform: translate3d(-3px, 0, 0);\n transition: all 100ms ease-in;\n\n .",":hover & {\n opacity: 1;\n transform: translate3d(3px, 0, 0);\n }\n"])),$n),Zn=a.css(qn||(qn=B(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]))),et="hover",nt="persist",tt="none",at=["href","children","className","arrowAppearance","hideExternalIcon","baseFontSize","target","darkMode"],rt=a.css(_n||(_n=B(["\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n line-height: 20px;\n letter-spacing: 0.4px;\n"]))),ot=["darkMode","className"],it=function(e){var n=e.darkMode,t=e.className,o=M(e,ot),i=r.useDarkMode(n).theme;return N.default.createElement(S.default,T({className:a.cx(_,rt,G[i],t)},o))};it.displayName="Overline";var lt=a.css(Kn||(Kn=B(["\n font-size: 18px;\n line-height: 24px;\n font-weight: 700;\n"]))),st=["darkMode","className"],ct=function(e){var n=e.darkMode,t=e.className,o=M(e,st),i=r.useDarkMode(n).theme;return N.default.createElement(S.default,T({as:"h6",className:a.cx(_,lt,G[i],t)},o))};ct.displayName="Subtitle";var dt,ut,ft=["as","children","maxFontWeight","pseudoElement","className"],ht=function(e){var n=e.pseudoElement,t=e.maxFontWeight,r="&:".concat(n);return a.css(dt||(dt=B(["\n /* Inherit relevant properties from the parent */\n font-weight: inherit;\n font-size: inherit;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n position: relative;\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n text-decoration: none;\n min-width: 0;\n max-width: 100%;\n\n "," {\n content: attr(data-text);\n height: 0;\n font-weight: ",";\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n }\n "])),r,t)},pt=a.css(ut||(ut=B(["\n flex: 1;\n min-width: 0;\n max-width: 100%;\n\n white-space: inherit;\n overflow: inherit;\n text-overflow: inherit;\n"])));e.Body=X,e.Description=le,e.Disclaimer=me,e.Error=function(e){var n=e.children,t=e.darkMode,o=e.className,i=M(e,ze),l=r.useDarkMode(t).theme;return N.default.createElement("p",T({},i,{className:a.cx(Fe,we[l],o)}),n)},e.H1=Be,e.H2=He,e.H3=Xe,e.InlineCode=fn,e.InlineKeyCode=zn,e.Label=Wn,e.Link=function(e){var t=e.href,o=e.children,i=e.className,l=e.arrowAppearance,s=void 0===l?tt:l,c=e.hideExternalIcon,d=void 0!==c&&c,u=e.baseFontSize,f=e.target,h=e.darkMode,p=M(e,at),m=E(n.useState(""),2),g=m[0],y=m[1];n.useEffect((function(){y(window.location.hostname)}),[]);var b,x,k,v=r.useDarkMode(h).theme,F=n.useMemo((function(){if(t){return/^http(s)?:\/\//.test(t)?new URL(t).hostname:g}}),[t,g]),B=J(u);if(f?b=f:F===g?b="_self":(b="_blank",k="noopener noreferrer"),"_blank"!==b||d){if(s!==tt){var O;x=N.default.createElement(w.default,{role:"presentation",size:12,className:a.cx((O={},D(O,Yn,s===et),D(O,Xn,s===nt),O))})}}else x=N.default.createElement(z.default,{role:"presentation",className:Zn});var L=t?{as:"a",href:t,target:b,rel:k}:{as:"span"};return N.default.createElement(S.default,T({className:a.cx($n,K[B],Gn,Jn[v],i)},L,p),N.default.createElement("span",{className:a.cx(Qn,Vn[v])},o),x)},e.Overline=it,e.StaticWidthText=function(e){var n=e.as,t=void 0===n?"span":n,r=e.children,i=e.maxFontWeight,l=void 0===i?700:i,s=e.pseudoElement,c=void 0===s?"after":s,d=e.className,u=M(e,ft),f=o.getNodeTextContent(r);return N.default.createElement(S.default,T({className:a.cx(ht({pseudoElement:c,maxFontWeight:l}),d),as:t,"data-text":f},u),N.default.createElement("span",{className:pt},r))},e.Subtitle=ct,e.anchorClassName=$n,e.bodyTypeScaleStyles=K,e.labelTypeScaleStyles=Pn,e.useUpdatedBaseFontSize=J,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/typography", | ||
"version": "15.2.1", | ||
"version": "15.3.0", | ||
"description": "leafyGreen UI Kit Typography", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -98,2 +98,3 @@ # Typography | ||
| `Description` | `p` | | ||
| `Label` | `p` | | ||
@@ -158,2 +159,8 @@ # H1 | ||
# Error | ||
| Prop | Type | Description | Default | | ||
| ---------- | --------- | ------------------------------------------------ | ------- | | ||
| `darkMode` | `boolean` | Determines if the component renders in dark mode | `false` | | ||
# Overline | ||
@@ -160,0 +167,0 @@ |
export { default as Body } from './Body/Body'; | ||
export { default as Description } from './Description/Description'; | ||
export { default as Disclaimer } from './Disclaimer/Disclaimer'; | ||
export { default as Error } from './Error/Error'; | ||
export { default as H1 } from './H1/H1'; | ||
@@ -5,0 +6,0 @@ export { default as H2 } from './H2/H2'; |
@@ -738,2 +738,38 @@ [ | ||
"methods": [], | ||
"displayName": "Error", | ||
"props": { | ||
"DOMAttributes": "https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes", | ||
"HTMLAttributes": "https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes", | ||
"AriaAttributes": "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes", | ||
"DarkModeProps": { | ||
"darkMode": { | ||
"name": "darkMode", | ||
"defaultValue": { | ||
"value": "false" | ||
}, | ||
"description": "Renders the component with dark mode styles.", | ||
"required": false, | ||
"type": { | ||
"name": "enum", | ||
"raw": "boolean", | ||
"value": [ | ||
{ | ||
"value": "false" | ||
}, | ||
{ | ||
"value": "true" | ||
} | ||
] | ||
}, | ||
"tags": { | ||
"default": "false" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"tags": {}, | ||
"description": "", | ||
"methods": [], | ||
"displayName": "InlineCode", | ||
@@ -740,0 +776,0 @@ "props": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305488
138
2854
197