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

@semcore/spin

Package Overview
Dependencies
Maintainers
1
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semcore/spin - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

src/index.d.ts

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [3.1.1] - 2021-05-14
### Fixed
- Fixed animation
- Rewrite code from TS to JS
## [3.1.0] - 2020-12-17

@@ -7,0 +14,0 @@

1

lib/cjs/index.js

@@ -21,2 +21,3 @@ "use strict";

if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _Spin[key]) return;
Object.defineProperty(exports, key, {

@@ -23,0 +24,0 @@ enumerable: true,

118

lib/cjs/Spin.js

@@ -24,8 +24,6 @@ "use strict";

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _core = _interopRequireWildcard(require("@semcore/core"));
var _react = _interopRequireDefault(require("react"));
var _core = _interopRequireWildcard(require("@semcore/core"));
var _flexBox = require("@semcore/flex-box");

@@ -35,44 +33,35 @@

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/*__reshadow-styles__:"./style/spin.shadow.css"*/
var _ref = (
var style = (
/*__reshadow_css_start__*/
(0, _core.__css__)(
_core.sstyled.insert(
/*__inner_css_start__*/
"@-webkit-keyframes _spin-rotate_15mef_gg_{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes _spin-rotate_15mef_gg_{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.___SSpin_15mef_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_15mef_gg_ .75s linear infinite;animation:_spin-rotate_15mef_gg_ .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}.___SSpin_15mef_gg_.__theme_15mef_gg_.__theme_dark_15mef_gg_{color:rgba(0,0,0,.3)}.___SSpin_15mef_gg_.__theme_15mef_gg_.__theme_invert_15mef_gg_{color:#fff}.___SSpin_15mef_gg_.__centered_15mef_gg_{margin:auto}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxs_15mef_gg_{width:10px;height:10px;border-width:1px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xs_15mef_gg_{width:16px;height:16px;border-width:2px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_s_15mef_gg_{width:20px;height:20px;border-width:3px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_m_15mef_gg_{width:24px;height:24px;border-width:4px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_l_15mef_gg_{width:32px;height:32px;border-width:6px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xl_15mef_gg_{width:48px;height:48px;border-width:8px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxl_15mef_gg_{width:72px;height:72px;border-width:10px}"
"@-webkit-keyframes spin-rotate_10k33rc{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin-rotate_10k33rc{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.___SSpin_qgxcd_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation-name:spin-rotate_10k33rc;animation-name:spin-rotate_10k33rc;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-duration:.75s;animation-duration:.75s;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent;color:var(--color_10k33rc)}.___SSpin_qgxcd_gg_._theme_dark_qgxcd_gg_{color:rgba(0,0,0,.3)}.___SSpin_qgxcd_gg_._theme_invert_qgxcd_gg_{color:#fff}.___SSpin_qgxcd_gg_.__centered_qgxcd_gg_{margin:auto}.___SSpin_qgxcd_gg_._size_xxs_qgxcd_gg_{width:10px;height:10px;border-width:1px}.___SSpin_qgxcd_gg_._size_xs_qgxcd_gg_{width:16px;height:16px;border-width:2px}.___SSpin_qgxcd_gg_._size_s_qgxcd_gg_{width:20px;height:20px;border-width:3px}.___SSpin_qgxcd_gg_._size_m_qgxcd_gg_{width:24px;height:24px;border-width:4px}.___SSpin_qgxcd_gg_._size_l_qgxcd_gg_{width:32px;height:32px;border-width:6px}.___SSpin_qgxcd_gg_._size_xl_qgxcd_gg_{width:48px;height:48px;border-width:8px}.___SSpin_qgxcd_gg_._size_xxl_qgxcd_gg_{width:72px;height:72px;border-width:10px}"
/*__inner_css_end__*/
, "1gfeea9_gg_")
, "10k33rc_gg_")
/*__reshadow_css_end__*/
, {
"__SSpin": "___SSpin_15mef_gg_",
"spin-rotate": "_spin-rotate_15mef_gg_",
"_theme": "__theme_15mef_gg_",
"_theme_dark": "__theme_dark_15mef_gg_",
"_theme_invert": "__theme_invert_15mef_gg_",
"_centered": "__centered_15mef_gg_",
"_size": "__size_15mef_gg_",
"_size_xxs": "__size_xxs_15mef_gg_",
"_size_xs": "__size_xs_15mef_gg_",
"_size_s": "__size_s_15mef_gg_",
"_size_m": "__size_m_15mef_gg_",
"_size_l": "__size_l_15mef_gg_",
"_size_xl": "__size_xl_15mef_gg_",
"_size_xxl": "__size_xxl_15mef_gg_"
}),
style = (0, _extends2["default"])({}, _ref);
"@spin-rotate": "spin-rotate_10k33rc",
"__SSpin": "___SSpin_qgxcd_gg_",
"--color": "--color_10k33rc",
"_theme_dark": "_theme_dark_qgxcd_gg_",
"_theme_invert": "_theme_invert_qgxcd_gg_",
"_centered": "__centered_qgxcd_gg_",
"_size_xxs": "_size_xxs_qgxcd_gg_",
"_size_xs": "_size_xs_qgxcd_gg_",
"_size_s": "_size_s_qgxcd_gg_",
"_size_m": "_size_m_qgxcd_gg_",
"_size_l": "_size_l_qgxcd_gg_",
"_size_xl": "_size_xl_qgxcd_gg_",
"_size_xxl": "_size_xxl_qgxcd_gg_"
});
if (false) {
/*__reshadow_css_start__*/
(0, _core.__css__)(
/*__inner_css_start__*/
"@media (max-width: 768px) {\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxs_15mef_gg_ {\n width: 13px;\n height: 13px;\n border-width: 1.3px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xs_15mef_gg_ {\n width: 20.8px;\n height: 20.8px;\n border-width: 2.6px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_s_15mef_gg_ {\n width: 26px;\n height: 26px;\n border-width: 3.9px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_m_15mef_gg_ {\n width: 31.2px;\n height: 31.2px;\n border-width: 5.2px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_l_15mef_gg_ {\n width: 41.6px;\n height: 41.6px;\n border-width: 7.8px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xl_15mef_gg_ {\n width: 62.4px;\n height: 62.4px;\n border-width: 10.4px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxl_15mef_gg_ {\n width: 93.6px;\n height: 93.6px;\n border-width: 13px;\n}}"
/*__inner_css_end__*/
, "gpinta_gg_")
/*__reshadow_css_end__*/
;
}
function getThemeColor(theme) {

@@ -89,57 +78,40 @@ switch (theme) {

var styled_c8 = (0, _core.create)([(
/*__reshadow_css_start__*/
(0, _core.__css__)(
/*__inner_css_start__*/
".___SSpin_9lp5w_gg_{color:var(--18595ct_0)}"
/*__inner_css_end__*/
, "1sy6yxi_gg_")
/*__reshadow_css_end__*/
, {
"__SSpin": "___SSpin_9lp5w_gg_"
})]);
var RootSpin = /*#__PURE__*/function (_Component) {
(0, _inherits2["default"])(RootSpin, _Component);
var Spin = /*#__PURE__*/function (_Component) {
(0, _inherits2["default"])(Spin, _Component);
var _super = _createSuper(RootSpin);
var _super = _createSuper(Spin);
function Spin() {
(0, _classCallCheck2["default"])(this, Spin);
function RootSpin() {
(0, _classCallCheck2["default"])(this, RootSpin);
return _super.apply(this, arguments);
}
(0, _createClass2["default"])(Spin, [{
(0, _createClass2["default"])(RootSpin, [{
key: "render",
value: function render() {
var SSpin = this.Root;
var _ref = this ? this.asProps : arguments[0],
_ref2;
var SSpin = _flexBox.Box;
var _this$asProps = this.asProps,
styles = _this$asProps.styles,
size = _this$asProps.size,
theme = _this$asProps.theme,
centered = _this$asProps.centered;
return (0, _core.styled)(((0, _core.set)([styled_c8, styles], {
"--18595ct_0": getThemeColor(theme)
}), /*#__PURE__*/_react["default"].createElement(SSpin, (0, _core.map)("SSpin", {
render: _flexBox.Box,
size: size,
theme: theme,
centered: centered,
$$style: _core.styled.$$style
}))));
theme = _this$asProps.theme;
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SSpin, _ref2.cn("SSpin", _objectSpread({}, (0, _core.assignProps)({
"theme": theme,
"color": getThemeColor(theme)
}, _ref))));
}
}]);
return Spin;
return RootSpin;
}(_core.Component);
(0, _defineProperty2["default"])(Spin, "displayName", 'Spin');
(0, _defineProperty2["default"])(Spin, "style", style);
(0, _defineProperty2["default"])(Spin, "defaultProps", {
(0, _defineProperty2["default"])(RootSpin, "displayName", 'Spin');
(0, _defineProperty2["default"])(RootSpin, "style", style);
(0, _defineProperty2["default"])(RootSpin, "defaultProps", {
size: 'm',
theme: 'dark'
});
var _default = (0, _core["default"])(Spin);
var Spin = (0, _core["default"])(RootSpin);
var _default = Spin;
exports["default"] = _default;
//# sourceMappingURL=Spin.js.map

@@ -7,10 +7,15 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _extends from "@babel/runtime/helpers/extends";
import { sstyled as _sstyled } from "@semcore/core";
import { assignProps as _assignProps } from "@semcore/core";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
import React from 'react';
import createComponent, { Component, styled, css, __css__, set, create, map } from '@semcore/core';
import createComponent, { Component, sstyled, Root } from '@semcore/core';
import { Box } from '@semcore/flex-box';

@@ -20,39 +25,26 @@ import resolveColor from '@semcore/utils/lib/color';

/*__reshadow-styles__:"./style/spin.shadow.css"*/
var _ref = (
var style = (
/*__reshadow_css_start__*/
__css__(
_sstyled.insert(
/*__inner_css_start__*/
"@-webkit-keyframes _spin-rotate_15mef_gg_{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes _spin-rotate_15mef_gg_{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.___SSpin_15mef_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_15mef_gg_ .75s linear infinite;animation:_spin-rotate_15mef_gg_ .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}.___SSpin_15mef_gg_.__theme_15mef_gg_.__theme_dark_15mef_gg_{color:rgba(0,0,0,.3)}.___SSpin_15mef_gg_.__theme_15mef_gg_.__theme_invert_15mef_gg_{color:#fff}.___SSpin_15mef_gg_.__centered_15mef_gg_{margin:auto}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxs_15mef_gg_{width:10px;height:10px;border-width:1px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xs_15mef_gg_{width:16px;height:16px;border-width:2px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_s_15mef_gg_{width:20px;height:20px;border-width:3px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_m_15mef_gg_{width:24px;height:24px;border-width:4px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_l_15mef_gg_{width:32px;height:32px;border-width:6px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xl_15mef_gg_{width:48px;height:48px;border-width:8px}.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxl_15mef_gg_{width:72px;height:72px;border-width:10px}"
"@-webkit-keyframes spin-rotate_10k33rc{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin-rotate_10k33rc{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.___SSpin_qgxcd_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation-name:spin-rotate_10k33rc;animation-name:spin-rotate_10k33rc;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-duration:.75s;animation-duration:.75s;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent;color:var(--color_10k33rc)}.___SSpin_qgxcd_gg_._theme_dark_qgxcd_gg_{color:rgba(0,0,0,.3)}.___SSpin_qgxcd_gg_._theme_invert_qgxcd_gg_{color:#fff}.___SSpin_qgxcd_gg_.__centered_qgxcd_gg_{margin:auto}.___SSpin_qgxcd_gg_._size_xxs_qgxcd_gg_{width:10px;height:10px;border-width:1px}.___SSpin_qgxcd_gg_._size_xs_qgxcd_gg_{width:16px;height:16px;border-width:2px}.___SSpin_qgxcd_gg_._size_s_qgxcd_gg_{width:20px;height:20px;border-width:3px}.___SSpin_qgxcd_gg_._size_m_qgxcd_gg_{width:24px;height:24px;border-width:4px}.___SSpin_qgxcd_gg_._size_l_qgxcd_gg_{width:32px;height:32px;border-width:6px}.___SSpin_qgxcd_gg_._size_xl_qgxcd_gg_{width:48px;height:48px;border-width:8px}.___SSpin_qgxcd_gg_._size_xxl_qgxcd_gg_{width:72px;height:72px;border-width:10px}"
/*__inner_css_end__*/
, "1gfeea9_gg_")
, "10k33rc_gg_")
/*__reshadow_css_end__*/
, {
"__SSpin": "___SSpin_15mef_gg_",
"spin-rotate": "_spin-rotate_15mef_gg_",
"_theme": "__theme_15mef_gg_",
"_theme_dark": "__theme_dark_15mef_gg_",
"_theme_invert": "__theme_invert_15mef_gg_",
"_centered": "__centered_15mef_gg_",
"_size": "__size_15mef_gg_",
"_size_xxs": "__size_xxs_15mef_gg_",
"_size_xs": "__size_xs_15mef_gg_",
"_size_s": "__size_s_15mef_gg_",
"_size_m": "__size_m_15mef_gg_",
"_size_l": "__size_l_15mef_gg_",
"_size_xl": "__size_xl_15mef_gg_",
"_size_xxl": "__size_xxl_15mef_gg_"
}),
style = _extends({}, _ref);
"@spin-rotate": "spin-rotate_10k33rc",
"__SSpin": "___SSpin_qgxcd_gg_",
"--color": "--color_10k33rc",
"_theme_dark": "_theme_dark_qgxcd_gg_",
"_theme_invert": "_theme_invert_qgxcd_gg_",
"_centered": "__centered_qgxcd_gg_",
"_size_xxs": "_size_xxs_qgxcd_gg_",
"_size_xs": "_size_xs_qgxcd_gg_",
"_size_s": "_size_s_qgxcd_gg_",
"_size_m": "_size_m_qgxcd_gg_",
"_size_l": "_size_l_qgxcd_gg_",
"_size_xl": "_size_xl_qgxcd_gg_",
"_size_xxl": "_size_xxl_qgxcd_gg_"
});
if (false) {
/*__reshadow_css_start__*/
__css__(
/*__inner_css_start__*/
"@media (max-width: 768px) {\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxs_15mef_gg_ {\n width: 13px;\n height: 13px;\n border-width: 1.3px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xs_15mef_gg_ {\n width: 20.8px;\n height: 20.8px;\n border-width: 2.6px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_s_15mef_gg_ {\n width: 26px;\n height: 26px;\n border-width: 3.9px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_m_15mef_gg_ {\n width: 31.2px;\n height: 31.2px;\n border-width: 5.2px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_l_15mef_gg_ {\n width: 41.6px;\n height: 41.6px;\n border-width: 7.8px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xl_15mef_gg_ {\n width: 62.4px;\n height: 62.4px;\n border-width: 10.4px;\n}\n\n.___SSpin_15mef_gg_.__size_15mef_gg_.__size_xxl_15mef_gg_ {\n width: 93.6px;\n height: 93.6px;\n border-width: 13px;\n}}"
/*__inner_css_end__*/
, "gpinta_gg_")
/*__reshadow_css_end__*/
;
}
function getThemeColor(theme) {

@@ -69,54 +61,38 @@ switch (theme) {

var styled_c8 = create([(
/*__reshadow_css_start__*/
__css__(
/*__inner_css_start__*/
".___SSpin_9lp5w_gg_{color:var(--18595ct_0)}"
/*__inner_css_end__*/
, "1sy6yxi_gg_")
/*__reshadow_css_end__*/
, {
"__SSpin": "___SSpin_9lp5w_gg_"
})]);
var RootSpin = /*#__PURE__*/function (_Component) {
_inherits(RootSpin, _Component);
var Spin = /*#__PURE__*/function (_Component) {
_inherits(Spin, _Component);
var _super = _createSuper(RootSpin);
var _super = _createSuper(Spin);
function RootSpin() {
_classCallCheck(this, RootSpin);
function Spin() {
_classCallCheck(this, Spin);
return _super.apply(this, arguments);
}
_createClass(Spin, [{
_createClass(RootSpin, [{
key: "render",
value: function render() {
var SSpin = this.Root;
var _ref = this ? this.asProps : arguments[0],
_ref2;
var SSpin = Box;
var _this$asProps = this.asProps,
styles = _this$asProps.styles,
size = _this$asProps.size,
theme = _this$asProps.theme,
centered = _this$asProps.centered;
return styled((set([styled_c8, styles], {
"--18595ct_0": getThemeColor(theme)
}), /*#__PURE__*/React.createElement(SSpin, map("SSpin", {
render: Box,
size: size,
theme: theme,
centered: centered,
$$style: styled.$$style
}))));
theme = _this$asProps.theme;
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(SSpin, _ref2.cn("SSpin", _objectSpread({}, _assignProps({
"theme": theme,
"color": getThemeColor(theme)
}, _ref))));
}
}]);
return Spin;
return RootSpin;
}(Component);
_defineProperty(Spin, "displayName", 'Spin');
_defineProperty(RootSpin, "displayName", 'Spin');
_defineProperty(Spin, "style", style);
_defineProperty(RootSpin, "style", style);
_defineProperty(Spin, "defaultProps", {
_defineProperty(RootSpin, "defaultProps", {
size: 'm',

@@ -126,3 +102,4 @@ theme: 'dark'

export default createComponent(Spin);
var Spin = createComponent(RootSpin);
export default Spin;
//# sourceMappingURL=Spin.js.map

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

export { default } from './Spin';
export * from './Spin';
import React from 'react';
import { CProps, ReturnEl } from '@semcore/core';
import { IBoxProps } from '@semcore/flex-box';
export interface ISpinProps extends IBoxProps {
/** Spinner size
* @default m
**/
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
/** Spinner theme. There are several default themes or you can use your own color
* @default dark
**/
theme?: 'dark' | 'invert' | string;
/** Whether the spinner should be in the center of the parent.
* This works for a nested spinner in flex,
* otherwise only horizontal alignment will occur.
* */
centered?: boolean;
}
declare const Spin: <T>(props: CProps<ISpinProps & T>) => ReturnEl;
export default Spin;
{
"name": "@semcore/spin",
"description": "SEMRush Spin Component",
"version": "3.1.0",
"version": "3.1.1",
"main": "lib/cjs/index.js",

@@ -11,3 +11,3 @@ "module": "lib/es6/index.js",

"scripts": {
"build": "build",
"build": "build --source=js",
"test": "jest"

@@ -20,3 +20,3 @@ },

"peerDependencies": {
"@semcore/core": "^1",
"@semcore/core": "^1.11",
"react": "16.8 - 17"

@@ -23,0 +23,0 @@ },

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

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

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