react-simple-tooltip
Advanced tools
Comparing version 2.3.3 to 2.4.0
@@ -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
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
1008542
2
24042
30
8
3
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.2(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.2(transitive)
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-plugin-utils@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/plugin-syntax-jsx@7.25.9(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.25.9(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@emotion/is-prop-valid@0.8.8(transitive)
+ Added@emotion/memoize@0.7.4(transitive)
+ Added@emotion/unitless@0.7.5(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbabel-plugin-styled-components@2.1.4(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedcaniuse-lite@1.0.30001680(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedelectron-to-chromium@1.5.62(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedis-what@3.14.1(transitive)
+ Addedjsesc@3.0.2(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmemoize-one@5.2.1(transitive)
+ Addedmerge-anything@2.4.4(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedstyled-components@4.4.1(transitive)
+ Addedstylis-rule-sheet@0.0.10(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedasap@2.0.6(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedhoist-non-react-statics@1.2.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedieee754@1.2.1(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisobject@3.0.1(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact-dom@16.14.0(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedscheduler@0.19.1(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedstyled-components@2.4.1(transitive)
- Removedsupports-color@3.2.3(transitive)
- Removedua-parser-js@0.7.39(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updatedstyled-components@^4.1.3