flowtip-react-dom
Advanced tools
Comparing version 5.2.0 to 5.2.1
export { default } from "./FlowTip"; | ||
export var unusedTest = function unusedTest() { | ||
return console.log('unusedTest side effect'); | ||
}; | ||
export { getContentStyle, getTailStyle } from "./util/render"; | ||
//# sourceMappingURL=index.js.map |
import { findDOMNode as _findDOMNode } from 'react-dom'; | ||
// flowlint unclear-type: off | ||
var findDOMNode = function findDOMNode(componentOrElement) { | ||
@@ -8,3 +7,4 @@ var node = _findDOMNode(componentOrElement); | ||
if (node) return node; | ||
var fiberNode = componentOrElement && componentOrElement._reactInternalFiber; | ||
var fiberNode = // flowlint-next-line unclear-type: off | ||
componentOrElement && componentOrElement._reactInternalFiber; | ||
@@ -11,0 +11,0 @@ while (fiberNode && !(fiberNode.stateNode instanceof Element)) { |
@@ -1,2 +0,2 @@ | ||
import { Rect, getClampedTailPosition, TOP, RIGHT, BOTTOM, LEFT } from 'flowtip-core'; | ||
import { Rect, getClampedTailPosition, RIGHT, LEFT } from 'flowtip-core'; | ||
import { getOffset } from "../util/state"; | ||
@@ -99,29 +99,2 @@ import { getViewportRect } from "../util/dom"; | ||
}; | ||
/** | ||
* Create a CSS border triangle facing a given region. | ||
* | ||
* @param {string} region -`top`, `right`, `bottom`, or `left`. | ||
* @param {string} color - CSS color string. | ||
* @param {number} size - Height of the triangle in px. | ||
* @returns {Object} Border triangle style. | ||
*/ | ||
export var cssTriangle = function cssTriangle(region, color, size) { | ||
var tip = "".concat(size, "px solid ").concat(color); | ||
var side = "".concat(size, "px solid transparent"); | ||
var result = region === TOP || region === BOTTOM ? { | ||
borderLeft: side, | ||
borderRight: side | ||
} : { | ||
borderTop: side, | ||
borderBottom: side | ||
}; | ||
result[{ | ||
top: 'borderTop', | ||
right: 'borderRight', | ||
bottom: 'borderBottom', | ||
left: 'borderLeft' | ||
}[region]] = tip; | ||
return result; | ||
}; | ||
//# sourceMappingURL=render.js.map |
@@ -12,13 +12,20 @@ "use strict"; | ||
}); | ||
exports.unusedTest = void 0; | ||
Object.defineProperty(exports, "getContentStyle", { | ||
enumerable: true, | ||
get: function get() { | ||
return _render.getContentStyle; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getTailStyle", { | ||
enumerable: true, | ||
get: function get() { | ||
return _render.getTailStyle; | ||
} | ||
}); | ||
var _FlowTip = _interopRequireDefault(require("./FlowTip")); | ||
var _render = require("./util/render"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var unusedTest = function unusedTest() { | ||
return console.log('unusedTest side effect'); | ||
}; | ||
exports.unusedTest = unusedTest; | ||
//# sourceMappingURL=index.js.map |
@@ -10,7 +10,7 @@ "use strict"; | ||
// flowlint unclear-type: off | ||
var findDOMNode = function findDOMNode(componentOrElement) { | ||
var node = (0, _reactDom.findDOMNode)(componentOrElement); | ||
if (node) return node; | ||
var fiberNode = componentOrElement && componentOrElement._reactInternalFiber; | ||
var fiberNode = // flowlint-next-line unclear-type: off | ||
componentOrElement && componentOrElement._reactInternalFiber; | ||
@@ -17,0 +17,0 @@ while (fiberNode && !(fiberNode.stateNode instanceof Element)) { |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.cssTriangle = exports.getTailStyle = exports.getContentStyle = void 0; | ||
exports.getTailStyle = exports.getContentStyle = void 0; | ||
@@ -112,34 +112,4 @@ var _flowtipCore = require("flowtip-core"); | ||
}; | ||
/** | ||
* Create a CSS border triangle facing a given region. | ||
* | ||
* @param {string} region -`top`, `right`, `bottom`, or `left`. | ||
* @param {string} color - CSS color string. | ||
* @param {number} size - Height of the triangle in px. | ||
* @returns {Object} Border triangle style. | ||
*/ | ||
exports.getTailStyle = getTailStyle; | ||
var cssTriangle = function cssTriangle(region, color, size) { | ||
var tip = "".concat(size, "px solid ").concat(color); | ||
var side = "".concat(size, "px solid transparent"); | ||
var result = region === _flowtipCore.TOP || region === _flowtipCore.BOTTOM ? { | ||
borderLeft: side, | ||
borderRight: side | ||
} : { | ||
borderTop: side, | ||
borderBottom: side | ||
}; | ||
result[{ | ||
top: 'borderTop', | ||
right: 'borderRight', | ||
bottom: 'borderBottom', | ||
left: 'borderLeft' | ||
}[region]] = tip; | ||
return result; | ||
}; | ||
exports.cssTriangle = cssTriangle; | ||
//# sourceMappingURL=render.js.map |
{ | ||
"name": "flowtip-react-dom", | ||
"description": "A flexible, adaptable, and easy to use tooltip positioning library for React.", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"author": "Neal Granger <neal@nealg.com>", | ||
@@ -31,3 +31,3 @@ "main": "./lib", | ||
"flowtip-core": "^5.2.0", | ||
"react-resize-observer": "^0.2.1" | ||
"react-resize-observer": "^1.0.1" | ||
}, | ||
@@ -34,0 +34,0 @@ "peerDependencies": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
215812
1426
+ Addedreact-resize-observer@1.1.1(transitive)
- Removedreact-resize-observer@0.2.2(transitive)
Updatedreact-resize-observer@^1.0.1