@leafygreen-ui/button
Advanced tools
Comparing version 12.0.3 to 12.0.4
# @leafygreen-ui/button | ||
## 12.0.4 | ||
### Patch Changes | ||
- 24930836: Fixes a bug where a disabled button with an `href` would still start navigation. | ||
- Updated dependencies [f6e5655a] | ||
- Updated dependencies [f6e5655a] | ||
- Updated dependencies [b8f03aa1] | ||
- @leafygreen-ui/emotion@4.0.0 | ||
- @leafygreen-ui/palette@3.2.2 | ||
- @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 | ||
## 12.0.3 | ||
@@ -4,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
import n,{useRef as r,useEffect as e}from"react";import o from"prop-types";import t from"@leafygreen-ui/box";import{css as a,cx as i}from"@leafygreen-ui/emotion";import{fontFamilies as u,spacing as c}from"@leafygreen-ui/tokens";import{registerRipple as l}from"@leafygreen-ui/ripple";import{useUsingKeyboardContext as f}from"@leafygreen-ui/leafygreen-provider";import{transparentize as d}from"polished";import{uiColors as p}from"@leafygreen-ui/palette";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 s(){return(s=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}).apply(this,arguments)}function x(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,o)}return e}function b(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?x(Object(e),!0).forEach((function(r){g(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):x(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function h(n,r){if(null==n)return{};var e,o,t=function(n,r){if(null==n)return{};var e,o,t={},a=Object.keys(n);for(o=0;o<a.length;o++)e=a[o],r.indexOf(e)>=0||(t[e]=n[e]);return t}(n,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)e=a[o],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function v(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var y,m,k,w,O,D,P,j,z,S,N,E,F={Primary:"primary",PrimaryOutline:"primaryOutline",Default:"default",Danger:"danger",DangerOutline:"dangerOutline"},M={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},G="light",B="dark";function L(){var n=v(["\n font-size: 16px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n "]);return L=function(){return n},n}function I(){var n=v(["\n font-size: 14px;\n "]);return I=function(){return n},n}function X(){var n=v(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "]);return X=function(){return n},n}function C(){var n=v(["\n height: 36px;\n "]);return C=function(){return n},n}function A(){var n=v(["\n height: 28px;\n "]);return A=function(){return n},n}function K(){var n=v(["\n height: 22px;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 1em;\n font-weight: bold;\n letter-spacing: 0.4px;\n "]);return K=function(){return n},n}function R(){var n=v(["\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n\n &:hover {\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n }\n "]);return R=function(){return n},n}function T(){var n=v(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n\n &:hover {\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n }\n "]);return T=function(){return n},n}function Y(){var n=v(["\n &:focus {\n background: rgba(249, 114, 22, 0.08);\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return Y=function(){return n},n}function q(){var n=v(["\n &:focus {\n background: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return q=function(){return n},n}function H(){var n=v(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 0px 0px 3px #2f9fc5;\n }\n "]);return H=function(){return n},n}function J(){var n=v(["\n &:focus {\n background: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #139fd7;\n }\n "]);return J=function(){return n},n}function Q(){var n=v(["\n &:focus {\n background: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return Q=function(){return n},n}function U(){var n=v(["\n &:focus {\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return U=function(){return n},n}function V(){var n=v(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return V=function(){return n},n}function W(){var n=v(["\n &:focus {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return W=function(){return n},n}function Z(){var n=v(["\n &:focus {\n background-color: rgba(9, 128, 76, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return Z=function(){return n},n}function $(){var n=v(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return $=function(){return n},n}function _(){var n=v(["\n border: 1px solid #f97216;\n color: #f97216;\n\n &:focus {\n color: #f97216;\n }\n\n &:hover,\n &:active {\n color: #f97216;\n background: rgba(249, 114, 22, 0.08);\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return _=function(){return n},n}function nn(){var n=v(["\n background-color: ",";\n border: 1px solid #f97216;\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return nn=function(){return n},n}function rn(){var n=v(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return rn=function(){return n},n}function en(){var n=v(["\n border: 1px solid ",";\n color: #0ad05b;\n\n &:focus {\n color: #0ad05b;\n }\n\n &:hover,\n &:active {\n color: #0ad05b;\n background-color: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return en=function(){return n},n}function on(){var n=v(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return on=function(){return n},n}function tn(){var n=v(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 4px ",";\n }\n "]);return tn=function(){return n},n}function an(){var n=v(["\n background-color: ",";\n box-shadow: 0px 1px 2px rgba(207, 74, 34, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(207, 74, 34, 0.25),\n 0px 0px 0px 3px ",";\n }\n "]);return an=function(){return n},n}function un(){var n=v(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 1px 2px rgba(6, 22, 33, 0.3);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3),\n 0px 0px 0px 3px ",";\n }\n "]);return un=function(){return n},n}function cn(){var n=v(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: rgba(9, 128, 76, 0.04); // green dark 1\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return cn=function(){return n},n}function ln(){var n=v(["\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4), 0px 0px 0px 3px #c3e7ca;\n }\n "]);return ln=function(){return n},n}function fn(){var n=v(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 0px solid transparent;\n display: inline-flex;\n align-items: stretch;\n border-radius: 4px;\n transition: all 150ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"]);return fn=function(){return n},n}var dn=a(fn()),pn=(g(k={},G,(g(y={},F.Primary,a(ln(),p.green.dark1,p.white,p.white,p.white,p.green.dark2)),g(y,F.PrimaryOutline,a(cn(),p.green.dark1,p.green.dark2,p.green.dark2,p.green.dark2,p.green.dark1,p.green.light2)),g(y,F.Default,a(un(),p.gray.light3,p.gray.base,p.gray.dark2,p.gray.dark2,p.gray.dark2,p.white,p.gray.dark1,p.gray.light2)),g(y,F.Danger,a(an(),p.red.base,p.white,p.white,p.white,p.red.dark1,p.red.light2)),g(y,F.DangerOutline,a(tn(),p.red.base,p.red.dark2,p.red.dark2,p.red.dark2,p.red.base,p.red.light2)),y)),g(k,B,(g(m={},F.Primary,a(on(),p.green.dark2,p.green.base,p.white,p.white,p.white,p.green.dark1,p.green.dark2)),g(m,F.PrimaryOutline,a(en(),p.green.base,p.green.base,p.green.dark2)),g(m,F.Default,a(rn(),p.gray.dark2,p.gray.base,p.white,p.white,p.white,p.gray.dark1,p.gray.base,p.gray.dark2)),g(m,F.Danger,a(nn(),p.red.dark1,p.white,p.white,p.white,p.red.base,p.red.dark2)),g(m,F.DangerOutline,a(_(),p.red.dark2)),m)),k),gn=(g(D={},G,(g(w={},F.Primary,a($(),p.green.dark2,p.focus)),g(w,F.PrimaryOutline,a(Z(),p.green.dark1,p.focus)),g(w,F.Default,a(W(),p.white,p.gray.dark1,p.focus)),g(w,F.Danger,a(V(),p.red.dark1,p.focus)),g(w,F.DangerOutline,a(U(),p.red.dark2)),w)),g(D,B,(g(O={},F.Primary,a(Q(),p.green.dark1,p.focus)),g(O,F.PrimaryOutline,a(J(),p.green.dark1)),g(O,F.Default,a(H(),p.gray.dark1)),g(O,F.Danger,a(q(),p.red.base,p.focus)),g(O,F.DangerOutline,a(Y())),O)),D),sn=(g(P={},G,a(T(),p.gray.light2,p.gray.light2,p.gray.light1,p.gray.dark1,p.gray.light2,p.gray.light2,p.gray.light1,p.gray.dark1)),g(P,B,a(R(),p.gray.dark2,p.gray.base,p.gray.dark2,p.gray.base)),P),xn=(g(j={},M.XSmall,a(K())),g(j,M.Small,a(A())),g(j,M.Default,a(C())),g(j,M.Large,a(X())),j),bn=(g(z={},14,a(I())),g(z,16,a(L())),z);var hn,vn,yn,mn,kn,wn,On,Dn,Pn="#0AD05B",jn="#09804C",zn="#F97216",Sn=(g(E={},G,(g(S={},F.Primary,Pn),g(S,F.PrimaryOutline,d(.76,jn)),g(S,F.Default,p.gray.light2),g(S,F.Danger,zn),g(S,F.DangerOutline,d(.76,p.red.base)),S)),g(E,B,(g(N={},F.Primary,Pn),g(N,F.PrimaryOutline,d(.76,p.green.base)),g(N,F.Default,p.gray.base),g(N,F.Danger,zn),g(N,F.DangerOutline,d(.76,zn)),N)),E);function Nn(){var n=v(["\n color: ",";\n "]);return Nn=function(){return n},n}function En(){var n=v(["\n color: ",";\n "]);return En=function(){return n},n}function Fn(){var n=v(["\n height: 20px;\n width: 20px;\n "]);return Fn=function(){return n},n}function Mn(){var n=v(["\n height: 16px;\n width: 16px;\n "]);return Mn=function(){return n},n}function Gn(){var n=v(["\n height: 16px;\n width: 16px;\n "]);return Gn=function(){return n},n}function Bn(){var n=v(["\n height: 14px;\n width: 14px;\n "]);return Bn=function(){return n},n}function Ln(){var n=v(["\n color: #f97216;\n "]);return Ln=function(){return n},n}function In(){var n=v(["\n color: ",";\n "]);return In=function(){return n},n}function Xn(){var n=v(["\n color: ",";\n "]);return Xn=function(){return n},n}function Cn(){var n=v(["\n color: #0ad05b;\n "]);return Cn=function(){return n},n}function An(){var n=v(["\n color: ",";\n "]);return An=function(){return n},n}function Kn(){var n=v(["\n color: #cf4a22;\n "]);return Kn=function(){return n},n}function Rn(){var n=v(["\n color: ",";\n "]);return Rn=function(){return n},n}function Tn(){var n=v(["\n color: ",";\n "]);return Tn=function(){return n},n}function Yn(){var n=v(["\n color: ",";\n "]);return Yn=function(){return n},n}function qn(){var n=v(["\n color: ",";\n "]);return qn=function(){return n},n}function Hn(){var n=v(["\n color: #f97216;\n "]);return Hn=function(){return n},n}function Jn(){var n=v(["\n color: ",";\n "]);return Jn=function(){return n},n}function Qn(){var n=v(["\n color: ",";\n "]);return Qn=function(){return n},n}function Un(){var n=v(["\n color: #13aa52;\n "]);return Un=function(){return n},n}function Vn(){var n=v(["\n color: ",";\n "]);return Vn=function(){return n},n}function Wn(){var n=v(["\n color: ",";\n "]);return Wn=function(){return n},n}function Zn(){var n=v(["\n color: ",";\n "]);return Zn=function(){return n},n}function $n(){var n=v(["\n color: ",";\n "]);return $n=function(){return n},n}function _n(){var n=v(["\n color: ",";\n "]);return _n=function(){return n},n}function nr(){var n=v(["\n color: ",";\n "]);return nr=function(){return n},n}var rr,er=(g(yn={},G,(g(hn={},F.Primary,a(nr(),p.green.light3)),g(hn,F.PrimaryOutline,a(_n(),p.green.dark1)),g(hn,F.Default,a($n(),p.gray.dark1)),g(hn,F.Danger,a(Zn(),p.red.light3)),g(hn,F.DangerOutline,a(Wn(),p.red.base)),hn)),g(yn,B,(g(vn={},F.Primary,a(Vn(),p.green.light2)),g(vn,F.PrimaryOutline,a(Un())),g(vn,F.Default,a(Qn(),p.gray.light1)),g(vn,F.Danger,a(Jn(),p.red.light3)),g(vn,F.DangerOutline,a(Hn())),vn)),yn),or=(g(wn={},G,(g(mn={},F.Primary,a(qn(),p.white)),g(mn,F.PrimaryOutline,a(Yn(),p.green.dark1)),g(mn,F.Default,a(Tn(),p.gray.dark2)),g(mn,F.Danger,a(Rn(),p.white)),g(mn,F.DangerOutline,a(Kn())),mn)),g(wn,B,(g(kn={},F.Primary,a(An(),p.white)),g(kn,F.PrimaryOutline,a(Cn())),g(kn,F.Default,a(Xn(),p.white)),g(kn,F.Danger,a(In(),p.white)),g(kn,F.DangerOutline,a(Ln())),kn)),wn),tr=(g(On={},M.XSmall,a(Bn())),g(On,M.Small,a(Gn())),g(On,M.Default,a(Mn())),g(On,M.Large,a(Fn())),On),ar=(g(Dn={},G,a(En(),p.gray.light1)),g(Dn,B,a(Nn(),p.gray.dark1)),Dn);function ir(r){var e=r.glyph,o=r.variant,t=r.size,a=r.darkMode,u=r.disabled,c=r.isIconOnlyButton,l=r.className,f=!c&&{"aria-hidden":!0,role:"presentation"},d=a?B:G,p=c?or[d][o]:er[d][o];return n.cloneElement(e,b({className:i(p,g({},ar[d],u),tr[t],l)},f))}function ur(){var n=v(["margin-left: ",";}"]);return ur=function(){return n},n}function cr(){var n=v(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: auto;\n "]);return cr=function(){return n},n}function lr(){var n=v(["\n vertical-align: text-top;\n "]);return lr=function(){return n},n}function fr(){var n=v(["margin-right: ",";}"]);return fr=function(){return n},n}function dr(){var n=v(["\n justify-content: center;\n "]);return dr=function(){return n},n}function pr(){var n=v(["\n justify-content: space-between;\n "]);return pr=function(){return n},n}function gr(){var n=v(["\n padding-left: ","px;\n padding-right: ","px;\n "]);return gr=function(){return n},n}function sr(){var n=v(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return sr=function(){return n},n}function xr(){var n=v(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return xr=function(){return n},n}function br(){var n=v(["\n padding-left: 6px;\n padding-right: 6px;\n "]);return br=function(){return n},n}function hr(){var n=v(["\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n font-family: ",";\n"]);return hr=function(){return n},n}function vr(){var n=v(["\n overflow: hidden;\n border-radius: 3px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n"]);return vr=function(){return n},n}ir.displayName="ButtonIcon";var yr=a(vr()),mr=a(hr(),u.default),kr=(g(rr={},M.XSmall,a(br())),g(rr,M.Small,a(xr())),g(rr,M.Default,a(sr())),g(rr,M.Large,a(gr(),c[3],c[3])),rr),wr=n.forwardRef((function(o,u){var c,d,p=o.variant,x=void 0===p?F.Default:p,v=o.size,y=void 0===v?M.Default:v,m=o.darkMode,k=void 0!==m&&m,w=o.baseFontSize,O=void 0===w?14:w,D=o.disabled,P=void 0!==D&&D,j=o.leftGlyph,z=o.rightGlyph,S=o.children,N=o.className,E=h(o,["variant","size","darkMode","baseFontSize","disabled","leftGlyph","rightGlyph","children","className"]),L=f().usingKeyboard,I=r(null);e((function(){var n,r=Sn[k?B:G][x];return null!=I.current&&(n=l(I.current,{backgroundColor:r})),n}),[I,x,k]);var X,C=null!==(c=(j||z)&&!S)&&void 0!==c&&c,A=function(n){var r=n.variant,e=n.size,o=n.darkMode,t=n.baseFontSize,a=n.disabled,u=n.showFocus,c=o?B:G,l=pn[c][r],f=gn[c][r],d=xn[e],p=bn[t];return i(dn,l,g({},f,u),g({},sn[c],a),p,d)}({variant:x,size:y,darkMode:k,baseFontSize:O,disabled:P,showFocus:L}),K="string"==typeof E.href;(E.as&&"button"===E.as||!K&&!E.as)&&(X="button");var R=b({type:X,className:i(A,N),ref:u,as:K?"a":"button"},"string"!=typeof E.href&&{disabled:P},{"aria-disabled":P},E),T={variant:x,size:y,darkMode:k,disabled:P,isIconOnlyButton:C},Y=y===M.Large?"8px":"6px",q=n.createElement(n.Fragment,null,n.createElement("div",{className:yr,ref:I}),n.createElement("div",{className:i(mr,(d={},g(d,a(pr()),!!z),g(d,a(dr()),!z),d),kr[y])},j&&n.createElement(ir,s({glyph:j,className:i(g({},a(fr(),Y),!C),a(lr()))},T)),S,z&&n.createElement("span",{className:a(cr())},n.createElement(ir,s({glyph:z,className:C?"":a(ur(),Y)},T)))));return n.createElement(t,R,q)}));wr.displayName="Button",wr.propTypes={variant:o.oneOf(Object.values(F)),darkMode:o.bool,baseFontSize:o.oneOf([14,16]),size:o.oneOf(Object.values(M)),disabled:o.bool,leftGlyph:o.element,rightGlyph:o.element,href:o.string};export default wr;export{M as Size,F as Variant}; | ||
import n,{useRef as r,useEffect as e}from"react";import o from"prop-types";import t from"@leafygreen-ui/box";import{css as a,cx as i}from"@leafygreen-ui/emotion";import{fontFamilies as u,spacing as c}from"@leafygreen-ui/tokens";import{registerRipple as l}from"@leafygreen-ui/ripple";import{useUsingKeyboardContext as f}from"@leafygreen-ui/leafygreen-provider";import{transparentize as d}from"polished";import{uiColors as p}from"@leafygreen-ui/palette";import{jsx as g}from"@emotion/react";function s(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function x(){return(x=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}).apply(this,arguments)}function b(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,o)}return e}function h(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?b(Object(e),!0).forEach((function(r){s(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,o,t=function(n,r){if(null==n)return{};var e,o,t={},a=Object.keys(n);for(o=0;o<a.length;o++)e=a[o],r.indexOf(e)>=0||(t[e]=n[e]);return t}(n,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)e=a[o],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function y(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var m,k,w,O,D,P,j,z,S,N,F,M,G={Primary:"primary",PrimaryOutline:"primaryOutline",Default:"default",Danger:"danger",DangerOutline:"dangerOutline"},B={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},L="light",E="dark";function I(){var n=y(["\n font-size: 16px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n "]);return I=function(){return n},n}function X(){var n=y(["\n font-size: 14px;\n "]);return X=function(){return n},n}function C(){var n=y(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "]);return C=function(){return n},n}function A(){var n=y(["\n height: 36px;\n "]);return A=function(){return n},n}function K(){var n=y(["\n height: 28px;\n "]);return K=function(){return n},n}function R(){var n=y(["\n height: 22px;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 1em;\n font-weight: bold;\n letter-spacing: 0.4px;\n "]);return R=function(){return n},n}function T(){var n=y(["\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n\n &:hover {\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n }\n "]);return T=function(){return n},n}function Y(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n\n &:hover {\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n }\n "]);return Y=function(){return n},n}function q(){var n=y(["\n &:focus {\n background: rgba(249, 114, 22, 0.08);\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return q=function(){return n},n}function H(){var n=y(["\n &:focus {\n background: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return H=function(){return n},n}function J(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 0px 0px 3px #2f9fc5;\n }\n "]);return J=function(){return n},n}function Q(){var n=y(["\n &:focus {\n background: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #139fd7;\n }\n "]);return Q=function(){return n},n}function U(){var n=y(["\n &:focus {\n background: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return U=function(){return n},n}function V(){var n=y(["\n &:focus {\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return V=function(){return n},n}function W(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return W=function(){return n},n}function Z(){var n=y(["\n &:focus {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return Z=function(){return n},n}function $(){var n=y(["\n &:focus {\n background-color: rgba(9, 128, 76, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return $=function(){return n},n}function _(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return _=function(){return n},n}function nn(){var n=y(["\n border: 1px solid #f97216;\n color: #f97216;\n\n &:focus {\n color: #f97216;\n }\n\n &:hover,\n &:active {\n color: #f97216;\n background: rgba(249, 114, 22, 0.08);\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return nn=function(){return n},n}function rn(){var n=y(["\n background-color: ",";\n border: 1px solid #f97216;\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return rn=function(){return n},n}function en(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return en=function(){return n},n}function on(){var n=y(["\n border: 1px solid ",";\n color: #0ad05b;\n\n &:focus {\n color: #0ad05b;\n }\n\n &:hover,\n &:active {\n color: #0ad05b;\n background-color: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return on=function(){return n},n}function tn(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return tn=function(){return n},n}function an(){var n=y(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 4px ",";\n }\n "]);return an=function(){return n},n}function un(){var n=y(["\n background-color: ",";\n box-shadow: 0px 1px 2px rgba(207, 74, 34, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(207, 74, 34, 0.25),\n 0px 0px 0px 3px ",";\n }\n "]);return un=function(){return n},n}function cn(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 1px 2px rgba(6, 22, 33, 0.3);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3),\n 0px 0px 0px 3px ",";\n }\n "]);return cn=function(){return n},n}function ln(){var n=y(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: rgba(9, 128, 76, 0.04); // green dark 1\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return ln=function(){return n},n}function fn(){var n=y(["\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4), 0px 0px 0px 3px #c3e7ca;\n }\n "]);return fn=function(){return n},n}function dn(){var n=y(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 0px solid transparent;\n display: inline-flex;\n align-items: stretch;\n border-radius: 4px;\n transition: all 150ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"]);return dn=function(){return n},n}var pn=a(dn()),gn=(s(w={},L,(s(m={},G.Primary,a(fn(),p.green.dark1,p.white,p.white,p.white,p.green.dark2)),s(m,G.PrimaryOutline,a(ln(),p.green.dark1,p.green.dark2,p.green.dark2,p.green.dark2,p.green.dark1,p.green.light2)),s(m,G.Default,a(cn(),p.gray.light3,p.gray.base,p.gray.dark2,p.gray.dark2,p.gray.dark2,p.white,p.gray.dark1,p.gray.light2)),s(m,G.Danger,a(un(),p.red.base,p.white,p.white,p.white,p.red.dark1,p.red.light2)),s(m,G.DangerOutline,a(an(),p.red.base,p.red.dark2,p.red.dark2,p.red.dark2,p.red.base,p.red.light2)),m)),s(w,E,(s(k={},G.Primary,a(tn(),p.green.dark2,p.green.base,p.white,p.white,p.white,p.green.dark1,p.green.dark2)),s(k,G.PrimaryOutline,a(on(),p.green.base,p.green.base,p.green.dark2)),s(k,G.Default,a(en(),p.gray.dark2,p.gray.base,p.white,p.white,p.white,p.gray.dark1,p.gray.base,p.gray.dark2)),s(k,G.Danger,a(rn(),p.red.dark1,p.white,p.white,p.white,p.red.base,p.red.dark2)),s(k,G.DangerOutline,a(nn(),p.red.dark2)),k)),w),sn=(s(P={},L,(s(O={},G.Primary,a(_(),p.green.dark2,p.focus)),s(O,G.PrimaryOutline,a($(),p.green.dark1,p.focus)),s(O,G.Default,a(Z(),p.white,p.gray.dark1,p.focus)),s(O,G.Danger,a(W(),p.red.dark1,p.focus)),s(O,G.DangerOutline,a(V(),p.red.dark2)),O)),s(P,E,(s(D={},G.Primary,a(U(),p.green.dark1,p.focus)),s(D,G.PrimaryOutline,a(Q(),p.green.dark1)),s(D,G.Default,a(J(),p.gray.dark1)),s(D,G.Danger,a(H(),p.red.base,p.focus)),s(D,G.DangerOutline,a(q())),D)),P),xn=(s(j={},L,a(Y(),p.gray.light2,p.gray.light2,p.gray.light1,p.gray.dark1,p.gray.light2,p.gray.light2,p.gray.light1,p.gray.dark1)),s(j,E,a(T(),p.gray.dark2,p.gray.base,p.gray.dark2,p.gray.base)),j),bn=(s(z={},B.XSmall,a(R())),s(z,B.Small,a(K())),s(z,B.Default,a(A())),s(z,B.Large,a(C())),z),hn=(s(S={},14,a(X())),s(S,16,a(I())),S);var vn,yn,mn,kn,wn,On,Dn,Pn,jn="#0AD05B",zn="#09804C",Sn="#F97216",Nn=(s(M={},L,(s(N={},G.Primary,jn),s(N,G.PrimaryOutline,d(.76,zn)),s(N,G.Default,p.gray.light2),s(N,G.Danger,Sn),s(N,G.DangerOutline,d(.76,p.red.base)),N)),s(M,E,(s(F={},G.Primary,jn),s(F,G.PrimaryOutline,d(.76,p.green.base)),s(F,G.Default,p.gray.base),s(F,G.Danger,Sn),s(F,G.DangerOutline,d(.76,Sn)),F)),M);function Fn(){var n=y(["\n color: ",";\n "]);return Fn=function(){return n},n}function Mn(){var n=y(["\n color: ",";\n "]);return Mn=function(){return n},n}function Gn(){var n=y(["\n height: 20px;\n width: 20px;\n "]);return Gn=function(){return n},n}function Bn(){var n=y(["\n height: 16px;\n width: 16px;\n "]);return Bn=function(){return n},n}function Ln(){var n=y(["\n height: 16px;\n width: 16px;\n "]);return Ln=function(){return n},n}function En(){var n=y(["\n height: 14px;\n width: 14px;\n "]);return En=function(){return n},n}function In(){var n=y(["\n color: #f97216;\n "]);return In=function(){return n},n}function Xn(){var n=y(["\n color: ",";\n "]);return Xn=function(){return n},n}function Cn(){var n=y(["\n color: ",";\n "]);return Cn=function(){return n},n}function An(){var n=y(["\n color: #0ad05b;\n "]);return An=function(){return n},n}function Kn(){var n=y(["\n color: ",";\n "]);return Kn=function(){return n},n}function Rn(){var n=y(["\n color: #cf4a22;\n "]);return Rn=function(){return n},n}function Tn(){var n=y(["\n color: ",";\n "]);return Tn=function(){return n},n}function Yn(){var n=y(["\n color: ",";\n "]);return Yn=function(){return n},n}function qn(){var n=y(["\n color: ",";\n "]);return qn=function(){return n},n}function Hn(){var n=y(["\n color: ",";\n "]);return Hn=function(){return n},n}function Jn(){var n=y(["\n color: #f97216;\n "]);return Jn=function(){return n},n}function Qn(){var n=y(["\n color: ",";\n "]);return Qn=function(){return n},n}function Un(){var n=y(["\n color: ",";\n "]);return Un=function(){return n},n}function Vn(){var n=y(["\n color: #13aa52;\n "]);return Vn=function(){return n},n}function Wn(){var n=y(["\n color: ",";\n "]);return Wn=function(){return n},n}function Zn(){var n=y(["\n color: ",";\n "]);return Zn=function(){return n},n}function $n(){var n=y(["\n color: ",";\n "]);return $n=function(){return n},n}function _n(){var n=y(["\n color: ",";\n "]);return _n=function(){return n},n}function nr(){var n=y(["\n color: ",";\n "]);return nr=function(){return n},n}function rr(){var n=y(["\n color: ",";\n "]);return rr=function(){return n},n}var er,or=(s(mn={},L,(s(vn={},G.Primary,a(rr(),p.green.light3)),s(vn,G.PrimaryOutline,a(nr(),p.green.dark1)),s(vn,G.Default,a(_n(),p.gray.dark1)),s(vn,G.Danger,a($n(),p.red.light3)),s(vn,G.DangerOutline,a(Zn(),p.red.base)),vn)),s(mn,E,(s(yn={},G.Primary,a(Wn(),p.green.light2)),s(yn,G.PrimaryOutline,a(Vn())),s(yn,G.Default,a(Un(),p.gray.light1)),s(yn,G.Danger,a(Qn(),p.red.light3)),s(yn,G.DangerOutline,a(Jn())),yn)),mn),tr=(s(On={},L,(s(kn={},G.Primary,a(Hn(),p.white)),s(kn,G.PrimaryOutline,a(qn(),p.green.dark1)),s(kn,G.Default,a(Yn(),p.gray.dark2)),s(kn,G.Danger,a(Tn(),p.white)),s(kn,G.DangerOutline,a(Rn())),kn)),s(On,E,(s(wn={},G.Primary,a(Kn(),p.white)),s(wn,G.PrimaryOutline,a(An())),s(wn,G.Default,a(Cn(),p.white)),s(wn,G.Danger,a(Xn(),p.white)),s(wn,G.DangerOutline,a(In())),wn)),On),ar=(s(Dn={},B.XSmall,a(En())),s(Dn,B.Small,a(Ln())),s(Dn,B.Default,a(Bn())),s(Dn,B.Large,a(Gn())),Dn),ir=(s(Pn={},L,a(Mn(),p.gray.light1)),s(Pn,E,a(Fn(),p.gray.dark1)),Pn);function ur(r){var e=r.glyph,o=r.variant,t=r.size,a=r.darkMode,u=r.disabled,c=r.isIconOnlyButton,l=r.className,f=!c&&{"aria-hidden":!0,role:"presentation"},d=a?E:L,p=c?tr[d][o]:or[d][o];return n.cloneElement(e,h({className:i(p,s({},ir[d],u),ar[t],l)},f))}function cr(){var n=y(["margin-left: ",";}"]);return cr=function(){return n},n}function lr(){var n=y(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: auto;\n "]);return lr=function(){return n},n}function fr(){var n=y(["\n vertical-align: text-top;\n "]);return fr=function(){return n},n}function dr(){var n=y(["margin-right: ",";}"]);return dr=function(){return n},n}function pr(){var n=y(["\n justify-content: center;\n "]);return pr=function(){return n},n}function gr(){var n=y(["\n justify-content: space-between;\n "]);return gr=function(){return n},n}function sr(){var n=y(["\n padding-left: ","px;\n padding-right: ","px;\n "]);return sr=function(){return n},n}function xr(){var n=y(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return xr=function(){return n},n}function br(){var n=y(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return br=function(){return n},n}function hr(){var n=y(["\n padding-left: 6px;\n padding-right: 6px;\n "]);return hr=function(){return n},n}function vr(){var n=y(["\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n font-family: ",";\n"]);return vr=function(){return n},n}function yr(){var n=y(["\n overflow: hidden;\n border-radius: 3px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n"]);return yr=function(){return n},n}ur.displayName="ButtonIcon";var mr=a(yr()),kr=a(vr(),u.default),wr=(s(er={},B.XSmall,a(hr())),s(er,B.Small,a(br())),s(er,B.Default,a(xr())),s(er,B.Large,a(sr(),c[3],c[3])),er),Or=n.forwardRef((function(o,u){var c,d,p=o.variant,b=void 0===p?G.Default:p,y=o.size,m=void 0===y?B.Default:y,k=o.darkMode,w=void 0!==k&&k,O=o.baseFontSize,D=void 0===O?14:O,P=o.disabled,j=void 0!==P&&P,z=o.leftGlyph,S=o.rightGlyph,N=o.children,F=o.className,M=v(o,["variant","size","darkMode","baseFontSize","disabled","leftGlyph","rightGlyph","children","className"]),I=f().usingKeyboard,X=r(null);e((function(){var n,r=Nn[w?E:L][b];return null!=X.current&&(n=l(X.current,{backgroundColor:r})),n}),[X,b,w]);var C,A=null!==(c=(z||S)&&!N)&&void 0!==c&&c,K=function(n){var r=n.variant,e=n.size,o=n.darkMode,t=n.baseFontSize,a=n.disabled,u=n.showFocus,c=o?E:L,l=gn[c][r],f=sn[c][r],d=bn[e],p=hn[t];return i(pn,l,s({},f,u),s({},xn[c],a),p,d)}({variant:b,size:m,darkMode:w,baseFontSize:D,disabled:j,showFocus:I}),R="string"==typeof M.href;(M.as&&"button"===M.as||!R&&!M.as)&&(C="button");var T=h({type:C,className:i(K,F),ref:u,as:function(n,r){return n&&!r?"a":"button"}(R,j)},"string"!=typeof M.href&&{disabled:j},{"aria-disabled":j},M),Y={variant:b,size:m,darkMode:w,disabled:j,isIconOnlyButton:A},q=m===B.Large?"8px":"6px",H=g(n.Fragment,null,g("div",{className:mr,ref:X}),g("div",{className:i(kr,(d={},s(d,a(gr()),!!S),s(d,a(pr()),!S),d),wr[m])},z&&g(ur,x({glyph:z,className:i(s({},a(dr(),q),!A),a(fr()))},Y)),N,S&&g("span",{className:a(lr())},g(ur,x({glyph:S,className:A?"":a(cr(),q)},Y)))));return g(t,T,H)}));Or.displayName="Button",Or.propTypes={variant:o.oneOf(Object.values(G)),darkMode:o.bool,baseFontSize:o.oneOf([14,16]),size:o.oneOf(Object.values(B)),disabled:o.bool,leftGlyph:o.element,rightGlyph:o.element,href:o.string};export default Or;export{B as Size,G as Variant}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/ripple"),require("@leafygreen-ui/leafygreen-provider"),require("polished"),require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/tokens","@leafygreen-ui/ripple","@leafygreen-ui/leafygreen-provider","polished","@leafygreen-ui/palette"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self)["@leafygreen-ui/button"]={},n.React,n.PropTypes,n["@leafygreen-ui/box"],n["@leafygreen-ui/emotion"],n["@leafygreen-ui/tokens"],n["@leafygreen-ui/ripple"],n["@leafygreen-ui/leafygreen-provider"],n.polished,n["@leafygreen-ui/palette"])}(this,(function(n,r,o,e,t,u,i,a,s,l){"use strict";function c(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var f=c(r),d=c(o),p=c(e);function g(n,r,o){return r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n}function x(){return(x=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n}).apply(this,arguments)}function b(n,r){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.push.apply(o,e)}return o}function h(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?b(Object(o),!0).forEach((function(r){g(n,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))}))}return n}function v(n,r){if(null==n)return{};var o,e,t=function(n,r){if(null==n)return{};var o,e,t={},u=Object.keys(n);for(e=0;e<u.length;e++)o=u[e],r.indexOf(o)>=0||(t[o]=n[o]);return t}(n,r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(e=0;e<u.length;e++)o=u[e],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(t[o]=n[o])}return t}function y(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var C,k,m,w,O,D,P,j,z,S,E,N,F={Primary:"primary",PrimaryOutline:"primaryOutline",Default:"default",Danger:"danger",DangerOutline:"dangerOutline"},q={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},M="light",G="dark";function B(){var n=y(["\n font-size: 16px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n "]);return B=function(){return n},n}function L(){var n=y(["\n font-size: 14px;\n "]);return L=function(){return n},n}function I(){var n=y(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "]);return I=function(){return n},n}function R(){var n=y(["\n height: 36px;\n "]);return R=function(){return n},n}function T(){var n=y(["\n height: 28px;\n "]);return T=function(){return n},n}function X(){var n=y(["\n height: 22px;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 1em;\n font-weight: bold;\n letter-spacing: 0.4px;\n "]);return X=function(){return n},n}function K(){var n=y(["\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n\n &:hover {\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n }\n "]);return K=function(){return n},n}function _(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n\n &:hover {\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n }\n "]);return _=function(){return n},n}function A(){var n=y(["\n &:focus {\n background: rgba(249, 114, 22, 0.08);\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return A=function(){return n},n}function U(){var n=y(["\n &:focus {\n background: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return U=function(){return n},n}function V(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 0px 0px 3px #2f9fc5;\n }\n "]);return V=function(){return n},n}function Y(){var n=y(["\n &:focus {\n background: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #139fd7;\n }\n "]);return Y=function(){return n},n}function H(){var n=y(["\n &:focus {\n background: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return H=function(){return n},n}function J(){var n=y(["\n &:focus {\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return J=function(){return n},n}function Q(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return Q=function(){return n},n}function W(){var n=y(["\n &:focus {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return W=function(){return n},n}function Z(){var n=y(["\n &:focus {\n background-color: rgba(9, 128, 76, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return Z=function(){return n},n}function $(){var n=y(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return $=function(){return n},n}function nn(){var n=y(["\n border: 1px solid #f97216;\n color: #f97216;\n\n &:focus {\n color: #f97216;\n }\n\n &:hover,\n &:active {\n color: #f97216;\n background: rgba(249, 114, 22, 0.08);\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return nn=function(){return n},n}function rn(){var n=y(["\n background-color: ",";\n border: 1px solid #f97216;\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return rn=function(){return n},n}function on(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return on=function(){return n},n}function en(){var n=y(["\n border: 1px solid ",";\n color: #0ad05b;\n\n &:focus {\n color: #0ad05b;\n }\n\n &:hover,\n &:active {\n color: #0ad05b;\n background-color: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return en=function(){return n},n}function tn(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return tn=function(){return n},n}function un(){var n=y(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 4px ",";\n }\n "]);return un=function(){return n},n}function an(){var n=y(["\n background-color: ",";\n box-shadow: 0px 1px 2px rgba(207, 74, 34, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(207, 74, 34, 0.25),\n 0px 0px 0px 3px ",";\n }\n "]);return an=function(){return n},n}function sn(){var n=y(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 1px 2px rgba(6, 22, 33, 0.3);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3),\n 0px 0px 0px 3px ",";\n }\n "]);return sn=function(){return n},n}function ln(){var n=y(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: rgba(9, 128, 76, 0.04); // green dark 1\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return ln=function(){return n},n}function cn(){var n=y(["\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4), 0px 0px 0px 3px #c3e7ca;\n }\n "]);return cn=function(){return n},n}function fn(){var n=y(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 0px solid transparent;\n display: inline-flex;\n align-items: stretch;\n border-radius: 4px;\n transition: all 150ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"]);return fn=function(){return n},n}var dn=t.css(fn()),pn=(g(m={},M,(g(C={},F.Primary,t.css(cn(),l.uiColors.green.dark1,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.green.dark2)),g(C,F.PrimaryOutline,t.css(ln(),l.uiColors.green.dark1,l.uiColors.green.dark2,l.uiColors.green.dark2,l.uiColors.green.dark2,l.uiColors.green.dark1,l.uiColors.green.light2)),g(C,F.Default,t.css(sn(),l.uiColors.gray.light3,l.uiColors.gray.base,l.uiColors.gray.dark2,l.uiColors.gray.dark2,l.uiColors.gray.dark2,l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.gray.light2)),g(C,F.Danger,t.css(an(),l.uiColors.red.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.red.dark1,l.uiColors.red.light2)),g(C,F.DangerOutline,t.css(un(),l.uiColors.red.base,l.uiColors.red.dark2,l.uiColors.red.dark2,l.uiColors.red.dark2,l.uiColors.red.base,l.uiColors.red.light2)),C)),g(m,G,(g(k={},F.Primary,t.css(tn(),l.uiColors.green.dark2,l.uiColors.green.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.green.dark1,l.uiColors.green.dark2)),g(k,F.PrimaryOutline,t.css(en(),l.uiColors.green.base,l.uiColors.green.base,l.uiColors.green.dark2)),g(k,F.Default,t.css(on(),l.uiColors.gray.dark2,l.uiColors.gray.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.gray.base,l.uiColors.gray.dark2)),g(k,F.Danger,t.css(rn(),l.uiColors.red.dark1,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.red.base,l.uiColors.red.dark2)),g(k,F.DangerOutline,t.css(nn(),l.uiColors.red.dark2)),k)),m),gn=(g(D={},M,(g(w={},F.Primary,t.css($(),l.uiColors.green.dark2,l.uiColors.focus)),g(w,F.PrimaryOutline,t.css(Z(),l.uiColors.green.dark1,l.uiColors.focus)),g(w,F.Default,t.css(W(),l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.focus)),g(w,F.Danger,t.css(Q(),l.uiColors.red.dark1,l.uiColors.focus)),g(w,F.DangerOutline,t.css(J(),l.uiColors.red.dark2)),w)),g(D,G,(g(O={},F.Primary,t.css(H(),l.uiColors.green.dark1,l.uiColors.focus)),g(O,F.PrimaryOutline,t.css(Y(),l.uiColors.green.dark1)),g(O,F.Default,t.css(V(),l.uiColors.gray.dark1)),g(O,F.Danger,t.css(U(),l.uiColors.red.base,l.uiColors.focus)),g(O,F.DangerOutline,t.css(A())),O)),D),xn=(g(P={},M,t.css(_(),l.uiColors.gray.light2,l.uiColors.gray.light2,l.uiColors.gray.light1,l.uiColors.gray.dark1,l.uiColors.gray.light2,l.uiColors.gray.light2,l.uiColors.gray.light1,l.uiColors.gray.dark1)),g(P,G,t.css(K(),l.uiColors.gray.dark2,l.uiColors.gray.base,l.uiColors.gray.dark2,l.uiColors.gray.base)),P),bn=(g(j={},q.XSmall,t.css(X())),g(j,q.Small,t.css(T())),g(j,q.Default,t.css(R())),g(j,q.Large,t.css(I())),j),hn=(g(z={},14,t.css(L())),g(z,16,t.css(B())),z);var vn,yn,Cn,kn,mn,wn,On,Dn,Pn=.76,jn="#0AD05B",zn="#09804C",Sn="#F97216",En=(g(N={},M,(g(S={},F.Primary,jn),g(S,F.PrimaryOutline,s.transparentize(Pn,zn)),g(S,F.Default,l.uiColors.gray.light2),g(S,F.Danger,Sn),g(S,F.DangerOutline,s.transparentize(Pn,l.uiColors.red.base)),S)),g(N,G,(g(E={},F.Primary,jn),g(E,F.PrimaryOutline,s.transparentize(Pn,l.uiColors.green.base)),g(E,F.Default,l.uiColors.gray.base),g(E,F.Danger,Sn),g(E,F.DangerOutline,s.transparentize(Pn,Sn)),E)),N);function Nn(){var n=y(["\n color: ",";\n "]);return Nn=function(){return n},n}function Fn(){var n=y(["\n color: ",";\n "]);return Fn=function(){return n},n}function qn(){var n=y(["\n height: 20px;\n width: 20px;\n "]);return qn=function(){return n},n}function Mn(){var n=y(["\n height: 16px;\n width: 16px;\n "]);return Mn=function(){return n},n}function Gn(){var n=y(["\n height: 16px;\n width: 16px;\n "]);return Gn=function(){return n},n}function Bn(){var n=y(["\n height: 14px;\n width: 14px;\n "]);return Bn=function(){return n},n}function Ln(){var n=y(["\n color: #f97216;\n "]);return Ln=function(){return n},n}function In(){var n=y(["\n color: ",";\n "]);return In=function(){return n},n}function Rn(){var n=y(["\n color: ",";\n "]);return Rn=function(){return n},n}function Tn(){var n=y(["\n color: #0ad05b;\n "]);return Tn=function(){return n},n}function Xn(){var n=y(["\n color: ",";\n "]);return Xn=function(){return n},n}function Kn(){var n=y(["\n color: #cf4a22;\n "]);return Kn=function(){return n},n}function _n(){var n=y(["\n color: ",";\n "]);return _n=function(){return n},n}function An(){var n=y(["\n color: ",";\n "]);return An=function(){return n},n}function Un(){var n=y(["\n color: ",";\n "]);return Un=function(){return n},n}function Vn(){var n=y(["\n color: ",";\n "]);return Vn=function(){return n},n}function Yn(){var n=y(["\n color: #f97216;\n "]);return Yn=function(){return n},n}function Hn(){var n=y(["\n color: ",";\n "]);return Hn=function(){return n},n}function Jn(){var n=y(["\n color: ",";\n "]);return Jn=function(){return n},n}function Qn(){var n=y(["\n color: #13aa52;\n "]);return Qn=function(){return n},n}function Wn(){var n=y(["\n color: ",";\n "]);return Wn=function(){return n},n}function Zn(){var n=y(["\n color: ",";\n "]);return Zn=function(){return n},n}function $n(){var n=y(["\n color: ",";\n "]);return $n=function(){return n},n}function nr(){var n=y(["\n color: ",";\n "]);return nr=function(){return n},n}function rr(){var n=y(["\n color: ",";\n "]);return rr=function(){return n},n}function or(){var n=y(["\n color: ",";\n "]);return or=function(){return n},n}var er,tr=(g(Cn={},M,(g(vn={},F.Primary,t.css(or(),l.uiColors.green.light3)),g(vn,F.PrimaryOutline,t.css(rr(),l.uiColors.green.dark1)),g(vn,F.Default,t.css(nr(),l.uiColors.gray.dark1)),g(vn,F.Danger,t.css($n(),l.uiColors.red.light3)),g(vn,F.DangerOutline,t.css(Zn(),l.uiColors.red.base)),vn)),g(Cn,G,(g(yn={},F.Primary,t.css(Wn(),l.uiColors.green.light2)),g(yn,F.PrimaryOutline,t.css(Qn())),g(yn,F.Default,t.css(Jn(),l.uiColors.gray.light1)),g(yn,F.Danger,t.css(Hn(),l.uiColors.red.light3)),g(yn,F.DangerOutline,t.css(Yn())),yn)),Cn),ur=(g(wn={},M,(g(kn={},F.Primary,t.css(Vn(),l.uiColors.white)),g(kn,F.PrimaryOutline,t.css(Un(),l.uiColors.green.dark1)),g(kn,F.Default,t.css(An(),l.uiColors.gray.dark2)),g(kn,F.Danger,t.css(_n(),l.uiColors.white)),g(kn,F.DangerOutline,t.css(Kn())),kn)),g(wn,G,(g(mn={},F.Primary,t.css(Xn(),l.uiColors.white)),g(mn,F.PrimaryOutline,t.css(Tn())),g(mn,F.Default,t.css(Rn(),l.uiColors.white)),g(mn,F.Danger,t.css(In(),l.uiColors.white)),g(mn,F.DangerOutline,t.css(Ln())),mn)),wn),ir=(g(On={},q.XSmall,t.css(Bn())),g(On,q.Small,t.css(Gn())),g(On,q.Default,t.css(Mn())),g(On,q.Large,t.css(qn())),On),ar=(g(Dn={},M,t.css(Fn(),l.uiColors.gray.light1)),g(Dn,G,t.css(Nn(),l.uiColors.gray.dark1)),Dn);function sr(n){var r=n.glyph,o=n.variant,e=n.size,u=n.darkMode,i=n.disabled,a=n.isIconOnlyButton,s=n.className,l=!a&&{"aria-hidden":!0,role:"presentation"},c=u?G:M,d=a?ur[c][o]:tr[c][o];return f.default.cloneElement(r,h({className:t.cx(d,g({},ar[c],i),ir[e],s)},l))}function lr(){var n=y(["margin-left: ",";}"]);return lr=function(){return n},n}function cr(){var n=y(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: auto;\n "]);return cr=function(){return n},n}function fr(){var n=y(["\n vertical-align: text-top;\n "]);return fr=function(){return n},n}function dr(){var n=y(["margin-right: ",";}"]);return dr=function(){return n},n}function pr(){var n=y(["\n justify-content: center;\n "]);return pr=function(){return n},n}function gr(){var n=y(["\n justify-content: space-between;\n "]);return gr=function(){return n},n}function xr(){var n=y(["\n padding-left: ","px;\n padding-right: ","px;\n "]);return xr=function(){return n},n}function br(){var n=y(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return br=function(){return n},n}function hr(){var n=y(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return hr=function(){return n},n}function vr(){var n=y(["\n padding-left: 6px;\n padding-right: 6px;\n "]);return vr=function(){return n},n}function yr(){var n=y(["\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n font-family: ",";\n"]);return yr=function(){return n},n}function Cr(){var n=y(["\n overflow: hidden;\n border-radius: 3px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n"]);return Cr=function(){return n},n}sr.displayName="ButtonIcon";var kr=t.css(Cr()),mr=t.css(yr(),u.fontFamilies.default),wr=(g(er={},q.XSmall,t.css(vr())),g(er,q.Small,t.css(hr())),g(er,q.Default,t.css(br())),g(er,q.Large,t.css(xr(),u.spacing[3],u.spacing[3])),er),Or=f.default.forwardRef((function(n,o){var e,u,s=n.variant,l=void 0===s?F.Default:s,c=n.size,d=void 0===c?q.Default:c,b=n.darkMode,y=void 0!==b&&b,C=n.baseFontSize,k=void 0===C?14:C,m=n.disabled,w=void 0!==m&&m,O=n.leftGlyph,D=n.rightGlyph,P=n.children,j=n.className,z=v(n,["variant","size","darkMode","baseFontSize","disabled","leftGlyph","rightGlyph","children","className"]),S=a.useUsingKeyboardContext().usingKeyboard,E=r.useRef(null);r.useEffect((function(){var n,r=En[y?G:M][l];return null!=E.current&&(n=i.registerRipple(E.current,{backgroundColor:r})),n}),[E,l,y]);var N,B=null!==(e=(O||D)&&!P)&&void 0!==e&&e,L=function(n){var r=n.variant,o=n.size,e=n.darkMode,u=n.baseFontSize,i=n.disabled,a=n.showFocus,s=e?G:M,l=pn[s][r],c=gn[s][r],f=bn[o],d=hn[u];return t.cx(dn,l,g({},c,a),g({},xn[s],i),d,f)}({variant:l,size:d,darkMode:y,baseFontSize:k,disabled:w,showFocus:S}),I="string"==typeof z.href;(z.as&&"button"===z.as||!I&&!z.as)&&(N="button");var R=h({type:N,className:t.cx(L,j),ref:o,as:I?"a":"button"},"string"!=typeof z.href&&{disabled:w},{"aria-disabled":w},z),T={variant:l,size:d,darkMode:y,disabled:w,isIconOnlyButton:B},X=d===q.Large?"8px":"6px",K=f.default.createElement(f.default.Fragment,null,f.default.createElement("div",{className:kr,ref:E}),f.default.createElement("div",{className:t.cx(mr,(u={},g(u,t.css(gr()),!!D),g(u,t.css(pr()),!D),u),wr[d])},O&&f.default.createElement(sr,x({glyph:O,className:t.cx(g({},t.css(dr(),X),!B),t.css(fr()))},T)),P,D&&f.default.createElement("span",{className:t.css(cr())},f.default.createElement(sr,x({glyph:D,className:B?"":t.css(lr(),X)},T)))));return f.default.createElement(p.default,R,K)}));Or.displayName="Button",Or.propTypes={variant:d.default.oneOf(Object.values(F)),darkMode:d.default.bool,baseFontSize:d.default.oneOf([14,16]),size:d.default.oneOf(Object.values(q)),disabled:d.default.bool,leftGlyph:d.default.element,rightGlyph:d.default.element,href:d.default.string},n.Size=q,n.Variant=F,n.default=Or,Object.defineProperty(n,"__esModule",{value:!0})})); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/ripple"),require("@leafygreen-ui/leafygreen-provider"),require("polished"),require("@leafygreen-ui/palette"),require("@emotion/react")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/tokens","@leafygreen-ui/ripple","@leafygreen-ui/leafygreen-provider","polished","@leafygreen-ui/palette","@emotion/react"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self)["@leafygreen-ui/button"]={},n.React,n.PropTypes,n["@leafygreen-ui/box"],n["@leafygreen-ui/emotion"],n["@leafygreen-ui/tokens"],n["@leafygreen-ui/ripple"],n["@leafygreen-ui/leafygreen-provider"],n.polished,n["@leafygreen-ui/palette"],n.react)}(this,(function(n,r,o,e,t,u,i,a,s,l,c){"use strict";function f(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var d=f(r),p=f(o),g=f(e);function x(n,r,o){return r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n}function b(){return(b=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n}).apply(this,arguments)}function h(n,r){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.push.apply(o,e)}return o}function v(n){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?h(Object(o),!0).forEach((function(r){x(n,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))}))}return n}function y(n,r){if(null==n)return{};var o,e,t=function(n,r){if(null==n)return{};var o,e,t={},u=Object.keys(n);for(e=0;e<u.length;e++)o=u[e],r.indexOf(o)>=0||(t[o]=n[o]);return t}(n,r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);for(e=0;e<u.length;e++)o=u[e],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(t[o]=n[o])}return t}function C(n,r){return r||(r=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(r)}}))}var k,m,w,O,D,P,j,z,S,N,q,F,M={Primary:"primary",PrimaryOutline:"primaryOutline",Default:"default",Danger:"danger",DangerOutline:"dangerOutline"},G={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},B="light",E="dark";function L(){var n=C(["\n font-size: 16px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n "]);return L=function(){return n},n}function I(){var n=C(["\n font-size: 14px;\n "]);return I=function(){return n},n}function R(){var n=C(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "]);return R=function(){return n},n}function T(){var n=C(["\n height: 36px;\n "]);return T=function(){return n},n}function X(){var n=C(["\n height: 28px;\n "]);return X=function(){return n},n}function K(){var n=C(["\n height: 22px;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 1em;\n font-weight: bold;\n letter-spacing: 0.4px;\n "]);return K=function(){return n},n}function _(){var n=C(["\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n\n &:hover {\n background: rgba(61, 79, 88, 0.3);\n border: 1px solid ",";\n color: ",";\n cursor: not-allowed;\n }\n "]);return _=function(){return n},n}function A(){var n=C(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n\n &:hover {\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 1px ",";\n cursor: not-allowed;\n color: ",";\n }\n "]);return A=function(){return n},n}function U(){var n=C(["\n &:focus {\n background: rgba(249, 114, 22, 0.08);\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return U=function(){return n},n}function V(){var n=C(["\n &:focus {\n background: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return V=function(){return n},n}function Y(){var n=C(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 0px 0px 3px #2f9fc5;\n }\n "]);return Y=function(){return n},n}function H(){var n=C(["\n &:focus {\n background: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #139fd7;\n }\n "]);return H=function(){return n},n}function J(){var n=C(["\n &:focus {\n background: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return J=function(){return n},n}function Q(){var n=C(["\n &:focus {\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px #019ee2;\n }\n "]);return Q=function(){return n},n}function W(){var n=C(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return W=function(){return n},n}function Z(){var n=C(["\n &:focus {\n background: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return Z=function(){return n},n}function $(){var n=C(["\n &:focus {\n background-color: rgba(9, 128, 76, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return $=function(){return n},n}function nn(){var n=C(["\n &:focus {\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(0, 124, 173, 0.4),\n 0px 0px 0px 3px ",";\n }\n "]);return nn=function(){return n},n}function rn(){var n=C(["\n border: 1px solid #f97216;\n color: #f97216;\n\n &:focus {\n color: #f97216;\n }\n\n &:hover,\n &:active {\n color: #f97216;\n background: rgba(249, 114, 22, 0.08);\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return rn=function(){return n},n}function on(){var n=C(["\n background-color: ",";\n border: 1px solid #f97216;\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid #f97216;\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return on=function(){return n},n}function en(){var n=C(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return en=function(){return n},n}function tn(){var n=C(["\n border: 1px solid ",";\n color: #0ad05b;\n\n &:focus {\n color: #0ad05b;\n }\n\n &:hover,\n &:active {\n color: #0ad05b;\n background-color: rgba(10, 208, 91, 0.08);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return tn=function(){return n},n}function un(){var n=C(["\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return un=function(){return n},n}function an(){var n=C(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background: rgba(207, 74, 34, 0.04);\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 4px ",";\n }\n "]);return an=function(){return n},n}function sn(){var n=C(["\n background-color: ",";\n box-shadow: 0px 1px 2px rgba(207, 74, 34, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 4px 4px rgba(207, 74, 34, 0.25),\n 0px 0px 0px 3px ",";\n }\n "]);return sn=function(){return n},n}function ln(){var n=C(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 1px 2px rgba(6, 22, 33, 0.3);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.3),\n 0px 0px 0px 3px ",";\n }\n "]);return ln=function(){return n},n}function cn(){var n=C(["\n border: 1px solid ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: rgba(9, 128, 76, 0.04); // green dark 1\n border: 1px solid ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "]);return cn=function(){return n},n}function fn(){var n=C(["\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4);\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 2px 3px rgba(19, 170, 82, 0.4), 0px 0px 0px 3px #c3e7ca;\n }\n "]);return fn=function(){return n},n}function dn(){var n=C(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 0px solid transparent;\n display: inline-flex;\n align-items: stretch;\n border-radius: 4px;\n transition: all 150ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"]);return dn=function(){return n},n}var pn=t.css(dn()),gn=(x(w={},B,(x(k={},M.Primary,t.css(fn(),l.uiColors.green.dark1,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.green.dark2)),x(k,M.PrimaryOutline,t.css(cn(),l.uiColors.green.dark1,l.uiColors.green.dark2,l.uiColors.green.dark2,l.uiColors.green.dark2,l.uiColors.green.dark1,l.uiColors.green.light2)),x(k,M.Default,t.css(ln(),l.uiColors.gray.light3,l.uiColors.gray.base,l.uiColors.gray.dark2,l.uiColors.gray.dark2,l.uiColors.gray.dark2,l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.gray.light2)),x(k,M.Danger,t.css(sn(),l.uiColors.red.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.red.dark1,l.uiColors.red.light2)),x(k,M.DangerOutline,t.css(an(),l.uiColors.red.base,l.uiColors.red.dark2,l.uiColors.red.dark2,l.uiColors.red.dark2,l.uiColors.red.base,l.uiColors.red.light2)),k)),x(w,E,(x(m={},M.Primary,t.css(un(),l.uiColors.green.dark2,l.uiColors.green.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.green.dark1,l.uiColors.green.dark2)),x(m,M.PrimaryOutline,t.css(tn(),l.uiColors.green.base,l.uiColors.green.base,l.uiColors.green.dark2)),x(m,M.Default,t.css(en(),l.uiColors.gray.dark2,l.uiColors.gray.base,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.gray.base,l.uiColors.gray.dark2)),x(m,M.Danger,t.css(on(),l.uiColors.red.dark1,l.uiColors.white,l.uiColors.white,l.uiColors.white,l.uiColors.red.base,l.uiColors.red.dark2)),x(m,M.DangerOutline,t.css(rn(),l.uiColors.red.dark2)),m)),w),xn=(x(P={},B,(x(O={},M.Primary,t.css(nn(),l.uiColors.green.dark2,l.uiColors.focus)),x(O,M.PrimaryOutline,t.css($(),l.uiColors.green.dark1,l.uiColors.focus)),x(O,M.Default,t.css(Z(),l.uiColors.white,l.uiColors.gray.dark1,l.uiColors.focus)),x(O,M.Danger,t.css(W(),l.uiColors.red.dark1,l.uiColors.focus)),x(O,M.DangerOutline,t.css(Q(),l.uiColors.red.dark2)),O)),x(P,E,(x(D={},M.Primary,t.css(J(),l.uiColors.green.dark1,l.uiColors.focus)),x(D,M.PrimaryOutline,t.css(H(),l.uiColors.green.dark1)),x(D,M.Default,t.css(Y(),l.uiColors.gray.dark1)),x(D,M.Danger,t.css(V(),l.uiColors.red.base,l.uiColors.focus)),x(D,M.DangerOutline,t.css(U())),D)),P),bn=(x(j={},B,t.css(A(),l.uiColors.gray.light2,l.uiColors.gray.light2,l.uiColors.gray.light1,l.uiColors.gray.dark1,l.uiColors.gray.light2,l.uiColors.gray.light2,l.uiColors.gray.light1,l.uiColors.gray.dark1)),x(j,E,t.css(_(),l.uiColors.gray.dark2,l.uiColors.gray.base,l.uiColors.gray.dark2,l.uiColors.gray.base)),j),hn=(x(z={},G.XSmall,t.css(K())),x(z,G.Small,t.css(X())),x(z,G.Default,t.css(T())),x(z,G.Large,t.css(R())),z),vn=(x(S={},14,t.css(I())),x(S,16,t.css(L())),S);var yn,Cn,kn,mn,wn,On,Dn,Pn,jn=.76,zn="#0AD05B",Sn="#09804C",Nn="#F97216",qn=(x(F={},B,(x(N={},M.Primary,zn),x(N,M.PrimaryOutline,s.transparentize(jn,Sn)),x(N,M.Default,l.uiColors.gray.light2),x(N,M.Danger,Nn),x(N,M.DangerOutline,s.transparentize(jn,l.uiColors.red.base)),N)),x(F,E,(x(q={},M.Primary,zn),x(q,M.PrimaryOutline,s.transparentize(jn,l.uiColors.green.base)),x(q,M.Default,l.uiColors.gray.base),x(q,M.Danger,Nn),x(q,M.DangerOutline,s.transparentize(jn,Nn)),q)),F);function Fn(){var n=C(["\n color: ",";\n "]);return Fn=function(){return n},n}function Mn(){var n=C(["\n color: ",";\n "]);return Mn=function(){return n},n}function Gn(){var n=C(["\n height: 20px;\n width: 20px;\n "]);return Gn=function(){return n},n}function Bn(){var n=C(["\n height: 16px;\n width: 16px;\n "]);return Bn=function(){return n},n}function En(){var n=C(["\n height: 16px;\n width: 16px;\n "]);return En=function(){return n},n}function Ln(){var n=C(["\n height: 14px;\n width: 14px;\n "]);return Ln=function(){return n},n}function In(){var n=C(["\n color: #f97216;\n "]);return In=function(){return n},n}function Rn(){var n=C(["\n color: ",";\n "]);return Rn=function(){return n},n}function Tn(){var n=C(["\n color: ",";\n "]);return Tn=function(){return n},n}function Xn(){var n=C(["\n color: #0ad05b;\n "]);return Xn=function(){return n},n}function Kn(){var n=C(["\n color: ",";\n "]);return Kn=function(){return n},n}function _n(){var n=C(["\n color: #cf4a22;\n "]);return _n=function(){return n},n}function An(){var n=C(["\n color: ",";\n "]);return An=function(){return n},n}function Un(){var n=C(["\n color: ",";\n "]);return Un=function(){return n},n}function Vn(){var n=C(["\n color: ",";\n "]);return Vn=function(){return n},n}function Yn(){var n=C(["\n color: ",";\n "]);return Yn=function(){return n},n}function Hn(){var n=C(["\n color: #f97216;\n "]);return Hn=function(){return n},n}function Jn(){var n=C(["\n color: ",";\n "]);return Jn=function(){return n},n}function Qn(){var n=C(["\n color: ",";\n "]);return Qn=function(){return n},n}function Wn(){var n=C(["\n color: #13aa52;\n "]);return Wn=function(){return n},n}function Zn(){var n=C(["\n color: ",";\n "]);return Zn=function(){return n},n}function $n(){var n=C(["\n color: ",";\n "]);return $n=function(){return n},n}function nr(){var n=C(["\n color: ",";\n "]);return nr=function(){return n},n}function rr(){var n=C(["\n color: ",";\n "]);return rr=function(){return n},n}function or(){var n=C(["\n color: ",";\n "]);return or=function(){return n},n}function er(){var n=C(["\n color: ",";\n "]);return er=function(){return n},n}var tr,ur=(x(kn={},B,(x(yn={},M.Primary,t.css(er(),l.uiColors.green.light3)),x(yn,M.PrimaryOutline,t.css(or(),l.uiColors.green.dark1)),x(yn,M.Default,t.css(rr(),l.uiColors.gray.dark1)),x(yn,M.Danger,t.css(nr(),l.uiColors.red.light3)),x(yn,M.DangerOutline,t.css($n(),l.uiColors.red.base)),yn)),x(kn,E,(x(Cn={},M.Primary,t.css(Zn(),l.uiColors.green.light2)),x(Cn,M.PrimaryOutline,t.css(Wn())),x(Cn,M.Default,t.css(Qn(),l.uiColors.gray.light1)),x(Cn,M.Danger,t.css(Jn(),l.uiColors.red.light3)),x(Cn,M.DangerOutline,t.css(Hn())),Cn)),kn),ir=(x(On={},B,(x(mn={},M.Primary,t.css(Yn(),l.uiColors.white)),x(mn,M.PrimaryOutline,t.css(Vn(),l.uiColors.green.dark1)),x(mn,M.Default,t.css(Un(),l.uiColors.gray.dark2)),x(mn,M.Danger,t.css(An(),l.uiColors.white)),x(mn,M.DangerOutline,t.css(_n())),mn)),x(On,E,(x(wn={},M.Primary,t.css(Kn(),l.uiColors.white)),x(wn,M.PrimaryOutline,t.css(Xn())),x(wn,M.Default,t.css(Tn(),l.uiColors.white)),x(wn,M.Danger,t.css(Rn(),l.uiColors.white)),x(wn,M.DangerOutline,t.css(In())),wn)),On),ar=(x(Dn={},G.XSmall,t.css(Ln())),x(Dn,G.Small,t.css(En())),x(Dn,G.Default,t.css(Bn())),x(Dn,G.Large,t.css(Gn())),Dn),sr=(x(Pn={},B,t.css(Mn(),l.uiColors.gray.light1)),x(Pn,E,t.css(Fn(),l.uiColors.gray.dark1)),Pn);function lr(n){var r=n.glyph,o=n.variant,e=n.size,u=n.darkMode,i=n.disabled,a=n.isIconOnlyButton,s=n.className,l=!a&&{"aria-hidden":!0,role:"presentation"},c=u?E:B,f=a?ir[c][o]:ur[c][o];return d.default.cloneElement(r,v({className:t.cx(f,x({},sr[c],i),ar[e],s)},l))}function cr(){var n=C(["margin-left: ",";}"]);return cr=function(){return n},n}function fr(){var n=C(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: auto;\n "]);return fr=function(){return n},n}function dr(){var n=C(["\n vertical-align: text-top;\n "]);return dr=function(){return n},n}function pr(){var n=C(["margin-right: ",";}"]);return pr=function(){return n},n}function gr(){var n=C(["\n justify-content: center;\n "]);return gr=function(){return n},n}function xr(){var n=C(["\n justify-content: space-between;\n "]);return xr=function(){return n},n}function br(){var n=C(["\n padding-left: ","px;\n padding-right: ","px;\n "]);return br=function(){return n},n}function hr(){var n=C(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return hr=function(){return n},n}function vr(){var n=C(["\n padding-left: 12px;\n padding-right: 12px;\n "]);return vr=function(){return n},n}function yr(){var n=C(["\n padding-left: 6px;\n padding-right: 6px;\n "]);return yr=function(){return n},n}function Cr(){var n=C(["\n display: flex;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n font-family: ",";\n"]);return Cr=function(){return n},n}function kr(){var n=C(["\n overflow: hidden;\n border-radius: 3px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n"]);return kr=function(){return n},n}lr.displayName="ButtonIcon";var mr=t.css(kr()),wr=t.css(Cr(),u.fontFamilies.default),Or=(x(tr={},G.XSmall,t.css(yr())),x(tr,G.Small,t.css(vr())),x(tr,G.Default,t.css(hr())),x(tr,G.Large,t.css(br(),u.spacing[3],u.spacing[3])),tr),Dr=d.default.forwardRef((function(n,o){var e,u,s=n.variant,l=void 0===s?M.Default:s,f=n.size,p=void 0===f?G.Default:f,h=n.darkMode,C=void 0!==h&&h,k=n.baseFontSize,m=void 0===k?14:k,w=n.disabled,O=void 0!==w&&w,D=n.leftGlyph,P=n.rightGlyph,j=n.children,z=n.className,S=y(n,["variant","size","darkMode","baseFontSize","disabled","leftGlyph","rightGlyph","children","className"]),N=a.useUsingKeyboardContext().usingKeyboard,q=r.useRef(null);r.useEffect((function(){var n,r=qn[C?E:B][l];return null!=q.current&&(n=i.registerRipple(q.current,{backgroundColor:r})),n}),[q,l,C]);var F,L=null!==(e=(D||P)&&!j)&&void 0!==e&&e,I=function(n){var r=n.variant,o=n.size,e=n.darkMode,u=n.baseFontSize,i=n.disabled,a=n.showFocus,s=e?E:B,l=gn[s][r],c=xn[s][r],f=hn[o],d=vn[u];return t.cx(pn,l,x({},c,a),x({},bn[s],i),d,f)}({variant:l,size:p,darkMode:C,baseFontSize:m,disabled:O,showFocus:N}),R="string"==typeof S.href;(S.as&&"button"===S.as||!R&&!S.as)&&(F="button");var T=v({type:F,className:t.cx(I,z),ref:o,as:function(n,r){return n&&!r?"a":"button"}(R,O)},"string"!=typeof S.href&&{disabled:O},{"aria-disabled":O},S),X={variant:l,size:p,darkMode:C,disabled:O,isIconOnlyButton:L},K=p===G.Large?"8px":"6px",_=c.jsx(d.default.Fragment,null,c.jsx("div",{className:mr,ref:q}),c.jsx("div",{className:t.cx(wr,(u={},x(u,t.css(xr()),!!P),x(u,t.css(gr()),!P),u),Or[p])},D&&c.jsx(lr,b({glyph:D,className:t.cx(x({},t.css(pr(),K),!L),t.css(dr()))},X)),j,P&&c.jsx("span",{className:t.css(fr())},c.jsx(lr,b({glyph:P,className:L?"":t.css(cr(),K)},X)))));return c.jsx(g.default,T,_)}));Dr.displayName="Button",Dr.propTypes={variant:p.default.oneOf(Object.values(M)),darkMode:p.default.bool,baseFontSize:p.default.oneOf([14,16]),size:p.default.oneOf(Object.values(G)),disabled:p.default.bool,leftGlyph:p.default.element,rightGlyph:p.default.element,href:p.default.string},n.Size=G,n.Variant=M,n.default=Dr,Object.defineProperty(n,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/button", | ||
"version": "12.0.3", | ||
"version": "12.0.4", | ||
"description": "leafyGreen UI Kit Button", | ||
@@ -23,16 +23,16 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@leafygreen-ui/box": "^3.0.5", | ||
"@leafygreen-ui/lib": "^8.0.0", | ||
"@leafygreen-ui/tokens": "^0.5.2", | ||
"@leafygreen-ui/palette": "^3.2.1", | ||
"@leafygreen-ui/emotion": "^3.0.1", | ||
"@leafygreen-ui/box": "^3.0.6", | ||
"@leafygreen-ui/lib": "^9.0.0", | ||
"@leafygreen-ui/tokens": "^0.5.3", | ||
"@leafygreen-ui/palette": "^3.2.2", | ||
"@leafygreen-ui/emotion": "^4.0.0", | ||
"@leafygreen-ui/ripple": "^1.1.1" | ||
}, | ||
"devDependencies": { | ||
"@leafygreen-ui/icon": "^11.1.1" | ||
"@leafygreen-ui/icon": "^11.3.0" | ||
}, | ||
"peerDependencies": { | ||
"@leafygreen-ui/leafygreen-provider": "^2.1.2" | ||
"@leafygreen-ui/leafygreen-provider": "^2.1.3" | ||
}, | ||
"gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0" | ||
} |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
375069
1202
+ Added@babel/generator@7.26.5(transitive)
+ Added@babel/parser@7.26.7(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.7(transitive)
+ Added@babel/types@7.26.7(transitive)
+ Added@emotion/babel-plugin@11.13.5(transitive)
+ Added@emotion/cache@11.14.0(transitive)
+ Added@emotion/css@11.13.5(transitive)
+ Added@emotion/hash@0.9.2(transitive)
+ Added@emotion/memoize@0.9.0(transitive)
+ Added@emotion/serialize@1.3.3(transitive)
+ Added@emotion/server@11.11.0(transitive)
+ Added@emotion/sheet@1.4.0(transitive)
+ Added@emotion/unitless@0.10.0(transitive)
+ Added@emotion/utils@1.4.2(transitive)
+ Added@emotion/weak-memoize@0.4.0(transitive)
+ Added@leafygreen-ui/emotion@4.0.9(transitive)
+ Addedbabel-plugin-macros@3.1.0(transitive)
+ Addedcosmiconfig@7.1.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedstylis@4.2.0(transitive)
- Removed@babel/generator@7.26.8(transitive)
- Removed@babel/parser@7.26.8(transitive)
- Removed@babel/template@7.26.8(transitive)
- Removed@babel/traverse@7.26.8(transitive)
- Removed@babel/types@7.26.8(transitive)
- 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/lib@^9.0.0
Updated@leafygreen-ui/tokens@^0.5.3