@mysugr/spring-core
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -10,3 +10,32 @@ 'use strict'; | ||
function styleInject(css, ref) { | ||
if ( ref === void 0 ) ref = {}; | ||
var insertAt = ref.insertAt; | ||
if (!css || typeof document === 'undefined') { return; } | ||
var head = document.head || document.getElementsByTagName('head')[0]; | ||
var style = document.createElement('style'); | ||
style.type = 'text/css'; | ||
if (insertAt === 'top') { | ||
if (head.firstChild) { | ||
head.insertBefore(style, head.firstChild); | ||
} else { | ||
head.appendChild(style); | ||
} | ||
} else { | ||
head.appendChild(style); | ||
} | ||
if (style.styleSheet) { | ||
style.styleSheet.cssText = css; | ||
} else { | ||
style.appendChild(document.createTextNode(css)); | ||
} | ||
} | ||
var css = ".Button_button__3_Ozh {\n font-family: \"Brandon Text\", \"Trebuchet MS\", sans-serif;\n font-size: 1rem;\n font-weight: 400;\n background-color: #8eb927;\n border-radius: 6px;\n border: 0;\n color: white;\n cursor: pointer;\n line-height: 36px;\n min-width: 72px;\n padding: 0 8px;\n position: relative;\n transition: background-color 0.1s ease-in; }\n @media screen and (min-width: 768px) {\n .Button_button__3_Ozh {\n font-size: 1rem; } }\n @media screen and (min-width: 1024px) {\n .Button_button__3_Ozh {\n font-size: 1.0625rem; } }\n @media screen and (min-weight: 768px) {\n .Button_button__3_Ozh {\n font-weight: 400; } }\n @media screen and (min-weight: 1024px) {\n .Button_button__3_Ozh {\n font-weight: 500; } }\n .Button_button__3_Ozh::before {\n border-radius: 6px;\n border: 2px solid #8eb927;\n content: ' ';\n height: calc(100% - 8px);\n left: 2px;\n position: absolute;\n top: 2px;\n transition: border-color 0.1s ease-in;\n width: calc(100% - 8px); }\n .Button_button__3_Ozh:hover {\n background-color: #72951f; }\n .Button_button__3_Ozh:hover::before {\n border-color: #72951f; }\n .Button_button__3_Ozh.Button_focus__6iQfE, .Button_button__3_Ozh:focus {\n background-color: #8eb927; }\n .Button_button__3_Ozh.Button_focus__6iQfE::before, .Button_button__3_Ozh:focus::before {\n border-color: white; }\n\n.Button_large__1AC7w {\n font-size: 1.125rem;\n line-height: 44px;\n min-width: 88px;\n padding-left: 10px;\n padding-right: 10px; }\n @media screen and (min-width: 768px) {\n .Button_large__1AC7w {\n font-size: 1.125rem; } }\n @media screen and (min-width: 1024px) {\n .Button_large__1AC7w {\n font-size: 1.19531rem; } }\n\n.Button_slim__3DaeJ {\n font-size: 0.875rem;\n line-height: 30px; }\n @media screen and (min-width: 768px) {\n .Button_slim__3DaeJ {\n font-size: 0.875rem; } }\n @media screen and (min-width: 1024px) {\n .Button_slim__3DaeJ {\n font-size: 0.92969rem; } }\n\n.Button_line__2JqtO {\n background-color: transparent;\n color: #8eb927; }\n .Button_line__2JqtO:hover {\n background-color: #f3f8e9; }\n .Button_line__2JqtO:hover::before {\n border-color: #8eb927; }\n .Button_line__2JqtO.Button_focus__6iQfE, .Button_line__2JqtO:focus {\n background-color: transparent;\n color: #72951f; }\n .Button_line__2JqtO.Button_focus__6iQfE::before, .Button_line__2JqtO:focus::before {\n border-color: #72951f; }\n\n.Button_text__74Hf2 {\n background-color: transparent;\n color: #8eb927; }\n .Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_text__74Hf2:hover {\n background-color: transparent;\n color: #72951f; }\n .Button_text__74Hf2:hover::before {\n border-color: transparent; }\n .Button_text__74Hf2.Button_focus__6iQfE, .Button_text__74Hf2:focus {\n background-color: transparent; }\n .Button_text__74Hf2.Button_focus__6iQfE::before, .Button_text__74Hf2:focus::before {\n border-color: transparent; }\n\n.Button_inverse__11bW2 {\n background-color: #ffffff;\n color: #8eb927; }\n .Button_inverse__11bW2::before {\n border-color: #ffffff; }\n .Button_inverse__11bW2:hover {\n background-color: #ffffff;\n color: #72951f; }\n .Button_inverse__11bW2:hover::before {\n border-color: #ffffff; }\n .Button_inverse__11bW2.Button_focus__6iQfE, .Button_inverse__11bW2:focus {\n background-color: #ffffff; }\n\n.Button_secondary__3Hm6m {\n background-color: #ff8819; }\n .Button_secondary__3Hm6m::before {\n border-color: #ff8819; }\n .Button_secondary__3Hm6m:hover {\n background-color: #e07716; }\n .Button_secondary__3Hm6m:hover::before {\n border-color: #e07716; }\n .Button_secondary__3Hm6m.Button_focus__6iQfE, .Button_secondary__3Hm6m:focus {\n background-color: #ff8819; }\n .Button_secondary__3Hm6m.Button_focus__6iQfE::before, .Button_secondary__3Hm6m:focus::before {\n border-color: white; }\n .Button_secondary__3Hm6m.Button_line__2JqtO {\n background-color: transparent;\n color: #ff8819; }\n .Button_secondary__3Hm6m.Button_line__2JqtO:hover {\n background-color: #fff3e8; }\n .Button_secondary__3Hm6m.Button_line__2JqtO.Button_focus__6iQfE, .Button_secondary__3Hm6m.Button_line__2JqtO:focus {\n color: #e07716; }\n .Button_secondary__3Hm6m.Button_line__2JqtO.Button_focus__6iQfE::before, .Button_secondary__3Hm6m.Button_line__2JqtO:focus::before {\n border-color: #e07716; }\n .Button_secondary__3Hm6m.Button_text__74Hf2 {\n background-color: transparent;\n color: #ff8819; }\n .Button_secondary__3Hm6m.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_secondary__3Hm6m.Button_text__74Hf2:hover {\n color: #e07716; }\n\n.Button_tertiary__1vMCD {\n background-color: #479d95; }\n .Button_tertiary__1vMCD::before {\n border-color: #479d95; }\n .Button_tertiary__1vMCD:hover {\n background-color: #088e85; }\n .Button_tertiary__1vMCD:hover::before {\n border-color: #088e85; }\n .Button_tertiary__1vMCD.Button_focus__6iQfE, .Button_tertiary__1vMCD:focus {\n background-color: #479d95; }\n .Button_tertiary__1vMCD.Button_focus__6iQfE::before, .Button_tertiary__1vMCD:focus::before {\n border-color: white; }\n .Button_tertiary__1vMCD.Button_line__2JqtO {\n background-color: transparent;\n color: #479d95; }\n .Button_tertiary__1vMCD.Button_line__2JqtO:hover {\n background-color: #edf5f4; }\n .Button_tertiary__1vMCD.Button_line__2JqtO.Button_focus__6iQfE, .Button_tertiary__1vMCD.Button_line__2JqtO:focus {\n color: #088e85; }\n .Button_tertiary__1vMCD.Button_line__2JqtO.Button_focus__6iQfE::before, .Button_tertiary__1vMCD.Button_line__2JqtO:focus::before {\n border-color: #088e85; }\n .Button_tertiary__1vMCD.Button_text__74Hf2 {\n background-color: transparent;\n color: #479d95; }\n .Button_tertiary__1vMCD.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_tertiary__1vMCD.Button_text__74Hf2:hover {\n color: #088e85; }\n\n.Button_button__3_Ozh.Button_disabled__3O5v9 {\n background-color: #c4c2c2;\n cursor: not-allowed; }\n .Button_button__3_Ozh.Button_disabled__3O5v9::before {\n border-color: #c4c2c2; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_line__2JqtO {\n background-color: transparent;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_line__2JqtO::before {\n border-color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_text__74Hf2 {\n background-color: transparent;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_inverse__11bW2 {\n background-color: #ffffff;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_inverse__11bW2::before {\n border-color: #ffffff; }\n"; | ||
var Button = {"button":"Button_button__3_Ozh","focus":"Button_focus__6iQfE","large":"Button_large__1AC7w","slim":"Button_slim__3DaeJ","line":"Button_line__2JqtO","text":"Button_text__74Hf2","inverse":"Button_inverse__11bW2","secondary":"Button_secondary__3Hm6m","tertiary":"Button_tertiary__1vMCD","disabled":"Button_disabled__3O5v9"}; | ||
styleInject(css); | ||
@@ -18,3 +47,3 @@ var styles = /*#__PURE__*/Object.freeze({ | ||
// This is the only way to make CSS Modules work with Rollup and Jest | ||
var css = undefined ? styles : Button; | ||
var css$1 = undefined ? styles : Button; | ||
var ERR_FOCUS_DISABLED = 'Can not combine focus and disabled props on a single button.'; | ||
@@ -47,12 +76,12 @@ var ERR_SECONDARY_TERTIARY = 'Can not combine secondary and tertiary props on a single button.'; | ||
} | ||
return (React.createElement("button", { className: classNames(css.button, (_b = {}, | ||
_b[css.disabled] = disabled, | ||
_b[css.focus] = focus, | ||
_b[css.inverse] = inverse, | ||
_b[css.large] = large, | ||
_b[css.line] = line, | ||
_b[css.secondary] = secondary, | ||
_b[css.slim] = slim, | ||
_b[css.tertiary] = tertiary, | ||
_b[css.text] = text, | ||
return (React.createElement("button", { className: classNames(css$1.button, (_b = {}, | ||
_b[css$1.disabled] = disabled, | ||
_b[css$1.focus] = focus, | ||
_b[css$1.inverse] = inverse, | ||
_b[css$1.large] = large, | ||
_b[css$1.line] = line, | ||
_b[css$1.secondary] = secondary, | ||
_b[css$1.slim] = slim, | ||
_b[css$1.tertiary] = tertiary, | ||
_b[css$1.text] = text, | ||
_b)), disabled: disabled, onClick: onClick }, children)); | ||
@@ -59,0 +88,0 @@ }; |
import classNames from 'classnames'; | ||
import { createElement } from 'react'; | ||
function styleInject(css, ref) { | ||
if ( ref === void 0 ) ref = {}; | ||
var insertAt = ref.insertAt; | ||
if (!css || typeof document === 'undefined') { return; } | ||
var head = document.head || document.getElementsByTagName('head')[0]; | ||
var style = document.createElement('style'); | ||
style.type = 'text/css'; | ||
if (insertAt === 'top') { | ||
if (head.firstChild) { | ||
head.insertBefore(style, head.firstChild); | ||
} else { | ||
head.appendChild(style); | ||
} | ||
} else { | ||
head.appendChild(style); | ||
} | ||
if (style.styleSheet) { | ||
style.styleSheet.cssText = css; | ||
} else { | ||
style.appendChild(document.createTextNode(css)); | ||
} | ||
} | ||
var css = ".Button_button__3_Ozh {\n font-family: \"Brandon Text\", \"Trebuchet MS\", sans-serif;\n font-size: 1rem;\n font-weight: 400;\n background-color: #8eb927;\n border-radius: 6px;\n border: 0;\n color: white;\n cursor: pointer;\n line-height: 36px;\n min-width: 72px;\n padding: 0 8px;\n position: relative;\n transition: background-color 0.1s ease-in; }\n @media screen and (min-width: 768px) {\n .Button_button__3_Ozh {\n font-size: 1rem; } }\n @media screen and (min-width: 1024px) {\n .Button_button__3_Ozh {\n font-size: 1.0625rem; } }\n @media screen and (min-weight: 768px) {\n .Button_button__3_Ozh {\n font-weight: 400; } }\n @media screen and (min-weight: 1024px) {\n .Button_button__3_Ozh {\n font-weight: 500; } }\n .Button_button__3_Ozh::before {\n border-radius: 6px;\n border: 2px solid #8eb927;\n content: ' ';\n height: calc(100% - 8px);\n left: 2px;\n position: absolute;\n top: 2px;\n transition: border-color 0.1s ease-in;\n width: calc(100% - 8px); }\n .Button_button__3_Ozh:hover {\n background-color: #72951f; }\n .Button_button__3_Ozh:hover::before {\n border-color: #72951f; }\n .Button_button__3_Ozh.Button_focus__6iQfE, .Button_button__3_Ozh:focus {\n background-color: #8eb927; }\n .Button_button__3_Ozh.Button_focus__6iQfE::before, .Button_button__3_Ozh:focus::before {\n border-color: white; }\n\n.Button_large__1AC7w {\n font-size: 1.125rem;\n line-height: 44px;\n min-width: 88px;\n padding-left: 10px;\n padding-right: 10px; }\n @media screen and (min-width: 768px) {\n .Button_large__1AC7w {\n font-size: 1.125rem; } }\n @media screen and (min-width: 1024px) {\n .Button_large__1AC7w {\n font-size: 1.19531rem; } }\n\n.Button_slim__3DaeJ {\n font-size: 0.875rem;\n line-height: 30px; }\n @media screen and (min-width: 768px) {\n .Button_slim__3DaeJ {\n font-size: 0.875rem; } }\n @media screen and (min-width: 1024px) {\n .Button_slim__3DaeJ {\n font-size: 0.92969rem; } }\n\n.Button_line__2JqtO {\n background-color: transparent;\n color: #8eb927; }\n .Button_line__2JqtO:hover {\n background-color: #f3f8e9; }\n .Button_line__2JqtO:hover::before {\n border-color: #8eb927; }\n .Button_line__2JqtO.Button_focus__6iQfE, .Button_line__2JqtO:focus {\n background-color: transparent;\n color: #72951f; }\n .Button_line__2JqtO.Button_focus__6iQfE::before, .Button_line__2JqtO:focus::before {\n border-color: #72951f; }\n\n.Button_text__74Hf2 {\n background-color: transparent;\n color: #8eb927; }\n .Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_text__74Hf2:hover {\n background-color: transparent;\n color: #72951f; }\n .Button_text__74Hf2:hover::before {\n border-color: transparent; }\n .Button_text__74Hf2.Button_focus__6iQfE, .Button_text__74Hf2:focus {\n background-color: transparent; }\n .Button_text__74Hf2.Button_focus__6iQfE::before, .Button_text__74Hf2:focus::before {\n border-color: transparent; }\n\n.Button_inverse__11bW2 {\n background-color: #ffffff;\n color: #8eb927; }\n .Button_inverse__11bW2::before {\n border-color: #ffffff; }\n .Button_inverse__11bW2:hover {\n background-color: #ffffff;\n color: #72951f; }\n .Button_inverse__11bW2:hover::before {\n border-color: #ffffff; }\n .Button_inverse__11bW2.Button_focus__6iQfE, .Button_inverse__11bW2:focus {\n background-color: #ffffff; }\n\n.Button_secondary__3Hm6m {\n background-color: #ff8819; }\n .Button_secondary__3Hm6m::before {\n border-color: #ff8819; }\n .Button_secondary__3Hm6m:hover {\n background-color: #e07716; }\n .Button_secondary__3Hm6m:hover::before {\n border-color: #e07716; }\n .Button_secondary__3Hm6m.Button_focus__6iQfE, .Button_secondary__3Hm6m:focus {\n background-color: #ff8819; }\n .Button_secondary__3Hm6m.Button_focus__6iQfE::before, .Button_secondary__3Hm6m:focus::before {\n border-color: white; }\n .Button_secondary__3Hm6m.Button_line__2JqtO {\n background-color: transparent;\n color: #ff8819; }\n .Button_secondary__3Hm6m.Button_line__2JqtO:hover {\n background-color: #fff3e8; }\n .Button_secondary__3Hm6m.Button_line__2JqtO.Button_focus__6iQfE, .Button_secondary__3Hm6m.Button_line__2JqtO:focus {\n color: #e07716; }\n .Button_secondary__3Hm6m.Button_line__2JqtO.Button_focus__6iQfE::before, .Button_secondary__3Hm6m.Button_line__2JqtO:focus::before {\n border-color: #e07716; }\n .Button_secondary__3Hm6m.Button_text__74Hf2 {\n background-color: transparent;\n color: #ff8819; }\n .Button_secondary__3Hm6m.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_secondary__3Hm6m.Button_text__74Hf2:hover {\n color: #e07716; }\n\n.Button_tertiary__1vMCD {\n background-color: #479d95; }\n .Button_tertiary__1vMCD::before {\n border-color: #479d95; }\n .Button_tertiary__1vMCD:hover {\n background-color: #088e85; }\n .Button_tertiary__1vMCD:hover::before {\n border-color: #088e85; }\n .Button_tertiary__1vMCD.Button_focus__6iQfE, .Button_tertiary__1vMCD:focus {\n background-color: #479d95; }\n .Button_tertiary__1vMCD.Button_focus__6iQfE::before, .Button_tertiary__1vMCD:focus::before {\n border-color: white; }\n .Button_tertiary__1vMCD.Button_line__2JqtO {\n background-color: transparent;\n color: #479d95; }\n .Button_tertiary__1vMCD.Button_line__2JqtO:hover {\n background-color: #edf5f4; }\n .Button_tertiary__1vMCD.Button_line__2JqtO.Button_focus__6iQfE, .Button_tertiary__1vMCD.Button_line__2JqtO:focus {\n color: #088e85; }\n .Button_tertiary__1vMCD.Button_line__2JqtO.Button_focus__6iQfE::before, .Button_tertiary__1vMCD.Button_line__2JqtO:focus::before {\n border-color: #088e85; }\n .Button_tertiary__1vMCD.Button_text__74Hf2 {\n background-color: transparent;\n color: #479d95; }\n .Button_tertiary__1vMCD.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_tertiary__1vMCD.Button_text__74Hf2:hover {\n color: #088e85; }\n\n.Button_button__3_Ozh.Button_disabled__3O5v9 {\n background-color: #c4c2c2;\n cursor: not-allowed; }\n .Button_button__3_Ozh.Button_disabled__3O5v9::before {\n border-color: #c4c2c2; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_line__2JqtO {\n background-color: transparent;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_line__2JqtO::before {\n border-color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_text__74Hf2 {\n background-color: transparent;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_text__74Hf2::before {\n border-color: transparent; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_inverse__11bW2 {\n background-color: #ffffff;\n color: #a3a3a3; }\n .Button_button__3_Ozh.Button_disabled__3O5v9.Button_inverse__11bW2::before {\n border-color: #ffffff; }\n"; | ||
var Button = {"button":"Button_button__3_Ozh","focus":"Button_focus__6iQfE","large":"Button_large__1AC7w","slim":"Button_slim__3DaeJ","line":"Button_line__2JqtO","text":"Button_text__74Hf2","inverse":"Button_inverse__11bW2","secondary":"Button_secondary__3Hm6m","tertiary":"Button_tertiary__1vMCD","disabled":"Button_disabled__3O5v9"}; | ||
styleInject(css); | ||
@@ -11,3 +40,3 @@ var styles = /*#__PURE__*/Object.freeze({ | ||
// This is the only way to make CSS Modules work with Rollup and Jest | ||
var css = undefined ? styles : Button; | ||
var css$1 = undefined ? styles : Button; | ||
var ERR_FOCUS_DISABLED = 'Can not combine focus and disabled props on a single button.'; | ||
@@ -40,12 +69,12 @@ var ERR_SECONDARY_TERTIARY = 'Can not combine secondary and tertiary props on a single button.'; | ||
} | ||
return (createElement("button", { className: classNames(css.button, (_b = {}, | ||
_b[css.disabled] = disabled, | ||
_b[css.focus] = focus, | ||
_b[css.inverse] = inverse, | ||
_b[css.large] = large, | ||
_b[css.line] = line, | ||
_b[css.secondary] = secondary, | ||
_b[css.slim] = slim, | ||
_b[css.tertiary] = tertiary, | ||
_b[css.text] = text, | ||
return (createElement("button", { className: classNames(css$1.button, (_b = {}, | ||
_b[css$1.disabled] = disabled, | ||
_b[css$1.focus] = focus, | ||
_b[css$1.inverse] = inverse, | ||
_b[css$1.large] = large, | ||
_b[css$1.line] = line, | ||
_b[css$1.secondary] = secondary, | ||
_b[css$1.slim] = slim, | ||
_b[css$1.tertiary] = tertiary, | ||
_b[css$1.text] = text, | ||
_b)), disabled: disabled, onClick: onClick }, children)); | ||
@@ -52,0 +81,0 @@ }; |
@@ -18,3 +18,3 @@ { | ||
"watch": "rollup -c -w", | ||
"clean": "rm -rf ./dist" | ||
"clean": "rm -rf ./dist ./coverage" | ||
}, | ||
@@ -24,4 +24,4 @@ "peerDependencies": { | ||
}, | ||
"version": "0.6.0", | ||
"gitHead": "d1567444a5c6fc43441ee338ca6d2b38282bdcf0" | ||
"version": "0.7.0", | ||
"gitHead": "9c41764b47a1be83a47e4eb4d734fc85cf39eac6" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28557
11
221
3