@leafygreen-ui/typography
Advanced tools
Comparing version 8.0.3 to 8.0.4
# @leafygreen-ui/typography | ||
## 8.0.4 | ||
### Patch Changes | ||
- Updated dependencies [f6e5655a] | ||
- Updated dependencies [03388ff2] | ||
- Updated dependencies [b8f03aa1] | ||
- @leafygreen-ui/palette@3.2.2 | ||
- @leafygreen-ui/icon@11.3.0 | ||
- @leafygreen-ui/lib@9.0.0 | ||
- @leafygreen-ui/box@3.0.6 | ||
- @leafygreen-ui/leafygreen-provider@2.1.3 | ||
- @leafygreen-ui/tokens@0.5.3 | ||
## 8.0.3 | ||
@@ -4,0 +18,0 @@ |
@@ -1,2 +0,2 @@ | ||
import n,{useState as e,useEffect as r,useMemo as t}from"react";import a from"@leafygreen-ui/box";import{createDataProp as o}from"@leafygreen-ui/lib";import{useBaseFontSize as i,useUsingKeyboardContext as l}from"@leafygreen-ui/leafygreen-provider";import{css as c,cx as u}from"@leafygreen-ui/emotion";import{uiColors as s}from"@leafygreen-ui/palette";import{fontFamilies as f}from"@leafygreen-ui/tokens";import p from"@leafygreen-ui/icon/dist/ArrowRight";import d from"@leafygreen-ui/icon/dist/OpenNewTab";function m(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function g(){return(g=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function h(n,e){if(null==n)return{};var r,t,a=function(n,e){if(null==n)return{};var r,t,a={},o=Object.keys(n);for(t=0;t<o.length;t++)r=o[t],e.indexOf(r)>=0||(a[r]=n[r]);return a}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(t=0;t<o.length;t++)r=o[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(a[r]=n[r])}return a}function v(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function b(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var r=[],t=!0,a=!1,o=void 0;try{for(var i,l=n[Symbol.iterator]();!(t=(i=l.next()).done)&&(r.push(i.value),!e||r.length!==e);t=!0);}catch(n){a=!0,o=n}finally{try{t||null==l.return||l.return()}finally{if(a)throw o}}return r}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return y(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(n,e)}(n,e)||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 y(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function x(){var n=v(["\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return x=function(){return n},n}function N(){var n=v(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0px;\n"]);return N=function(){return n},n}var w=c(N()),k=c(x());function E(){var n=v(["\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n line-height: 16px;\n letter-spacing: 0.4px;\n"]);return E=function(){return n},n}function F(){var n=v(["\n display: block;\n font-size: 12px;\n line-height: 20px;\n letter-spacing: 0.2px;\n"]);return F=function(){return n},n}function O(){var n=v(["\n font-family: ",";\n color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n padding-left: 4px;\n padding-right: 4px;\n"]);return O=function(){return n},n}function C(){var n=v(["\n color: ",";\n"]);return C=function(){return n},n}function D(){var n=v(["\n white-space: normal;\n"]);return D=function(){return n},n}function j(){var n=v(["\n white-space: nowrap;\n"]);return j=function(){return n},n}function z(){var n=v(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n\n &:focus {\n outline: none;\n }\n"]);return z=function(){return n},n}function A(){var n=v(["\n ",":focus > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return A=function(){return n},n}function S(){var n=v(["\n background-color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n font-family: ",";\n\n ",":hover > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return S=function(){return n},n}function I(){var n=v(["\n font-weight: ",";\n "]);return I=function(){return n},n}function B(){var n=v(["\n font-size: 18px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return B=function(){return n},n}function L(){var n=v(["\n font-size: 24px;\n line-height: 32px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return L=function(){return n},n}function M(){var n=v(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return M=function(){return n},n}function P(){var n=v(["\n font-weight: 500;\n font-size: 60px;\n line-height: 68px;\n letter-spacing: -0.3px;\n"]);return P=function(){return n},n}function H(){var n=v(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return H=function(){return n},n}var _=c(H(),f.default,s.gray.dark3),K=c(P()),R=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({as:"h1",className:u(_,K,r)},t))};R.displayName="H1";var T=c(M()),U=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({as:"h2",className:u(_,T,r)},t))};U.displayName="H2";var $=c(L()),q=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({as:"h3",className:u(_,$,r)},t))};q.displayName="H3";var G=c(B()),J=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({as:"h6",className:u(_,G,r)},t))};function Q(e){var r=e.children,t=e.className,a=e.weight,o=void 0===a?"regular":a,l=h(e,["children","className","weight"]),s=16===i()?k:w,f=c(I(),"regular"!==o?600:400);return n.createElement("div",g({},l,{className:u(_,s,f,t)}),r)}J.displayName="Subtitle",Q.displayName="Body";var V=o("anchor-inline-code"),W=c(S(),s.gray.light3,s.gray.light1,f.code,V.selector,s.gray.light2),X=c(A(),V.selector,s.blue.light2),Y=c(z()),Z=c(j()),nn=c(D()),en=c(C(),s.blue.base);function rn(e){var r,t,a=e.children,o=e.className,c=h(e,["children","className"]),s=l().usingKeyboard,f=16===i()?k:w,p=(null!==(r="string"==typeof a&&(null===(t=a.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===t?void 0:t.length))&&void 0!==r?r:0)<=30?Z:nn,d=void 0!==(null==c?void 0:c.href)||void 0!==c.onClick,v=n.createElement("code",{className:u(W,f,p,m({},X,s),o)},a);return d?n.createElement("a",g({},V.prop,{className:u(Y,en,o)},c),v):n.cloneElement(v,c)}rn.displayName="InlineCode";var tn=c(O(),f.code,s.gray.dark3,s.gray.dark3);function an(e){var r=e.children,t=e.className,a=h(e,["children","className"]),o=16===i()?k:w;return n.createElement("code",g({className:u(tn,o,t)},a),r)}an.displayName="InlineKeyCode";var on=c(F());function ln(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("small",g({},a,{className:u(_,on,t)}),r)}ln.displayName="Disclaimer";var cn=c(E()),un=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({className:u(_,cn,r)},t))};function sn(){var n=v(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]);return sn=function(){return n},n}function fn(){var n=v(["\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"]);return fn=function(){return n},n}function pn(){var n=v(["\n transform: translate3d(3px, 0, 0);\n"]);return pn=function(){return n},n}function dn(){var n=v(["\n background-repeat: repeat-x;\n background-size: 2px 2px;\n background-position: center bottom;\n\n ",":hover & {\n background-image: linear-gradient(\n "," 100%,\n "," 0\n );\n }\n\n ",":focus & {\n background-image: linear-gradient(\n to right,\n "," 100%,\n "," 0\n );\n }\n"]);return dn=function(){return n},n}function mn(){var n=v(["\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n"]);return mn=function(){return n},n}un.displayName="Overline";var gn,hn=o("anchor-container"),vn=c(mn(),s.blue.base),bn=c(dn(),hn.selector,s.gray.light2,s.gray.light2,hn.selector,s.blue.light1,s.blue.light1),yn=c(pn()),xn=c(fn(),hn.selector),Nn=c(sn()),wn="hover",kn="persist",En="none",Fn=function(o){var l=o.href,c=o.children,s=o.className,f=o.target,v=o.arrowAppearance,y=void 0===v?En:v,x=o.hideExternalIcon,N=void 0!==x&&x,E=h(o,["href","children","className","target","arrowAppearance","hideExternalIcon"]),F=b(e(""),2),O=F[0],C=F[1];r((function(){C(window.location.hostname)}),[]);var D,j,z,A=t((function(){if(l){return/^http(s)?:\/\//.test(l)?new URL(l).hostname:O}}),[l,O]),S=16===i()?k:w;if(f?D=f:A===O?D="_self":(D="_blank",z="noopener noreferrer"),"_blank"!==D||N){if(y!==En){var I;j=n.createElement(p,{role:"presentation",size:12,className:u((I={},m(I,xn,y===wn),m(I,yn,y===kn),I))})}}else j=n.createElement(d,{role:"presentation",className:Nn});var B=l?{as:"a",href:l,target:D,rel:z}:{as:"span"};return n.createElement(a,g({className:u(vn,S,s)},B,hn.prop,E),n.createElement("span",{className:bn},c),j)};function On(){var n=v(["\n font-size: 14px;\n line-height: 16px;\n font-weight: normal;\n padding-bottom: 4px;\n margin-top: 0;\n margin-bottom: 0;\n"]);return On=function(){return n},n}function Cn(){var n=v(["\n font-size: 14px;\n font-weight: bold;\n line-height: 16px;\n padding-bottom: 4px;\n"]);return Cn=function(){return n},n}function Dn(){var n=v(["\n color: ",";\n "]);return Dn=function(){return n},n}function jn(){var n=v(["\n color: ",";\n "]);return jn=function(){return n},n}function zn(){var n=v(["\n color: ",";\n "]);return zn=function(){return n},n}function An(){var n=v(["\n color: ",";\n "]);return An=function(){return n},n}function Sn(){var n=v(["\n color: ",";\n "]);return Sn=function(){return n},n}function In(){var n=v(["\n color: ",";\n "]);return In=function(){return n},n}var Bn="light",Ln="dark",Mn=(m(gn={},Bn,{labelColor:c(In(),s.gray.dark2),disabledLabelColor:c(Sn(),s.gray.dark1),descriptionColor:c(An(),s.gray.dark1)}),m(gn,Ln,{labelColor:c(zn(),s.white),disabledLabelColor:c(jn(),s.gray.light1),descriptionColor:c(Dn(),s.gray.light1)}),gn),Pn=c(Cn()),Hn=function(e){var r=e.darkMode,t=void 0!==r&&r,a=e.className,o=e.children,i=e.disabled,l=void 0!==i&&i,c=h(e,["darkMode","className","children","disabled"]),s=t?Ln:Bn;return n.createElement("label",g({className:u(Pn,Mn[s].labelColor,m({},Mn[s].disabledLabelColor,l),a)},c),o)};Hn.displayName="Label";var _n=c(On()),Kn=function(e){var r=e.darkMode,t=void 0!==r&&r,a=e.children,o=e.className,i=h(e,["darkMode","children","className"]),l=t?Ln:Bn;return n.createElement("p",g({className:u(_n,Mn[l].descriptionColor,o)},i),a)};Kn.displayName="Description";export{Q as Body,Kn as Description,ln as Disclaimer,R as H1,U as H2,q as H3,rn as InlineCode,an as InlineKeyCode,Hn as Label,Fn as Link,un as Overline,J as Subtitle}; | ||
import n,{useState as r,useEffect as e,useMemo as t}from"react";import a from"@leafygreen-ui/box";import{createDataProp as o}from"@leafygreen-ui/lib";import{useBaseFontSize as i,useUsingKeyboardContext as l}from"@leafygreen-ui/leafygreen-provider";import{css as u,cx as c}from"@leafygreen-ui/emotion";import{uiColors as s}from"@leafygreen-ui/palette";import{fontFamilies as f}from"@leafygreen-ui/tokens";import{jsx as p}from"@emotion/react";import d from"@leafygreen-ui/icon/dist/ArrowRight";import m from"@leafygreen-ui/icon/dist/OpenNewTab";function g(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function h(){return(h=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n}).apply(this,arguments)}function v(n,r){if(null==n)return{};var e,t,a=function(n,r){if(null==n)return{};var e,t,a={},o=Object.keys(n);for(t=0;t<o.length;t++)e=o[t],r.indexOf(e)>=0||(a[e]=n[e]);return a}(n,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(t=0;t<o.length;t++)e=o[t],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(a[e]=n[e])}return a}function b(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}function y(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var e=[],t=!0,a=!1,o=void 0;try{for(var i,l=n[Symbol.iterator]();!(t=(i=l.next()).done)&&(e.push(i.value),!r||e.length!==r);t=!0);}catch(n){a=!0,o=n}finally{try{t||null==l.return||l.return()}finally{if(a)throw o}}return e}(n,r)||function(n,r){if(!n)return;if("string"==typeof n)return x(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return x(n,r)}(n,r)||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 x(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function N(){var n=b(["\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return N=function(){return n},n}function w(){var n=b(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0px;\n"]);return w=function(){return n},n}var k=u(w()),F=u(N());function O(){var n=b(["\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n line-height: 16px;\n letter-spacing: 0.4px;\n"]);return O=function(){return n},n}function C(){var n=b(["\n display: block;\n font-size: 12px;\n line-height: 20px;\n letter-spacing: 0.2px;\n"]);return C=function(){return n},n}function D(){var n=b(["\n font-family: ",";\n color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n padding-left: 4px;\n padding-right: 4px;\n"]);return D=function(){return n},n}function j(){var n=b(["\n color: ",";\n"]);return j=function(){return n},n}function z(){var n=b(["\n white-space: normal;\n"]);return z=function(){return n},n}function A(){var n=b(["\n white-space: nowrap;\n"]);return A=function(){return n},n}function S(){var n=b(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n\n &:focus {\n outline: none;\n }\n"]);return S=function(){return n},n}function I(){var n=b(["\n ",":focus > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return I=function(){return n},n}function E(){var n=b(["\n background-color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n font-family: ",";\n\n ",":hover > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return E=function(){return n},n}function B(){var n=b(["\n font-weight: ",";\n "]);return B=function(){return n},n}function L(){var n=b(["\n font-size: 18px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return L=function(){return n},n}function M(){var n=b(["\n font-size: 24px;\n line-height: 32px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return M=function(){return n},n}function P(){var n=b(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return P=function(){return n},n}function H(){var n=b(["\n font-weight: 500;\n font-size: 60px;\n line-height: 68px;\n letter-spacing: -0.3px;\n"]);return H=function(){return n},n}function _(){var n=b(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return _=function(){return n},n}var K=u(_(),f.default,s.gray.dark3),R=u(H()),T=function(n){var r=n.className,e=v(n,["className"]);return p(a,h({as:"h1",className:c(K,R,r)},e))};T.displayName="H1";var U=u(P()),$=function(n){var r=n.className,e=v(n,["className"]);return p(a,h({as:"h2",className:c(K,U,r)},e))};$.displayName="H2";var q=u(M()),G=function(n){var r=n.className,e=v(n,["className"]);return p(a,h({as:"h3",className:c(K,q,r)},e))};G.displayName="H3";var J=u(L()),Q=function(n){var r=n.className,e=v(n,["className"]);return p(a,h({as:"h6",className:c(K,J,r)},e))};function V(n){var r=n.children,e=n.className,t=n.weight,a=void 0===t?"regular":t,o=v(n,["children","className","weight"]),l=16===i()?F:k,s=u(B(),"regular"!==a?600:400);return p("div",h({},o,{className:c(K,l,s,e)}),r)}Q.displayName="Subtitle",V.displayName="Body";var W=o("anchor-inline-code"),X=u(E(),s.gray.light3,s.gray.light1,f.code,W.selector,s.gray.light2),Y=u(I(),W.selector,s.blue.light2),Z=u(S()),nn=u(A()),rn=u(z()),en=u(j(),s.blue.base);function tn(r){var e,t,a=r.children,o=r.className,u=v(r,["children","className"]),s=l().usingKeyboard,f=16===i()?F:k,d=(null!==(e="string"==typeof a&&(null===(t=a.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===t?void 0:t.length))&&void 0!==e?e:0)<=30?nn:rn,m=void 0!==(null==u?void 0:u.href)||void 0!==u.onClick,b=p("code",{className:c(X,f,d,g({},Y,s),o)},a);return m?p("a",h({},W.prop,{className:c(Z,en,o)},u),b):n.cloneElement(b,u)}tn.displayName="InlineCode";var an=u(D(),f.code,s.gray.dark3,s.gray.dark3);function on(n){var r=n.children,e=n.className,t=v(n,["children","className"]),a=i();return p("code",h({className:c(an,16===a?F:k,e)},t),r)}on.displayName="InlineKeyCode";var ln=u(C());function un(n){var r=n.children,e=n.className,t=v(n,["children","className"]);return p("small",h({},t,{className:c(K,ln,e)}),r)}un.displayName="Disclaimer";var cn=u(O()),sn=function(n){var r=n.className,e=v(n,["className"]);return p(a,h({className:c(K,cn,r)},e))};function fn(){var n=b(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]);return fn=function(){return n},n}function pn(){var n=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"]);return pn=function(){return n},n}function dn(){var n=b(["\n transform: translate3d(3px, 0, 0);\n"]);return dn=function(){return n},n}function mn(){var n=b(["\n background-repeat: repeat-x;\n background-size: 2px 2px;\n background-position: center bottom;\n\n ",":hover & {\n background-image: linear-gradient(\n "," 100%,\n "," 0\n );\n }\n\n ",":focus & {\n background-image: linear-gradient(\n to right,\n "," 100%,\n "," 0\n );\n }\n"]);return mn=function(){return n},n}function gn(){var n=b(["\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n"]);return gn=function(){return n},n}sn.displayName="Overline";var hn,vn=o("anchor-container"),bn=u(gn(),s.blue.base),yn=u(mn(),vn.selector,s.gray.light2,s.gray.light2,vn.selector,s.blue.light1,s.blue.light1),xn=u(dn()),Nn=u(pn(),vn.selector),wn=u(fn()),kn="hover",Fn="persist",On="none",Cn=function(n){var o=n.href,l=n.children,u=n.className,s=n.target,f=n.arrowAppearance,b=void 0===f?On:f,x=n.hideExternalIcon,N=void 0!==x&&x,w=v(n,["href","children","className","target","arrowAppearance","hideExternalIcon"]),O=y(r(""),2),C=O[0],D=O[1];e((function(){D(window.location.hostname)}),[]);var j,z,A,S=t((function(){if(o){return/^http(s)?:\/\//.test(o)?new URL(o).hostname:C}}),[o,C]),I=16===i()?F:k;if(s?j=s:S===C?j="_self":(j="_blank",A="noopener noreferrer"),"_blank"!==j||N){if(b!==On){var E;z=p(d,{role:"presentation",size:12,className:c((E={},g(E,Nn,b===kn),g(E,xn,b===Fn),E))})}}else z=p(m,{role:"presentation",className:wn});var B=o?{as:"a",href:o,target:j,rel:A}:{as:"span"};return p(a,h({className:c(bn,I,u)},B,vn.prop,w),p("span",{className:yn},l),z)};function Dn(){var n=b(["\n font-size: 14px;\n line-height: 16px;\n font-weight: normal;\n padding-bottom: 4px;\n margin-top: 0;\n margin-bottom: 0;\n"]);return Dn=function(){return n},n}function jn(){var n=b(["\n font-size: 14px;\n font-weight: bold;\n line-height: 16px;\n padding-bottom: 4px;\n"]);return jn=function(){return n},n}function zn(){var n=b(["\n color: ",";\n "]);return zn=function(){return n},n}function An(){var n=b(["\n color: ",";\n "]);return An=function(){return n},n}function Sn(){var n=b(["\n color: ",";\n "]);return Sn=function(){return n},n}function In(){var n=b(["\n color: ",";\n "]);return In=function(){return n},n}function En(){var n=b(["\n color: ",";\n "]);return En=function(){return n},n}function Bn(){var n=b(["\n color: ",";\n "]);return Bn=function(){return n},n}var Ln="light",Mn="dark",Pn=(g(hn={},Ln,{labelColor:u(Bn(),s.gray.dark2),disabledLabelColor:u(En(),s.gray.dark1),descriptionColor:u(In(),s.gray.dark1)}),g(hn,Mn,{labelColor:u(Sn(),s.white),disabledLabelColor:u(An(),s.gray.light1),descriptionColor:u(zn(),s.gray.light1)}),hn),Hn=u(jn()),_n=function(n){var r=n.darkMode,e=void 0!==r&&r,t=n.className,a=n.children,o=n.disabled,i=void 0!==o&&o,l=v(n,["darkMode","className","children","disabled"]),u=e?Mn:Ln;return p("label",h({className:c(Hn,Pn[u].labelColor,g({},Pn[u].disabledLabelColor,i),t)},l),a)};_n.displayName="Label";var Kn=u(Dn()),Rn=function(n){var r=n.darkMode,e=void 0!==r&&r,t=n.children,a=n.className,o=v(n,["darkMode","children","className"]);return p("p",h({className:c(Kn,Pn[e?Mn:Ln].descriptionColor,a)},o),t)};Rn.displayName="Description";export{V as Body,Rn as Description,un as Disclaimer,T as H1,$ as H2,G as H3,tn as InlineCode,on as InlineKeyCode,_n as Label,Cn as Link,sn as Overline,Q as Subtitle}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("@leafygreen-ui/box"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/leafygreen-provider"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),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/lib","@leafygreen-ui/leafygreen-provider","@leafygreen-ui/emotion","@leafygreen-ui/palette","@leafygreen-ui/tokens","@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/lib"],e["@leafygreen-ui/leafygreen-provider"],e["@leafygreen-ui/emotion"],e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e.ArrowRight,e.OpenNewTab)}(this,(function(e,n,r,t,a,i,o,l,u,s){"use strict";function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=c(n),d=c(r),p=c(u),g=c(s);function m(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function h(){return(h=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}).apply(this,arguments)}function y(e,n){if(null==e)return{};var r,t,a=function(e,n){if(null==e)return{};var r,t,a={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function v(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function b(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],t=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(t=(o=l.next()).done)&&(r.push(o.value),!n||r.length!==n);t=!0);}catch(e){a=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(a)throw i}}return r}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return x(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 x(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 x(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}function N(){var e=v(["\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return N=function(){return e},e}function C(){var e=v(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0px;\n"]);return C=function(){return e},e}var w=i.css(C()),F=i.css(N());function k(){var e=v(["\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n line-height: 16px;\n letter-spacing: 0.4px;\n"]);return k=function(){return e},e}function E(){var e=v(["\n display: block;\n font-size: 12px;\n line-height: 20px;\n letter-spacing: 0.2px;\n"]);return E=function(){return e},e}function O(){var e=v(["\n font-family: ",";\n color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n padding-left: 4px;\n padding-right: 4px;\n"]);return O=function(){return e},e}function D(){var e=v(["\n color: ",";\n"]);return D=function(){return e},e}function z(){var e=v(["\n white-space: normal;\n"]);return z=function(){return e},e}function j(){var e=v(["\n white-space: nowrap;\n"]);return j=function(){return e},e}function S(){var e=v(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n\n &:focus {\n outline: none;\n }\n"]);return S=function(){return e},e}function A(){var e=v(["\n ",":focus > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return A=function(){return e},e}function B(){var e=v(["\n background-color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n font-family: ",";\n\n ",":hover > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return B=function(){return e},e}function I(){var e=v(["\n font-weight: ",";\n "]);return I=function(){return e},e}function q(){var e=v(["\n font-size: 18px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return q=function(){return e},e}function P(){var e=v(["\n font-size: 24px;\n line-height: 32px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return P=function(){return e},e}function L(){var e=v(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return L=function(){return e},e}function M(){var e=v(["\n font-weight: 500;\n font-size: 60px;\n line-height: 68px;\n letter-spacing: -0.3px;\n"]);return M=function(){return e},e}function H(){var e=v(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return H=function(){return e},e}var T=i.css(H(),l.fontFamilies.default,o.uiColors.gray.dark3),R=i.css(M()),_=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({as:"h1",className:i.cx(T,R,n)},r))};_.displayName="H1";var K=i.css(L()),U=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({as:"h2",className:i.cx(T,K,n)},r))};U.displayName="H2";var $=i.css(P()),G=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({as:"h3",className:i.cx(T,$,n)},r))};G.displayName="H3";var J=i.css(q()),Q=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({as:"h6",className:i.cx(T,J,n)},r))};function V(e){var n=e.children,r=e.className,t=e.weight,o=void 0===t?"regular":t,l=y(e,["children","className","weight"]),u=16===a.useBaseFontSize()?F:w,s=i.css(I(),"regular"!==o?600:400);return f.default.createElement("div",h({},l,{className:i.cx(T,u,s,r)}),n)}Q.displayName="Subtitle",V.displayName="Body";var W=t.createDataProp("anchor-inline-code"),X=i.css(B(),o.uiColors.gray.light3,o.uiColors.gray.light1,l.fontFamilies.code,W.selector,o.uiColors.gray.light2),Y=i.css(A(),W.selector,o.uiColors.blue.light2),Z=i.css(S()),ee=i.css(j()),ne=i.css(z()),re=i.css(D(),o.uiColors.blue.base);function te(e){var n,r,t=e.children,o=e.className,l=y(e,["children","className"]),u=a.useUsingKeyboardContext().usingKeyboard,s=16===a.useBaseFontSize()?F:w,c=(null!==(n="string"==typeof t&&(null===(r=t.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===r?void 0:r.length))&&void 0!==n?n:0)<=30?ee:ne,d=void 0!==(null==l?void 0:l.href)||void 0!==l.onClick,p=f.default.createElement("code",{className:i.cx(X,s,c,m({},Y,u),o)},t);return d?f.default.createElement("a",h({},W.prop,{className:i.cx(Z,re,o)},l),p):f.default.cloneElement(p,l)}te.displayName="InlineCode";var ae=i.css(O(),l.fontFamilies.code,o.uiColors.gray.dark3,o.uiColors.gray.dark3);function ie(e){var n=e.children,r=e.className,t=y(e,["children","className"]),o=16===a.useBaseFontSize()?F:w;return f.default.createElement("code",h({className:i.cx(ae,o,r)},t),n)}ie.displayName="InlineKeyCode";var oe=i.css(E());function le(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("small",h({},t,{className:i.cx(T,oe,r)}),n)}le.displayName="Disclaimer";var ue=i.css(k()),se=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({className:i.cx(T,ue,n)},r))};function ce(){var e=v(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]);return ce=function(){return e},e}function fe(){var e=v(["\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"]);return fe=function(){return e},e}function de(){var e=v(["\n transform: translate3d(3px, 0, 0);\n"]);return de=function(){return e},e}function pe(){var e=v(["\n background-repeat: repeat-x;\n background-size: 2px 2px;\n background-position: center bottom;\n\n ",":hover & {\n background-image: linear-gradient(\n "," 100%,\n "," 0\n );\n }\n\n ",":focus & {\n background-image: linear-gradient(\n to right,\n "," 100%,\n "," 0\n );\n }\n"]);return pe=function(){return e},e}function ge(){var e=v(["\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n"]);return ge=function(){return e},e}se.displayName="Overline";var me,he=t.createDataProp("anchor-container"),ye=i.css(ge(),o.uiColors.blue.base),ve=i.css(pe(),he.selector,o.uiColors.gray.light2,o.uiColors.gray.light2,he.selector,o.uiColors.blue.light1,o.uiColors.blue.light1),be=i.css(de()),xe=i.css(fe(),he.selector),Ne=i.css(ce()),Ce="hover",we="persist",Fe="none";function ke(){var e=v(["\n font-size: 14px;\n line-height: 16px;\n font-weight: normal;\n padding-bottom: 4px;\n margin-top: 0;\n margin-bottom: 0;\n"]);return ke=function(){return e},e}function Ee(){var e=v(["\n font-size: 14px;\n font-weight: bold;\n line-height: 16px;\n padding-bottom: 4px;\n"]);return Ee=function(){return e},e}function Oe(){var e=v(["\n color: ",";\n "]);return Oe=function(){return e},e}function De(){var e=v(["\n color: ",";\n "]);return De=function(){return e},e}function ze(){var e=v(["\n color: ",";\n "]);return ze=function(){return e},e}function je(){var e=v(["\n color: ",";\n "]);return je=function(){return e},e}function Se(){var e=v(["\n color: ",";\n "]);return Se=function(){return e},e}function Ae(){var e=v(["\n color: ",";\n "]);return Ae=function(){return e},e}var Be="light",Ie="dark",qe=(m(me={},Be,{labelColor:i.css(Ae(),o.uiColors.gray.dark2),disabledLabelColor:i.css(Se(),o.uiColors.gray.dark1),descriptionColor:i.css(je(),o.uiColors.gray.dark1)}),m(me,Ie,{labelColor:i.css(ze(),o.uiColors.white),disabledLabelColor:i.css(De(),o.uiColors.gray.light1),descriptionColor:i.css(Oe(),o.uiColors.gray.light1)}),me),Pe=i.css(Ee()),Le=function(e){var n=e.darkMode,r=void 0!==n&&n,t=e.className,a=e.children,o=e.disabled,l=void 0!==o&&o,u=y(e,["darkMode","className","children","disabled"]),s=r?Ie:Be;return f.default.createElement("label",h({className:i.cx(Pe,qe[s].labelColor,m({},qe[s].disabledLabelColor,l),t)},u),a)};Le.displayName="Label";var Me=i.css(ke()),He=function(e){var n=e.darkMode,r=void 0!==n&&n,t=e.children,a=e.className,o=y(e,["darkMode","children","className"]),l=r?Ie:Be;return f.default.createElement("p",h({className:i.cx(Me,qe[l].descriptionColor,a)},o),t)};He.displayName="Description",e.Body=V,e.Description=He,e.Disclaimer=le,e.H1=_,e.H2=U,e.H3=G,e.InlineCode=te,e.InlineKeyCode=ie,e.Label=Le,e.Link=function(e){var r=e.href,t=e.children,o=e.className,l=e.target,u=e.arrowAppearance,s=void 0===u?Fe:u,c=e.hideExternalIcon,v=void 0!==c&&c,x=y(e,["href","children","className","target","arrowAppearance","hideExternalIcon"]),N=b(n.useState(""),2),C=N[0],k=N[1];n.useEffect((function(){k(window.location.hostname)}),[]);var E,O,D,z=n.useMemo((function(){if(r){return/^http(s)?:\/\//.test(r)?new URL(r).hostname:C}}),[r,C]),j=16===a.useBaseFontSize()?F:w;if(l?E=l:z===C?E="_self":(E="_blank",D="noopener noreferrer"),"_blank"!==E||v){if(s!==Fe){var S;O=f.default.createElement(p.default,{role:"presentation",size:12,className:i.cx((S={},m(S,xe,s===Ce),m(S,be,s===we),S))})}}else O=f.default.createElement(g.default,{role:"presentation",className:Ne});var A=r?{as:"a",href:r,target:E,rel:D}:{as:"span"};return f.default.createElement(d.default,h({className:i.cx(ye,j,o)},A,he.prop,x),f.default.createElement("span",{className:ve},t),O)},e.Overline=se,e.Subtitle=Q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("@leafygreen-ui/box"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/leafygreen-provider"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("@emotion/react"),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/lib","@leafygreen-ui/leafygreen-provider","@leafygreen-ui/emotion","@leafygreen-ui/palette","@leafygreen-ui/tokens","@emotion/react","@leafygreen-ui/icon/dist/ArrowRight","@leafygreen-ui/icon/dist/OpenNewTab"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self)["@leafygreen-ui/typography"]={},n.React,n["@leafygreen-ui/box"],n["@leafygreen-ui/lib"],n["@leafygreen-ui/leafygreen-provider"],n["@leafygreen-ui/emotion"],n["@leafygreen-ui/palette"],n["@leafygreen-ui/tokens"],n.react,n.ArrowRight,n.OpenNewTab)}(this,(function(n,e,r,t,a,i,o,s,u,l,c){"use strict";function f(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var d=f(e),p=f(r),g=f(l),m=f(c);function h(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function y(){return(y=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n}).apply(this,arguments)}function v(n,e){if(null==n)return{};var r,t,a=function(n,e){if(null==n)return{};var r,t,a={},i=Object.keys(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||(a[r]=n[r]);return a}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(a[r]=n[r])}return a}function x(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function b(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var r=[],t=!0,a=!1,i=void 0;try{for(var o,s=n[Symbol.iterator]();!(t=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);t=!0);}catch(n){a=!0,i=n}finally{try{t||null==s.return||s.return()}finally{if(a)throw i}}return r}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return N(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);"Object"===r&&n.constructor&&(r=n.constructor.name);if("Map"===r||"Set"===r)return Array.from(n);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(n,e)}(n,e)||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 N(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function C(){var n=x(["\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return C=function(){return n},n}function w(){var n=x(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0px;\n"]);return w=function(){return n},n}var j=i.css(w()),F=i.css(C());function k(){var n=x(["\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n line-height: 16px;\n letter-spacing: 0.4px;\n"]);return k=function(){return n},n}function O(){var n=x(["\n display: block;\n font-size: 12px;\n line-height: 20px;\n letter-spacing: 0.2px;\n"]);return O=function(){return n},n}function D(){var n=x(["\n font-family: ",";\n color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n padding-left: 4px;\n padding-right: 4px;\n"]);return D=function(){return n},n}function z(){var n=x(["\n color: ",";\n"]);return z=function(){return n},n}function S(){var n=x(["\n white-space: normal;\n"]);return S=function(){return n},n}function A(){var n=x(["\n white-space: nowrap;\n"]);return A=function(){return n},n}function q(){var n=x(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n\n &:focus {\n outline: none;\n }\n"]);return q=function(){return n},n}function B(){var n=x(["\n ",":focus > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return B=function(){return n},n}function I(){var n=x(["\n background-color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n font-family: ",";\n\n ",":hover > & {\n box-shadow: 0 0 0 3px ",";\n }\n"]);return I=function(){return n},n}function E(){var n=x(["\n font-weight: ",";\n "]);return E=function(){return n},n}function P(){var n=x(["\n font-size: 18px;\n line-height: 24px;\n letter-spacing: 0px;\n"]);return P=function(){return n},n}function L(){var n=x(["\n font-size: 24px;\n line-height: 32px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return L=function(){return n},n}function M(){var n=x(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return M=function(){return n},n}function H(){var n=x(["\n font-weight: 500;\n font-size: 60px;\n line-height: 68px;\n letter-spacing: -0.3px;\n"]);return H=function(){return n},n}function T(){var n=x(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return T=function(){return n},n}var R=i.css(T(),s.fontFamilies.default,o.uiColors.gray.dark3),_=i.css(H()),K=function(n){var e=n.className,r=v(n,["className"]);return u.jsx(p.default,y({as:"h1",className:i.cx(R,_,e)},r))};K.displayName="H1";var U=i.css(M()),$=function(n){var e=n.className,r=v(n,["className"]);return u.jsx(p.default,y({as:"h2",className:i.cx(R,U,e)},r))};$.displayName="H2";var G=i.css(L()),J=function(n){var e=n.className,r=v(n,["className"]);return u.jsx(p.default,y({as:"h3",className:i.cx(R,G,e)},r))};J.displayName="H3";var Q=i.css(P()),V=function(n){var e=n.className,r=v(n,["className"]);return u.jsx(p.default,y({as:"h6",className:i.cx(R,Q,e)},r))};function W(n){var e=n.children,r=n.className,t=n.weight,o=void 0===t?"regular":t,s=v(n,["children","className","weight"]),l=16===a.useBaseFontSize()?F:j,c=i.css(E(),"regular"!==o?600:400);return u.jsx("div",y({},s,{className:i.cx(R,l,c,r)}),e)}V.displayName="Subtitle",W.displayName="Body";var X=t.createDataProp("anchor-inline-code"),Y=i.css(I(),o.uiColors.gray.light3,o.uiColors.gray.light1,s.fontFamilies.code,X.selector,o.uiColors.gray.light2),Z=i.css(B(),X.selector,o.uiColors.blue.light2),nn=i.css(q()),en=i.css(A()),rn=i.css(S()),tn=i.css(z(),o.uiColors.blue.base);function an(n){var e,r,t=n.children,o=n.className,s=v(n,["children","className"]),l=a.useUsingKeyboardContext().usingKeyboard,c=16===a.useBaseFontSize()?F:j,f=(null!==(e="string"==typeof t&&(null===(r=t.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===r?void 0:r.length))&&void 0!==e?e:0)<=30?en:rn,p=void 0!==(null==s?void 0:s.href)||void 0!==s.onClick,g=u.jsx("code",{className:i.cx(Y,c,f,h({},Z,l),o)},t);return p?u.jsx("a",y({},X.prop,{className:i.cx(nn,tn,o)},s),g):d.default.cloneElement(g,s)}an.displayName="InlineCode";var on=i.css(D(),s.fontFamilies.code,o.uiColors.gray.dark3,o.uiColors.gray.dark3);function sn(n){var e=n.children,r=n.className,t=v(n,["children","className"]),o=16===a.useBaseFontSize()?F:j;return u.jsx("code",y({className:i.cx(on,o,r)},t),e)}sn.displayName="InlineKeyCode";var un=i.css(O());function ln(n){var e=n.children,r=n.className,t=v(n,["children","className"]);return u.jsx("small",y({},t,{className:i.cx(R,un,r)}),e)}ln.displayName="Disclaimer";var cn=i.css(k()),fn=function(n){var e=n.className,r=v(n,["className"]);return u.jsx(p.default,y({className:i.cx(R,cn,e)},r))};function dn(){var n=x(["\n position: relative;\n bottom: 4px;\n left: -1px;\n height: 12px;\n"]);return dn=function(){return n},n}function pn(){var n=x(["\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"]);return pn=function(){return n},n}function gn(){var n=x(["\n transform: translate3d(3px, 0, 0);\n"]);return gn=function(){return n},n}function mn(){var n=x(["\n background-repeat: repeat-x;\n background-size: 2px 2px;\n background-position: center bottom;\n\n ",":hover & {\n background-image: linear-gradient(\n "," 100%,\n "," 0\n );\n }\n\n ",":focus & {\n background-image: linear-gradient(\n to right,\n "," 100%,\n "," 0\n );\n }\n"]);return mn=function(){return n},n}function hn(){var n=x(["\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n"]);return hn=function(){return n},n}fn.displayName="Overline";var yn,vn=t.createDataProp("anchor-container"),xn=i.css(hn(),o.uiColors.blue.base),bn=i.css(mn(),vn.selector,o.uiColors.gray.light2,o.uiColors.gray.light2,vn.selector,o.uiColors.blue.light1,o.uiColors.blue.light1),Nn=i.css(gn()),Cn=i.css(pn(),vn.selector),wn=i.css(dn()),jn="hover",Fn="persist",kn="none";function On(){var n=x(["\n font-size: 14px;\n line-height: 16px;\n font-weight: normal;\n padding-bottom: 4px;\n margin-top: 0;\n margin-bottom: 0;\n"]);return On=function(){return n},n}function Dn(){var n=x(["\n font-size: 14px;\n font-weight: bold;\n line-height: 16px;\n padding-bottom: 4px;\n"]);return Dn=function(){return n},n}function zn(){var n=x(["\n color: ",";\n "]);return zn=function(){return n},n}function Sn(){var n=x(["\n color: ",";\n "]);return Sn=function(){return n},n}function An(){var n=x(["\n color: ",";\n "]);return An=function(){return n},n}function qn(){var n=x(["\n color: ",";\n "]);return qn=function(){return n},n}function Bn(){var n=x(["\n color: ",";\n "]);return Bn=function(){return n},n}function In(){var n=x(["\n color: ",";\n "]);return In=function(){return n},n}var En="light",Pn="dark",Ln=(h(yn={},En,{labelColor:i.css(In(),o.uiColors.gray.dark2),disabledLabelColor:i.css(Bn(),o.uiColors.gray.dark1),descriptionColor:i.css(qn(),o.uiColors.gray.dark1)}),h(yn,Pn,{labelColor:i.css(An(),o.uiColors.white),disabledLabelColor:i.css(Sn(),o.uiColors.gray.light1),descriptionColor:i.css(zn(),o.uiColors.gray.light1)}),yn),Mn=i.css(Dn()),Hn=function(n){var e=n.darkMode,r=void 0!==e&&e,t=n.className,a=n.children,o=n.disabled,s=void 0!==o&&o,l=v(n,["darkMode","className","children","disabled"]),c=r?Pn:En;return u.jsx("label",y({className:i.cx(Mn,Ln[c].labelColor,h({},Ln[c].disabledLabelColor,s),t)},l),a)};Hn.displayName="Label";var Tn=i.css(On()),Rn=function(n){var e=n.darkMode,r=void 0!==e&&e,t=n.children,a=n.className,o=v(n,["darkMode","children","className"]),s=r?Pn:En;return u.jsx("p",y({className:i.cx(Tn,Ln[s].descriptionColor,a)},o),t)};Rn.displayName="Description",n.Body=W,n.Description=Rn,n.Disclaimer=ln,n.H1=K,n.H2=$,n.H3=J,n.InlineCode=an,n.InlineKeyCode=sn,n.Label=Hn,n.Link=function(n){var r=n.href,t=n.children,o=n.className,s=n.target,l=n.arrowAppearance,c=void 0===l?kn:l,f=n.hideExternalIcon,d=void 0!==f&&f,x=v(n,["href","children","className","target","arrowAppearance","hideExternalIcon"]),N=b(e.useState(""),2),C=N[0],w=N[1];e.useEffect((function(){w(window.location.hostname)}),[]);var k,O,D,z=e.useMemo((function(){if(r){return/^http(s)?:\/\//.test(r)?new URL(r).hostname:C}}),[r,C]),S=16===a.useBaseFontSize()?F:j;if(s?k=s:z===C?k="_self":(k="_blank",D="noopener noreferrer"),"_blank"!==k||d){if(c!==kn){var A;O=u.jsx(g.default,{role:"presentation",size:12,className:i.cx((A={},h(A,Cn,c===jn),h(A,Nn,c===Fn),A))})}}else O=u.jsx(m.default,{role:"presentation",className:wn});var q=r?{as:"a",href:r,target:k,rel:D}:{as:"span"};return u.jsx(p.default,y({className:i.cx(xn,S,o)},q,vn.prop,x),u.jsx("span",{className:bn},t),O)},n.Overline=fn,n.Subtitle=V,Object.defineProperty(n,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/typography", | ||
"version": "8.0.3", | ||
"version": "8.0.4", | ||
"description": "leafyGreen UI Kit Typography", | ||
@@ -23,11 +23,11 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@leafygreen-ui/lib": "^8.0.0", | ||
"@leafygreen-ui/palette": "^3.2.1", | ||
"@leafygreen-ui/box": "^3.0.5", | ||
"@leafygreen-ui/icon": "^11.1.1", | ||
"@leafygreen-ui/tokens": "^0.5.2" | ||
"@leafygreen-ui/lib": "^9.0.0", | ||
"@leafygreen-ui/palette": "^3.2.2", | ||
"@leafygreen-ui/box": "^3.0.6", | ||
"@leafygreen-ui/icon": "^11.3.0", | ||
"@leafygreen-ui/tokens": "^0.5.3" | ||
}, | ||
"peerDependencies": { | ||
"@leafygreen-ui/leafygreen-provider": "^2.1.2" | ||
"@leafygreen-ui/leafygreen-provider": "^2.1.3" | ||
} | ||
} |
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
275324
899
- Removed@emotion/cache@10.0.29(transitive)
- Removed@emotion/hash@0.8.0(transitive)
- Removed@emotion/memoize@0.7.4(transitive)
- Removed@emotion/serialize@0.11.16(transitive)
- Removed@emotion/sheet@0.9.4(transitive)
- Removed@emotion/stylis@0.8.5(transitive)
- Removed@emotion/unitless@0.7.5(transitive)
- Removed@emotion/utils@0.11.3(transitive)
- Removed@emotion/weak-memoize@0.2.5(transitive)
- Removed@leafygreen-ui/emotion@3.0.1(transitive)
- Removed@leafygreen-ui/lib@8.0.0(transitive)
- Removedbabel-plugin-emotion@10.2.2(transitive)
- Removedbabel-plugin-macros@2.8.0(transitive)
- Removedbabel-plugin-syntax-jsx@6.18.0(transitive)
- Removedcosmiconfig@6.0.0(transitive)
- Removedcreate-emotion@10.0.27(transitive)
- Removedcreate-emotion-server@10.0.27(transitive)
- Removedcsstype@2.6.21(transitive)
- Removedemotion@10.0.27(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfacepaint@1.2.1(transitive)
- Removedpolished@2.3.3(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
- Removedreact-is@16.13.1(transitive)
Updated@leafygreen-ui/box@^3.0.6
Updated@leafygreen-ui/icon@^11.3.0
Updated@leafygreen-ui/lib@^9.0.0
Updated@leafygreen-ui/tokens@^0.5.3