spinners-react
Version:
Lightweight SVG/CSS spinners for React
3 lines (2 loc) • 2.78 kB
JavaScript
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).SpinnersReact={},e.React)}(this,(function(e,n){"use strict";var t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var o={speed:100,still:!1,thickness:100};t(t({},o),{secondaryColor:"rgba(0,0,0,0.44)"});var i={color:"#38ad48",enabled:!0,size:50,style:{}},s=function(e){return parseFloat(e.toString()).toString()===e.toString()?"".concat(e,"px"):e.toString()};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("@keyframes spinners-react-round-filled-outer{40%,60%{transform:scale(0)}}@keyframes spinners-react-round-filled-center{30%,70%{transform:scale(0)}}@keyframes spinners-react-round-filled-inner{20%,80%{transform:scale(0)}}");var l=[{r:4},{name:"spinners-react-round-filled-inner",r:12.66},{name:"spinners-react-round-filled-center",r:20.32},{name:"spinners-react-round-filled-outer",r:27.5}];var a=function(e){return function(o){var l=o.color,a=void 0===l?i.color:l,c=o.enabled,d=void 0===c?i.enabled:c,f=o.size,p=void 0===f?i.size:f,u=o.style,y=void 0===u?i.style:u,m=r(o,["color","enabled","size","style"]),v=t(t({},m),{style:t({color:a,overflow:"visible",width:s(p)},y)});return d?n.createElement(e,t({},v)):null}}((function(e){var i=e.speed,s=void 0===i?o.speed:i,a=e.still,c=void 0===a?o.still:a,d=e.thickness,f=void 0===d?o.thickness:d,p=r(e,["speed","still","thickness"]);return n.createElement("svg",t({fill:"none"},p,{viewBox:"0 0 66 66"}),l.map((function(e){return n.createElement("circle",{key:e.name||"still",cx:"33",cy:"33",fill:"currentColor",r:e.r*(e.name?f/100:1),style:{opacity:e.name?.25:1,transformOrigin:"center",animation:!e.name||c?"none":"".concat(e.name," ").concat(140/s,"s ease-in-out infinite")}})})))}));e.SpinnerRoundFilled=a}));
//# sourceMappingURL=SpinnerRoundFilled.min.js.map