@semcore/spin
Advanced tools
Comparing version 2.1.0 to 2.2.0
# Changelog | ||
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/). | ||
## [2.2.0] 2019-12-12 | ||
### Added | ||
- Поддержка тем | ||
- Возможность подключить адаптивноссть | ||
- Возможность добавить изоляцию стилей | ||
### Changed | ||
- Алгоритм вставки стилей | ||
### Removed | ||
- Относительные единицы измерения | ||
- Адаптивность | ||
## [2.1.0] - 2019-11-14 | ||
@@ -9,3 +32,3 @@ | ||
- Добавлена адаптивность на маленьких экранах(< 768px) | ||
- Добавлена адаптивность на маленьких экранах(<768px) | ||
@@ -12,0 +35,0 @@ ## [2.0.2] - 2019-09-30 |
@@ -1,2 +0,1 @@ | ||
import _objectSpread from '@babel/runtime/helpers/objectSpread'; | ||
import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
@@ -13,22 +12,16 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; | ||
import { Box } from '@semcore/flex-box'; | ||
import injectStyle from '@semcore/utils/lib/injectStyle'; | ||
(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}"; | ||
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; } | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
} | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
(function cssModulesFnInject(_path, _pathMedia) { | ||
if (_path || _pathMedia) { | ||
injectStyle("@-webkit-keyframes _spin-rotate_1g2hf_gg_{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1g2hf_gg_{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_13uah_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1g2hf_gg_ .75s linear infinite;animation:_spin-rotate_1g2hf_gg_ .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_p4umi_gg_{margin:auto}._spin--theme_dark_1j5oh_gg_{color:rgba(0,0,0,.3)}._spin--theme_invert_17nyd_gg_{color:#fff}._spin--size_xxs_2no6t_gg_{width:10px;height:10px;border-width:1px}._spin--size_xs_mlkam_gg_{width:16px;height:16px;border-width:2px}._spin--size_s_1i5aq_gg_{width:20px;height:20px;border-width:3px}._spin--size_m_h8iyx_gg_{width:24px;height:24px;border-width:4px}._spin--size_l_u7u13_gg_{width:32px;height:32px;border-width:6px}._spin--size_xl_15qtb_gg_{width:48px;height:48px;border-width:8px}._spin--size_xxl_l26ux_gg_{width:72px;height:72px;border-width:10px}"); | ||
} | ||
})('./spin.style.css'); | ||
})("@semcore/spin/lib/spin.style.css", "@semcore/spin/lib/spin-media.style.css"); | ||
function block() { | ||
return '_spin_rius_12'; | ||
return '_spin_13uah_gg_'; | ||
} | ||
@@ -38,3 +31,3 @@ | ||
return { | ||
"block": "_spin--centered_rius_23" | ||
"block": "_spin--centered_p4umi_gg_" | ||
}[value || 'block']; | ||
@@ -45,4 +38,4 @@ }; | ||
return { | ||
"dark": "_spin--theme_dark_rius_27", | ||
"invert": "_spin--theme_invert_rius_30" | ||
"dark": "_spin--theme_dark_1j5oh_gg_", | ||
"invert": "_spin--theme_invert_17nyd_gg_" | ||
}[value || 'block']; | ||
@@ -53,9 +46,9 @@ }; | ||
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" | ||
"xxs": "_spin--size_xxs_2no6t_gg_", | ||
"xs": "_spin--size_xs_mlkam_gg_", | ||
"s": "_spin--size_s_1i5aq_gg_", | ||
"m": "_spin--size_m_h8iyx_gg_", | ||
"l": "_spin--size_l_u7u13_gg_", | ||
"xl": "_spin--size_xl_15qtb_gg_", | ||
"xxl": "_spin--size_xxl_l26ux_gg_" | ||
}[value || 'block']; | ||
@@ -62,0 +55,0 @@ }; |
@@ -7,3 +7,2 @@ 'use strict'; | ||
var _objectSpread = _interopDefault(require('@babel/runtime/helpers/objectSpread')); | ||
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty')); | ||
@@ -21,22 +20,16 @@ var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties')); | ||
var flexBox = require('@semcore/flex-box'); | ||
var injectStyle = _interopDefault(require('@semcore/utils/lib/injectStyle')); | ||
(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}"; | ||
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; } | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
} | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
(function cssModulesFnInject(_path, _pathMedia) { | ||
if (_path || _pathMedia) { | ||
injectStyle("@-webkit-keyframes _spin-rotate_1g2hf_gg_{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes _spin-rotate_1g2hf_gg_{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}._spin_13uah_gg_{display:block;flex-shrink:0;box-sizing:border-box;-webkit-animation:_spin-rotate_1g2hf_gg_ .75s linear infinite;animation:_spin-rotate_1g2hf_gg_ .75s linear infinite;border-radius:50%;border-style:solid;border-bottom-color:transparent;border-left-color:transparent}._spin--centered_p4umi_gg_{margin:auto}._spin--theme_dark_1j5oh_gg_{color:rgba(0,0,0,.3)}._spin--theme_invert_17nyd_gg_{color:#fff}._spin--size_xxs_2no6t_gg_{width:10px;height:10px;border-width:1px}._spin--size_xs_mlkam_gg_{width:16px;height:16px;border-width:2px}._spin--size_s_1i5aq_gg_{width:20px;height:20px;border-width:3px}._spin--size_m_h8iyx_gg_{width:24px;height:24px;border-width:4px}._spin--size_l_u7u13_gg_{width:32px;height:32px;border-width:6px}._spin--size_xl_15qtb_gg_{width:48px;height:48px;border-width:8px}._spin--size_xxl_l26ux_gg_{width:72px;height:72px;border-width:10px}"); | ||
} | ||
})('./spin.style.css'); | ||
})("@semcore/spin/lib/spin.style.css", "@semcore/spin/lib/spin-media.style.css"); | ||
function block() { | ||
return '_spin_rius_12'; | ||
return '_spin_13uah_gg_'; | ||
} | ||
@@ -46,3 +39,3 @@ | ||
return { | ||
"block": "_spin--centered_rius_23" | ||
"block": "_spin--centered_p4umi_gg_" | ||
}[value || 'block']; | ||
@@ -53,4 +46,4 @@ }; | ||
return { | ||
"dark": "_spin--theme_dark_rius_27", | ||
"invert": "_spin--theme_invert_rius_30" | ||
"dark": "_spin--theme_dark_1j5oh_gg_", | ||
"invert": "_spin--theme_invert_17nyd_gg_" | ||
}[value || 'block']; | ||
@@ -61,9 +54,9 @@ }; | ||
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" | ||
"xxs": "_spin--size_xxs_2no6t_gg_", | ||
"xs": "_spin--size_xs_mlkam_gg_", | ||
"s": "_spin--size_s_1i5aq_gg_", | ||
"m": "_spin--size_m_h8iyx_gg_", | ||
"l": "_spin--size_l_u7u13_gg_", | ||
"xl": "_spin--size_xl_15qtb_gg_", | ||
"xxl": "_spin--size_xxl_l26ux_gg_" | ||
}[value || 'block']; | ||
@@ -70,0 +63,0 @@ }; |
{ | ||
"name": "@semcore/spin", | ||
"description": "SEMRush Spin Component", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "lib/index.js", | ||
@@ -15,5 +15,5 @@ "module": "lib/index.es.js", | ||
"dependencies": { | ||
"@semcore/utils": "^3.4", | ||
"@semcore/paint": "^3.2", | ||
"@semcore/flex-box": "^3.3" | ||
"@semcore/utils": "^3.5", | ||
"@semcore/paint": "^3.3", | ||
"@semcore/flex-box": "^3.4" | ||
}, | ||
@@ -20,0 +20,0 @@ "jest": { |
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
25958
16
338
Updated@semcore/flex-box@^3.4
Updated@semcore/paint@^3.3
Updated@semcore/utils@^3.5