@polygon.io/core
Version:
A set of themeable UI components for React
1 lines • 4.96 kB
JavaScript
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _react=_interopRequireDefault(require("react")),_styledComponents=_interopRequireWildcard(require("styled-components")),_AnimatedSvg=_interopRequireDefault(require("./AnimatedSvg"));function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!==_typeof(a)&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d["default"]=a,c&&c.set(a,d),d}var __jsx=_react["default"].createElement,gRightAnimation=(0,_styledComponents.keyframes)(["0%{transform:translate(103.428362px,59.628726px) scale(1,1);}14.285714%{transform:translate(103.428362px,59.628726px) scale(1,1);}28.571429%{transform:translate(103.428362px,59.628726px) scale(1,1);animation-timing-function:cubic-bezier(0.42,0,1,1);}57.142857%{transform:translate(103.428362px,59.628726px) scale(0.257063,0.257063);}64.285714%{transform:translate(103.428362px,59.628726px) scale(0.257063,0.257063);animation-timing-function:cubic-bezier(0,0,0.58,1);}100%{transform:translate(103.428362px,59.628726px) scale(1,1);}"]),rectRightAnimation=(0,_styledComponents.keyframes)(["0%{rx:3px;ry:3px;}14.285714%{rx:3px;ry:3px;}28.571429%{rx:3px;ry:3px;}57.142857%{rx:8.5px;ry:8.5px;}64.285714%{rx:8.5px;ry:8.5px;}100%{rx:3px;ry:3px;}"]),gLeftAnimation=(0,_styledComponents.keyframes)(["0%{transform:translate(41.428362px,59.628726px) scale(1,1);animation-timing-function:cubic-bezier(0.42,0,1,1);}28.571429%{transform:translate(41.428362px,59.628726px) scale(0.257063,0.257063);}35.714286%{transform:translate(41.428362px,59.628726px) scale(0.257063,0.257063);animation-timing-function:cubic-bezier(0,0,0.58,1);}71.428571%{transform:translate(41.428362px,59.628726px) scale(1,1);}100%{transform:translate(41.428362px,59.628726px) scale(1,1);}"]),rectLeftAnimation=(0,_styledComponents.keyframes)(["0%{rx:3px;ry:3px;}14.285714%{rx:3px;ry:3px;}42.857143%{rx:8.5px;ry:8.5px;}50%{rx:8.5px;ry:8.5px;}85.714286%{rx:3px;ry:3px;}100%{rx:3px;ry:3px;}"]),gCenterAnimation=(0,_styledComponents.keyframes)(["0%{transform:translate(72.428362px,59.628726px) scale(1,1);}14.285714%{transform:translate(72.428362px,59.628726px) scale(1,1);animation-timing-function:cubic-bezier(0.42,0,1,1);}42.857143%{transform:translate(72.428362px,59.628726px) scale(0.257063,0.257063);}50%{transform:translate(72.428362px,59.628726px) scale(0.257063,0.257063);animation-timing-function:cubic-bezier(0,0,0.58,1);}85.714286%{transform:translate(72.428362px,59.628726px) scale(1,1);}100%{transform:translate(72.428362px,59.628726px) scale(1,1);}"]),rectCenterAnimation=(0,_styledComponents.keyframes)(["0%{rx:3px;ry:3px;}28.571429%{rx:8.5px;ry:8.5px;}35.714286%{rx:8.5px;ry:8.5px;}71.428571%{rx:3px;ry:3px;}100%{rx:3px;ry:3px;}"]),StyledSvg=_styledComponents["default"].svg.withConfig({displayName:"LoadingBubbler__StyledSvg",componentId:"sc-b5m5zl-0"})(["g:nth-of-type(1){animation:"," 1400ms linear infinite normal forwards;rect{animation:"," 1400ms linear infinite normal forwards;}}g:nth-of-type(2){animation:"," 1400ms linear infinite normal forwards;rect{animation:"," 1400ms linear infinite normal forwards;}}g:nth-of-type(3){animation:"," 1400ms linear infinite normal forwards;rect{animation:"," 1400ms linear infinite normal forwards;}}"],gRightAnimation,rectRightAnimation,gLeftAnimation,rectLeftAnimation,gCenterAnimation,rectCenterAnimation),LoadingBubbler=function(a){var b=a.size,c=a.absolute,d=(0,_styledComponents.useTheme)(),e=d.color.indicator.incomplete;return __jsx(_AnimatedSvg["default"],{size:b,absolute:c},__jsx(StyledSvg,{xmlns:"http://www.w3.org/2000/svg",viewBox:"32 51 81 17",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",height:"100%"},__jsx("g",{transform:"translate(103.428362,59.628726) scale(1,1)"},__jsx("rect",{width:"19",height:"17",rx:"3",ry:"3",transform:"translate(-9.456156,-8.564441)",fill:e})),__jsx("g",{transform:"translate(72.428362,59.628726) scale(1,1)"},__jsx("rect",{width:"19",height:"17",rx:"3",ry:"3",transform:"translate(-9.456156,-8.564441)",fill:e})),__jsx("g",{transform:"translate(41.428362,59.628726) scale(1,1)"},__jsx("rect",{width:"19",height:"17",rx:"3",ry:"3",transform:"translate(-9.456156,-8.564441)",fill:e}))))};LoadingBubbler.defaultProps={size:void 0,absolute:!1};var _default=LoadingBubbler;exports["default"]=_default;