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

@infotech/uikit-spin

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@infotech/uikit-spin - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

62

lib/index.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,49 +6,39 @@ Object.defineProperty(exports, "__esModule", {

});
exports.default = void 0;
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _react = _interopRequireDefault(require("react"));
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classnames = _interopRequireDefault(require("classnames"));
var _assign = require('babel-runtime/core-js/object/assign');
var _styles = _interopRequireDefault(require("./styles"));
var _assign2 = _interopRequireDefault(_assign);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _react = require('react');
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
var _react2 = _interopRequireDefault(_react);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _styles = require('./styles');
var _styles2 = _interopRequireDefault(_styles);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SPEED_TO_CN = {
slow: _styles2.default.slow,
middle: _styles2.default.middle,
fast: _styles2.default.fast
slow: _styles.default.slow,
middle: _styles.default.middle,
fast: _styles.default.fast
};
exports.default = function (_ref) {
var _default = function _default(_ref) {
var children = _ref.children,
disabled = _ref.disabled,
_ref$duration = _ref.duration,
duration = _ref$duration === undefined ? 'middle' : _ref$duration,
duration = _ref$duration === void 0 ? "middle" : _ref$duration,
_ref$style = _ref.style,
style = _ref$style === undefined ? {} : _ref$style,
style = _ref$style === void 0 ? {} : _ref$style,
className = _ref.className;
var inlineStyle = _objectSpread({}, style);
var inlineStyle = (0, _assign2.default)({}, style);
var durationCn = SPEED_TO_CN[duration];
if (!durationCn) {
if (typeof duration === 'number') {
inlineStyle.animationDuration = duration + 'ms';
} else if (typeof duration === 'string') {
if (typeof duration === "number") {
inlineStyle.animationDuration = "".concat(duration, "ms");
} else if (typeof duration === "string") {
inlineStyle.animationDuration = duration;

@@ -58,10 +48,8 @@ }

return _react2.default.createElement(
'div',
{
className: (0, _classnames2.default)(_styles2.default.Spin, className, durationCn, (0, _defineProperty3.default)({}, _styles2.default.enabled, !disabled)),
style: inlineStyle
},
children
);
};
return _react.default.createElement("div", {
className: (0, _classnames.default)(_styles.default.Spin, className, durationCn, _defineProperty({}, _styles.default.enabled, !disabled)),
style: inlineStyle
}, children);
};
exports.default = _default;

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,14 +6,16 @@ Object.defineProperty(exports, "__esModule", {

});
exports.default = void 0;
require('./default.css');
require("./default.css");
var defaultStyles = {
'Spin': 'uikit_components_spin__Spin_954f3503',
'enabled': 'uikit_components_spin__enabled_954f3503',
'spin': 'uikit_components_spin__spin_954f3503',
'fast': 'uikit_components_spin__fast_954f3503',
'normal': 'uikit_components_spin__normal_954f3503',
'slow': 'uikit_components_spin__slow_954f3503'
"Spin": "uikit_components_spin__Spin_954f3503",
"enabled": "uikit_components_spin__enabled_954f3503",
"spin": "uikit_components_spin__spin_954f3503",
"fast": "uikit_components_spin__fast_954f3503",
"normal": "uikit_components_spin__normal_954f3503",
"slow": "uikit_components_spin__slow_954f3503"
}; // @related-file ./default.css
exports.default = defaultStyles;
var _default = defaultStyles;
exports.default = _default;
{
"name": "@infotech/uikit-spin",
"version": "0.6.2",
"version": "0.6.3",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=8.5.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