@react-md/tooltip
Advanced tools
Comparing version 2.0.0-alpha.15 to 2.0.0-beta.0
@@ -35,3 +35,3 @@ var __assign = (this && this.__assign) || function () { | ||
*/ | ||
function Tooltip(_a, ref) { | ||
var Tooltip = forwardRef(function Tooltip(_a, ref) { | ||
var _b; | ||
@@ -47,8 +47,7 @@ var className = _a.className, _c = _a.classNames, classNames = _c === void 0 ? TOOLTIP_CLASS_NAMES : _c, visible = _a.visible, _d = _a.timeout, timeout = _d === void 0 ? TOOLTIP_TRANSITION_TIMEOUT : _d, _e = _a.dense, dense = _e === void 0 ? false : _e, _f = _a.lineWrap, lineWrap = _f === void 0 ? true : _f, _g = _a.position, position = _g === void 0 ? "below" : _g, children = _a.children, onEnter = _a.onEnter, onEntering = _a.onEntering, onEntered = _a.onEntered, onExit = _a.onExit, onExiting = _a.onExiting, onExited = _a.onExited, mountOnEnter = _a.mountOnEnter, unmountOnExit = _a.unmountOnExit, props = __rest(_a, ["className", "classNames", "visible", "timeout", "dense", "lineWrap", "position", "children", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "mountOnEnter", "unmountOnExit"]); | ||
_b)), className) }), children))); | ||
} | ||
var ForwardedTooltip = forwardRef(Tooltip); | ||
}); | ||
if (process.env.NODE_ENV !== "production") { | ||
try { | ||
var PropTypes = require("prop-types"); | ||
ForwardedTooltip.propTypes = { | ||
Tooltip.propTypes = { | ||
id: PropTypes.string.isRequired, | ||
@@ -86,2 +85,4 @@ style: PropTypes.object, | ||
onExited: PropTypes.func, | ||
mountOnEnter: PropTypes.bool, | ||
unmountOnExit: PropTypes.bool, | ||
position: PropTypes.oneOf(["above", "below", "left", "right"]), | ||
@@ -93,3 +94,3 @@ visible: PropTypes.bool.isRequired, | ||
} | ||
export default ForwardedTooltip; | ||
export default Tooltip; | ||
//# sourceMappingURL=Tooltip.js.map |
@@ -71,3 +71,9 @@ import React, { CSSProperties, HTMLAttributes, ReactNode } from "react"; | ||
} | ||
declare const ForwardedTooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>; | ||
export default ForwardedTooltip; | ||
/** | ||
* This is the base tooltip component that can only be used to render a tooltip | ||
* with an animation when the visibility changes. If this component is used, you | ||
* will need to manually add all the event listeners and triggers to change the | ||
* `visible` prop. | ||
*/ | ||
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>; | ||
export default Tooltip; |
@@ -47,3 +47,3 @@ "use strict"; | ||
*/ | ||
function Tooltip(_a, ref) { | ||
var Tooltip = react_1.forwardRef(function Tooltip(_a, ref) { | ||
var _b; | ||
@@ -59,8 +59,7 @@ var className = _a.className, _c = _a.classNames, classNames = _c === void 0 ? constants_1.TOOLTIP_CLASS_NAMES : _c, visible = _a.visible, _d = _a.timeout, timeout = _d === void 0 ? constants_1.TOOLTIP_TRANSITION_TIMEOUT : _d, _e = _a.dense, dense = _e === void 0 ? false : _e, _f = _a.lineWrap, lineWrap = _f === void 0 ? true : _f, _g = _a.position, position = _g === void 0 ? "below" : _g, children = _a.children, onEnter = _a.onEnter, onEntering = _a.onEntering, onEntered = _a.onEntered, onExit = _a.onExit, onExiting = _a.onExiting, onExited = _a.onExited, mountOnEnter = _a.mountOnEnter, unmountOnExit = _a.unmountOnExit, props = __rest(_a, ["className", "classNames", "visible", "timeout", "dense", "lineWrap", "position", "children", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "mountOnEnter", "unmountOnExit"]); | ||
_b)), className) }), children))); | ||
} | ||
var ForwardedTooltip = react_1.forwardRef(Tooltip); | ||
}); | ||
if (process.env.NODE_ENV !== "production") { | ||
try { | ||
var PropTypes = require("prop-types"); | ||
ForwardedTooltip.propTypes = { | ||
Tooltip.propTypes = { | ||
id: PropTypes.string.isRequired, | ||
@@ -98,2 +97,4 @@ style: PropTypes.object, | ||
onExited: PropTypes.func, | ||
mountOnEnter: PropTypes.bool, | ||
unmountOnExit: PropTypes.bool, | ||
position: PropTypes.oneOf(["above", "below", "left", "right"]), | ||
@@ -105,3 +106,3 @@ visible: PropTypes.bool.isRequired, | ||
} | ||
exports.default = ForwardedTooltip; | ||
exports.default = Tooltip; | ||
//# sourceMappingURL=Tooltip.js.map |
{ | ||
"name": "@react-md/tooltip", | ||
"version": "2.0.0-alpha.15", | ||
"version": "2.0.0-beta.0", | ||
"description": "Create accessible tooltips within react-md based on the material design specifications.", | ||
@@ -41,7 +41,7 @@ "scripts": { | ||
"dependencies": { | ||
"@react-md/portal": "^2.0.0-alpha.15", | ||
"@react-md/theme": "^2.0.0-alpha.15", | ||
"@react-md/transition": "^2.0.0-alpha.15", | ||
"@react-md/typography": "^2.0.0-alpha.15", | ||
"@react-md/utils": "^2.0.0-alpha.15", | ||
"@react-md/portal": "^2.0.0-beta.0", | ||
"@react-md/theme": "^2.0.0-beta.0", | ||
"@react-md/transition": "^2.0.0-beta.0", | ||
"@react-md/typography": "^2.0.0-beta.0", | ||
"@react-md/utils": "^2.0.0-beta.0", | ||
"classnames": "^2.2.6", | ||
@@ -59,3 +59,3 @@ "react-transition-group": "^4.3.0" | ||
}, | ||
"gitHead": "c20671308497530c59f6563eafd1914b55122b8c" | ||
"gitHead": "8d754a2c2734ee98eaf571e348a836cf12a9f104" | ||
} |
@@ -71,3 +71,9 @@ import React, { CSSProperties, HTMLAttributes, ReactNode } from "react"; | ||
} | ||
declare const ForwardedTooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>; | ||
export default ForwardedTooltip; | ||
/** | ||
* This is the base tooltip component that can only be used to render a tooltip | ||
* with an animation when the visibility changes. If this component is used, you | ||
* will need to manually add all the event listeners and triggers to change the | ||
* `visible` prop. | ||
*/ | ||
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>; | ||
export default Tooltip; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
267389
4506