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

react-simple-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-tooltip - npm Package Compare versions

Comparing version 2.3.3 to 2.4.0

50

CHANGELOG.md

@@ -0,64 +1,68 @@

# 2.4.0 — 2019-03-08
- Updated: dependencies
- Updated: tests
# 2.3.3 — 2018-11-08
* Fixed: z-index prop
* Updated: Dependencies
- Fixed: z-index prop
- Updated: Dependencies
# 2.3.2 — 2018-06-13
* Removes: index.css in package.json
- Removes: index.css in package.json
# 2.3.1 — 2018-03-12
* Fixed: Removed warning when onMouseEnter and Leave are booleans instead of undefined by @vincentdesmares
- Fixed: Removed warning when onMouseEnter and Leave are booleans instead of undefined by @vincentdesmares
# 2.3.0 - 2018-01-04
* Updated: FadeDuration to be in ms,
* Added: Offset prop to allow spacing between arrow and trigger
- Updated: FadeDuration to be in ms,
- Added: Offset prop to allow spacing between arrow and trigger
# 2.2.0 - 2018-01-03
* Added: Fade animation props (by @BenLorantfy)
- Added: Fade animation props (by @BenLorantfy)
# 2.1.0 - 2017-12-08
* Added: Standalone version
- Added: Standalone version
# 2.0.0 - 2017-10-18
* Added: Nwb build
* Updated: Nwb build
* Added: Tests
* Added: styled-components dependency
* Removed: classnames dependency
- Added: Nwb build
- Updated: Nwb build
- Added: Tests
- Added: styled-components dependency
- Removed: classnames dependency
# 1.0.6 - 2017-08-24
* Updated: Import PropTypes from `prop-types` package
* Added: Yarn
- Updated: Import PropTypes from `prop-types` package
- Added: Yarn
# 1.0.5 - 2015-07-09
* Updated: webpack build
- Updated: webpack build
# 1.0.4 - 2015-07-08
* Added: webpack build
- Added: webpack build
# 1.0.3 - 2015-07-03
* Added: fixed tooltip example
- Added: fixed tooltip example
# 1.0.2 - 2015-07-02
* Updated: tooltips example screenshot
- Updated: tooltips example screenshot
# 1.0.1 - 2015-07-02
* Updated: repository url in package.json
* Added: Npm Badge in README
- Updated: repository url in package.json
- Added: Npm Badge in README
# 1.0.0 - 2015-07-01
* Initial release
- Initial release

@@ -13,3 +13,3 @@ var _templateObject = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n"], ["\n position: absolute;\n width: ", "px;\n height: ", "px;\n background: ", ";\n"]),

