@semcore/utils
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -5,2 +5,8 @@ # Changelog | ||
## [3.0.2] - 2019-09-09 | ||
### Fixed | ||
- Усправлены не работающие фокусы с клавиатуры | ||
## [3.0.1] - 2019-09-06 | ||
@@ -7,0 +13,0 @@ |
@@ -92,3 +92,3 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); | ||
return children({ | ||
className: className + dynamicClassName | ||
className: className + dynamicClassName || undefined | ||
}); | ||
@@ -95,0 +95,0 @@ } |
@@ -24,5 +24,7 @@ import React from "react"; | ||
tabIndex: number; | ||
}; | ||
static getDerivedStateFromProps(props: any, state: any): any; | ||
state: { | ||
keyboardFocused: boolean; | ||
}; | ||
constructor(props: any); | ||
handlerFocus: (e: FocusEvent) => void; | ||
@@ -29,0 +31,0 @@ handlerBlur: (e: FocusEvent) => void; |
@@ -35,7 +35,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
function EnhancedWithKeyboardFocus(props) { | ||
function EnhancedWithKeyboardFocus() { | ||
var _this; | ||
(0, _classCallCheck2["default"])(this, EnhancedWithKeyboardFocus); | ||
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(EnhancedWithKeyboardFocus).call(this, props)); | ||
_this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(EnhancedWithKeyboardFocus).apply(this, arguments)); | ||
_this.state = { | ||
keyboardFocused: false | ||
}; | ||
@@ -69,5 +72,2 @@ _this.handlerFocus = function (e) { | ||
_this.state = { | ||
keyboardFocused: props.keyboardFocused | ||
}; | ||
return _this; | ||
@@ -93,2 +93,13 @@ } | ||
} | ||
}], [{ | ||
key: "getDerivedStateFromProps", | ||
value: function getDerivedStateFromProps(props, state) { | ||
if (props.keyboardFocused !== undefined) { | ||
return { | ||
keyboardFocused: props.keyboardFocused | ||
}; | ||
} | ||
return state; | ||
} | ||
}]); | ||
@@ -101,4 +112,3 @@ return EnhancedWithKeyboardFocus; | ||
EnhancedWithKeyboardFocus.defaultProps = { | ||
tabIndex: 0, | ||
keyboardFocused: false | ||
tabIndex: 0 | ||
}; | ||
@@ -105,0 +115,0 @@ |
{ | ||
"name": "@semcore/utils", | ||
"description": "SEMRush Utils Component", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"author": "Roman Lysov <r.lysov@semrush.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "NODE_ENV=production rollup --config=node:rollup-config-typescript", | ||
"build": "rollup --config=node:rollup-config-typescript", | ||
"test": "jest --no-cache" | ||
@@ -24,3 +24,3 @@ }, | ||
"dependencies": { | ||
"@babel/runtime": "^7.5", | ||
"@babel/runtime": "^7.6", | ||
"@types/react": "^16.9", | ||
@@ -27,0 +27,0 @@ "classnames": "^2.2", |
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
129850
1703
Updated@babel/runtime@^7.6