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

cf-component-arrow-swivel

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-arrow-swivel - npm Package Compare versions

Comparing version 2.0.0 to 2.0.2

18

CHANGELOG.md

@@ -6,3 +6,19 @@ # Change Log

<a name="2.0.0"></a>
<a name="2.0.2"></a>
## [2.0.2](http://stash.cfops.it:7999/www/cf-ux/compare/cf-component-arrow-swivel@2.0.1...cf-component-arrow-swivel@2.0.2) (2017-10-23)
**Note:** Version bump only for package cf-component-arrow-swivel
<a name="2.0.1"></a>
## [2.0.1](http://stash.cfops.it:7999/www/cf-ux/compare/cf-component-arrow-swivel@2.0.0...cf-component-arrow-swivel@2.0.1) (2017-10-20)
**Note:** Version bump only for package cf-component-arrow-swivel
<a name="2.0.0"></a>
# 2.0.0 (2017-10-13)

@@ -9,0 +25,0 @@

109

lib/ArrowSwivel.js
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');

@@ -15,73 +15,48 @@

var _cfComponentIcon = require('cf-component-icon');
var _cfComponentIcon = require('../../cf-component-icon/src/index.js');
var _cfStyleContainer = require('cf-style-container');
var _cfStyleContainer = require('../../cf-style-container/src/index.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
const CaretIconWrapper = (0, _cfStyleContainer.createComponent)(({ isActive, startAngle, endAngle, duration }) => ({
position: 'relative',
top: '0.2rem',
display: 'inline-block',
'& svg': {
transform: isActive ? `rotate(${endAngle}deg)` : `rotate(${startAngle}deg)`,
transition: `transform ${duration}ms ease`
}
}), 'span', ['onClick']);
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CaretIconWrapper = (0, _cfStyleContainer.createComponent)(function (_ref) {
var isActive = _ref.isActive,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
duration = _ref.duration;
return {
position: 'relative',
top: '0.2rem',
display: 'inline-block',
'& svg': {
transform: isActive ? 'rotate(' + endAngle + 'deg)' : 'rotate(' + startAngle + 'deg)',
transition: 'transform ' + duration + 'ms ease'
}
};
}, 'span', ['onClick']);
var ArrowSwivel = function (_React$Component) {
_inherits(ArrowSwivel, _React$Component);
function ArrowSwivel() {
_classCallCheck(this, ArrowSwivel);
return _possibleConstructorReturn(this, (ArrowSwivel.__proto__ || Object.getPrototypeOf(ArrowSwivel)).apply(this, arguments));
class ArrowSwivel extends _react2.default.Component {
render() {
const {
onClick,
isActive,
startAngle,
endAngle,
duration,
color,
size
} = this.props;
return _react2.default.createElement(
CaretIconWrapper,
{
startAngle: startAngle,
endAngle: endAngle,
onClick: onClick,
isActive: isActive,
duration: duration
},
_react2.default.createElement(_cfComponentIcon.Icon, {
label: 'caret-right',
type: 'caret-right',
color: color,
size: size
})
);
}
}
_createClass(ArrowSwivel, [{
key: 'render',
value: function render() {
var _props = this.props,
onClick = _props.onClick,
isActive = _props.isActive,
startAngle = _props.startAngle,
endAngle = _props.endAngle,
duration = _props.duration,
color = _props.color,
size = _props.size;
return _react2.default.createElement(
CaretIconWrapper,
{
startAngle: startAngle,
endAngle: endAngle,
onClick: onClick,
isActive: isActive,
duration: duration
},
_react2.default.createElement(_cfComponentIcon.Icon, {
label: 'caret-right',
type: 'caret-right',
color: color,
size: size
})
);
}
}]);
return ArrowSwivel;
}(_react2.default.Component);
ArrowSwivel.propTypes = {

@@ -88,0 +63,0 @@ isActive: _propTypes2.default.bool,

"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function () {
return {};
};
exports.default = () => ({});
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrowSwivelTheme = exports.ArrowSwivelUnstyled = exports.ArrowSwivel = undefined;

@@ -14,7 +16,7 @@

var _cfStyleContainer = require('cf-style-container');
var _cfStyleContainer = require('../../cf-style-container/src/index.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var ArrowSwivel = (0, _cfStyleContainer.applyTheme)(_ArrowSwivel2.default, _ArrowSwivelTheme2.default);
const ArrowSwivel = (0, _cfStyleContainer.applyTheme)(_ArrowSwivel2.default, _ArrowSwivelTheme2.default);

@@ -21,0 +23,0 @@ exports.ArrowSwivel = ArrowSwivel;

{
"name": "cf-component-arrow-swivel",
"description": "",
"version": "2.0.0",
"version": "2.0.2",
"main": "lib/index.js",

@@ -14,4 +14,4 @@ "module": "es/index.js",

"dependencies": {
"cf-component-icon": "^4.0.0",
"cf-style-container": "^5.0.3",
"cf-component-icon": "^4.0.1",
"cf-style-container": "^5.2.0",
"prop-types": "^15.5.8"

@@ -18,0 +18,0 @@ },

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