UNPKG

@navinc/base-react-components

Version:
62 lines 3.11 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.LoadingDots = exports.Wrapper = exports.DotWrapper = exports.Dot = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const styled_components_1 = __importStar(require("styled-components")); exports.Dot = styled_components_1.default.div.withConfig({ displayName: "brc-sc-Dot", componentId: "brc-sc-zso5ad" }) ` margin: 0.25em 0.3em; border-radius: 50%; height: 0.5em; width: 0.5em; background-color: currentcolor; `; exports.DotWrapper = styled_components_1.default.div.withConfig({ displayName: "brc-sc-DotWrapper", componentId: "brc-sc-1fcz8hx" }) ` display: flex; `; const fadeIn = (0, styled_components_1.keyframes) ` from { opacity: 1; } to { opacity: 0; } `; const Dot1 = (0, styled_components_1.default)(exports.Dot).withConfig({ displayName: "brc-sc-Dot1", componentId: "brc-sc-o1gywh" }) ` animation: ${fadeIn} 1.5s ease infinite; `; const Dot2 = (0, styled_components_1.default)(exports.Dot).withConfig({ displayName: "brc-sc-Dot2", componentId: "brc-sc-2qeahg" }) ` animation: ${fadeIn} 1.5s ease 0.15s infinite; `; const Dot3 = (0, styled_components_1.default)(exports.Dot).withConfig({ displayName: "brc-sc-Dot3", componentId: "brc-sc-1kzzyg5" }) ` animation: ${fadeIn} 1.5s ease 0.3s infinite; `; const colors = { purple: 'navPrimary', green: 'navStatusPositive', white: 'navNeutralLight', }; exports.Wrapper = (0, styled_components_1.default)(exports.DotWrapper).withConfig({ displayName: "brc-sc-Wrapper", componentId: "brc-sc-adh9la" }) ` color: ${({ dotColor, theme }) => (dotColor ? theme[colors[dotColor]] : undefined)}; `; const _LoadingDots = (props) => ((0, jsx_runtime_1.jsxs)(exports.Wrapper, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(Dot1, {}), (0, jsx_runtime_1.jsx)(Dot2, {}), (0, jsx_runtime_1.jsx)(Dot3, {})] }))); exports.LoadingDots = (0, styled_components_1.default)(_LoadingDots).withConfig({ displayName: "brc-sc-LoadingDots", componentId: "brc-sc-63imj8" }) ``; //# sourceMappingURL=loading-dots.js.map