New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/button

Package Overview
Dependencies
Maintainers
5
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/button - npm Package Compare versions

Comparing version 19.0.1 to 19.0.2

10

CHANGELOG.md
# @leafygreen-ui/button
## 19.0.2
### Patch Changes
- b7f7a4c95: Updates package dependencies & devDependencies, and ensures each package is appropriately listed. Ensures `tsconfig` has no circular dependencies
- Updated dependencies [b7f7a4c95]
- @leafygreen-ui/palette@3.4.5
- @leafygreen-ui/ripple@1.1.7
- @leafygreen-ui/tokens@1.4.1
## 19.0.1

@@ -4,0 +14,0 @@

2

dist/esm/index.js

@@ -1,2 +0,2 @@

import n,{useRef as e,useEffect as r}from"react";import o from"prop-types";import a from"@leafygreen-ui/box";import{css as t,cx as l}from"@leafygreen-ui/emotion";import{useDarkMode as i,useUsingKeyboardContext as c}from"@leafygreen-ui/leafygreen-provider";import{transparentize as d,mix as g}from"polished";import{palette as s}from"@leafygreen-ui/palette";import{transitionDuration as b,fontFamilies as u,typeScales as p,BaseFontSize as h}from"@leafygreen-ui/tokens";import{Theme as f,createUniqueClassName as y,getTheme as x}from"@leafygreen-ui/lib";import{registerRipple as k}from"@leafygreen-ui/ripple";function m(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,o)}return r}function w(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){v(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function v(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function O(){return O=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},O.apply(this,arguments)}function D(n,e){if(null==n)return{};var r,o,a=function(n,e){if(null==n)return{};var r,o,a={},t=Object.keys(n);for(o=0;o<t.length;o++)r=t[o],e.indexOf(r)>=0||(a[r]=n[r]);return a}(n,e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);for(o=0;o<t.length;o++)r=t[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(a[r]=n[r])}return a}function P(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var j,z,G,B,S,N,M,E,L,q,F,C,I,X,K,H,R,T,Y,A,J,Q,U,V,W,Z,$,_,nn,en,rn,on,an,tn,ln,cn,dn,gn,sn,bn,un,pn,hn,fn,yn,xn,kn,mn,wn,vn,On,Dn,Pn={Default:"default",Primary:"primary",PrimaryOutline:"primaryOutline",Danger:"danger",DangerOutline:"dangerOutline",BaseGreen:"baseGreen"},jn={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},zn={Body1:13,Body2:16},Gn=function(n){return"\n 0 0 0 2px ".concat(n,", \n 0 0 0 4px ").concat(s.blue.light1,";\n")},Bn=t(j||(j=P(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 1px solid transparent;\n display: inline-flex;\n align-items: stretch;\n transition: all ","ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n font-family: ",";\n border-radius: 6px;\n\n &:focus {\n outline: none;\n }\n\n &[disabled],\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"])),b.default,u.default),Sn=(v(H={},f.Light,(v(E={},Pn.Default,t(z||(z=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0 0 0 3px ",";\n }\n "])),s.gray.light3,s.gray.base,s.black,s.black,s.white,s.gray.light2)),v(E,Pn.Primary,t(G||(G=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #00593f; // Not quite dark3\n border-color: #00593f; // Not quite dark3\n box-shadow: 0 0 0 3px ",";\n }\n "])),s.green.dark2,s.green.dark2,s.white,s.white,s.green.light2)),v(E,Pn.PrimaryOutline,t(B||(B=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.green.dark2,s.green.dark2,s.green.dark2,d(.96,s.green.base),s.green.light2)),v(E,Pn.Danger,t(S||(S=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #c82222; // not quite dark1\n border-color: #c82222; // not quite dark1\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.red.base,s.red.base,s.white,s.white,s.red.light3)),v(E,Pn.DangerOutline,t(N||(N=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.red.light1,s.red.base,s.red.dark2,d(.96,s.red.base),s.red.base,s.red.light3)),v(E,Pn.BaseGreen,t(M||(M=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.green.base,s.green.dark2,s.green.dark3,s.green.dark3,g(.96,s.green.base,s.green.dark3),s.green.light2)),E)),v(H,f.Dark,(v(K={},Pn.Default,t(L||(L=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n background-color: ",";\n border-color: ",";\n color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.gray.dark2,s.gray.base,s.white,s.white,s.gray.dark1,s.gray.base,s.white,s.gray.dark2)),v(K,Pn.Primary,t(q||(q=P(["\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: #00593f; // Off palette\n box-shadow: 0 0 0 3px ",";\n }\n "])),s.green.dark2,s.green.base,s.white,s.white,s.white,s.green.dark3)),v(K,Pn.PrimaryOutline,t(F||(F=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.green.base,s.green.base,s.green.base,s.green.base,d(.96,s.green.base),s.green.base,s.green.dark3)),v(K,Pn.Danger,t(C||(C=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n border-color: ",";\n color: ",";\n background-color: #c82222; // Off palette\n box-shadow: 0px 0px 0px 3px ","; // yes, yellow\n }\n "])),s.red.base,s.red.light1,s.white,s.white,s.red.light1,s.white,s.yellow.dark3)),v(K,Pn.DangerOutline,t(I||(I=P(["\n border-color: ",";\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 ","; // yes, yellow\n }\n "])),s.red.light1,s.red.light1,s.red.light1,s.red.light1,d(.96,s.red.base),s.yellow.dark3)),v(K,Pn.BaseGreen,t(X||(X=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),s.green.base,s.green.dark2,s.green.dark3,s.green.dark3,g(.96,s.green.base,s.green.light3),s.green.dark2,s.green.dark3)),K)),H),Nn=(v(rn={},f.Light,(v(U={},Pn.Default,t(R||(R=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),s.white,Gn(s.white))),v(U,Pn.Primary,t(T||(T=P(["\n &:focus {\n color: ",";\n background-color: #00593f; // Not quite dark3\n box-shadow: ",";\n }\n "])),s.white,Gn(s.white))),v(U,Pn.PrimaryOutline,t(Y||(Y=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),d(.96,s.green.base),Gn(s.white))),v(U,Pn.Danger,t(A||(A=P(["\n &:focus {\n color: ",";\n background-color: #c82222; // not quite dark1\n box-shadow: ",";\n }\n "])),s.white,Gn(s.white))),v(U,Pn.DangerOutline,t(J||(J=P(["\n &:focus {\n color: ",";\n box-shadow: ",";\n }\n "])),s.red.dark2,Gn(s.white))),v(U,Pn.BaseGreen,t(Q||(Q=P(["\n &:focus {\n box-shadow: ",";\n }\n "])),Gn(s.white))),U)),v(rn,f.Dark,(v(en={},Pn.Default,t(V||(V=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),s.gray.dark1,Gn(s.black))),v(en,Pn.Primary,t(W||(W=P(["\n &:focus {\n background-color: #00593f; // Off palette\n box-shadow: ",";\n }\n "])),Gn(s.black))),v(en,Pn.PrimaryOutline,t(Z||(Z=P(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),d(.96,s.green.base),s.green.base,Gn(s.black))),v(en,Pn.Danger,t($||($=P(["\n &:focus {\n background-color: #c82222; // Off palette\n box-shadow: ",";\n }\n "])),Gn(s.black))),v(en,Pn.DangerOutline,t(_||(_=P(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),d(.96,s.red.base),s.red.light1,Gn(s.black))),v(en,Pn.BaseGreen,t(nn||(nn=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),s.green.base,Gn(s.black))),en)),rn),Mn=(v(tn={},f.Light,t(on||(on=P(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),s.gray.light2,s.gray.light1,s.gray.base,Gn(s.white))),v(tn,f.Dark,t(an||(an=P(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),s.gray.dark3,s.gray.dark1,s.gray.dark1,Gn(s.black))),tn),En=(v(sn={},jn.XSmall,t(ln||(ln=P(["\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 "])))),v(sn,jn.Small,t(cn||(cn=P(["\n height: 28px;\n "])))),v(sn,jn.Default,t(dn||(dn=P(["\n height: 36px;\n "])))),v(sn,jn.Large,t(gn||(gn=P(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "])))),sn),Ln=(v(pn={},h.Body1,t(bn||(bn=P(["\n font-size: ","px;\n line-height: ","px;\n font-weight: 500; // Medium\n "])),p.body1.fontSize,p.body1.lineHeight)),v(pn,h.Body2,t(un||(un=P(["\n font-size: ","px;\n line-height: ","px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n font-weight: 500; // Medium\n "])),p.body2.fontSize,p.body2.lineHeight)),pn),qn=y("button");var Fn,Cn,In,Xn,Kn,Hn,Rn,Tn,Yn,An,Jn,Qn,Un,Vn,Wn,Zn,$n,_n,ne,ee,re,oe,ae,te,le,ie,ce,de,ge,se,be,ue,pe,he,fe,ye,xe,ke,me,we,ve,Oe,De,Pe=(v(yn={},f.Light,(v(hn={},Pn.Default,s.gray.light2),v(hn,Pn.Primary,s.green.dark1),v(hn,Pn.PrimaryOutline,d(.76,s.green.base)),v(hn,Pn.Danger,s.red.light1),v(hn,Pn.DangerOutline,d(.76,s.red.base)),v(hn,Pn.BaseGreen,s.green.light1),hn)),v(yn,f.Dark,(v(fn={},Pn.Default,s.gray.base),v(fn,Pn.Primary,s.green.dark1),v(fn,Pn.PrimaryOutline,d(.76,s.green.base)),v(fn,Pn.Danger,s.red.dark2),v(fn,Pn.DangerOutline,d(.76,s.red.light1)),v(fn,Pn.BaseGreen,s.green.dark1),fn)),yn),je=t(xn||(xn=P(["\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 5px;\n"]))),ze=t(kn||(kn=P(["\n display: grid;\n grid-auto-flow: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n"]))),Ge=(v(Dn={},jn.XSmall,t(mn||(mn=P(["\n padding: 0 7px; // 8px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Small,t(wn||(wn=P(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Default,t(vn||(vn=P(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Large,t(On||(On=P(["\n padding: 0 15px; // 16px - 1px border\n gap: 8px;\n "])))),Dn),Be=(v(Wn={},f.Light,(v(Rn={},Pn.Default,t(Fn||(Fn=P(["\n color: ",";\n "])),s.gray.base)),v(Rn,Pn.Primary,t(Cn||(Cn=P(["\n color: ",";\n "])),s.green.light2)),v(Rn,Pn.PrimaryOutline,t(In||(In=P(["\n color: ",";\n "])),s.green.dark2)),v(Rn,Pn.Danger,t(Xn||(Xn=P(["\n color: ",";\n "])),s.red.light3)),v(Rn,Pn.DangerOutline,t(Kn||(Kn=P(["\n color: ",";\n "])),s.red.light1)),v(Rn,Pn.BaseGreen,t(Hn||(Hn=P(["\n color: ",";\n "])),s.green.dark2)),Rn)),v(Wn,f.Dark,(v(Vn={},Pn.Default,t(Tn||(Tn=P(["\n color: ",";\n "])),s.gray.light2)),v(Vn,Pn.Primary,t(Yn||(Yn=P(["\n color: ",";\n "])),s.green.light2)),v(Vn,Pn.PrimaryOutline,t(An||(An=P(["\n color: ",";\n "])),s.green.base)),v(Vn,Pn.Danger,t(Jn||(Jn=P(["\n color: ",";\n "])),s.red.light2)),v(Vn,Pn.DangerOutline,t(Qn||(Qn=P(["\n color: ",";\n "])),s.red.light1)),v(Vn,Pn.BaseGreen,t(Un||(Un=P(["\n color: ",";\n "])),s.green.dark2)),Vn)),Wn),Se=(v(se={},f.Light,(v(oe={},Pn.Default,t(Zn||(Zn=P(["\n color: ",";\n "])),s.black)),v(oe,Pn.Primary,t($n||($n=P(["\n color: ",";\n "])),s.white)),v(oe,Pn.PrimaryOutline,t(_n||(_n=P(["\n color: ",";\n "])),s.green.dark2)),v(oe,Pn.Danger,t(ne||(ne=P(["\n color: ",";\n "])),s.white)),v(oe,Pn.DangerOutline,t(ee||(ee=P(["\n color: ",";\n "])),s.red.base)),v(oe,Pn.BaseGreen,t(re||(re=P(["\n color: ",";\n "])),s.green.dark3)),oe)),v(se,f.Dark,(v(ge={},Pn.Default,t(ae||(ae=P(["\n color: ",";\n "])),s.white)),v(ge,Pn.Primary,t(te||(te=P(["\n color: ",";\n "])),s.white)),v(ge,Pn.PrimaryOutline,t(le||(le=P(["\n color: ",";\n "])),s.green.base)),v(ge,Pn.Danger,t(ie||(ie=P(["\n color: ",";\n "])),s.white)),v(ge,Pn.DangerOutline,t(ce||(ce=P(["\n color: ",";\n "])),s.red.light1)),v(ge,Pn.BaseGreen,t(de||(de=P(["\n color: ",";\n "])),s.green.dark3)),ge)),se),Ne=t(be||(be=P(["\n ."," {\n &:hover,\n &:active {\n color: currentColor;\n }\n }\n"])),qn),Me=(v(ye={},jn.XSmall,t(ue||(ue=P(["\n height: 14px;\n width: 14px;\n "])))),v(ye,jn.Small,t(pe||(pe=P(["\n height: 16px;\n width: 16px;\n "])))),v(ye,jn.Default,t(he||(he=P(["\n height: 16px;\n width: 16px;\n "])))),v(ye,jn.Large,t(fe||(fe=P(["\n height: 20px;\n width: 20px;\n "])))),ye),Ee=(v(me={},f.Light,t(xe||(xe=P(["\n color: ",";\n "])),s.gray.light1)),v(me,f.Dark,t(ke||(ke=P(["\n color: ",";\n "])),s.gray.dark1)),me),Le=t(we||(we=P(["\n color: ",";\n"])),s.gray.dark2);function qe(e){var r,o=e.glyph,a=e.variant,t=e.size,i=e.darkMode,c=e.disabled,d=e.isIconOnlyButton,g=e.className,s=!d&&{"aria-hidden":!0,role:"presentation"},b=x(i),u=d?Se:Be;return n.cloneElement(o,w({className:l(u[b][a],Me[t],(r={},v(r,Ne,d),v(r,Ee[b],c),v(r,Le,c&&d&&i),r),g)},s))}qe.displayName="ButtonIcon";var Fe=function(o){var a,c=o.rightGlyph,d=o.leftGlyph,g=o.darkMode,s=o.disabled,b=void 0!==s&&s,u=o.variant,p=void 0===u?Pn.Default:u,h=o.size,f=void 0===h?jn.Default:h,y=o.children,x=i(g),m=x.darkMode,w=x.theme,D=e(null);r((function(){var n,e=Pe[w][p];return null==D.current||b||(n=k(D.current,{backgroundColor:e})),n}),[D,p,m,b,w]);var j=null!==(a=(d||c)&&!y)&&void 0!==a&&a,z={variant:p,size:f,darkMode:m,disabled:b,isIconOnlyButton:j};return n.createElement(n.Fragment,null,n.createElement("div",{className:l(je),ref:D}),n.createElement("div",{className:l(ze,Ge[f],v({},t(ve||(ve=P(["\n justify-content: space-between;\n "]))),!!c&&m))},d&&n.createElement(qe,O({glyph:d,className:t(Oe||(Oe=P(["\n justify-self: right;\n "])))},z)),y,c&&n.createElement(qe,O({glyph:c,className:t(De||(De=P(["\n justify-self: left;\n "])))},z))))},Ce=["variant","size","darkMode","baseFontSize","disabled","onClick","leftGlyph","rightGlyph","children","className","as","type"],Ie=n.forwardRef((function(e,r){var o=e.variant,t=void 0===o?Pn.Default:o,d=e.size,g=void 0===d?jn.Default:d,s=e.darkMode,b=e.baseFontSize,u=void 0===b?h.Body1:b,p=e.disabled,f=void 0!==p&&p,y=e.onClick,k=e.leftGlyph,m=e.rightGlyph,O=e.children,P=e.className,j=e.as,z=e.type,G=D(e,Ce),B=c().usingKeyboard,S=i(s).darkMode,N=function(n){var e=n.variant,r=n.size,o=n.darkMode,a=n.baseFontSize,t=n.disabled,i=n.usingKeyboard,c=x(o),d=Sn[c][e],g=Nn[c][e];return l(Bn,d,Ln[a],En[r],v({},g,i&&!t),v({},Mn[c],t))}({variant:t,size:g,darkMode:S,baseFontSize:u,disabled:f,usingKeyboard:B}),M=!(!G.href&&"a"!==j||f),E=w(w({type:M?void 0:z||"button",className:l(qn,N,P),ref:r,as:j||(M?"a":"button")},"string"!=typeof G.href&&{disabled:f}),{},{"aria-disabled":f,onClick:f?void 0:y},G),L={rightGlyph:m,leftGlyph:k,darkMode:S,disabled:f,variant:t,size:g};return n.createElement(a,E,n.createElement(Fe,L,O))}));Ie.displayName="Button",Ie.propTypes={variant:o.oneOf(Object.values(Pn)),baseFontSize:o.oneOf(Object.values(h)),size:o.oneOf(Object.values(jn)),darkMode:o.bool,disabled:o.bool,leftGlyph:o.element,rightGlyph:o.element,href:o.string};export{zn as FontSize,jn as Size,Pn as Variant,Ie as default};
import n,{useRef as e,useEffect as r}from"react";import o from"prop-types";import a from"@leafygreen-ui/box";import{css as t,cx as l}from"@leafygreen-ui/emotion";import{useDarkMode as i,useUsingKeyboardContext as c}from"@leafygreen-ui/leafygreen-provider";import{transitionDuration as d,fontFamilies as g,typeScales as s,BaseFontSize as b}from"@leafygreen-ui/tokens";import{registerRipple as u}from"@leafygreen-ui/ripple";import{Theme as p,createUniqueClassName as h,getTheme as f}from"@leafygreen-ui/lib";import{palette as y}from"@leafygreen-ui/palette";import{transparentize as x,mix as k}from"polished";function m(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,o)}return r}function w(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){v(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function v(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function O(){return O=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},O.apply(this,arguments)}function D(n,e){if(null==n)return{};var r,o,a=function(n,e){if(null==n)return{};var r,o,a={},t=Object.keys(n);for(o=0;o<t.length;o++)r=t[o],e.indexOf(r)>=0||(a[r]=n[r]);return a}(n,e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);for(o=0;o<t.length;o++)r=t[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(a[r]=n[r])}return a}function P(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var j,z,G,B,S,N,M,E,L,q,F,C,I,X,K,H,R,T,Y,A,J,Q,U,V,W,Z,$,_,nn,en,rn,on,an,tn,ln,cn,dn,gn,sn,bn,un,pn,hn,fn,yn,xn,kn,mn,wn,vn,On,Dn,Pn={Default:"default",Primary:"primary",PrimaryOutline:"primaryOutline",Danger:"danger",DangerOutline:"dangerOutline",BaseGreen:"baseGreen"},jn={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},zn={Body1:13,Body2:16},Gn=function(n){return"\n 0 0 0 2px ".concat(n,", \n 0 0 0 4px ").concat(y.blue.light1,";\n")},Bn=t(j||(j=P(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 1px solid transparent;\n display: inline-flex;\n align-items: stretch;\n transition: all ","ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n font-family: ",";\n border-radius: 6px;\n\n &:focus {\n outline: none;\n }\n\n &[disabled],\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"])),d.default,g.default),Sn=(v(H={},p.Light,(v(E={},Pn.Default,t(z||(z=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0 0 0 3px ",";\n }\n "])),y.gray.light3,y.gray.base,y.black,y.black,y.white,y.gray.light2)),v(E,Pn.Primary,t(G||(G=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #00593f; // Not quite dark3\n border-color: #00593f; // Not quite dark3\n box-shadow: 0 0 0 3px ",";\n }\n "])),y.green.dark2,y.green.dark2,y.white,y.white,y.green.light2)),v(E,Pn.PrimaryOutline,t(B||(B=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.green.dark2,y.green.dark2,y.green.dark2,x(.96,y.green.base),y.green.light2)),v(E,Pn.Danger,t(S||(S=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #c82222; // not quite dark1\n border-color: #c82222; // not quite dark1\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.red.base,y.red.base,y.white,y.white,y.red.light3)),v(E,Pn.DangerOutline,t(N||(N=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.red.light1,y.red.base,y.red.dark2,x(.96,y.red.base),y.red.base,y.red.light3)),v(E,Pn.BaseGreen,t(M||(M=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.green.base,y.green.dark2,y.green.dark3,y.green.dark3,k(.96,y.green.base,y.green.dark3),y.green.light2)),E)),v(H,p.Dark,(v(K={},Pn.Default,t(L||(L=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n background-color: ",";\n border-color: ",";\n color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.gray.dark2,y.gray.base,y.white,y.white,y.gray.dark1,y.gray.base,y.white,y.gray.dark2)),v(K,Pn.Primary,t(q||(q=P(["\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: #00593f; // Off palette\n box-shadow: 0 0 0 3px ",";\n }\n "])),y.green.dark2,y.green.base,y.white,y.white,y.white,y.green.dark3)),v(K,Pn.PrimaryOutline,t(F||(F=P(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.green.base,y.green.base,y.green.base,y.green.base,x(.96,y.green.base),y.green.base,y.green.dark3)),v(K,Pn.Danger,t(C||(C=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n border-color: ",";\n color: ",";\n background-color: #c82222; // Off palette\n box-shadow: 0px 0px 0px 3px ","; // yes, yellow\n }\n "])),y.red.base,y.red.light1,y.white,y.white,y.red.light1,y.white,y.yellow.dark3)),v(K,Pn.DangerOutline,t(I||(I=P(["\n border-color: ",";\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 ","; // yes, yellow\n }\n "])),y.red.light1,y.red.light1,y.red.light1,y.red.light1,x(.96,y.red.base),y.yellow.dark3)),v(K,Pn.BaseGreen,t(X||(X=P(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),y.green.base,y.green.dark2,y.green.dark3,y.green.dark3,k(.96,y.green.base,y.green.light3),y.green.dark2,y.green.dark3)),K)),H),Nn=(v(rn={},p.Light,(v(U={},Pn.Default,t(R||(R=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),y.white,Gn(y.white))),v(U,Pn.Primary,t(T||(T=P(["\n &:focus {\n color: ",";\n background-color: #00593f; // Not quite dark3\n box-shadow: ",";\n }\n "])),y.white,Gn(y.white))),v(U,Pn.PrimaryOutline,t(Y||(Y=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),x(.96,y.green.base),Gn(y.white))),v(U,Pn.Danger,t(A||(A=P(["\n &:focus {\n color: ",";\n background-color: #c82222; // not quite dark1\n box-shadow: ",";\n }\n "])),y.white,Gn(y.white))),v(U,Pn.DangerOutline,t(J||(J=P(["\n &:focus {\n color: ",";\n box-shadow: ",";\n }\n "])),y.red.dark2,Gn(y.white))),v(U,Pn.BaseGreen,t(Q||(Q=P(["\n &:focus {\n box-shadow: ",";\n }\n "])),Gn(y.white))),U)),v(rn,p.Dark,(v(en={},Pn.Default,t(V||(V=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),y.gray.dark1,Gn(y.black))),v(en,Pn.Primary,t(W||(W=P(["\n &:focus {\n background-color: #00593f; // Off palette\n box-shadow: ",";\n }\n "])),Gn(y.black))),v(en,Pn.PrimaryOutline,t(Z||(Z=P(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),x(.96,y.green.base),y.green.base,Gn(y.black))),v(en,Pn.Danger,t($||($=P(["\n &:focus {\n background-color: #c82222; // Off palette\n box-shadow: ",";\n }\n "])),Gn(y.black))),v(en,Pn.DangerOutline,t(_||(_=P(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),x(.96,y.red.base),y.red.light1,Gn(y.black))),v(en,Pn.BaseGreen,t(nn||(nn=P(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),y.green.base,Gn(y.black))),en)),rn),Mn=(v(tn={},p.Light,t(on||(on=P(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),y.gray.light2,y.gray.light1,y.gray.base,Gn(y.white))),v(tn,p.Dark,t(an||(an=P(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),y.gray.dark3,y.gray.dark1,y.gray.dark1,Gn(y.black))),tn),En=(v(sn={},jn.XSmall,t(ln||(ln=P(["\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 "])))),v(sn,jn.Small,t(cn||(cn=P(["\n height: 28px;\n "])))),v(sn,jn.Default,t(dn||(dn=P(["\n height: 36px;\n "])))),v(sn,jn.Large,t(gn||(gn=P(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "])))),sn),Ln=(v(pn={},b.Body1,t(bn||(bn=P(["\n font-size: ","px;\n line-height: ","px;\n font-weight: 500; // Medium\n "])),s.body1.fontSize,s.body1.lineHeight)),v(pn,b.Body2,t(un||(un=P(["\n font-size: ","px;\n line-height: ","px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n font-weight: 500; // Medium\n "])),s.body2.fontSize,s.body2.lineHeight)),pn),qn=h("button");var Fn,Cn,In,Xn,Kn,Hn,Rn,Tn,Yn,An,Jn,Qn,Un,Vn,Wn,Zn,$n,_n,ne,ee,re,oe,ae,te,le,ie,ce,de,ge,se,be,ue,pe,he,fe,ye,xe,ke,me,we,ve,Oe,De,Pe=(v(yn={},p.Light,(v(hn={},Pn.Default,y.gray.light2),v(hn,Pn.Primary,y.green.dark1),v(hn,Pn.PrimaryOutline,x(.76,y.green.base)),v(hn,Pn.Danger,y.red.light1),v(hn,Pn.DangerOutline,x(.76,y.red.base)),v(hn,Pn.BaseGreen,y.green.light1),hn)),v(yn,p.Dark,(v(fn={},Pn.Default,y.gray.base),v(fn,Pn.Primary,y.green.dark1),v(fn,Pn.PrimaryOutline,x(.76,y.green.base)),v(fn,Pn.Danger,y.red.dark2),v(fn,Pn.DangerOutline,x(.76,y.red.light1)),v(fn,Pn.BaseGreen,y.green.dark1),fn)),yn),je=t(xn||(xn=P(["\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 5px;\n"]))),ze=t(kn||(kn=P(["\n display: grid;\n grid-auto-flow: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n"]))),Ge=(v(Dn={},jn.XSmall,t(mn||(mn=P(["\n padding: 0 7px; // 8px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Small,t(wn||(wn=P(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Default,t(vn||(vn=P(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),v(Dn,jn.Large,t(On||(On=P(["\n padding: 0 15px; // 16px - 1px border\n gap: 8px;\n "])))),Dn),Be=(v(Wn={},p.Light,(v(Rn={},Pn.Default,t(Fn||(Fn=P(["\n color: ",";\n "])),y.gray.base)),v(Rn,Pn.Primary,t(Cn||(Cn=P(["\n color: ",";\n "])),y.green.light2)),v(Rn,Pn.PrimaryOutline,t(In||(In=P(["\n color: ",";\n "])),y.green.dark2)),v(Rn,Pn.Danger,t(Xn||(Xn=P(["\n color: ",";\n "])),y.red.light3)),v(Rn,Pn.DangerOutline,t(Kn||(Kn=P(["\n color: ",";\n "])),y.red.light1)),v(Rn,Pn.BaseGreen,t(Hn||(Hn=P(["\n color: ",";\n "])),y.green.dark2)),Rn)),v(Wn,p.Dark,(v(Vn={},Pn.Default,t(Tn||(Tn=P(["\n color: ",";\n "])),y.gray.light2)),v(Vn,Pn.Primary,t(Yn||(Yn=P(["\n color: ",";\n "])),y.green.light2)),v(Vn,Pn.PrimaryOutline,t(An||(An=P(["\n color: ",";\n "])),y.green.base)),v(Vn,Pn.Danger,t(Jn||(Jn=P(["\n color: ",";\n "])),y.red.light2)),v(Vn,Pn.DangerOutline,t(Qn||(Qn=P(["\n color: ",";\n "])),y.red.light1)),v(Vn,Pn.BaseGreen,t(Un||(Un=P(["\n color: ",";\n "])),y.green.dark2)),Vn)),Wn),Se=(v(se={},p.Light,(v(oe={},Pn.Default,t(Zn||(Zn=P(["\n color: ",";\n "])),y.black)),v(oe,Pn.Primary,t($n||($n=P(["\n color: ",";\n "])),y.white)),v(oe,Pn.PrimaryOutline,t(_n||(_n=P(["\n color: ",";\n "])),y.green.dark2)),v(oe,Pn.Danger,t(ne||(ne=P(["\n color: ",";\n "])),y.white)),v(oe,Pn.DangerOutline,t(ee||(ee=P(["\n color: ",";\n "])),y.red.base)),v(oe,Pn.BaseGreen,t(re||(re=P(["\n color: ",";\n "])),y.green.dark3)),oe)),v(se,p.Dark,(v(ge={},Pn.Default,t(ae||(ae=P(["\n color: ",";\n "])),y.white)),v(ge,Pn.Primary,t(te||(te=P(["\n color: ",";\n "])),y.white)),v(ge,Pn.PrimaryOutline,t(le||(le=P(["\n color: ",";\n "])),y.green.base)),v(ge,Pn.Danger,t(ie||(ie=P(["\n color: ",";\n "])),y.white)),v(ge,Pn.DangerOutline,t(ce||(ce=P(["\n color: ",";\n "])),y.red.light1)),v(ge,Pn.BaseGreen,t(de||(de=P(["\n color: ",";\n "])),y.green.dark3)),ge)),se),Ne=t(be||(be=P(["\n ."," {\n &:hover,\n &:active {\n color: currentColor;\n }\n }\n"])),qn),Me=(v(ye={},jn.XSmall,t(ue||(ue=P(["\n height: 14px;\n width: 14px;\n "])))),v(ye,jn.Small,t(pe||(pe=P(["\n height: 16px;\n width: 16px;\n "])))),v(ye,jn.Default,t(he||(he=P(["\n height: 16px;\n width: 16px;\n "])))),v(ye,jn.Large,t(fe||(fe=P(["\n height: 20px;\n width: 20px;\n "])))),ye),Ee=(v(me={},p.Light,t(xe||(xe=P(["\n color: ",";\n "])),y.gray.light1)),v(me,p.Dark,t(ke||(ke=P(["\n color: ",";\n "])),y.gray.dark1)),me),Le=t(we||(we=P(["\n color: ",";\n"])),y.gray.dark2);function qe(e){var r,o=e.glyph,a=e.variant,t=e.size,i=e.darkMode,c=e.disabled,d=e.isIconOnlyButton,g=e.className,s=!d&&{"aria-hidden":!0,role:"presentation"},b=f(i),u=d?Se:Be;return n.cloneElement(o,w({className:l(u[b][a],Me[t],(r={},v(r,Ne,d),v(r,Ee[b],c),v(r,Le,c&&d&&i),r),g)},s))}qe.displayName="ButtonIcon";var Fe=function(o){var a,c=o.rightGlyph,d=o.leftGlyph,g=o.darkMode,s=o.disabled,b=void 0!==s&&s,p=o.variant,h=void 0===p?Pn.Default:p,f=o.size,y=void 0===f?jn.Default:f,x=o.children,k=i(g),m=k.darkMode,w=k.theme,D=e(null);r((function(){var n,e=Pe[w][h];return null==D.current||b||(n=u(D.current,{backgroundColor:e})),n}),[D,h,m,b,w]);var j=null!==(a=(d||c)&&!x)&&void 0!==a&&a,z={variant:h,size:y,darkMode:m,disabled:b,isIconOnlyButton:j};return n.createElement(n.Fragment,null,n.createElement("div",{className:l(je),ref:D}),n.createElement("div",{className:l(ze,Ge[y],v({},t(ve||(ve=P(["\n justify-content: space-between;\n "]))),!!c&&m))},d&&n.createElement(qe,O({glyph:d,className:t(Oe||(Oe=P(["\n justify-self: right;\n "])))},z)),x,c&&n.createElement(qe,O({glyph:c,className:t(De||(De=P(["\n justify-self: left;\n "])))},z))))},Ce=["variant","size","darkMode","baseFontSize","disabled","onClick","leftGlyph","rightGlyph","children","className","as","type"],Ie=n.forwardRef((function(e,r){var o=e.variant,t=void 0===o?Pn.Default:o,d=e.size,g=void 0===d?jn.Default:d,s=e.darkMode,u=e.baseFontSize,p=void 0===u?b.Body1:u,h=e.disabled,y=void 0!==h&&h,x=e.onClick,k=e.leftGlyph,m=e.rightGlyph,O=e.children,P=e.className,j=e.as,z=e.type,G=D(e,Ce),B=c().usingKeyboard,S=i(s).darkMode,N=function(n){var e=n.variant,r=n.size,o=n.darkMode,a=n.baseFontSize,t=n.disabled,i=n.usingKeyboard,c=f(o),d=Sn[c][e],g=Nn[c][e];return l(Bn,d,Ln[a],En[r],v({},g,i&&!t),v({},Mn[c],t))}({variant:t,size:g,darkMode:S,baseFontSize:p,disabled:y,usingKeyboard:B}),M=!(!G.href&&"a"!==j||y),E=w(w({type:M?void 0:z||"button",className:l(qn,N,P),ref:r,as:j||(M?"a":"button")},"string"!=typeof G.href&&{disabled:y}),{},{"aria-disabled":y,onClick:y?void 0:x},G),L={rightGlyph:m,leftGlyph:k,darkMode:S,disabled:y,variant:t,size:g};return n.createElement(a,E,n.createElement(Fe,L,O))}));Ie.displayName="Button",Ie.propTypes={variant:o.oneOf(Object.values(Pn)),baseFontSize:o.oneOf(Object.values(b)),size:o.oneOf(Object.values(jn)),darkMode:o.bool,disabled:o.bool,leftGlyph:o.element,rightGlyph:o.element,href:o.string};export{zn as FontSize,jn as Size,Pn as Variant,Ie as default};
//# sourceMappingURL=index.js.map
export { Button as default } from './Button';
export type { ButtonProps } from './types';
export { FontSize, Variant, Size } from './types';
export { FontSize, Size, Variant } from './types';
//# sourceMappingURL=index.d.ts.map

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/leafygreen-provider"),require("polished"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/ripple")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/leafygreen-provider","polished","@leafygreen-ui/palette","@leafygreen-ui/tokens","@leafygreen-ui/lib","@leafygreen-ui/ripple"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/button"]={},e.React,e.PropTypes,e["@leafygreen-ui/box"],e["@leafygreen-ui/emotion"],e["@leafygreen-ui/leafygreen-provider"],e.polished,e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e["@leafygreen-ui/lib"],e["@leafygreen-ui/ripple"])}(this,(function(e,n,t,r,a,o,l,i,s,c,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(n),u=d(t),b=d(r);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){y(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(){return x=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},x.apply(this,arguments)}function k(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v,w,O,D,z,P,j,S,B,G,T,q,M,N,E,F,L,C,I,K,R,X,H,U,_,V,Y,A,J,Q,W,Z,$,ee,ne,te,re,ae,oe,le,ie,se,ce,pe,de,ge,ue,be,he,fe,ye,xe,ke={Default:"default",Primary:"primary",PrimaryOutline:"primaryOutline",Danger:"danger",DangerOutline:"dangerOutline",BaseGreen:"baseGreen"},me={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},ve=function(e){return"\n 0 0 0 2px ".concat(e,", \n 0 0 0 4px ").concat(i.palette.blue.light1,";\n")},we=a.css(v||(v=m(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 1px solid transparent;\n display: inline-flex;\n align-items: stretch;\n transition: all ","ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n font-family: ",";\n border-radius: 6px;\n\n &:focus {\n outline: none;\n }\n\n &[disabled],\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"])),s.transitionDuration.default,s.fontFamilies.default),Oe=(y(F={},c.Theme.Light,(y(S={},ke.Default,a.css(w||(w=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0 0 0 3px ",";\n }\n "])),i.palette.gray.light3,i.palette.gray.base,i.palette.black,i.palette.black,i.palette.white,i.palette.gray.light2)),y(S,ke.Primary,a.css(O||(O=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #00593f; // Not quite dark3\n border-color: #00593f; // Not quite dark3\n box-shadow: 0 0 0 3px ",";\n }\n "])),i.palette.green.dark2,i.palette.green.dark2,i.palette.white,i.palette.white,i.palette.green.light2)),y(S,ke.PrimaryOutline,a.css(D||(D=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.green.dark2,i.palette.green.dark2,i.palette.green.dark2,l.transparentize(.96,i.palette.green.base),i.palette.green.light2)),y(S,ke.Danger,a.css(z||(z=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #c82222; // not quite dark1\n border-color: #c82222; // not quite dark1\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.red.base,i.palette.red.base,i.palette.white,i.palette.white,i.palette.red.light3)),y(S,ke.DangerOutline,a.css(P||(P=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.red.light1,i.palette.red.base,i.palette.red.dark2,l.transparentize(.96,i.palette.red.base),i.palette.red.base,i.palette.red.light3)),y(S,ke.BaseGreen,a.css(j||(j=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.green.base,i.palette.green.dark2,i.palette.green.dark3,i.palette.green.dark3,l.mix(.96,i.palette.green.base,i.palette.green.dark3),i.palette.green.light2)),S)),y(F,c.Theme.Dark,(y(E={},ke.Default,a.css(B||(B=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n background-color: ",";\n border-color: ",";\n color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.gray.dark2,i.palette.gray.base,i.palette.white,i.palette.white,i.palette.gray.dark1,i.palette.gray.base,i.palette.white,i.palette.gray.dark2)),y(E,ke.Primary,a.css(G||(G=m(["\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: #00593f; // Off palette\n box-shadow: 0 0 0 3px ",";\n }\n "])),i.palette.green.dark2,i.palette.green.base,i.palette.white,i.palette.white,i.palette.white,i.palette.green.dark3)),y(E,ke.PrimaryOutline,a.css(T||(T=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.green.base,i.palette.green.base,i.palette.green.base,i.palette.green.base,l.transparentize(.96,i.palette.green.base),i.palette.green.base,i.palette.green.dark3)),y(E,ke.Danger,a.css(q||(q=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n border-color: ",";\n color: ",";\n background-color: #c82222; // Off palette\n box-shadow: 0px 0px 0px 3px ","; // yes, yellow\n }\n "])),i.palette.red.base,i.palette.red.light1,i.palette.white,i.palette.white,i.palette.red.light1,i.palette.white,i.palette.yellow.dark3)),y(E,ke.DangerOutline,a.css(M||(M=m(["\n border-color: ",";\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 ","; // yes, yellow\n }\n "])),i.palette.red.light1,i.palette.red.light1,i.palette.red.light1,i.palette.red.light1,l.transparentize(.96,i.palette.red.base),i.palette.yellow.dark3)),y(E,ke.BaseGreen,a.css(N||(N=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),i.palette.green.base,i.palette.green.dark2,i.palette.green.dark3,i.palette.green.dark3,l.mix(.96,i.palette.green.base,i.palette.green.light3),i.palette.green.dark2,i.palette.green.dark3)),E)),F),De=(y(W={},c.Theme.Light,(y(H={},ke.Default,a.css(L||(L=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),i.palette.white,ve(i.palette.white))),y(H,ke.Primary,a.css(C||(C=m(["\n &:focus {\n color: ",";\n background-color: #00593f; // Not quite dark3\n box-shadow: ",";\n }\n "])),i.palette.white,ve(i.palette.white))),y(H,ke.PrimaryOutline,a.css(I||(I=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),l.transparentize(.96,i.palette.green.base),ve(i.palette.white))),y(H,ke.Danger,a.css(K||(K=m(["\n &:focus {\n color: ",";\n background-color: #c82222; // not quite dark1\n box-shadow: ",";\n }\n "])),i.palette.white,ve(i.palette.white))),y(H,ke.DangerOutline,a.css(R||(R=m(["\n &:focus {\n color: ",";\n box-shadow: ",";\n }\n "])),i.palette.red.dark2,ve(i.palette.white))),y(H,ke.BaseGreen,a.css(X||(X=m(["\n &:focus {\n box-shadow: ",";\n }\n "])),ve(i.palette.white))),H)),y(W,c.Theme.Dark,(y(Q={},ke.Default,a.css(U||(U=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),i.palette.gray.dark1,ve(i.palette.black))),y(Q,ke.Primary,a.css(_||(_=m(["\n &:focus {\n background-color: #00593f; // Off palette\n box-shadow: ",";\n }\n "])),ve(i.palette.black))),y(Q,ke.PrimaryOutline,a.css(V||(V=m(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),l.transparentize(.96,i.palette.green.base),i.palette.green.base,ve(i.palette.black))),y(Q,ke.Danger,a.css(Y||(Y=m(["\n &:focus {\n background-color: #c82222; // Off palette\n box-shadow: ",";\n }\n "])),ve(i.palette.black))),y(Q,ke.DangerOutline,a.css(A||(A=m(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),l.transparentize(.96,i.palette.red.base),i.palette.red.light1,ve(i.palette.black))),y(Q,ke.BaseGreen,a.css(J||(J=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),i.palette.green.base,ve(i.palette.black))),Q)),W),ze=(y(ee={},c.Theme.Light,a.css(Z||(Z=m(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),i.palette.gray.light2,i.palette.gray.light1,i.palette.gray.base,ve(i.palette.white))),y(ee,c.Theme.Dark,a.css($||($=m(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),i.palette.gray.dark3,i.palette.gray.dark1,i.palette.gray.dark1,ve(i.palette.black))),ee),Pe=(y(oe={},me.XSmall,a.css(ne||(ne=m(["\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 "])))),y(oe,me.Small,a.css(te||(te=m(["\n height: 28px;\n "])))),y(oe,me.Default,a.css(re||(re=m(["\n height: 36px;\n "])))),y(oe,me.Large,a.css(ae||(ae=m(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "])))),oe),je=(y(se={},s.BaseFontSize.Body1,a.css(le||(le=m(["\n font-size: ","px;\n line-height: ","px;\n font-weight: 500; // Medium\n "])),s.typeScales.body1.fontSize,s.typeScales.body1.lineHeight)),y(se,s.BaseFontSize.Body2,a.css(ie||(ie=m(["\n font-size: ","px;\n line-height: ","px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n font-weight: 500; // Medium\n "])),s.typeScales.body2.fontSize,s.typeScales.body2.lineHeight)),se),Se=c.createUniqueClassName("button");var Be,Ge,Te,qe,Me,Ne,Ee,Fe,Le,Ce,Ie,Ke,Re,Xe,He,Ue,_e,Ve,Ye,Ae,Je,Qe,We,Ze,$e,en,nn,tn,rn,an,on,ln,sn,cn,pn,dn,gn,un,bn,hn,fn,yn,xn,kn=.76,mn=(y(de={},c.Theme.Light,(y(ce={},ke.Default,i.palette.gray.light2),y(ce,ke.Primary,i.palette.green.dark1),y(ce,ke.PrimaryOutline,l.transparentize(kn,i.palette.green.base)),y(ce,ke.Danger,i.palette.red.light1),y(ce,ke.DangerOutline,l.transparentize(kn,i.palette.red.base)),y(ce,ke.BaseGreen,i.palette.green.light1),ce)),y(de,c.Theme.Dark,(y(pe={},ke.Default,i.palette.gray.base),y(pe,ke.Primary,i.palette.green.dark1),y(pe,ke.PrimaryOutline,l.transparentize(kn,i.palette.green.base)),y(pe,ke.Danger,i.palette.red.dark2),y(pe,ke.DangerOutline,l.transparentize(kn,i.palette.red.light1)),y(pe,ke.BaseGreen,i.palette.green.dark1),pe)),de),vn=a.css(ge||(ge=m(["\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 5px;\n"]))),wn=a.css(ue||(ue=m(["\n display: grid;\n grid-auto-flow: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n"]))),On=(y(xe={},me.XSmall,a.css(be||(be=m(["\n padding: 0 7px; // 8px - 1px border\n gap: 6px;\n "])))),y(xe,me.Small,a.css(he||(he=m(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),y(xe,me.Default,a.css(fe||(fe=m(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),y(xe,me.Large,a.css(ye||(ye=m(["\n padding: 0 15px; // 16px - 1px border\n gap: 8px;\n "])))),xe),Dn=(y(He={},c.Theme.Light,(y(Ee={},ke.Default,a.css(Be||(Be=m(["\n color: ",";\n "])),i.palette.gray.base)),y(Ee,ke.Primary,a.css(Ge||(Ge=m(["\n color: ",";\n "])),i.palette.green.light2)),y(Ee,ke.PrimaryOutline,a.css(Te||(Te=m(["\n color: ",";\n "])),i.palette.green.dark2)),y(Ee,ke.Danger,a.css(qe||(qe=m(["\n color: ",";\n "])),i.palette.red.light3)),y(Ee,ke.DangerOutline,a.css(Me||(Me=m(["\n color: ",";\n "])),i.palette.red.light1)),y(Ee,ke.BaseGreen,a.css(Ne||(Ne=m(["\n color: ",";\n "])),i.palette.green.dark2)),Ee)),y(He,c.Theme.Dark,(y(Xe={},ke.Default,a.css(Fe||(Fe=m(["\n color: ",";\n "])),i.palette.gray.light2)),y(Xe,ke.Primary,a.css(Le||(Le=m(["\n color: ",";\n "])),i.palette.green.light2)),y(Xe,ke.PrimaryOutline,a.css(Ce||(Ce=m(["\n color: ",";\n "])),i.palette.green.base)),y(Xe,ke.Danger,a.css(Ie||(Ie=m(["\n color: ",";\n "])),i.palette.red.light2)),y(Xe,ke.DangerOutline,a.css(Ke||(Ke=m(["\n color: ",";\n "])),i.palette.red.light1)),y(Xe,ke.BaseGreen,a.css(Re||(Re=m(["\n color: ",";\n "])),i.palette.green.dark2)),Xe)),He),zn=(y(an={},c.Theme.Light,(y(Qe={},ke.Default,a.css(Ue||(Ue=m(["\n color: ",";\n "])),i.palette.black)),y(Qe,ke.Primary,a.css(_e||(_e=m(["\n color: ",";\n "])),i.palette.white)),y(Qe,ke.PrimaryOutline,a.css(Ve||(Ve=m(["\n color: ",";\n "])),i.palette.green.dark2)),y(Qe,ke.Danger,a.css(Ye||(Ye=m(["\n color: ",";\n "])),i.palette.white)),y(Qe,ke.DangerOutline,a.css(Ae||(Ae=m(["\n color: ",";\n "])),i.palette.red.base)),y(Qe,ke.BaseGreen,a.css(Je||(Je=m(["\n color: ",";\n "])),i.palette.green.dark3)),Qe)),y(an,c.Theme.Dark,(y(rn={},ke.Default,a.css(We||(We=m(["\n color: ",";\n "])),i.palette.white)),y(rn,ke.Primary,a.css(Ze||(Ze=m(["\n color: ",";\n "])),i.palette.white)),y(rn,ke.PrimaryOutline,a.css($e||($e=m(["\n color: ",";\n "])),i.palette.green.base)),y(rn,ke.Danger,a.css(en||(en=m(["\n color: ",";\n "])),i.palette.white)),y(rn,ke.DangerOutline,a.css(nn||(nn=m(["\n color: ",";\n "])),i.palette.red.light1)),y(rn,ke.BaseGreen,a.css(tn||(tn=m(["\n color: ",";\n "])),i.palette.green.dark3)),rn)),an),Pn=a.css(on||(on=m(["\n ."," {\n &:hover,\n &:active {\n color: currentColor;\n }\n }\n"])),Se),jn=(y(dn={},me.XSmall,a.css(ln||(ln=m(["\n height: 14px;\n width: 14px;\n "])))),y(dn,me.Small,a.css(sn||(sn=m(["\n height: 16px;\n width: 16px;\n "])))),y(dn,me.Default,a.css(cn||(cn=m(["\n height: 16px;\n width: 16px;\n "])))),y(dn,me.Large,a.css(pn||(pn=m(["\n height: 20px;\n width: 20px;\n "])))),dn),Sn=(y(bn={},c.Theme.Light,a.css(gn||(gn=m(["\n color: ",";\n "])),i.palette.gray.light1)),y(bn,c.Theme.Dark,a.css(un||(un=m(["\n color: ",";\n "])),i.palette.gray.dark1)),bn),Bn=a.css(hn||(hn=m(["\n color: ",";\n"])),i.palette.gray.dark2);function Gn(e){var n,t=e.glyph,r=e.variant,o=e.size,l=e.darkMode,i=e.disabled,s=e.isIconOnlyButton,p=e.className,d=!s&&{"aria-hidden":!0,role:"presentation"},u=c.getTheme(l),b=s?zn:Dn;return g.default.cloneElement(t,f({className:a.cx(b[u][r],jn[o],(n={},y(n,Pn,s),y(n,Sn[u],i),y(n,Bn,i&&s&&l),n),p)},d))}Gn.displayName="ButtonIcon";var Tn=function(e){var t,r=e.rightGlyph,l=e.leftGlyph,i=e.darkMode,s=e.disabled,c=void 0!==s&&s,d=e.variant,u=void 0===d?ke.Default:d,b=e.size,h=void 0===b?me.Default:b,f=e.children,k=o.useDarkMode(i),v=k.darkMode,w=k.theme,O=n.useRef(null);n.useEffect((function(){var e,n=mn[w][u];return null==O.current||c||(e=p.registerRipple(O.current,{backgroundColor:n})),e}),[O,u,v,c,w]);var D=null!==(t=(l||r)&&!f)&&void 0!==t&&t,z={variant:u,size:h,darkMode:v,disabled:c,isIconOnlyButton:D};return g.default.createElement(g.default.Fragment,null,g.default.createElement("div",{className:a.cx(vn),ref:O}),g.default.createElement("div",{className:a.cx(wn,On[h],y({},a.css(fn||(fn=m(["\n justify-content: space-between;\n "]))),!!r&&v))},l&&g.default.createElement(Gn,x({glyph:l,className:a.css(yn||(yn=m(["\n justify-self: right;\n "])))},z)),f,r&&g.default.createElement(Gn,x({glyph:r,className:a.css(xn||(xn=m(["\n justify-self: left;\n "])))},z))))},qn=["variant","size","darkMode","baseFontSize","disabled","onClick","leftGlyph","rightGlyph","children","className","as","type"],Mn=g.default.forwardRef((function(e,n){var t=e.variant,r=void 0===t?ke.Default:t,l=e.size,i=void 0===l?me.Default:l,p=e.darkMode,d=e.baseFontSize,u=void 0===d?s.BaseFontSize.Body1:d,h=e.disabled,x=void 0!==h&&h,m=e.onClick,v=e.leftGlyph,w=e.rightGlyph,O=e.children,D=e.className,z=e.as,P=e.type,j=k(e,qn),S=o.useUsingKeyboardContext().usingKeyboard,B=o.useDarkMode(p).darkMode,G=function(e){var n=e.variant,t=e.size,r=e.darkMode,o=e.baseFontSize,l=e.disabled,i=e.usingKeyboard,s=c.getTheme(r),p=Oe[s][n],d=De[s][n],g=Pe[t],u=je[o];return a.cx(we,p,u,g,y({},d,i&&!l),y({},ze[s],l))}({variant:r,size:i,darkMode:B,baseFontSize:u,disabled:x,usingKeyboard:S}),T=!(!j.href&&"a"!==z||x),q=f(f({type:T?void 0:P||"button",className:a.cx(Se,G,D),ref:n,as:z||(T?"a":"button")},"string"!=typeof j.href&&{disabled:x}),{},{"aria-disabled":x,onClick:x?void 0:m},j),M={rightGlyph:w,leftGlyph:v,darkMode:B,disabled:x,variant:r,size:i};return g.default.createElement(b.default,q,g.default.createElement(Tn,M,O))}));Mn.displayName="Button",Mn.propTypes={variant:u.default.oneOf(Object.values(ke)),baseFontSize:u.default.oneOf(Object.values(s.BaseFontSize)),size:u.default.oneOf(Object.values(me)),darkMode:u.default.bool,disabled:u.default.bool,leftGlyph:u.default.element,rightGlyph:u.default.element,href:u.default.string},e.FontSize={Body1:13,Body2:16},e.Size=me,e.Variant=ke,e.default=Mn,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types"),require("@leafygreen-ui/box"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/leafygreen-provider"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/ripple"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/palette"),require("polished")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/box","@leafygreen-ui/emotion","@leafygreen-ui/leafygreen-provider","@leafygreen-ui/tokens","@leafygreen-ui/ripple","@leafygreen-ui/lib","@leafygreen-ui/palette","polished"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/button"]={},e.React,e.PropTypes,e["@leafygreen-ui/box"],e["@leafygreen-ui/emotion"],e["@leafygreen-ui/leafygreen-provider"],e["@leafygreen-ui/tokens"],e["@leafygreen-ui/ripple"],e["@leafygreen-ui/lib"],e["@leafygreen-ui/palette"],e.polished)}(this,(function(e,n,t,r,a,o,l,i,s,c,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(n),u=d(t),b=d(r);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){y(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(){return x=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},x.apply(this,arguments)}function k(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v,w,O,D,z,P,j,S,B,G,T,q,M,N,E,F,L,C,I,K,R,X,H,U,_,V,Y,A,J,Q,W,Z,$,ee,ne,te,re,ae,oe,le,ie,se,ce,pe,de,ge,ue,be,he,fe,ye,xe,ke={Default:"default",Primary:"primary",PrimaryOutline:"primaryOutline",Danger:"danger",DangerOutline:"dangerOutline",BaseGreen:"baseGreen"},me={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},ve=function(e){return"\n 0 0 0 2px ".concat(e,", \n 0 0 0 4px ").concat(c.palette.blue.light1,";\n")},we=a.css(v||(v=m(["\n // unset browser default\n appearance: none;\n padding: 0;\n margin: 0;\n background-color: transparent;\n border: 1px solid transparent;\n display: inline-flex;\n align-items: stretch;\n transition: all ","ms ease-in-out;\n position: relative;\n text-decoration: none;\n cursor: pointer;\n z-index: 0;\n font-family: ",";\n border-radius: 6px;\n\n &:focus {\n outline: none;\n }\n\n &[disabled],\n &:disabled {\n pointer-events: none;\n }\n\n &:active,\n &:focus,\n &:hover {\n text-decoration: none;\n }\n"])),l.transitionDuration.default,l.fontFamilies.default),Oe=(y(F={},s.Theme.Light,(y(S={},ke.Default,a.css(w||(w=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0 0 0 3px ",";\n }\n "])),c.palette.gray.light3,c.palette.gray.base,c.palette.black,c.palette.black,c.palette.white,c.palette.gray.light2)),y(S,ke.Primary,a.css(O||(O=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #00593f; // Not quite dark3\n border-color: #00593f; // Not quite dark3\n box-shadow: 0 0 0 3px ",";\n }\n "])),c.palette.green.dark2,c.palette.green.dark2,c.palette.white,c.palette.white,c.palette.green.light2)),y(S,ke.PrimaryOutline,a.css(D||(D=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.green.dark2,c.palette.green.dark2,c.palette.green.dark2,p.transparentize(.96,c.palette.green.base),c.palette.green.light2)),y(S,ke.Danger,a.css(z||(z=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: #c82222; // not quite dark1\n border-color: #c82222; // not quite dark1\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.red.base,c.palette.red.base,c.palette.white,c.palette.white,c.palette.red.light3)),y(S,ke.DangerOutline,a.css(P||(P=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.red.light1,c.palette.red.base,c.palette.red.dark2,p.transparentize(.96,c.palette.red.base),c.palette.red.base,c.palette.red.light3)),y(S,ke.BaseGreen,a.css(j||(j=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.green.base,c.palette.green.dark2,c.palette.green.dark3,c.palette.green.dark3,p.mix(.96,c.palette.green.base,c.palette.green.dark3),c.palette.green.light2)),S)),y(F,s.Theme.Dark,(y(E={},ke.Default,a.css(B||(B=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n background-color: ",";\n border-color: ",";\n color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.gray.dark2,c.palette.gray.base,c.palette.white,c.palette.white,c.palette.gray.dark1,c.palette.gray.base,c.palette.white,c.palette.gray.dark2)),y(E,ke.Primary,a.css(G||(G=m(["\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: #00593f; // Off palette\n box-shadow: 0 0 0 3px ",";\n }\n "])),c.palette.green.dark2,c.palette.green.base,c.palette.white,c.palette.white,c.palette.white,c.palette.green.dark3)),y(E,ke.PrimaryOutline,a.css(T||(T=m(["\n background-color: transparent;\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.green.base,c.palette.green.base,c.palette.green.base,c.palette.green.base,p.transparentize(.96,c.palette.green.base),c.palette.green.base,c.palette.green.dark3)),y(E,ke.Danger,a.css(q||(q=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:focus {\n color: ",";\n }\n\n &:hover,\n &:active {\n border-color: ",";\n color: ",";\n background-color: #c82222; // Off palette\n box-shadow: 0px 0px 0px 3px ","; // yes, yellow\n }\n "])),c.palette.red.base,c.palette.red.light1,c.palette.white,c.palette.white,c.palette.red.light1,c.palette.white,c.palette.yellow.dark3)),y(E,ke.DangerOutline,a.css(M||(M=m(["\n border-color: ",";\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 ","; // yes, yellow\n }\n "])),c.palette.red.light1,c.palette.red.light1,c.palette.red.light1,c.palette.red.light1,p.transparentize(.96,c.palette.red.base),c.palette.yellow.dark3)),y(E,ke.BaseGreen,a.css(N||(N=m(["\n background-color: ",";\n border-color: ",";\n color: ",";\n\n &:hover,\n &:active {\n color: ",";\n background-color: ",";\n border-color: ",";\n box-shadow: 0px 0px 0px 3px ",";\n }\n "])),c.palette.green.base,c.palette.green.dark2,c.palette.green.dark3,c.palette.green.dark3,p.mix(.96,c.palette.green.base,c.palette.green.light3),c.palette.green.dark2,c.palette.green.dark3)),E)),F),De=(y(W={},s.Theme.Light,(y(H={},ke.Default,a.css(L||(L=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),c.palette.white,ve(c.palette.white))),y(H,ke.Primary,a.css(C||(C=m(["\n &:focus {\n color: ",";\n background-color: #00593f; // Not quite dark3\n box-shadow: ",";\n }\n "])),c.palette.white,ve(c.palette.white))),y(H,ke.PrimaryOutline,a.css(I||(I=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),p.transparentize(.96,c.palette.green.base),ve(c.palette.white))),y(H,ke.Danger,a.css(K||(K=m(["\n &:focus {\n color: ",";\n background-color: #c82222; // not quite dark1\n box-shadow: ",";\n }\n "])),c.palette.white,ve(c.palette.white))),y(H,ke.DangerOutline,a.css(R||(R=m(["\n &:focus {\n color: ",";\n box-shadow: ",";\n }\n "])),c.palette.red.dark2,ve(c.palette.white))),y(H,ke.BaseGreen,a.css(X||(X=m(["\n &:focus {\n box-shadow: ",";\n }\n "])),ve(c.palette.white))),H)),y(W,s.Theme.Dark,(y(Q={},ke.Default,a.css(U||(U=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),c.palette.gray.dark1,ve(c.palette.black))),y(Q,ke.Primary,a.css(_||(_=m(["\n &:focus {\n background-color: #00593f; // Off palette\n box-shadow: ",";\n }\n "])),ve(c.palette.black))),y(Q,ke.PrimaryOutline,a.css(V||(V=m(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),p.transparentize(.96,c.palette.green.base),c.palette.green.base,ve(c.palette.black))),y(Q,ke.Danger,a.css(Y||(Y=m(["\n &:focus {\n background-color: #c82222; // Off palette\n box-shadow: ",";\n }\n "])),ve(c.palette.black))),y(Q,ke.DangerOutline,a.css(A||(A=m(["\n &:focus {\n background-color: ",";\n border-color: ",";\n box-shadow: ",";\n }\n "])),p.transparentize(.96,c.palette.red.base),c.palette.red.light1,ve(c.palette.black))),y(Q,ke.BaseGreen,a.css(J||(J=m(["\n &:focus {\n background-color: ",";\n box-shadow: ",";\n }\n "])),c.palette.green.base,ve(c.palette.black))),Q)),W),ze=(y(ee={},s.Theme.Light,a.css(Z||(Z=m(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),c.palette.gray.light2,c.palette.gray.light1,c.palette.gray.base,ve(c.palette.white))),y(ee,s.Theme.Dark,a.css($||($=m(["\n &,\n &:hover {\n background-color: ",";\n border-color: ",";\n color: ",";\n cursor: not-allowed;\n }\n\n &:focus {\n box-shadow: ",";\n }\n "])),c.palette.gray.dark3,c.palette.gray.dark1,c.palette.gray.dark1,ve(c.palette.black))),ee),Pe=(y(oe={},me.XSmall,a.css(ne||(ne=m(["\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 "])))),y(oe,me.Small,a.css(te||(te=m(["\n height: 28px;\n "])))),y(oe,me.Default,a.css(re||(re=m(["\n height: 36px;\n "])))),y(oe,me.Large,a.css(ae||(ae=m(["\n height: 48px;\n font-size: 18px;\n line-height: 24px;\n "])))),oe),je=(y(se={},l.BaseFontSize.Body1,a.css(le||(le=m(["\n font-size: ","px;\n line-height: ","px;\n font-weight: 500; // Medium\n "])),l.typeScales.body1.fontSize,l.typeScales.body1.lineHeight)),y(se,l.BaseFontSize.Body2,a.css(ie||(ie=m(["\n font-size: ","px;\n line-height: ","px;\n // Pixel pushing for optical alignment purposes\n transform: translateY(1px);\n font-weight: 500; // Medium\n "])),l.typeScales.body2.fontSize,l.typeScales.body2.lineHeight)),se),Se=s.createUniqueClassName("button");var Be,Ge,Te,qe,Me,Ne,Ee,Fe,Le,Ce,Ie,Ke,Re,Xe,He,Ue,_e,Ve,Ye,Ae,Je,Qe,We,Ze,$e,en,nn,tn,rn,an,on,ln,sn,cn,pn,dn,gn,un,bn,hn,fn,yn,xn,kn=.76,mn=(y(de={},s.Theme.Light,(y(ce={},ke.Default,c.palette.gray.light2),y(ce,ke.Primary,c.palette.green.dark1),y(ce,ke.PrimaryOutline,p.transparentize(kn,c.palette.green.base)),y(ce,ke.Danger,c.palette.red.light1),y(ce,ke.DangerOutline,p.transparentize(kn,c.palette.red.base)),y(ce,ke.BaseGreen,c.palette.green.light1),ce)),y(de,s.Theme.Dark,(y(pe={},ke.Default,c.palette.gray.base),y(pe,ke.Primary,c.palette.green.dark1),y(pe,ke.PrimaryOutline,p.transparentize(kn,c.palette.green.base)),y(pe,ke.Danger,c.palette.red.dark2),y(pe,ke.DangerOutline,p.transparentize(kn,c.palette.red.light1)),y(pe,ke.BaseGreen,c.palette.green.dark1),pe)),de),vn=a.css(ge||(ge=m(["\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 5px;\n"]))),wn=a.css(ue||(ue=m(["\n display: grid;\n grid-auto-flow: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n z-index: 0;\n"]))),On=(y(xe={},me.XSmall,a.css(be||(be=m(["\n padding: 0 7px; // 8px - 1px border\n gap: 6px;\n "])))),y(xe,me.Small,a.css(he||(he=m(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),y(xe,me.Default,a.css(fe||(fe=m(["\n padding: 0 11px; // 12px - 1px border\n gap: 6px;\n "])))),y(xe,me.Large,a.css(ye||(ye=m(["\n padding: 0 15px; // 16px - 1px border\n gap: 8px;\n "])))),xe),Dn=(y(He={},s.Theme.Light,(y(Ee={},ke.Default,a.css(Be||(Be=m(["\n color: ",";\n "])),c.palette.gray.base)),y(Ee,ke.Primary,a.css(Ge||(Ge=m(["\n color: ",";\n "])),c.palette.green.light2)),y(Ee,ke.PrimaryOutline,a.css(Te||(Te=m(["\n color: ",";\n "])),c.palette.green.dark2)),y(Ee,ke.Danger,a.css(qe||(qe=m(["\n color: ",";\n "])),c.palette.red.light3)),y(Ee,ke.DangerOutline,a.css(Me||(Me=m(["\n color: ",";\n "])),c.palette.red.light1)),y(Ee,ke.BaseGreen,a.css(Ne||(Ne=m(["\n color: ",";\n "])),c.palette.green.dark2)),Ee)),y(He,s.Theme.Dark,(y(Xe={},ke.Default,a.css(Fe||(Fe=m(["\n color: ",";\n "])),c.palette.gray.light2)),y(Xe,ke.Primary,a.css(Le||(Le=m(["\n color: ",";\n "])),c.palette.green.light2)),y(Xe,ke.PrimaryOutline,a.css(Ce||(Ce=m(["\n color: ",";\n "])),c.palette.green.base)),y(Xe,ke.Danger,a.css(Ie||(Ie=m(["\n color: ",";\n "])),c.palette.red.light2)),y(Xe,ke.DangerOutline,a.css(Ke||(Ke=m(["\n color: ",";\n "])),c.palette.red.light1)),y(Xe,ke.BaseGreen,a.css(Re||(Re=m(["\n color: ",";\n "])),c.palette.green.dark2)),Xe)),He),zn=(y(an={},s.Theme.Light,(y(Qe={},ke.Default,a.css(Ue||(Ue=m(["\n color: ",";\n "])),c.palette.black)),y(Qe,ke.Primary,a.css(_e||(_e=m(["\n color: ",";\n "])),c.palette.white)),y(Qe,ke.PrimaryOutline,a.css(Ve||(Ve=m(["\n color: ",";\n "])),c.palette.green.dark2)),y(Qe,ke.Danger,a.css(Ye||(Ye=m(["\n color: ",";\n "])),c.palette.white)),y(Qe,ke.DangerOutline,a.css(Ae||(Ae=m(["\n color: ",";\n "])),c.palette.red.base)),y(Qe,ke.BaseGreen,a.css(Je||(Je=m(["\n color: ",";\n "])),c.palette.green.dark3)),Qe)),y(an,s.Theme.Dark,(y(rn={},ke.Default,a.css(We||(We=m(["\n color: ",";\n "])),c.palette.white)),y(rn,ke.Primary,a.css(Ze||(Ze=m(["\n color: ",";\n "])),c.palette.white)),y(rn,ke.PrimaryOutline,a.css($e||($e=m(["\n color: ",";\n "])),c.palette.green.base)),y(rn,ke.Danger,a.css(en||(en=m(["\n color: ",";\n "])),c.palette.white)),y(rn,ke.DangerOutline,a.css(nn||(nn=m(["\n color: ",";\n "])),c.palette.red.light1)),y(rn,ke.BaseGreen,a.css(tn||(tn=m(["\n color: ",";\n "])),c.palette.green.dark3)),rn)),an),Pn=a.css(on||(on=m(["\n ."," {\n &:hover,\n &:active {\n color: currentColor;\n }\n }\n"])),Se),jn=(y(dn={},me.XSmall,a.css(ln||(ln=m(["\n height: 14px;\n width: 14px;\n "])))),y(dn,me.Small,a.css(sn||(sn=m(["\n height: 16px;\n width: 16px;\n "])))),y(dn,me.Default,a.css(cn||(cn=m(["\n height: 16px;\n width: 16px;\n "])))),y(dn,me.Large,a.css(pn||(pn=m(["\n height: 20px;\n width: 20px;\n "])))),dn),Sn=(y(bn={},s.Theme.Light,a.css(gn||(gn=m(["\n color: ",";\n "])),c.palette.gray.light1)),y(bn,s.Theme.Dark,a.css(un||(un=m(["\n color: ",";\n "])),c.palette.gray.dark1)),bn),Bn=a.css(hn||(hn=m(["\n color: ",";\n"])),c.palette.gray.dark2);function Gn(e){var n,t=e.glyph,r=e.variant,o=e.size,l=e.darkMode,i=e.disabled,c=e.isIconOnlyButton,p=e.className,d=!c&&{"aria-hidden":!0,role:"presentation"},u=s.getTheme(l),b=c?zn:Dn;return g.default.cloneElement(t,f({className:a.cx(b[u][r],jn[o],(n={},y(n,Pn,c),y(n,Sn[u],i),y(n,Bn,i&&c&&l),n),p)},d))}Gn.displayName="ButtonIcon";var Tn=function(e){var t,r=e.rightGlyph,l=e.leftGlyph,s=e.darkMode,c=e.disabled,p=void 0!==c&&c,d=e.variant,u=void 0===d?ke.Default:d,b=e.size,h=void 0===b?me.Default:b,f=e.children,k=o.useDarkMode(s),v=k.darkMode,w=k.theme,O=n.useRef(null);n.useEffect((function(){var e,n=mn[w][u];return null==O.current||p||(e=i.registerRipple(O.current,{backgroundColor:n})),e}),[O,u,v,p,w]);var D=null!==(t=(l||r)&&!f)&&void 0!==t&&t,z={variant:u,size:h,darkMode:v,disabled:p,isIconOnlyButton:D};return g.default.createElement(g.default.Fragment,null,g.default.createElement("div",{className:a.cx(vn),ref:O}),g.default.createElement("div",{className:a.cx(wn,On[h],y({},a.css(fn||(fn=m(["\n justify-content: space-between;\n "]))),!!r&&v))},l&&g.default.createElement(Gn,x({glyph:l,className:a.css(yn||(yn=m(["\n justify-self: right;\n "])))},z)),f,r&&g.default.createElement(Gn,x({glyph:r,className:a.css(xn||(xn=m(["\n justify-self: left;\n "])))},z))))},qn=["variant","size","darkMode","baseFontSize","disabled","onClick","leftGlyph","rightGlyph","children","className","as","type"],Mn=g.default.forwardRef((function(e,n){var t=e.variant,r=void 0===t?ke.Default:t,i=e.size,c=void 0===i?me.Default:i,p=e.darkMode,d=e.baseFontSize,u=void 0===d?l.BaseFontSize.Body1:d,h=e.disabled,x=void 0!==h&&h,m=e.onClick,v=e.leftGlyph,w=e.rightGlyph,O=e.children,D=e.className,z=e.as,P=e.type,j=k(e,qn),S=o.useUsingKeyboardContext().usingKeyboard,B=o.useDarkMode(p).darkMode,G=function(e){var n=e.variant,t=e.size,r=e.darkMode,o=e.baseFontSize,l=e.disabled,i=e.usingKeyboard,c=s.getTheme(r),p=Oe[c][n],d=De[c][n],g=Pe[t],u=je[o];return a.cx(we,p,u,g,y({},d,i&&!l),y({},ze[c],l))}({variant:r,size:c,darkMode:B,baseFontSize:u,disabled:x,usingKeyboard:S}),T=!(!j.href&&"a"!==z||x),q=f(f({type:T?void 0:P||"button",className:a.cx(Se,G,D),ref:n,as:z||(T?"a":"button")},"string"!=typeof j.href&&{disabled:x}),{},{"aria-disabled":x,onClick:x?void 0:m},j),M={rightGlyph:w,leftGlyph:v,darkMode:B,disabled:x,variant:r,size:c};return g.default.createElement(b.default,q,g.default.createElement(Tn,M,O))}));Mn.displayName="Button",Mn.propTypes={variant:u.default.oneOf(Object.values(ke)),baseFontSize:u.default.oneOf(Object.values(l.BaseFontSize)),size:u.default.oneOf(Object.values(me)),darkMode:u.default.bool,disabled:u.default.bool,leftGlyph:u.default.element,rightGlyph:u.default.element,href:u.default.string},e.FontSize={Body1:13,Body2:16},e.Size=me,e.Variant=ke,e.default=Mn,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import { Size, Variant, ButtonProps } from './types';
import { Theme } from '@leafygreen-ui/lib';
import { ButtonProps, Size, Variant } from './types';
export declare const ButtonClassName: string;

@@ -4,0 +4,0 @@ export declare function getClassName({ variant, size: sizeProp, darkMode, baseFontSize, disabled, usingKeyboard, }: Required<Pick<ButtonProps, 'baseFontSize' | 'variant' | 'size' | 'darkMode' | 'disabled'> & {

@@ -0,3 +1,3 @@

import React, { HTMLProps } from 'react';
import { BaseFontSize } from '@leafygreen-ui/tokens';
import React, { HTMLProps } from 'react';
declare const Variant: {

@@ -112,3 +112,3 @@ readonly Default: "default";

}
export { Variant, Size, ButtonProps };
export { ButtonProps, Size, Variant };
//# sourceMappingURL=types.d.ts.map
{
"name": "@leafygreen-ui/button",
"version": "19.0.1",
"version": "19.0.2",
"description": "leafyGreen UI Kit Button",

@@ -26,10 +26,10 @@ "main": "./dist/index.js",

"@leafygreen-ui/lib": "^10.0.0",
"@leafygreen-ui/palette": "^3.4.4",
"@leafygreen-ui/ripple": "^1.1.6",
"@leafygreen-ui/tokens": "^1.4.0",
"@leafygreen-ui/palette": "^3.4.5",
"@leafygreen-ui/ripple": "^1.1.7",
"@leafygreen-ui/tokens": "^1.4.1",
"polished": "^4.2.2"
},
"devDependencies": {
"@leafygreen-ui/icon": "^11.12.1",
"next": "^12.2.5"
"next": "^13.0.5",
"@leafygreen-ui/icon": "^11.12.2"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

export { Button as default } from './Button';
export type { ButtonProps } from './types';
export { FontSize, Variant, Size } from './types';
export { FontSize, Size, Variant } from './types';
import { mix, transparentize } from 'polished';
import { css, cx } from '@leafygreen-ui/emotion';
import { createUniqueClassName, getTheme, Theme } from '@leafygreen-ui/lib';
import { palette } from '@leafygreen-ui/palette';
import { Size, Variant, ButtonProps } from './types';
import {
BaseFontSize,
fontFamilies,
transitionDuration,
typeScales,
transitionDuration,
} from '@leafygreen-ui/tokens';
import { createUniqueClassName, getTheme, Theme } from '@leafygreen-ui/lib';
import { ButtonProps, Size, Variant } from './types';
const focusBoxShadow = (color: string) => `

@@ -14,0 +16,0 @@ 0 0 0 2px ${color},

@@ -1,4 +0,5 @@

import { BaseFontSize } from '@leafygreen-ui/tokens';
import React, { HTMLProps } from 'react';
import { BaseFontSize } from '@leafygreen-ui/tokens';
const Variant = {

@@ -133,2 +134,2 @@ Default: 'default',

export { Variant, Size, ButtonProps };
export { ButtonProps, Size, Variant };

@@ -16,6 +16,6 @@ {

{
"path": "../lib"
"path": "../emotion"
},
{
"path": "../tokens"
"path": "../lib"
},

@@ -26,9 +26,6 @@ {

{
"path": "../emotion"
},
{
"path": "../ripple"
},
{
"path": "../icon"
"path": "../tokens"
},

@@ -35,0 +32,0 @@ {

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc