Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/tooltip

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/tooltip - npm Package Compare versions

Comparing version 3.2.2 to 3.3.0

dist/index.d.ts.map

11

CHANGELOG.md
# @leafygreen-ui/tooltip
## 3.3.0
### Minor Changes
- 12bc8c3: Tooltip allows setting a `portalClassName` prop
### Patch Changes
- Updated dependencies [06fbf05]
- @leafygreen-ui/popover@5.1.0
## 3.2.2

@@ -4,0 +15,0 @@

1

dist/index.d.ts
import Tooltip, { TriggerEvent, Variant, Align, Justify } from './Tooltip';
export { TriggerEvent, Variant, Align, Justify };
export default Tooltip;
//# sourceMappingURL=index.d.ts.map

2

dist/index.node.js

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished"));else if("function"==typeof define&&define.amd)define(["@leafygreen-ui/popover","@leafygreen-ui/emotion","react","prop-types","@leafygreen-ui/hooks","@leafygreen-ui/palette","polished"],t);else{var r="object"==typeof exports?t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished")):t(e["@leafygreen-ui/popover"],e["@leafygreen-ui/emotion"],e.react,e["prop-types"],e["@leafygreen-ui/hooks"],e["@leafygreen-ui/palette"],e.polished);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,(function(e,t,r,n,o,i,u){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(14),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){var n=r(3).Symbol;e.exports=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TriggerEvent",{enumerable:!0,get:function(){return o.TriggerEvent}}),Object.defineProperty(t,"Variant",{enumerable:!0,get:function(){return o.Variant}}),Object.defineProperty(t,"Align",{enumerable:!0,get:function(){return o.Align}}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return o.Justify}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r(6));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var u=o.default;t.default=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return c.Justify}}),t.default=t.Align=t.Variant=t.TriggerEvent=void 0;var o,i,u=v(r(7)),a=b(r(8)),c=v(r(0)),f=r(9),l=r(1),s=r(10),p=r(11),y=b(r(12)),d=r(21);function b(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function m(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(){var e=N(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 2px 4px ",";\n "]);return k=function(){return e},e}function M(){var e=N(["\n background-color: ",";\n box-shadow: 0px 2px 4px ",";\n "]);return M=function(){return e},e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(){var e=N(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n "]);return T=function(){return e},e}function C(){var e=N(["\n background-color: ",";\n color: ",";\n "]);return C=function(){return e},e}function A(){var e=N(["\n position: relative;\n"]);return A=function(){return e},e}function _(){var e=N(["\n font-size: 14px;\n line-height: 20px;\n padding: 14px 16px;\n border-radius: 3px;\n box-shadow: 0px 2px 4px ",";\n"]);return _=function(){return e},e}function N(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var q={Hover:"hover",Click:"click"};t.TriggerEvent=q;var J={Light:"light",Dark:"dark"};t.Variant=J;var D={Top:c.Align.Top,Bottom:c.Align.Bottom,Left:c.Align.Left,Right:c.Align.Right};t.Align=D;var z=(0,l.css)(_(),(0,p.transparentize)(.85,s.uiColors.black)),L=(0,l.css)(A()),I=(E(o={},J.Dark,(0,l.css)(C(),s.uiColors.gray.dark3,s.uiColors.gray.light1)),E(o,J.Light,(0,l.css)(T(),s.uiColors.gray.light3,s.uiColors.gray.dark2,s.uiColors.gray.light2)),o),W=(E(i={},J.Dark,(0,l.css)(M(),s.uiColors.gray.dark3,(0,p.transparentize)(.85,s.uiColors.black))),E(i,J.Light,(0,l.css)(k(),s.uiColors.gray.light3,s.uiColors.gray.light2,(0,p.transparentize)(.85,s.uiColors.black))),i);function $(e){var t=e.open,r=e.setOpen,n=e.className,o=e.children,i=e.trigger,a=e.variant,s=void 0===a?J.Light:a,p=e.triggerEvent,b=void 0===p?q.Hover:p,g=e.align,v=void 0===g?"top":g,h=e.justify,P=void 0===h?"start":h,w=e.id,k=e.shouldClose,M=e.usePortal,E=void 0===M||M,T=S(e,["open","setOpen","className","children","trigger","variant","triggerEvent","align","justify","id","shouldClose","usePortal"]),C="boolean"==typeof t,A=x((0,u.useState)(!1),2),_=A[0],N=A[1],D=C?t:_,$=C&&r?r:N,F=(0,u.useRef)(null),V=(0,u.useMemo)((function(){return w||"tooltip-".concat(Math.floor(Math.random()*Math.floor(10)))}),[w]),B=function(e,t){return e===q.Hover?{onMouseEnter:(0,y.default)((function(){$((function(e){return!e}))}),35),onMouseLeave:(0,y.default)(H,35),onFocus:function(){return $(!0)},onBlur:H}:t&&t.onClick?{onClick:function(e){e.target!==F.current&&(t.onClick(),$((function(e){return!e})))}}:{onClick:function(e){e.target!==F.current&&$((function(e){return!e}))}}},H=function(){("function"!=typeof k||k())&&$(!1)};(0,f.useEscapeKey)(H,{enabled:D});(0,f.useEventListener)("click",(function(e){var t=F&&F.current;t&&!t.contains(e.target)&&H()}),{enabled:D&&"click"===b});var R=u.default.createElement(c.default,{active:D,align:v,justify:P,usePortal:E,adjustOnMutation:!0,spacing:12,key:"tooltip"},(function(e){var t=e.align,r=e.justify,i=e.referenceElPos,a=(0,d.trianglePosition)(t,r,i);return u.default.createElement("div",j({},T,{role:"tooltip",id:V,className:(0,l.cx)(n,z,I[s]),ref:F}),u.default.createElement("div",{className:a.containerStyle},u.default.createElement("div",{className:(0,l.cx)(a.notchStyle,W[s])})),o)}));if(i){if("function"==typeof i)return i(O({},B(b),{className:L,"aria-describedby":V,children:R}));var U=i.props.children;return u.default.cloneElement(i,O({},B(b,i.props),{className:(0,l.cx)(i.props.className,L),"aria-describedby":V,children:U?[].concat(m(U instanceof Array?U:[U]),[R]):R}))}return R}$.displayName="Tooltip",$.propTypes={children:a.default.node,className:a.default.string,align:a.default.oneOf(Object.values(D)),justify:a.default.oneOf(Object.values(c.Justify)),trigger:a.default.oneOfType([a.default.node,a.default.func]),triggerEvent:a.default.oneOf(Object.values(q)),variant:a.default.oneOf(Object.values(J)),open:a.default.bool,setOpen:a.default.func,id:a.default.string,shouldClose:a.default.func};var F=$;t.default=F},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){var n=r(2),o=r(13),i=r(15),u=Math.max,a=Math.min;e.exports=function(e,t,r){var c,f,l,s,p,y,d=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=c,n=f;return c=f=void 0,d=t,s=e.apply(n,r)}function h(e){return d=e,p=setTimeout(j,t),b?m(e):s}function O(e){var r=e-y;return void 0===y||r>=t||r<0||g&&e-d>=l}function j(){var e=o();if(O(e))return x(e);p=setTimeout(j,function(e){var r=t-(e-y);return g?a(r,l-(e-d)):r}(e))}function x(e){return p=void 0,v&&c?m(e):(c=f=void 0,s)}function P(){var e=o(),r=O(e);if(c=arguments,f=this,y=e,r){if(void 0===p)return h(y);if(g)return clearTimeout(p),p=setTimeout(j,t),m(y)}return void 0===p&&(p=setTimeout(j,t)),s}return t=i(t)||0,n(r)&&(b=!!r.leading,l=(g="maxWait"in r)?u(i(r.maxWait)||0,t):l,v="trailing"in r?!!r.trailing:v),P.cancel=function(){void 0!==p&&clearTimeout(p),d=0,c=y=f=p=void 0},P.flush=function(){return void 0===p?s:x(o())},P}},function(e,t,r){var n=r(3);e.exports=function(){return n.Date.now()}},function(e,t){var r="object"==typeof global&&global&&global.Object===Object&&global;e.exports=r},function(e,t,r){var n=r(2),o=r(16),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var r=a.test(e);return r||c.test(e)?f(e.slice(2),r?2:8):u.test(e)?NaN:+e}},function(e,t,r){var n=r(17),o=r(20);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(4),o=r(18),i=r(19),u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?o(e):i(e)}},function(e,t,r){var n=r(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[a]=r:delete e[a]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trianglePosition=function(e,t,r){if(!e||!t||!r)return"";var a=(r.width-15)/2,c=(r.height-15)/2,f={},l={};switch(e){case"top":case"bottom":switch(f.left="0px",f.right="0px","top"===e?(l.top="".concat("calc(100% - 1px)"),f.top="".concat(-4,"px")):(l.bottom="".concat("calc(100% - 1px)"),f.bottom="".concat(-4,"px")),t){case o.Justify.Start:l.left="".concat(a,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.left="0px",l.right="0px";break;case o.Justify.End:l.right="".concat(a,"px")}break;case"left":case"right":switch(f.top="0px",f.bottom="0px","left"===e?(f.left="".concat(-4,"px"),l.left="calc(100% - 1.8px)"):(f.right="".concat(-4,"px"),l.right="".concat("calc(100% - 1px)")),t){case o.Justify.Start:l.top="".concat(c,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.top="0px",l.bottom="0px";break;case o.Justify.End:l.bottom="".concat(c,"px")}}return{containerStyle:(0,n.css)(u(),15,15,(0,n.css)(l)),notchStyle:(0,n.css)(i(),(0,n.css)(f))}};var n=r(1),o=r(0);function i(){var e=a(["\n ",";\n position: absolute;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n margin: auto;\n "]);return i=function(){return e},e}function u(){var e=a(["\n position: absolute;\n width: ","px;\n height: ","px;\n overflow: hidden;\n margin: auto;\n ",";\n "]);return u=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished"));else if("function"==typeof define&&define.amd)define(["@leafygreen-ui/popover","@leafygreen-ui/emotion","react","prop-types","@leafygreen-ui/hooks","@leafygreen-ui/palette","polished"],t);else{var r="object"==typeof exports?t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished")):t(e["@leafygreen-ui/popover"],e["@leafygreen-ui/emotion"],e.react,e["prop-types"],e["@leafygreen-ui/hooks"],e["@leafygreen-ui/palette"],e.polished);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,(function(e,t,r,n,o,i,u){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(14),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){var n=r(3).Symbol;e.exports=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TriggerEvent",{enumerable:!0,get:function(){return o.TriggerEvent}}),Object.defineProperty(t,"Variant",{enumerable:!0,get:function(){return o.Variant}}),Object.defineProperty(t,"Align",{enumerable:!0,get:function(){return o.Align}}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return o.Justify}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r(6));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var u=o.default;t.default=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return c.Justify}}),t.default=t.Align=t.Variant=t.TriggerEvent=void 0;var o,i,u=v(r(7)),a=b(r(8)),c=v(r(0)),l=r(9),f=r(1),s=r(10),p=r(11),y=b(r(12)),d=r(21);function b(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function m(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(){var e=_(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 2px 4px ",";\n "]);return k=function(){return e},e}function M(){var e=_(["\n background-color: ",";\n box-shadow: 0px 2px 4px ",";\n "]);return M=function(){return e},e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(){var e=_(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n "]);return C=function(){return e},e}function T(){var e=_(["\n background-color: ",";\n color: ",";\n "]);return T=function(){return e},e}function N(){var e=_(["\n position: relative;\n"]);return N=function(){return e},e}function A(){var e=_(["\n font-size: 14px;\n line-height: 20px;\n padding: 14px 16px;\n border-radius: 3px;\n box-shadow: 0px 2px 4px ",";\n"]);return A=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var q={Hover:"hover",Click:"click"};t.TriggerEvent=q;var J={Light:"light",Dark:"dark"};t.Variant=J;var D={Top:c.Align.Top,Bottom:c.Align.Bottom,Left:c.Align.Left,Right:c.Align.Right};t.Align=D;var z=(0,f.css)(A(),(0,p.transparentize)(.85,s.uiColors.black)),L=(0,f.css)(N()),I=(E(o={},J.Dark,(0,f.css)(T(),s.uiColors.gray.dark3,s.uiColors.gray.light1)),E(o,J.Light,(0,f.css)(C(),s.uiColors.gray.light3,s.uiColors.gray.dark2,s.uiColors.gray.light2)),o),W=(E(i={},J.Dark,(0,f.css)(M(),s.uiColors.gray.dark3,(0,p.transparentize)(.85,s.uiColors.black))),E(i,J.Light,(0,f.css)(k(),s.uiColors.gray.light3,s.uiColors.gray.light2,(0,p.transparentize)(.85,s.uiColors.black))),i);function $(e){var t=e.open,r=e.setOpen,n=e.className,o=e.children,i=e.trigger,a=e.variant,s=void 0===a?J.Light:a,p=e.triggerEvent,b=void 0===p?q.Hover:p,g=e.enabled,v=void 0===g||g,h=e.align,P=void 0===h?"top":h,w=e.justify,k=void 0===w?"start":w,M=e.id,E=e.shouldClose,C=e.usePortal,T=void 0===C||C,N=e.portalClassName,A=S(e,["open","setOpen","className","children","trigger","variant","triggerEvent","enabled","align","justify","id","shouldClose","usePortal","portalClassName"]),_="boolean"==typeof t,D=x((0,u.useState)(!1),2),$=D[0],F=D[1],V=_?t:$,B=_&&r?r:F,H=(0,u.useRef)(null),R=(0,u.useMemo)((function(){return M||"tooltip-".concat(Math.floor(Math.random()*Math.floor(10)))}),[M]),U=function(e,t){return e===q.Hover?{onMouseEnter:(0,y.default)((function(){B(!0)}),35),onMouseLeave:(0,y.default)(K,35),onFocus:function(){return B(!0)},onBlur:K}:t&&t.onClick?{onClick:function(e){e.target!==H.current&&(t.onClick(),B((function(e){return!e})))}}:{onClick:function(e){e.target!==H.current&&B((function(e){return!e}))}}},K=function(){("function"!=typeof E||E())&&B(!1)};(0,l.useEscapeKey)(K,{enabled:V});(0,l.useEventListener)("click",(function(e){var t=H&&H.current;t&&!t.contains(e.target)&&K()}),{enabled:V&&"click"===b});var G=T?{usePortal:T,portalClassName:N}:{usePortal:T},Q=u.default.createElement(c.default,j({key:"tooltip",active:v&&V,align:P,justify:k,adjustOnMutation:!0,spacing:12},G),(function(e){var t=e.align,r=e.justify,i=e.referenceElPos,a=(0,d.trianglePosition)(t,r,i);return u.default.createElement("div",j({},A,{role:"tooltip",id:R,className:(0,f.cx)(z,I[s],n),ref:H}),u.default.createElement("div",{className:a.containerStyle},u.default.createElement("div",{className:(0,f.cx)(a.notchStyle,W[s])})),o)}));if(i){if("function"==typeof i)return i(O({},U(b),{className:L,"aria-describedby":R,children:Q}));var X=i.props.children;return u.default.cloneElement(i,O({},U(b,i.props),{className:(0,f.cx)(i.props.className,L),"aria-describedby":R,children:X?[].concat(m(X instanceof Array?X:[X]),[Q]):Q}))}return Q}$.displayName="Tooltip",$.propTypes={children:a.default.node,className:a.default.string,align:a.default.oneOf(Object.values(D)),justify:a.default.oneOf(Object.values(c.Justify)),trigger:a.default.oneOfType([a.default.node,a.default.func]),triggerEvent:a.default.oneOf(Object.values(q)),variant:a.default.oneOf(Object.values(J)),open:a.default.bool,setOpen:a.default.func,id:a.default.string,shouldClose:a.default.func,usePortal:a.default.bool,portalClassName:a.default.string};var F=$;t.default=F},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){var n=r(2),o=r(13),i=r(15),u=Math.max,a=Math.min;e.exports=function(e,t,r){var c,l,f,s,p,y,d=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=c,n=l;return c=l=void 0,d=t,s=e.apply(n,r)}function h(e){return d=e,p=setTimeout(j,t),b?m(e):s}function O(e){var r=e-y;return void 0===y||r>=t||r<0||g&&e-d>=f}function j(){var e=o();if(O(e))return x(e);p=setTimeout(j,function(e){var r=t-(e-y);return g?a(r,f-(e-d)):r}(e))}function x(e){return p=void 0,v&&c?m(e):(c=l=void 0,s)}function P(){var e=o(),r=O(e);if(c=arguments,l=this,y=e,r){if(void 0===p)return h(y);if(g)return clearTimeout(p),p=setTimeout(j,t),m(y)}return void 0===p&&(p=setTimeout(j,t)),s}return t=i(t)||0,n(r)&&(b=!!r.leading,f=(g="maxWait"in r)?u(i(r.maxWait)||0,t):f,v="trailing"in r?!!r.trailing:v),P.cancel=function(){void 0!==p&&clearTimeout(p),d=0,c=y=l=p=void 0},P.flush=function(){return void 0===p?s:x(o())},P}},function(e,t,r){var n=r(3);e.exports=function(){return n.Date.now()}},function(e,t){var r="object"==typeof global&&global&&global.Object===Object&&global;e.exports=r},function(e,t,r){var n=r(2),o=r(16),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var r=a.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):u.test(e)?NaN:+e}},function(e,t,r){var n=r(17),o=r(20);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(4),o=r(18),i=r(19),u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?o(e):i(e)}},function(e,t,r){var n=r(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[a]=r:delete e[a]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trianglePosition=function(e,t,r){if(!e||!t||!r)return"";var a=(r.width-15)/2,c=(r.height-15)/2,l={},f={};switch(e){case"top":case"bottom":switch(l.left="0px",l.right="0px","top"===e?(f.top="".concat("calc(100% - 1px)"),l.top="".concat(-4,"px")):(f.bottom="".concat("calc(100% - 1px)"),l.bottom="".concat(-4,"px")),t){case o.Justify.Start:f.left="".concat(a,"px");break;case o.Justify.Middle:case o.Justify.Fit:f.left="0px",f.right="0px";break;case o.Justify.End:f.right="".concat(a,"px")}break;case"left":case"right":switch(l.top="0px",l.bottom="0px","left"===e?(l.left="".concat(-4,"px"),f.left="calc(100% - 1.8px)"):(l.right="".concat(-4,"px"),f.right="".concat("calc(100% - 1px)")),t){case o.Justify.Start:f.top="".concat(c,"px");break;case o.Justify.Middle:case o.Justify.Fit:f.top="0px",f.bottom="0px";break;case o.Justify.End:f.bottom="".concat(c,"px")}}return{containerStyle:(0,n.css)(u(),15,15,(0,n.css)(f)),notchStyle:(0,n.css)(i(),(0,n.css)(l))}};var n=r(1),o=r(0);function i(){var e=a(["\n ",";\n position: absolute;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n margin: auto;\n "]);return i=function(){return e},e}function u(){var e=a(["\n position: absolute;\n width: ","px;\n height: ","px;\n overflow: hidden;\n margin: auto;\n ",";\n "]);return u=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}}])}));
//# sourceMappingURL=index.node.js.map

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished"));else if("function"==typeof define&&define.amd)define(["@leafygreen-ui/popover","@leafygreen-ui/emotion","react","prop-types","@leafygreen-ui/hooks","@leafygreen-ui/palette","polished"],t);else{var r="object"==typeof exports?t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished")):t(e["@leafygreen-ui/popover"],e["@leafygreen-ui/emotion"],e.react,e["prop-types"],e["@leafygreen-ui/hooks"],e["@leafygreen-ui/palette"],e.polished);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e,t,r,n,o,i,u){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(14),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){var n=r(3).Symbol;e.exports=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TriggerEvent",{enumerable:!0,get:function(){return o.TriggerEvent}}),Object.defineProperty(t,"Variant",{enumerable:!0,get:function(){return o.Variant}}),Object.defineProperty(t,"Align",{enumerable:!0,get:function(){return o.Align}}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return o.Justify}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r(6));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var u=o.default;t.default=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return c.Justify}}),t.default=t.Align=t.Variant=t.TriggerEvent=void 0;var o,i,u=v(r(7)),a=b(r(8)),c=v(r(0)),f=r(9),l=r(1),s=r(10),p=r(11),y=b(r(12)),d=r(22);function b(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function m(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(){var e=N(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 2px 4px ",";\n "]);return k=function(){return e},e}function M(){var e=N(["\n background-color: ",";\n box-shadow: 0px 2px 4px ",";\n "]);return M=function(){return e},e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(){var e=N(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n "]);return T=function(){return e},e}function C(){var e=N(["\n background-color: ",";\n color: ",";\n "]);return C=function(){return e},e}function A(){var e=N(["\n position: relative;\n"]);return A=function(){return e},e}function _(){var e=N(["\n font-size: 14px;\n line-height: 20px;\n padding: 14px 16px;\n border-radius: 3px;\n box-shadow: 0px 2px 4px ",";\n"]);return _=function(){return e},e}function N(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var q={Hover:"hover",Click:"click"};t.TriggerEvent=q;var J={Light:"light",Dark:"dark"};t.Variant=J;var D={Top:c.Align.Top,Bottom:c.Align.Bottom,Left:c.Align.Left,Right:c.Align.Right};t.Align=D;var z=(0,l.css)(_(),(0,p.transparentize)(.85,s.uiColors.black)),L=(0,l.css)(A()),I=(E(o={},J.Dark,(0,l.css)(C(),s.uiColors.gray.dark3,s.uiColors.gray.light1)),E(o,J.Light,(0,l.css)(T(),s.uiColors.gray.light3,s.uiColors.gray.dark2,s.uiColors.gray.light2)),o),W=(E(i={},J.Dark,(0,l.css)(M(),s.uiColors.gray.dark3,(0,p.transparentize)(.85,s.uiColors.black))),E(i,J.Light,(0,l.css)(k(),s.uiColors.gray.light3,s.uiColors.gray.light2,(0,p.transparentize)(.85,s.uiColors.black))),i);function F(e){var t=e.open,r=e.setOpen,n=e.className,o=e.children,i=e.trigger,a=e.variant,s=void 0===a?J.Light:a,p=e.triggerEvent,b=void 0===p?q.Hover:p,g=e.align,v=void 0===g?"top":g,h=e.justify,w=void 0===h?"start":h,P=e.id,k=e.shouldClose,M=e.usePortal,E=void 0===M||M,T=S(e,["open","setOpen","className","children","trigger","variant","triggerEvent","align","justify","id","shouldClose","usePortal"]),C="boolean"==typeof t,A=x((0,u.useState)(!1),2),_=A[0],N=A[1],D=C?t:_,F=C&&r?r:N,$=(0,u.useRef)(null),V=(0,u.useMemo)((function(){return P||"tooltip-".concat(Math.floor(Math.random()*Math.floor(10)))}),[P]),B=function(e,t){return e===q.Hover?{onMouseEnter:(0,y.default)((function(){F((function(e){return!e}))}),35),onMouseLeave:(0,y.default)(H,35),onFocus:function(){return F(!0)},onBlur:H}:t&&t.onClick?{onClick:function(e){e.target!==$.current&&(t.onClick(),F((function(e){return!e})))}}:{onClick:function(e){e.target!==$.current&&F((function(e){return!e}))}}},H=function(){("function"!=typeof k||k())&&F(!1)};(0,f.useEscapeKey)(H,{enabled:D});(0,f.useEventListener)("click",(function(e){var t=$&&$.current;t&&!t.contains(e.target)&&H()}),{enabled:D&&"click"===b});var R=u.default.createElement(c.default,{active:D,align:v,justify:w,usePortal:E,adjustOnMutation:!0,spacing:12,key:"tooltip"},(function(e){var t=e.align,r=e.justify,i=e.referenceElPos,a=(0,d.trianglePosition)(t,r,i);return u.default.createElement("div",j({},T,{role:"tooltip",id:V,className:(0,l.cx)(n,z,I[s]),ref:$}),u.default.createElement("div",{className:a.containerStyle},u.default.createElement("div",{className:(0,l.cx)(a.notchStyle,W[s])})),o)}));if(i){if("function"==typeof i)return i(O({},B(b),{className:L,"aria-describedby":V,children:R}));var U=i.props.children;return u.default.cloneElement(i,O({},B(b,i.props),{className:(0,l.cx)(i.props.className,L),"aria-describedby":V,children:U?[].concat(m(U instanceof Array?U:[U]),[R]):R}))}return R}F.displayName="Tooltip",F.propTypes={children:a.default.node,className:a.default.string,align:a.default.oneOf(Object.values(D)),justify:a.default.oneOf(Object.values(c.Justify)),trigger:a.default.oneOfType([a.default.node,a.default.func]),triggerEvent:a.default.oneOf(Object.values(q)),variant:a.default.oneOf(Object.values(J)),open:a.default.bool,setOpen:a.default.func,id:a.default.string,shouldClose:a.default.func};var $=F;t.default=$},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){var n=r(2),o=r(13),i=r(16),u=Math.max,a=Math.min;e.exports=function(e,t,r){var c,f,l,s,p,y,d=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=c,n=f;return c=f=void 0,d=t,s=e.apply(n,r)}function h(e){return d=e,p=setTimeout(j,t),b?m(e):s}function O(e){var r=e-y;return void 0===y||r>=t||r<0||g&&e-d>=l}function j(){var e=o();if(O(e))return x(e);p=setTimeout(j,function(e){var r=t-(e-y);return g?a(r,l-(e-d)):r}(e))}function x(e){return p=void 0,v&&c?m(e):(c=f=void 0,s)}function w(){var e=o(),r=O(e);if(c=arguments,f=this,y=e,r){if(void 0===p)return h(y);if(g)return clearTimeout(p),p=setTimeout(j,t),m(y)}return void 0===p&&(p=setTimeout(j,t)),s}return t=i(t)||0,n(r)&&(b=!!r.leading,l=(g="maxWait"in r)?u(i(r.maxWait)||0,t):l,v="trailing"in r?!!r.trailing:v),w.cancel=function(){void 0!==p&&clearTimeout(p),d=0,c=y=f=p=void 0},w.flush=function(){return void 0===p?s:x(o())},w}},function(e,t,r){var n=r(3);e.exports=function(){return n.Date.now()}},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(15))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(2),o=r(17),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var r=a.test(e);return r||c.test(e)?f(e.slice(2),r?2:8):u.test(e)?NaN:+e}},function(e,t,r){var n=r(18),o=r(21);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(4),o=r(19),i=r(20),u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?o(e):i(e)}},function(e,t,r){var n=r(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[a]=r:delete e[a]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trianglePosition=function(e,t,r){if(!e||!t||!r)return"";var a=(r.width-15)/2,c=(r.height-15)/2,f={},l={};switch(e){case"top":case"bottom":switch(f.left="0px",f.right="0px","top"===e?(l.top="".concat("calc(100% - 1px)"),f.top="".concat(-4,"px")):(l.bottom="".concat("calc(100% - 1px)"),f.bottom="".concat(-4,"px")),t){case o.Justify.Start:l.left="".concat(a,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.left="0px",l.right="0px";break;case o.Justify.End:l.right="".concat(a,"px")}break;case"left":case"right":switch(f.top="0px",f.bottom="0px","left"===e?(f.left="".concat(-4,"px"),l.left="calc(100% - 1.8px)"):(f.right="".concat(-4,"px"),l.right="".concat("calc(100% - 1px)")),t){case o.Justify.Start:l.top="".concat(c,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.top="0px",l.bottom="0px";break;case o.Justify.End:l.bottom="".concat(c,"px")}}return{containerStyle:(0,n.css)(u(),15,15,(0,n.css)(l)),notchStyle:(0,n.css)(i(),(0,n.css)(f))}};var n=r(1),o=r(0);function i(){var e=a(["\n ",";\n position: absolute;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n margin: auto;\n "]);return i=function(){return e},e}function u(){var e=a(["\n position: absolute;\n width: ","px;\n height: ","px;\n overflow: hidden;\n margin: auto;\n ",";\n "]);return u=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished"));else if("function"==typeof define&&define.amd)define(["@leafygreen-ui/popover","@leafygreen-ui/emotion","react","prop-types","@leafygreen-ui/hooks","@leafygreen-ui/palette","polished"],t);else{var r="object"==typeof exports?t(require("@leafygreen-ui/popover"),require("@leafygreen-ui/emotion"),require("react"),require("prop-types"),require("@leafygreen-ui/hooks"),require("@leafygreen-ui/palette"),require("polished")):t(e["@leafygreen-ui/popover"],e["@leafygreen-ui/emotion"],e.react,e["prop-types"],e["@leafygreen-ui/hooks"],e["@leafygreen-ui/palette"],e.polished);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e,t,r,n,o,i,u){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){var n=r(14),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){var n=r(3).Symbol;e.exports=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TriggerEvent",{enumerable:!0,get:function(){return o.TriggerEvent}}),Object.defineProperty(t,"Variant",{enumerable:!0,get:function(){return o.Variant}}),Object.defineProperty(t,"Align",{enumerable:!0,get:function(){return o.Align}}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return o.Justify}}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var a=o?Object.getOwnPropertyDescriptor(e,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=e[u]}r.default=e,t&&t.set(e,r);return r}(r(6));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}var u=o.default;t.default=u},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Justify",{enumerable:!0,get:function(){return c.Justify}}),t.default=t.Align=t.Variant=t.TriggerEvent=void 0;var o,i,u=v(r(7)),a=b(r(8)),c=v(r(0)),f=r(9),l=r(1),s=r(10),p=r(11),y=b(r(12)),d=r(22);function b(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function m(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(){var e=_(["\n background-color: ",";\n border: 1px solid ",";\n box-shadow: 0px 2px 4px ",";\n "]);return k=function(){return e},e}function M(){var e=_(["\n background-color: ",";\n box-shadow: 0px 2px 4px ",";\n "]);return M=function(){return e},e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(){var e=_(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n "]);return C=function(){return e},e}function T(){var e=_(["\n background-color: ",";\n color: ",";\n "]);return T=function(){return e},e}function N(){var e=_(["\n position: relative;\n"]);return N=function(){return e},e}function A(){var e=_(["\n font-size: 14px;\n line-height: 20px;\n padding: 14px 16px;\n border-radius: 3px;\n box-shadow: 0px 2px 4px ",";\n"]);return A=function(){return e},e}function _(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var q={Hover:"hover",Click:"click"};t.TriggerEvent=q;var J={Light:"light",Dark:"dark"};t.Variant=J;var D={Top:c.Align.Top,Bottom:c.Align.Bottom,Left:c.Align.Left,Right:c.Align.Right};t.Align=D;var z=(0,l.css)(A(),(0,p.transparentize)(.85,s.uiColors.black)),L=(0,l.css)(N()),I=(E(o={},J.Dark,(0,l.css)(T(),s.uiColors.gray.dark3,s.uiColors.gray.light1)),E(o,J.Light,(0,l.css)(C(),s.uiColors.gray.light3,s.uiColors.gray.dark2,s.uiColors.gray.light2)),o),W=(E(i={},J.Dark,(0,l.css)(M(),s.uiColors.gray.dark3,(0,p.transparentize)(.85,s.uiColors.black))),E(i,J.Light,(0,l.css)(k(),s.uiColors.gray.light3,s.uiColors.gray.light2,(0,p.transparentize)(.85,s.uiColors.black))),i);function F(e){var t=e.open,r=e.setOpen,n=e.className,o=e.children,i=e.trigger,a=e.variant,s=void 0===a?J.Light:a,p=e.triggerEvent,b=void 0===p?q.Hover:p,g=e.enabled,v=void 0===g||g,h=e.align,w=void 0===h?"top":h,P=e.justify,k=void 0===P?"start":P,M=e.id,E=e.shouldClose,C=e.usePortal,T=void 0===C||C,N=e.portalClassName,A=S(e,["open","setOpen","className","children","trigger","variant","triggerEvent","enabled","align","justify","id","shouldClose","usePortal","portalClassName"]),_="boolean"==typeof t,D=x((0,u.useState)(!1),2),F=D[0],$=D[1],V=_?t:F,B=_&&r?r:$,H=(0,u.useRef)(null),R=(0,u.useMemo)((function(){return M||"tooltip-".concat(Math.floor(Math.random()*Math.floor(10)))}),[M]),U=function(e,t){return e===q.Hover?{onMouseEnter:(0,y.default)((function(){B(!0)}),35),onMouseLeave:(0,y.default)(K,35),onFocus:function(){return B(!0)},onBlur:K}:t&&t.onClick?{onClick:function(e){e.target!==H.current&&(t.onClick(),B((function(e){return!e})))}}:{onClick:function(e){e.target!==H.current&&B((function(e){return!e}))}}},K=function(){("function"!=typeof E||E())&&B(!1)};(0,f.useEscapeKey)(K,{enabled:V});(0,f.useEventListener)("click",(function(e){var t=H&&H.current;t&&!t.contains(e.target)&&K()}),{enabled:V&&"click"===b});var G=T?{usePortal:T,portalClassName:N}:{usePortal:T},Q=u.default.createElement(c.default,j({key:"tooltip",active:v&&V,align:w,justify:k,adjustOnMutation:!0,spacing:12},G),(function(e){var t=e.align,r=e.justify,i=e.referenceElPos,a=(0,d.trianglePosition)(t,r,i);return u.default.createElement("div",j({},A,{role:"tooltip",id:R,className:(0,l.cx)(z,I[s],n),ref:H}),u.default.createElement("div",{className:a.containerStyle},u.default.createElement("div",{className:(0,l.cx)(a.notchStyle,W[s])})),o)}));if(i){if("function"==typeof i)return i(O({},U(b),{className:L,"aria-describedby":R,children:Q}));var X=i.props.children;return u.default.cloneElement(i,O({},U(b,i.props),{className:(0,l.cx)(i.props.className,L),"aria-describedby":R,children:X?[].concat(m(X instanceof Array?X:[X]),[Q]):Q}))}return Q}F.displayName="Tooltip",F.propTypes={children:a.default.node,className:a.default.string,align:a.default.oneOf(Object.values(D)),justify:a.default.oneOf(Object.values(c.Justify)),trigger:a.default.oneOfType([a.default.node,a.default.func]),triggerEvent:a.default.oneOf(Object.values(q)),variant:a.default.oneOf(Object.values(J)),open:a.default.bool,setOpen:a.default.func,id:a.default.string,shouldClose:a.default.func,usePortal:a.default.bool,portalClassName:a.default.string};var $=F;t.default=$},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){var n=r(2),o=r(13),i=r(16),u=Math.max,a=Math.min;e.exports=function(e,t,r){var c,f,l,s,p,y,d=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var r=c,n=f;return c=f=void 0,d=t,s=e.apply(n,r)}function h(e){return d=e,p=setTimeout(j,t),b?m(e):s}function O(e){var r=e-y;return void 0===y||r>=t||r<0||g&&e-d>=l}function j(){var e=o();if(O(e))return x(e);p=setTimeout(j,function(e){var r=t-(e-y);return g?a(r,l-(e-d)):r}(e))}function x(e){return p=void 0,v&&c?m(e):(c=f=void 0,s)}function w(){var e=o(),r=O(e);if(c=arguments,f=this,y=e,r){if(void 0===p)return h(y);if(g)return clearTimeout(p),p=setTimeout(j,t),m(y)}return void 0===p&&(p=setTimeout(j,t)),s}return t=i(t)||0,n(r)&&(b=!!r.leading,l=(g="maxWait"in r)?u(i(r.maxWait)||0,t):l,v="trailing"in r?!!r.trailing:v),w.cancel=function(){void 0!==p&&clearTimeout(p),d=0,c=y=f=p=void 0},w.flush=function(){return void 0===p?s:x(o())},w}},function(e,t,r){var n=r(3);e.exports=function(){return n.Date.now()}},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(15))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(2),o=r(17),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var r=a.test(e);return r||c.test(e)?f(e.slice(2),r?2:8):u.test(e)?NaN:+e}},function(e,t,r){var n=r(18),o=r(21);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(4),o=r(19),i=r(20),u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?o(e):i(e)}},function(e,t,r){var n=r(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[a]=r:delete e[a]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trianglePosition=function(e,t,r){if(!e||!t||!r)return"";var a=(r.width-15)/2,c=(r.height-15)/2,f={},l={};switch(e){case"top":case"bottom":switch(f.left="0px",f.right="0px","top"===e?(l.top="".concat("calc(100% - 1px)"),f.top="".concat(-4,"px")):(l.bottom="".concat("calc(100% - 1px)"),f.bottom="".concat(-4,"px")),t){case o.Justify.Start:l.left="".concat(a,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.left="0px",l.right="0px";break;case o.Justify.End:l.right="".concat(a,"px")}break;case"left":case"right":switch(f.top="0px",f.bottom="0px","left"===e?(f.left="".concat(-4,"px"),l.left="calc(100% - 1.8px)"):(f.right="".concat(-4,"px"),l.right="".concat("calc(100% - 1px)")),t){case o.Justify.Start:l.top="".concat(c,"px");break;case o.Justify.Middle:case o.Justify.Fit:l.top="0px",l.bottom="0px";break;case o.Justify.End:l.bottom="".concat(c,"px")}}return{containerStyle:(0,n.css)(u(),15,15,(0,n.css)(l)),notchStyle:(0,n.css)(i(),(0,n.css)(f))}};var n=r(1),o=r(0);function i(){var e=a(["\n ",";\n position: absolute;\n transform: rotate(45deg);\n width: 8px;\n height: 8px;\n margin: auto;\n "]);return i=function(){return e},e}function u(){var e=a(["\n position: absolute;\n width: ","px;\n height: ","px;\n overflow: hidden;\n margin: auto;\n ",";\n "]);return u=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}}])}));
//# sourceMappingURL=index.web.js.map

@@ -0,4 +1,6 @@

import type { OneOf } from '@leafygreen-ui/lib';
import React from 'react';
import PropTypes from 'prop-types';
import { PopoverProps, Justify } from '@leafygreen-ui/popover';
import { HTMLElementProps } from '@leafygreen-ui/lib';
export declare const TriggerEvent: {

@@ -22,3 +24,4 @@ readonly Hover: "hover";

export { Justify };
interface TooltipProps extends Omit<PopoverProps, 'active' | 'spacing' | 'refEl'> {
declare type ModifiedPopoverProps = Omit<PopoverProps, 'active' | 'spacing' | 'refEl'>;
export declare type TooltipProps = Omit<HTMLElementProps<'div'>, keyof ModifiedPopoverProps> & ModifiedPopoverProps & {
/**

@@ -31,2 +34,3 @@ * A slot for the element used to trigger the `Tooltip`.

* Determines if a `hover` or `click` event will trigger the opening of a `Tooltip`.
* default: 'hover'
*/

@@ -57,3 +61,24 @@ triggerEvent?: TriggerEvent;

shouldClose?: () => boolean;
}
/**
* Enables Tooltip to trigger based on the event specified by `triggerEvent`.
* default: true
*/
enabled?: boolean;
} & OneOf<{
/**
* Specifies that the popover content will appear portaled to the end of the DOM,
* rather than in the DOM tree.
*
* default: `true`
*/
usePortal?: true;
/**
* If using a portal, specifies a class name to apply to the root element of the portal.
*
* default: undefined
*/
portalClassName?: string;
}, {
usePortal: false;
}>;
/**

@@ -86,4 +111,5 @@ * # Tooltip

* @param props.usePortal Determines whether or not Tooltip will be Portaled
* @param props.portalClassName Classname applied to root element of the portal.
*/
declare function Tooltip({ open: controlledOpen, setOpen: controlledSetOpen, className, children, trigger, variant, triggerEvent, align, justify, id, shouldClose, usePortal, ...rest }: TooltipProps): any;
declare function Tooltip({ open: controlledOpen, setOpen: controlledSetOpen, className, children, trigger, variant, triggerEvent, enabled, align, justify, id, shouldClose, usePortal, portalClassName, ...rest }: TooltipProps): any;
declare namespace Tooltip {

@@ -103,4 +129,7 @@ var displayName: string;

shouldClose: PropTypes.Requireable<(...args: any[]) => any>;
usePortal: PropTypes.Requireable<boolean>;
portalClassName: PropTypes.Requireable<string>;
};
}
export default Tooltip;
//# sourceMappingURL=Tooltip.d.ts.map

@@ -6,1 +6,2 @@ import { Align, Justify } from '@leafygreen-ui/popover';

};
//# sourceMappingURL=tooltipUtils.d.ts.map
{
"name": "@leafygreen-ui/tooltip",
"version": "3.2.2",
"version": "3.3.0",
"description": "LeafyGreen UI Kit Tooltip",

@@ -16,3 +16,3 @@ "browser": "./dist/index.web.js",

"dependencies": {
"@leafygreen-ui/popover": "^5.0.1",
"@leafygreen-ui/popover": "^5.1.0",
"@leafygreen-ui/lib": "^4.2.0",

@@ -19,0 +19,0 @@ "@leafygreen-ui/palette": "^2.0.0",

@@ -70,3 +70,4 @@ # Tooltip

| `usePortal` | `boolean` | Determines whether or not the Tooltip will be Portaled | `true` |
| `enabled` | `boolean` | Enables Tooltip to trigger based on the event specified by `triggerEvent`. | `true` |
_Any other properties will be spread on the Tooltip `div` container_

@@ -5,2 +5,3 @@ {

"declarationDir": "dist",
"outDir": "dist",
"rootDir": "src"

@@ -7,0 +8,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

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