var Base = styled.div(_templateObject, function (props) {
var Base = styled("div")(_templateObject, function (props) {
return props.width;

@@ -22,3 +22,3 @@ }, function (props) {

var Up = Base.extend(_templateObject2, function (props) {
var Up = styled(Base)(_templateObject2, function (props) {
return props.border;

@@ -28,3 +28,3 @@ }, function (props) {

});
var Down = Base.extend(_templateObject3, function (props) {
var Down = styled(Base)(_templateObject3, function (props) {
return props.border;

@@ -34,3 +34,3 @@ }, function (props) {

});
var Left = Base.extend(_templateObject4, function (props) {
var Left = styled(Base)(_templateObject4, function (props) {
return props.border;

@@ -41,3 +41,3 @@ }, function (props) {

var Right = Base.extend(_templateObject5, function (props) {
var Right = styled(Base)(_templateObject5, function (props) {
return props.border;

@@ -44,0 +44,0 @@ }, function (props) {

@@ -8,3 +8,3 @@ var _templateObject = _taggedTemplateLiteralLoose(["\n color: ", ";\n background: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n padding: ", ";\n font-size: ", ";\n font-family: ", ";\n"], ["\n color: ", ";\n background: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n padding: ", ";\n font-size: ", ";\n font-family: ", ";\n"]);

var Bubble = styled.div(_templateObject, function (props) {
var Bubble = styled("div")(_templateObject, function (props) {
return props.color ? props.color : "inherit";

@@ -11,0 +11,0 @@ }, function (props) {

var _templateObject = _taggedTemplateLiteralLoose(["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"], ["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"]),
_templateObject2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n ", ";\n ", ";\n"], ["\n position: absolute;\n ", ";\n ", ";\n"]),
_templateObject3 = _taggedTemplateLiteralLoose(["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"], ["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"]),
_templateObject4 = _taggedTemplateLiteralLoose(["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"], ["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"]),
_templateObject5 = _taggedTemplateLiteralLoose(["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"], ["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"]),
_templateObject6 = _taggedTemplateLiteralLoose(["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"], ["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"]);
_templateObject2 = _taggedTemplateLiteralLoose(["\n animation: ", "ms ", " 0s 1 ", ";\n"], ["\n animation: ", "ms ", " 0s 1 ", ";\n"]),
_templateObject3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n ", "\n ", ";\n"], ["\n position: absolute;\n ", "\n ", ";\n"]),
_templateObject4 = _taggedTemplateLiteralLoose(["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"], ["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"]),
_templateObject5 = _taggedTemplateLiteralLoose(["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"], ["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"]),
_templateObject6 = _taggedTemplateLiteralLoose(["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"], ["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"]),
_templateObject7 = _taggedTemplateLiteralLoose(["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"], ["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"]);

@@ -12,3 +13,3 @@ function _taggedTemplateLiteralLoose(strings, raw) { strings.raw = raw; return strings; }

import PropTypes from "prop-types";
import styled, { keyframes } from "styled-components";
import styled, { css, keyframes } from "styled-components";
import { easingPropType } from "../../utils/propTypes";

@@ -18,9 +19,9 @@

var createAnimation = function createAnimation(props) {
return "animation:\n " + props.fadeDuration + "ms\n " + props.fadeEasing + "\n 0s\n 1\n " + fadeAnimation + ";\n ";
var animation = function animation(props) {
return css(_templateObject2, props.fadeDuration, props.fadeEasing, fadeAnimation);
};
// prettier-ignore
var Base = styled.div(_templateObject2, function (props) {
return props.fadeDuration && props.fadeDuration > 0 && "" + createAnimation(props);
var Base = styled("div")(_templateObject3, function (props) {
return props.fadeDuration && props.fadeDuration > 0 && animation(props);
}, function (props) {

@@ -30,15 +31,15 @@ return props.zIndex && "z-index: " + props.zIndex + ";";

var Top = Base.extend(_templateObject3, function (props) {
var Top = styled(Base)(_templateObject4, function (props) {
return props.offset;
});
var Bottom = Base.extend(_templateObject4, function (props) {
var Bottom = styled(Base)(_templateObject5, function (props) {
return props.offset;
});
var Left = Base.extend(_templateObject5, function (props) {
var Left = styled(Base)(_templateObject6, function (props) {
return props.offset;
});
var Right = Base.extend(_templateObject6, function (props) {
var Right = styled(Base)(_templateObject7, function (props) {
return props.offset;

@@ -68,3 +69,2 @@ });

offset: offset,
open: open,
zIndex: zIndex,

@@ -71,0 +71,0 @@ fadeDuration: fadeDuration,

@@ -27,3 +27,3 @@ "use strict";

var Base = _styledComponents2.default.div(_templateObject, function (props) {
var Base = (0, _styledComponents2.default)("div")(_templateObject, function (props) {
return props.width;

@@ -36,3 +36,3 @@ }, function (props) {

var Up = Base.extend(_templateObject2, function (props) {
var Up = (0, _styledComponents2.default)(Base)(_templateObject2, function (props) {
return props.border;

@@ -42,3 +42,3 @@ }, function (props) {

});
var Down = Base.extend(_templateObject3, function (props) {
var Down = (0, _styledComponents2.default)(Base)(_templateObject3, function (props) {
return props.border;

@@ -48,3 +48,3 @@ }, function (props) {

});
var Left = Base.extend(_templateObject4, function (props) {
var Left = (0, _styledComponents2.default)(Base)(_templateObject4, function (props) {
return props.border;

@@ -55,3 +55,3 @@ }, function (props) {

var Right = Base.extend(_templateObject5, function (props) {
var Right = (0, _styledComponents2.default)(Base)(_templateObject5, function (props) {
return props.border;

@@ -58,0 +58,0 @@ }, function (props) {

@@ -19,3 +19,3 @@ "use strict";

var Bubble = _styledComponents2.default.div(_templateObject, function (props) {
var Bubble = (0, _styledComponents2.default)("div")(_templateObject, function (props) {
return props.color ? props.color : "inherit";

@@ -22,0 +22,0 @@ }, function (props) {

@@ -6,7 +6,8 @@ "use strict";

var _templateObject = _taggedTemplateLiteralLoose(["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"], ["\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n"]),
_templateObject2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n ", ";\n ", ";\n"], ["\n position: absolute;\n ", ";\n ", ";\n"]),
_templateObject3 = _taggedTemplateLiteralLoose(["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"], ["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"]),
_templateObject4 = _taggedTemplateLiteralLoose(["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"], ["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"]),
_templateObject5 = _taggedTemplateLiteralLoose(["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"], ["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"]),
_templateObject6 = _taggedTemplateLiteralLoose(["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"], ["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"]);
_templateObject2 = _taggedTemplateLiteralLoose(["\n animation: ", "ms ", " 0s 1 ", ";\n"], ["\n animation: ", "ms ", " 0s 1 ", ";\n"]),
_templateObject3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n ", "\n ", ";\n"], ["\n position: absolute;\n ", "\n ", ";\n"]),
_templateObject4 = _taggedTemplateLiteralLoose(["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"], ["\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: ", "px;\n"]),
_templateObject5 = _taggedTemplateLiteralLoose(["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"], ["\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: ", "px;\n"]),
_templateObject6 = _taggedTemplateLiteralLoose(["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"], ["\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: ", "px;\n"]),
_templateObject7 = _taggedTemplateLiteralLoose(["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"], ["\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: ", "px;\n"]);

@@ -33,9 +34,9 @@ var _react = require("react");

var createAnimation = function createAnimation(props) {
return "animation:\n " + props.fadeDuration + "ms\n " + props.fadeEasing + "\n 0s\n 1\n " + fadeAnimation + ";\n ";
var animation = function animation(props) {
return (0, _styledComponents.css)(_templateObject2, props.fadeDuration, props.fadeEasing, fadeAnimation);
};
// prettier-ignore
var Base = _styledComponents2.default.div(_templateObject2, function (props) {
return props.fadeDuration && props.fadeDuration > 0 && "" + createAnimation(props);
var Base = (0, _styledComponents2.default)("div")(_templateObject3, function (props) {
return props.fadeDuration && props.fadeDuration > 0 && animation(props);
}, function (props) {

@@ -45,15 +46,15 @@ return props.zIndex && "z-index: " + props.zIndex + ";";

var Top = Base.extend(_templateObject3, function (props) {
var Top = (0, _styledComponents2.default)(Base)(_templateObject4, function (props) {
return props.offset;
});
var Bottom = Base.extend(_templateObject4, function (props) {
var Bottom = (0, _styledComponents2.default)(Base)(_templateObject5, function (props) {
return props.offset;
});
var Left = Base.extend(_templateObject5, function (props) {
var Left = (0, _styledComponents2.default)(Base)(_templateObject6, function (props) {
return props.offset;
});
var Right = Base.extend(_templateObject6, function (props) {
var Right = (0, _styledComponents2.default)(Base)(_templateObject7, function (props) {
return props.offset;

@@ -83,3 +84,2 @@ });

offset: offset,
open: open,
zIndex: zIndex,

@@ -86,0 +86,0 @@ fadeDuration: fadeDuration,

{
"name": "react-simple-tooltip",
"version": "2.3.3",
"version": "2.4.0",
"author": {

@@ -37,6 +37,7 @@ "name": "Cédric Delpoux",

"test": "jest --config jest.config.json --colors --no-cache",
"test:snapshot:update": "jest --config jest.config.json --updateSnapshot",
"test:watch": "yarn test -- --watch"
},
"dependencies": {
"styled-components": "^2.1.2"
"styled-components": "^4.1.3"
},

@@ -49,4 +50,5 @@ "devDependencies": {

"babel-preset-react": "^6.24.1",
"enzyme": "^2.9.1",
"enzyme-to-json": "^2.0.1",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.10.0",
"enzyme-to-json": "^3.3.5",
"eslint": "^4.5.0",

@@ -63,3 +65,3 @@ "eslint-config-prettier": "^2.3.0",

"jest-css-modules": "^1.1.0",
"jest-styled-components": "^4.10.0",
"jest-styled-components": "^6.3.1",
"lint-staged": "^4.0.2",

@@ -70,5 +72,5 @@ "markdown-loader": "^2.0.1",

"prop-types": "^15.6.0",
"react": "^15.6.1",
"react": "^16.8.4",
"react-demo-page": "^0.2.2",
"react-dom": "^15.6.1",
"react-dom": "^16.8.4",
"react-test-renderer": "^15.6.1",

@@ -78,5 +80,4 @@ "sinon": "^4.2.2"

"peerDependencies": {
"react": "^15.0.0 || ^16.0.0",
"react-dom": "^15.0.0 || ^16.0.0"
"react": "^15.0.0 || ^16.0.0"
}
}

Sorry, the diff of this file is too big to display

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