react-box-text
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -15,3 +15,3 @@ import n from"react";import o from"styled-components"; | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function r(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n}var t,e,d,i,a,l,u={Container:o.div(t||(t=r(["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "],["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "])),(function(n){return"undefined"!==n.backgroundColor?n.backgroundColor:"transparent"}),(function(n){return"undefined"!==n.borderColor?n.borderColor:"#ddd"})),DotOne:o.div(e||(e=r(["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotTwo:o.div(d||(d=r(["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotThree:o.div(i||(i=r(["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotFour:o.div(a||(a=r(["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"}))},s=o.span(l||(l=r(["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"],["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"])),(function(n){return"undefined"!==n.textColor?n.textColor:"inherit"}));function c(o){var r=o.texts,t=o.backgroundColor,e=o.textColor,d=o.borderColor,i=o.dotColor,a=n.useState(r[0]),l=a[0],c=a[1],p=n.useState(0),f=p[0],b=p[1],h=n.useState("fade-in"),x=h[0],g=h[1];return n.useEffect((function(){var n=setInterval((function(){"fade-in"===x?g("fade-out"):(g("fade-in"),f<r.length-1?b(f+1):b(0),c((function(){return r[f]})))}),1e3);return function(){return clearInterval(n)}}),[x,f,r]),n.createElement(u.Container,{backgroundColor:""+t,borderColor:""+d},n.createElement(u.DotOne,{dotColor:""+i}),n.createElement(u.DotTwo,{dotColor:""+i}),n.createElement(u.DotThree,{dotColor:""+i}),n.createElement(u.DotFour,{dotColor:""+i}),n.createElement(s,{textColor:""+e},l))}export default c; | ||
***************************************************************************** */function t(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n}var e,r,d,i,a,l,s={Container:o.div(e||(e=t(["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "],["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "])),(function(n){return"undefined"!==n.backgroundColor?n.backgroundColor:"transparent"}),(function(n){return"undefined"!==n.borderColor?n.borderColor:"#ddd"})),DotOne:o.div(r||(r=t(["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotTwo:o.div(d||(d=t(["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotThree:o.div(i||(i=t(["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotFour:o.div(a||(a=t(["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"}))},u=o.span(l||(l=t(["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"],["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"])),(function(n){return"undefined"!==n.textColor?n.textColor:"inherit"}));function c(o){var t=o.texts,e=o.backgroundColor,r=o.textColor,d=o.borderColor,i=o.dotColor,a=n.useState(t[0]),l=a[0],c=a[1],p=n.useState(0),f=p[0],h=p[1],b=n.useState("fade-in"),x=b[0],g=b[1];return n.useEffect((function(){var n=setInterval((function(){"fade-in"===x?g("fade-out"):(g("fade-in"),f<t.length-1?h(f+1):h(0),c((function(){return t[f]})))}),1e3);return function(){return clearInterval(n)}}),[x,f,t]),n.createElement(s.Container,{backgroundColor:""+e,borderColor:""+d},n.createElement(s.DotOne,{dotColor:""+i}),n.createElement(s.DotTwo,{dotColor:""+i}),n.createElement(s.DotThree,{dotColor:""+i}),n.createElement(s.DotFour,{dotColor:""+i}),n.createElement(u,{className:x,textColor:""+r},l))}!function(n,o){void 0===o&&(o={});var t=o.insertAt;if(n&&"undefined"!=typeof document){var e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}}(".fade-in {\n transition: opacity 1s ease;\n}\n\n.fade-out {\n opacity: 0;\n transition: opacity 1s ease;\n}");export default c; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var n=require("react"),o=require("styled-components");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r=t(n),e=t(o); | ||
"use strict";var n=require("react"),t=require("styled-components");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o=e(n),r=e(t); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
function d(n,o){return Object.defineProperty?Object.defineProperty(n,"raw",{value:o}):n.raw=o,n}var a,i,l,u,s,f,c={Container:e.default.div(a||(a=d(["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "],["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "])),(function(n){return"undefined"!==n.backgroundColor?n.backgroundColor:"transparent"}),(function(n){return"undefined"!==n.borderColor?n.borderColor:"#ddd"})),DotOne:e.default.div(i||(i=d(["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotTwo:e.default.div(l||(l=d(["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotThree:e.default.div(u||(u=d(["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotFour:e.default.div(s||(s=d(["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"}))},p=e.default.span(f||(f=d(["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"],["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"])),(function(n){return"undefined"!==n.textColor?n.textColor:"inherit"}));module.exports=function(n){var o=n.texts,t=n.backgroundColor,e=n.textColor,d=n.borderColor,a=n.dotColor,i=r.default.useState(o[0]),l=i[0],u=i[1],s=r.default.useState(0),f=s[0],b=s[1],h=r.default.useState("fade-in"),x=h[0],g=h[1];return r.default.useEffect((function(){var n=setInterval((function(){"fade-in"===x?g("fade-out"):(g("fade-in"),f<o.length-1?b(f+1):b(0),u((function(){return o[f]})))}),1e3);return function(){return clearInterval(n)}}),[x,f,o]),r.default.createElement(c.Container,{backgroundColor:""+t,borderColor:""+d},r.default.createElement(c.DotOne,{dotColor:""+a}),r.default.createElement(c.DotTwo,{dotColor:""+a}),r.default.createElement(c.DotThree,{dotColor:""+a}),r.default.createElement(c.DotFour,{dotColor:""+a}),r.default.createElement(p,{textColor:""+e},l))}; | ||
function d(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}var a,i,l,u,s,c,f={Container:r.default.div(a||(a=d(["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "],["\n position:relative;\n display:inline-block;\n background-color:",";\n padding:4px;\n width:150px;\n border-style:dashed;\n border-color:",";;\n border-width:1px;\n "])),(function(n){return"undefined"!==n.backgroundColor?n.backgroundColor:"transparent"}),(function(n){return"undefined"!==n.borderColor?n.borderColor:"#ddd"})),DotOne:r.default.div(i||(i=d(["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotTwo:r.default.div(l||(l=d(["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:0;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotThree:r.default.div(u||(u=d(["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n left:0;\n transform:translate(-50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"})),DotFour:r.default.div(s||(s=d(["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "],["\n top:100%;\n right:0;\n transform:translate(50%,-50%);\n position: absolute;\n background-color:",";\n width: 4px;\n height: 4px;\n border-radius: 50%;\n "])),(function(n){return"undefined"!==n.dotColor?n.dotColor:"#ddd"}))},p=r.default.span(c||(c=d(["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"],["\ncolor:",";\ndisplay:flex;\njustify-content:center;\n"])),(function(n){return"undefined"!==n.textColor?n.textColor:"inherit"}));!function(n,t){void 0===t&&(t={});var e=t.insertAt;if(n&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===e&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}}(".fade-in {\n transition: opacity 1s ease;\n}\n\n.fade-out {\n opacity: 0;\n transition: opacity 1s ease;\n}"),module.exports=function(n){var t=n.texts,e=n.backgroundColor,r=n.textColor,d=n.borderColor,a=n.dotColor,i=o.default.useState(t[0]),l=i[0],u=i[1],s=o.default.useState(0),c=s[0],h=s[1],b=o.default.useState("fade-in"),x=b[0],g=b[1];return o.default.useEffect((function(){var n=setInterval((function(){"fade-in"===x?g("fade-out"):(g("fade-in"),c<t.length-1?h(c+1):h(0),u((function(){return t[c]})))}),1e3);return function(){return clearInterval(n)}}),[x,c,t]),o.default.createElement(f.Container,{backgroundColor:""+e,borderColor:""+d},o.default.createElement(f.DotOne,{dotColor:""+a}),o.default.createElement(f.DotTwo,{dotColor:""+a}),o.default.createElement(f.DotThree,{dotColor:""+a}),o.default.createElement(f.DotFour,{dotColor:""+a}),o.default.createElement(p,{className:x,textColor:""+r},l))}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-box-text", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
49289
57