@semcore/spin
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -5,2 +5,14 @@ # Changelog | ||
## [2.1.0] - 2019-11-14 | ||
### Added | ||
- Добавлена адаптивность на маленьких экранах(< 768px) | ||
## [2.0.2] - 2019-09-30 | ||
### Changed | ||
- Нужные зависимости перенесены в `utils`, размер должен стать меньше | ||
## [2.0.1] - 2019-05-13 | ||
@@ -7,0 +19,0 @@ |
@@ -14,35 +14,14 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread'; | ||
var data = { | ||
"block": { | ||
"block": "_spin_1poqh_12", | ||
"centered": { | ||
"block": "_spin--centered_1poqh_23" | ||
}, | ||
"theme": { | ||
"dark": "_spin--theme_dark_1poqh_27", | ||
"invert": "_spin--theme_invert_1poqh_30" | ||
}, | ||
"size": { | ||
"xxs": "_spin--size_xxs_1poqh_34", | ||
"xs": "_spin--size_xs_1poqh_40", | ||
"s": "_spin--size_s_1poqh_46", | ||
"m": "_spin--size_m_1poqh_52", | ||
"l": "_spin--size_l_1poqh_58", | ||
"xl": "_spin--size_xl_1poqh_64", | ||
"xxl": "_spin--size_xxl_1poqh_70" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject() { | ||
if (typeof window !== 'undefined') { | ||
(function cssModulesFnInject(_path) { | ||
if (_path && typeof window !== 'undefined') { | ||
var head = window.document.head; | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "@-webkit-keyframes _spin-rotate_rius_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_rius_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_rius_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_rius_1 .75s linear infinite;animation:_spin-rotate_rius_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_rius_23{margin:auto}._spin--theme_dark_rius_27{color:rgba(0,0,0,.3)}._spin--theme_invert_rius_30{color:#fff}._spin--size_xxs_rius_34{width:.83333rem;height:.83333rem;border-width:.08333rem}._spin--size_xs_rius_40{width:1.33333rem;height:1.33333rem;border-width:.16666rem}._spin--size_s_rius_46{width:1.66666rem;height:1.66666rem;border-width:.25rem}._spin--size_m_rius_52{width:2rem;height:2rem;border-width:.33333rem}._spin--size_l_rius_58{width:2.66666rem;height:2.66666rem;border-width:.5rem}._spin--size_xl_rius_64{width:4rem;height:4rem;border-width:.66666rem}._spin--size_xxl_rius_70{width:6rem;height:6rem;border-width:.83333rem}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "@-webkit-keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_1poqh_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1poqh_1 .75s linear infinite;animation:_spin-rotate_1poqh_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_1poqh_23{margin:auto}._spin--theme_dark_1poqh_27{color:rgba(0,0,0,.3)}._spin--theme_invert_1poqh_30{color:#fff}._spin--size_xxs_1poqh_34{width:10px;height:10px;border-width:1px}._spin--size_xs_1poqh_40{width:16px;height:16px;border-width:2px}._spin--size_s_1poqh_46{width:20px;height:20px;border-width:3px}._spin--size_m_1poqh_52{width:24px;height:24px;border-width:4px}._spin--size_l_1poqh_58{width:32px;height:32px;border-width:6px}._spin--size_xl_1poqh_64{width:48px;height:48px;border-width:8px}._spin--size_xxl_1poqh_70{width:72px;height:72px;border-width:10px}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "@-webkit-keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_1poqh_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1poqh_1 .75s linear infinite;animation:_spin-rotate_1poqh_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_1poqh_23{margin:auto}._spin--theme_dark_1poqh_27{color:rgba(0,0,0,.3)}._spin--theme_invert_1poqh_30{color:#fff}._spin--size_xxs_1poqh_34{width:10px;height:10px;border-width:1px}._spin--size_xs_1poqh_40{width:16px;height:16px;border-width:2px}._spin--size_s_1poqh_46{width:20px;height:20px;border-width:3px}._spin--size_m_1poqh_52{width:24px;height:24px;border-width:4px}._spin--size_l_1poqh_58{width:32px;height:32px;border-width:6px}._spin--size_xl_1poqh_64{width:48px;height:48px;border-width:8px}._spin--size_xxl_1poqh_70{width:72px;height:72px;border-width:10px}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -54,18 +33,28 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_spin_rius_12'; | ||
} | ||
block['centered'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['centered'][value]; | ||
block['centered'] = function (value) { | ||
return { | ||
"block": "_spin--centered_rius_23" | ||
}[value || 'block']; | ||
}; | ||
block['theme'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['theme'][value]; | ||
block['theme'] = function (value) { | ||
return { | ||
"dark": "_spin--theme_dark_rius_27", | ||
"invert": "_spin--theme_invert_rius_30" | ||
}[value || 'block']; | ||
}; | ||
block['size'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['size'][value]; | ||
block['size'] = function (value) { | ||
return { | ||
"xxs": "_spin--size_xxs_rius_34", | ||
"xs": "_spin--size_xs_rius_40", | ||
"s": "_spin--size_s_rius_46", | ||
"m": "_spin--size_m_rius_52", | ||
"l": "_spin--size_l_rius_58", | ||
"xl": "_spin--size_xl_rius_64", | ||
"xxl": "_spin--size_xxl_rius_70" | ||
}[value || 'block']; | ||
}; | ||
@@ -72,0 +61,0 @@ |
@@ -21,35 +21,14 @@ 'use strict'; | ||
var data = { | ||
"block": { | ||
"block": "_spin_1poqh_12", | ||
"centered": { | ||
"block": "_spin--centered_1poqh_23" | ||
}, | ||
"theme": { | ||
"dark": "_spin--theme_dark_1poqh_27", | ||
"invert": "_spin--theme_invert_1poqh_30" | ||
}, | ||
"size": { | ||
"xxs": "_spin--size_xxs_1poqh_34", | ||
"xs": "_spin--size_xs_1poqh_40", | ||
"s": "_spin--size_s_1poqh_46", | ||
"m": "_spin--size_m_1poqh_52", | ||
"l": "_spin--size_l_1poqh_58", | ||
"xl": "_spin--size_xl_1poqh_64", | ||
"xxl": "_spin--size_xxl_1poqh_70" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject() { | ||
if (typeof window !== 'undefined') { | ||
(function cssModulesFnInject(_path) { | ||
if (_path && typeof window !== 'undefined') { | ||
var head = window.document.head; | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "@-webkit-keyframes _spin-rotate_rius_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_rius_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_rius_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_rius_1 .75s linear infinite;animation:_spin-rotate_rius_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_rius_23{margin:auto}._spin--theme_dark_rius_27{color:rgba(0,0,0,.3)}._spin--theme_invert_rius_30{color:#fff}._spin--size_xxs_rius_34{width:.83333rem;height:.83333rem;border-width:.08333rem}._spin--size_xs_rius_40{width:1.33333rem;height:1.33333rem;border-width:.16666rem}._spin--size_s_rius_46{width:1.66666rem;height:1.66666rem;border-width:.25rem}._spin--size_m_rius_52{width:2rem;height:2rem;border-width:.33333rem}._spin--size_l_rius_58{width:2.66666rem;height:2.66666rem;border-width:.5rem}._spin--size_xl_rius_64{width:4rem;height:4rem;border-width:.66666rem}._spin--size_xxl_rius_70{width:6rem;height:6rem;border-width:.83333rem}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "@-webkit-keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_1poqh_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1poqh_1 .75s linear infinite;animation:_spin-rotate_1poqh_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_1poqh_23{margin:auto}._spin--theme_dark_1poqh_27{color:rgba(0,0,0,.3)}._spin--theme_invert_1poqh_30{color:#fff}._spin--size_xxs_1poqh_34{width:10px;height:10px;border-width:1px}._spin--size_xs_1poqh_40{width:16px;height:16px;border-width:2px}._spin--size_s_1poqh_46{width:20px;height:20px;border-width:3px}._spin--size_m_1poqh_52{width:24px;height:24px;border-width:4px}._spin--size_l_1poqh_58{width:32px;height:32px;border-width:6px}._spin--size_xl_1poqh_64{width:48px;height:48px;border-width:8px}._spin--size_xxl_1poqh_70{width:72px;height:72px;border-width:10px}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "@-webkit-keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1poqh_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_1poqh_12{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1poqh_1 .75s linear infinite;animation:_spin-rotate_1poqh_1 .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_1poqh_23{margin:auto}._spin--theme_dark_1poqh_27{color:rgba(0,0,0,.3)}._spin--theme_invert_1poqh_30{color:#fff}._spin--size_xxs_1poqh_34{width:10px;height:10px;border-width:1px}._spin--size_xs_1poqh_40{width:16px;height:16px;border-width:2px}._spin--size_s_1poqh_46{width:20px;height:20px;border-width:3px}._spin--size_m_1poqh_52{width:24px;height:24px;border-width:4px}._spin--size_l_1poqh_58{width:32px;height:32px;border-width:6px}._spin--size_xl_1poqh_64{width:48px;height:48px;border-width:8px}._spin--size_xxl_1poqh_70{width:72px;height:72px;border-width:10px}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -61,18 +40,28 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_spin_rius_12'; | ||
} | ||
block['centered'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['centered'][value]; | ||
block['centered'] = function (value) { | ||
return { | ||
"block": "_spin--centered_rius_23" | ||
}[value || 'block']; | ||
}; | ||
block['theme'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['theme'][value]; | ||
block['theme'] = function (value) { | ||
return { | ||
"dark": "_spin--theme_dark_rius_27", | ||
"invert": "_spin--theme_invert_rius_30" | ||
}[value || 'block']; | ||
}; | ||
block['size'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['size'][value]; | ||
block['size'] = function (value) { | ||
return { | ||
"xxs": "_spin--size_xxs_rius_34", | ||
"xs": "_spin--size_xs_rius_40", | ||
"s": "_spin--size_s_rius_46", | ||
"m": "_spin--size_m_rius_52", | ||
"l": "_spin--size_l_rius_58", | ||
"xl": "_spin--size_xl_rius_64", | ||
"xxl": "_spin--size_xxl_rius_70" | ||
}[value || 'block']; | ||
}; | ||
@@ -79,0 +68,0 @@ |
@@ -14,3 +14,3 @@ import React, { PureComponent } from 'react'; | ||
* Хорошо работает для вложенного спиннера во `flex`, | ||
* иначе варавнивание произойдет только по горизонтали. | ||
* иначе выравнивание произойдет только по горизонтали. | ||
* */ | ||
@@ -17,0 +17,0 @@ centered?: boolean; |
{ | ||
"name": "@semcore/spin", | ||
"description": "SEMRush Spin Component", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"main": "lib/index.js", | ||
@@ -12,20 +12,9 @@ "module": "lib/index.es.js", | ||
"build": "rollup --config=node:rollup-config-ts", | ||
"test": "jest --no-cache" | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.4", | ||
"@semcore/paint": "^3.1.0", | ||
"@semcore/flex-box": "^3.1.0", | ||
"@types/react": "^16.8.17", | ||
"classnames": "^2.2.6" | ||
"@semcore/utils": "^3.4", | ||
"@semcore/paint": "^3.2", | ||
"@semcore/flex-box": "^3.3" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.4.0" | ||
}, | ||
"devDependencies": { | ||
"babel-preset-ui": "*", | ||
"jest": "*", | ||
"jest-preset-ui": "*", | ||
"react": "^16.4.0" | ||
}, | ||
"jest": { | ||
@@ -32,0 +21,0 @@ "preset": "jest-preset-ui" |
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
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
3
0
3
23823
350
+ Added@semcore/utils@^3.4
- Removed@babel/runtime@^7.4.4
- Removed@types/react@^16.8.17
- Removedclassnames@^2.2.6
- Removed@types/prop-types@15.7.13(transitive)
- Removed@types/react@16.14.62(transitive)
- Removed@types/scheduler@0.16.8(transitive)
- Removedclassnames@2.5.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
Updated@semcore/flex-box@^3.3
Updated@semcore/paint@^3.2