@leafygreen-ui/typography
Advanced tools
Comparing version 7.1.1 to 7.2.0
# @leafygreen-ui/typography | ||
## 7.2.0 | ||
### Minor Changes | ||
- 8b0ea602: - `Label` component now supports a `disabled` prop | ||
## 7.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import n,{useState as e,useMemo as r,useEffect as t}from"react";import a from"@leafygreen-ui/box";import{createDataProp as i}from"@leafygreen-ui/lib";import{useBaseFontSize as o,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 m from"@leafygreen-ui/icon/dist/OpenNewTab";function d(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={},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 v(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function y(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,l=n[Symbol.iterator]();!(t=(o=l.next()).done)&&(r.push(o.value),!e||r.length!==e);t=!0);}catch(n){a=!0,i=n}finally{try{t||null==l.return||l.return()}finally{if(a)throw i}}return r}(n,e)||function(n,e){if(!n)return;if("string"==typeof n)return b(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 b(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 b(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()),E=c(x());function k(){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 k=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 D(){var n=v(["\n color: ",";\n"]);return D=function(){return n},n}function j(){var n=v(["\n white-space: normal;\n"]);return j=function(){return n},n}function z(){var n=v(["\n white-space: nowrap;\n"]);return z=function(){return n},n}function C(){var n=v(["\n text-decoration: none;\n margin: 0;\n padding: 0;\n\n &:focus {\n outline: none;\n }\n"]);return C=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 M(){var n=v(["\n font-size: 24px;\n line-height: 28px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return M=function(){return n},n}function P(){var n=v(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return P=function(){return n},n}function H(){var n=v(["\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=v(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return _=function(){return n},n}var K=c(_(),f.default,s.gray.dark3),L=c(H());function R(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h1",g({},a,{className:u(K,L,t)}),r)}R.displayName="H1";var T=c(P());function U(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h2",g({},a,{className:u(K,T,t)}),r)}U.displayName="H2";var $=c(M());function q(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h3",g({},a,{className:u(K,$,t)}),r)}q.displayName="H3";var G=c(B());function J(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h6",g({},a,{className:u(K,G,t)}),r)}function Q(e){var r=e.children,t=e.className,a=e.weight,i=void 0===a?"regular":a,l=h(e,["children","className","weight"]),s=16===o()?E:w,f=c(I(),"regular"!==i?600:400);return n.createElement("div",g({},l,{className:u(K,s,f,t)}),r)}J.displayName="Subtitle",Q.displayName="Body";var V=i("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(C()),Z=c(z()),nn=c(j()),en=c(D(),s.blue.base);function rn(e){var r,t,a=e.children,i=e.className,c=h(e,["children","className"]),s=l().usingKeyboard,f=16===o()?E: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,m=void 0!==(null==c?void 0:c.href)||void 0!==c.onClick,v=n.createElement("code",{className:u(W,f,p,d({},X,s),i)},a);return m?n.createElement("a",g({},V.prop,{className:u(Y,en,i)},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"]),i=16===o()?E:w;return n.createElement("code",g({className:u(tn,i,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(K,on,t)}),r)}ln.displayName="Disclaimer";var cn=c(k()),un=function(e){var r=e.className,t=h(e,["className"]);return n.createElement(a,g({className:u(K,cn,r)},t))};function sn(){var n=v(["\n margin-bottom: 4px;\n margin-left: -1px;\n margin-right: -2px;\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 mn(){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 mn=function(){return n},n}function dn(){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 dn=function(){return n},n}un.displayName="Overline";var gn,hn=i("anchor-container"),vn=c(dn(),s.blue.base),yn=c(mn(),hn.selector,s.gray.light2,s.gray.light2,hn.selector,s.blue.light1,s.blue.light1),bn=c(pn()),xn=c(fn(),hn.selector),Nn=c(sn()),wn="hover",En="persist",kn="none",Fn=function(i){var l,c,s=i.href,f=i.children,v=i.className,b=i.target,x=i.arrowAppearance,N=void 0===x?kn:x,k=i.hideExternalIcon,F=void 0!==k&&k,O=h(i,["href","children","className","target","arrowAppearance","hideExternalIcon"]),D=y(e(""),2),j=D[0],z=D[1],C=r((function(){return s&&new URL(s).hostname}),[s]),A=16===o()?E:w;if(t((function(){z(window.location.hostname)}),[]),"_blank"!==(l=b||(C===j?"_self":"_blank"))||F){if(N!==kn){var S;c=n.createElement(p,{size:10,className:u((S={},d(S,xn,N===wn),d(S,bn,N===En),S))})}}else c=n.createElement(m,{className:Nn});var I=s?{as:"a",href:s,target:l}:{as:"span"};return n.createElement(a,g({className:u(vn,A,v)},I,hn.prop,O),n.createElement("span",{className:yn},f),c)};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 Dn(){var n=v(["\n font-size: 14px;\n font-weight: bold;\n line-height: 16px;\n padding-bottom: 4px;\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 Cn(){var n=v(["\n color: ",";\n "]);return Cn=function(){return n},n}function An(){var n=v(["\n color: ",";\n "]);return An=function(){return n},n}var Sn="light",In="dark",Bn=(d(gn={},Sn,{labelColor:c(An(),s.gray.dark2),descriptionColor:c(Cn(),s.gray.dark1)}),d(gn,In,{labelColor:c(zn(),s.white),descriptionColor:c(jn(),s.gray.light1)}),gn),Mn=c(Dn()),Pn=function(e){var r=e.darkMode,t=void 0!==r&&r,a=e.className,i=e.children,o=h(e,["darkMode","className","children"]),l=t?In:Sn;return n.createElement("label",g({className:u(Mn,Bn[l].labelColor,a)},o),i)};Pn.displayName="Label";var Hn=c(On()),_n=function(e){var r=e.darkMode,t=void 0!==r&&r,a=e.children,i=e.className,o=h(e,["darkMode","children","className"]),l=t?In:Sn;return n.createElement("p",g({className:u(Hn,Bn[l].descriptionColor,i)},o),a)};_n.displayName="Description";export{Q as Body,_n as Description,ln as Disclaimer,R as H1,U as H2,q as H3,rn as InlineCode,an as InlineKeyCode,Pn as Label,Fn as Link,un as Overline,J as Subtitle}; | ||
import n,{useState as e,useMemo as r,useEffect as t}from"react";import a from"@leafygreen-ui/box";import{createDataProp as i}from"@leafygreen-ui/lib";import{useBaseFontSize as o,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 d from"@leafygreen-ui/icon/dist/ArrowRight";import p 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={},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 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,i=void 0;try{for(var o,l=n[Symbol.iterator]();!(t=(o=l.next()).done)&&(r.push(o.value),!e||r.length!==e);t=!0);}catch(n){a=!0,i=n}finally{try{t||null==l.return||l.return()}finally{if(a)throw i}}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: 28px;\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());function R(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h1",g({},a,{className:u(_,K,t)}),r)}R.displayName="H1";var T=c(M());function U(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h2",g({},a,{className:u(_,T,t)}),r)}U.displayName="H2";var $=c(L());function q(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h3",g({},a,{className:u(_,$,t)}),r)}q.displayName="H3";var G=c(B());function J(e){var r=e.children,t=e.className,a=h(e,["children","className"]);return n.createElement("h6",g({},a,{className:u(_,G,t)}),r)}function Q(e){var r=e.children,t=e.className,a=e.weight,i=void 0===a?"regular":a,l=h(e,["children","className","weight"]),s=16===o()?k:w,f=c(I(),"regular"!==i?600:400);return n.createElement("div",g({},l,{className:u(_,s,f,t)}),r)}J.displayName="Subtitle",Q.displayName="Body";var V=i("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,i=e.className,c=h(e,["children","className"]),s=l().usingKeyboard,f=16===o()?k:w,d=(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,p=void 0!==(null==c?void 0:c.href)||void 0!==c.onClick,v=n.createElement("code",{className:u(W,f,d,m({},X,s),i)},a);return p?n.createElement("a",g({},V.prop,{className:u(Y,en,i)},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"]),i=16===o()?k:w;return n.createElement("code",g({className:u(tn,i,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 margin-bottom: 4px;\n margin-left: -1px;\n margin-right: -2px;\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 dn(){var n=v(["\n transform: translate3d(3px, 0, 0);\n"]);return dn=function(){return n},n}function pn(){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 pn=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=i("anchor-container"),vn=c(mn(),s.blue.base),bn=c(pn(),hn.selector,s.gray.light2,s.gray.light2,hn.selector,s.blue.light1,s.blue.light1),yn=c(dn()),xn=c(fn(),hn.selector),Nn=c(sn()),wn="hover",kn="persist",En="none",Fn=function(i){var l,c,s=i.href,f=i.children,v=i.className,y=i.target,x=i.arrowAppearance,N=void 0===x?En:x,E=i.hideExternalIcon,F=void 0!==E&&E,O=h(i,["href","children","className","target","arrowAppearance","hideExternalIcon"]),C=b(e(""),2),D=C[0],j=C[1],z=r((function(){return s&&new URL(s).hostname}),[s]),A=16===o()?k:w;if(t((function(){j(window.location.hostname)}),[]),"_blank"!==(l=y||(z===D?"_self":"_blank"))||F){if(N!==En){var S;c=n.createElement(d,{size:10,className:u((S={},m(S,xn,N===wn),m(S,yn,N===kn),S))})}}else c=n.createElement(p,{className:Nn});var I=s?{as:"a",href:s,target:l}:{as:"span"};return n.createElement(a,g({className:u(vn,A,v)},I,hn.prop,O),n.createElement("span",{className:bn},f),c)};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,i=e.children,o=e.disabled,l=void 0!==o&&o,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),i)};Hn.displayName="Label";var _n=c(On()),Kn=function(e){var r=e.darkMode,t=void 0!==r&&r,a=e.children,i=e.className,o=h(e,["darkMode","children","className"]),l=t?Ln:Bn;return n.createElement("p",g({className:u(_n,Mn[l].descriptionColor,i)},o),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}; | ||
//# sourceMappingURL=index.js.map |
@@ -6,5 +6,6 @@ /// <reference types="react" /> | ||
htmlFor: string; | ||
disabled?: boolean; | ||
}; | ||
declare const Label: { | ||
({ darkMode, className, children, ...rest }: LabelProps): JSX.Element; | ||
({ darkMode, className, children, disabled, ...rest }: LabelProps): JSX.Element; | ||
displayName: string; | ||
@@ -11,0 +12,0 @@ }; |
@@ -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,c){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=s(n),d=s(r),p=s(u),g=s(c);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 x(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 b(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 b(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 b(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 w(){var e=v(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0px;\n"]);return w=function(){return e},e}var C=i.css(w()),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: 28px;\n letter-spacing: 0px;\n font-weight: medium;\n"]);return P=function(){return e},e}function M(){var e=v(["\n font-size: 32px;\n line-height: 40px;\n letter-spacing: 0px;\n"]);return M=function(){return e},e}function H(){var e=v(["\n font-weight: 500;\n font-size: 60px;\n line-height: 68px;\n letter-spacing: -0.3px;\n"]);return H=function(){return e},e}function T(){var e=v(["\n margin: unset;\n font-family: ",";\n color: ",";\n"]);return T=function(){return e},e}var R=i.css(T(),l.fontFamilies.default,o.uiColors.gray.dark3),_=i.css(H());function K(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h1",h({},t,{className:i.cx(R,_,r)}),n)}K.displayName="H1";var L=i.css(M());function U(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h2",h({},t,{className:i.cx(R,L,r)}),n)}U.displayName="H2";var $=i.css(P());function G(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h3",h({},t,{className:i.cx(R,$,r)}),n)}G.displayName="H3";var J=i.css(q());function Q(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h6",h({},t,{className:i.cx(R,J,r)}),n)}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:C,c=i.css(I(),"regular"!==o?600:400);return f.default.createElement("div",h({},l,{className:i.cx(R,u,c,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,c=16===a.useBaseFontSize()?F:C,s=(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,c,s,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:C;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(R,oe,r)}),n)}le.displayName="Disclaimer";var ue=i.css(k()),ce=function(e){var n=e.className,r=y(e,["className"]);return f.default.createElement(d.default,h({className:i.cx(R,ue,n)},r))};function se(){var e=v(["\n margin-bottom: 4px;\n margin-left: -1px;\n margin-right: -2px;\n"]);return se=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}ce.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),xe=i.css(de()),be=i.css(fe(),he.selector),Ne=i.css(se()),we="hover",Ce="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}var Se="light",Ae="dark",Be=(m(me={},Se,{labelColor:i.css(je(),o.uiColors.gray.dark2),descriptionColor:i.css(ze(),o.uiColors.gray.dark1)}),m(me,Ae,{labelColor:i.css(De(),o.uiColors.white),descriptionColor:i.css(Oe(),o.uiColors.gray.light1)}),me),Ie=i.css(Ee()),qe=function(e){var n=e.darkMode,r=void 0!==n&&n,t=e.className,a=e.children,o=y(e,["darkMode","className","children"]),l=r?Ae:Se;return f.default.createElement("label",h({className:i.cx(Ie,Be[l].labelColor,t)},o),a)};qe.displayName="Label";var Pe=i.css(ke()),Me=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?Ae:Se;return f.default.createElement("p",h({className:i.cx(Pe,Be[l].descriptionColor,a)},o),t)};Me.displayName="Description",e.Body=V,e.Description=Me,e.Disclaimer=le,e.H1=K,e.H2=U,e.H3=G,e.InlineCode=te,e.InlineKeyCode=ie,e.Label=qe,e.Link=function(e){var r,t,o=e.href,l=e.children,u=e.className,c=e.target,s=e.arrowAppearance,v=void 0===s?Fe:s,b=e.hideExternalIcon,N=void 0!==b&&b,w=y(e,["href","children","className","target","arrowAppearance","hideExternalIcon"]),k=x(n.useState(""),2),E=k[0],O=k[1],D=n.useMemo((function(){return o&&new URL(o).hostname}),[o]),z=16===a.useBaseFontSize()?F:C;if(n.useEffect((function(){O(window.location.hostname)}),[]),"_blank"!==(r=c||(D===E?"_self":"_blank"))||N){if(v!==Fe){var j;t=f.default.createElement(p.default,{size:10,className:i.cx((j={},m(j,be,v===we),m(j,xe,v===Ce),j))})}}else t=f.default.createElement(g.default,{className:Ne});var S=o?{as:"a",href:o,target:r}:{as:"span"};return f.default.createElement(d.default,h({className:i.cx(ye,z,u)},S,he.prop,w),f.default.createElement("span",{className:ve},l),t)},e.Overline=ce,e.Subtitle=Q,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/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,c){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=s(n),d=s(r),p=s(u),g=s(c);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: 28px;\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.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h1",h({},t,{className:i.cx(T,R,r)}),n)}_.displayName="H1";var K=i.css(L());function U(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h2",h({},t,{className:i.cx(T,K,r)}),n)}U.displayName="H2";var $=i.css(P());function G(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h3",h({},t,{className:i.cx(T,$,r)}),n)}G.displayName="H3";var J=i.css(q());function Q(e){var n=e.children,r=e.className,t=y(e,["children","className"]);return f.default.createElement("h6",h({},t,{className:i.cx(T,J,r)}),n)}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,c=i.css(I(),"regular"!==o?600:400);return f.default.createElement("div",h({},l,{className:i.cx(T,u,c,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,c=16===a.useBaseFontSize()?F:w,s=(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,c,s,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()),ce=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 se(){var e=v(["\n margin-bottom: 4px;\n margin-left: -1px;\n margin-right: -2px;\n"]);return se=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}ce.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(se()),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"]),c=r?Ie:Be;return f.default.createElement("label",h({className:i.cx(Pe,qe[c].labelColor,m({},qe[c].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,t,o=e.href,l=e.children,u=e.className,c=e.target,s=e.arrowAppearance,v=void 0===s?Fe:s,x=e.hideExternalIcon,N=void 0!==x&&x,C=y(e,["href","children","className","target","arrowAppearance","hideExternalIcon"]),k=b(n.useState(""),2),E=k[0],O=k[1],D=n.useMemo((function(){return o&&new URL(o).hostname}),[o]),z=16===a.useBaseFontSize()?F:w;if(n.useEffect((function(){O(window.location.hostname)}),[]),"_blank"!==(r=c||(D===E?"_self":"_blank"))||N){if(v!==Fe){var j;t=f.default.createElement(p.default,{size:10,className:i.cx((j={},m(j,xe,v===Ce),m(j,be,v===we),j))})}}else t=f.default.createElement(g.default,{className:Ne});var S=o?{as:"a",href:o,target:r}:{as:"span"};return f.default.createElement(d.default,h({className:i.cx(ye,z,u)},S,he.prop,C),f.default.createElement("span",{className:ve},l),t)},e.Overline=ce,e.Subtitle=Q,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/typography", | ||
"version": "7.1.1", | ||
"version": "7.2.0", | ||
"description": "leafyGreen UI Kit Typography", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -126,5 +126,6 @@ # Typography | ||
| Prop | Type | Description | Default | | ||
| ---------- | --------- | ------------------------------------------------ | ------- | | ||
| `darkMode` | `boolean` | Determines if the component renders in dark mode | `false` | | ||
| Prop | Type | Description | Default | | ||
| ---------- | --------- | ------------------------------------------------------- | ------- | | ||
| `darkMode` | `boolean` | Determines if the component renders in dark mode | `false` | | ||
| `disabled` | `boolean` | Determines whether the component should appear disabled | `false` | | ||
@@ -131,0 +132,0 @@ # Description |
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
271235
880
138