uxcore-badge
Advanced tools
Comparing version 0.3.12 to 0.3.13
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
@@ -43,11 +45,24 @@ | ||
var isIE = document.documentMode || !!window["ActiveXObject"] || "ActiveXObject" in window || navigator.userAgent.indexOf('Edge') !== -1; | ||
var renderNumberList = function renderNumberList(position) { | ||
var childrenToReturn = []; | ||
for (var i = 0; i < 30; i++) { | ||
var currentClassName = position === i ? 'current' : null; | ||
childrenToReturn.push(_react2["default"].createElement( | ||
'p', | ||
{ key: i, className: currentClassName }, | ||
i % 10 | ||
)); | ||
if (isIE) { | ||
if (position === i) { | ||
childrenToReturn.push(_react2["default"].createElement( | ||
'p', | ||
{ key: i }, | ||
i % 10 | ||
)); | ||
break; | ||
} | ||
} else { | ||
var currentClassName = position === i ? 'current' : null; | ||
childrenToReturn.push(_react2["default"].createElement( | ||
'p', | ||
{ key: i, className: currentClassName }, | ||
i % 10 | ||
)); | ||
} | ||
} | ||
@@ -135,10 +150,14 @@ return childrenToReturn; | ||
var removeTransition = this.state.animateStarted || getNumberArray(this.state.lastCount)[i] === undefined; | ||
var transformStyle = {}; | ||
if (!isIE) { | ||
transformStyle.WebkitTransform = 'translate3d(0, ' + -position * height + 'px, 0)'; | ||
transformStyle.transform = 'translate3d(0, ' + -position * height + 'px, 0)'; | ||
} | ||
return (0, _react.createElement)('span', { | ||
className: this.props.prefixCls + '-only', | ||
style: { | ||
transition: removeTransition && 'none', | ||
WebkitTransform: 'translate3d(0, ' + -position * height + 'px, 0)', | ||
transform: 'translate3d(0, ' + -position * height + 'px, 0)', | ||
style: _extends({ | ||
transition: removeTransition && 'none' | ||
}, transformStyle, { | ||
height: height | ||
}, | ||
}), | ||
key: i | ||
@@ -145,0 +164,0 @@ }, renderNumberList(position)); |
{ | ||
"name": "uxcore-badge", | ||
"version": "0.3.12", | ||
"version": "0.3.13", | ||
"description": "uxcore-badge component for uxcore.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/uxcore/uxcore-badge.git", |
@@ -16,11 +16,25 @@ /** | ||
const isIE = document.documentMode || !!window["ActiveXObject"] || | ||
"ActiveXObject" in window || navigator.userAgent.indexOf('Edge') !== -1 | ||
const renderNumberList = position => { | ||
const childrenToReturn = []; | ||
for (let i = 0; i < 30; i++) { | ||
const currentClassName = position === i ? 'current' : null; | ||
childrenToReturn.push( | ||
<p key={i} className={currentClassName}> | ||
{i % 10} | ||
</p> | ||
); | ||
if (isIE) { | ||
if (position === i) { | ||
childrenToReturn.push( | ||
<p key={i}> | ||
{i % 10} | ||
</p> | ||
) | ||
break | ||
} | ||
} else { | ||
const currentClassName = position === i ? 'current' : null; | ||
childrenToReturn.push( | ||
<p key={i} className={currentClassName}> | ||
{i % 10} | ||
</p> | ||
); | ||
} | ||
} | ||
@@ -108,2 +122,7 @@ return childrenToReturn; | ||
getNumberArray(this.state.lastCount)[i] === undefined; | ||
const transformStyle = {}; | ||
if (!isIE) { | ||
transformStyle.WebkitTransform = `translate3d(0, ${-position * height}px, 0)` | ||
transformStyle.transform = `translate3d(0, ${-position * height}px, 0)` | ||
} | ||
return createElement( | ||
@@ -115,4 +134,3 @@ 'span', | ||
transition: removeTransition && 'none', | ||
WebkitTransform: `translate3d(0, ${-position * height}px, 0)`, | ||
transform: `translate3d(0, ${-position * height}px, 0)`, | ||
...transformStyle, | ||
height, | ||
@@ -119,0 +137,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
42795
792
1