UNPKG

calcite-react

Version:
89 lines (76 loc) 3.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Text = exports.Bar = exports.Track = exports.StyledProgress = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _helpers = require("../utils/helpers"); var _CalciteThemeProvider = require("../CalciteThemeProvider"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } // Copyright 2019 Esri // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.​ // styled-components // Utils, common elements // Calcite theme and Esri colors // Calcite components // Icons // Third party libraries var StyledProgress = _styledComponents.default.div.withConfig({ displayName: "StyledProgress", componentId: "kdhe8q-0" })(["position:relative;width:100%;display:flex;flex-direction:column;align-items:center;"]); exports.StyledProgress = StyledProgress; StyledProgress.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var Track = _styledComponents.default.div.withConfig({ displayName: "Track", componentId: "kdhe8q-1" })(["position:absolute;top:0;height:2px;background-color:", ";z-index:0;width:100%;overflow:hidden;"], function (_ref) { var theme = _ref.theme; return theme.palette.lightestGray; }); exports.Track = Track; Track.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var Bar = _styledComponents.default.div.withConfig({ displayName: "Bar", componentId: "kdhe8q-2" })(["position:absolute;top:0;height:2px;background-color:", ";z-index:0;", " ", " ", ""], function (_ref2) { var theme = _ref2.theme; return theme.palette.blue; }, function (_ref3) { var type = _ref3.type; return type === 'indeterminate' && (0, _styledComponents.css)(["width:20%;animation:looping-progress-bar-ani 2200ms linear infinite;[dir='rtl'] &{animation:looping-progress-bar-ani-rtl 2200ms linear infinite;}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0);}50%{width:40%;}100%{transform:translate3d(600%,0,0);}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0);}50%{width:40%;}100%{transform:translate3d(-600%,0,0);}}"]); }, function (_ref4) { var type = _ref4.type, value = _ref4.value; return type === 'determinate' && (0, _styledComponents.css)(["width:", "%;"], value * 100); }, function (_ref5) { var reversed = _ref5.reversed; return reversed && (0, _styledComponents.css)(["animation-direction:reverse !important;"]); }); exports.Bar = Bar; Bar.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var Text = _styledComponents.default.div.withConfig({ displayName: "Text", componentId: "kdhe8q-3" })(["padding:", " 0 0 0;", ";"], function (_ref6) { var theme = _ref6.theme; return theme.baseline; }, (0, _helpers.fontSize)(0)); exports.Text = Text; Text.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme };