kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
40 lines (39 loc) • 8.09 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.StyledContainer = void 0;
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _templateObject; // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
var StyledContainer = exports.StyledContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n left: ", "px;\n bottom: ", "px;\n z-index: 1;\n color: ", ";\n opacity: ", ";\n transition: opacity 0.5s ease-in-out;\n background-color: ", ";\n border-radius: 0px;\n padding-left: 3px;\n padding-right: 3px;\n font-size: 12px;\n"])), function (props) {
return props.left;
}, function (props) {
return props.theme.sidePanel.margin.left;
}, function (props) {
return props.theme.textColorHl;
}, function (props) {
return props.isVisible ? 1 : 0;
}, function (props) {
return props.theme.sidePanelBg;
});
var LoadingIndicator = function LoadingIndicator(_ref) {
var isVisible = _ref.isVisible,
children = _ref.children,
activeSidePanel = _ref.activeSidePanel,
sidePanelWidth = _ref.sidePanelWidth,
theme = _ref.theme;
var left = (activeSidePanel ? sidePanelWidth || 0 : 0) + theme.sidePanel.margin.left;
return /*#__PURE__*/_react["default"].createElement(StyledContainer, {
isVisible: isVisible,
left: left
}, children);
};
var _default = exports["default"] = (0, _styledComponents.withTheme)(LoadingIndicator);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIl9zdHlsZWRDb21wb25lbnRzIiwiX2ludGVyb3BSZXF1aXJlV2lsZGNhcmQiLCJfdGVtcGxhdGVPYmplY3QiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJlIiwiV2Vha01hcCIsInIiLCJ0IiwiX19lc01vZHVsZSIsIl90eXBlb2YiLCJoYXMiLCJnZXQiLCJuIiwiX19wcm90b19fIiwiYSIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIiwidSIsImhhc093blByb3BlcnR5IiwiY2FsbCIsImkiLCJzZXQiLCJTdHlsZWRDb250YWluZXIiLCJleHBvcnRzIiwic3R5bGVkIiwiZGl2IiwiX3RhZ2dlZFRlbXBsYXRlTGl0ZXJhbDIiLCJwcm9wcyIsImxlZnQiLCJ0aGVtZSIsInNpZGVQYW5lbCIsIm1hcmdpbiIsInRleHRDb2xvckhsIiwiaXNWaXNpYmxlIiwic2lkZVBhbmVsQmciLCJMb2FkaW5nSW5kaWNhdG9yIiwiX3JlZiIsImNoaWxkcmVuIiwiYWN0aXZlU2lkZVBhbmVsIiwic2lkZVBhbmVsV2lkdGgiLCJjcmVhdGVFbGVtZW50IiwiX2RlZmF1bHQiLCJ3aXRoVGhlbWUiXSwic291cmNlcyI6WyIuLi9zcmMvbG9hZGluZy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