UNPKG

calcite-react

Version:
122 lines (112 loc) 5.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledPanelTitle = exports.StyledPanelText = exports.StyledPanel = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _helpers = require("../utils/helpers"); var _CalciteThemeProvider = require("../CalciteThemeProvider"); var _Elements = require("../Elements"); 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 StyledPanel = _styledComponents.default.div.withConfig({ displayName: "StyledPanel", componentId: "xhibc5-0" })(["", ";background-color:", ";border:1px solid ", ";padding:", ";border-radius:", ";code{background-color:", ";}", ";", ";", ";", ";", ";", ";", ";", ";"], (0, _helpers.clearfix)(), function (props) { return props.theme.palette.offWhite; }, function (props) { return props.theme.palette.lightestGray; }, function (props) { return (0, _helpers.unitCalc)(props.theme.baseline, 0.66, '*'); }, function (props) { return props.theme.borderRadius; }, function (props) { return props.theme.palette.white; }, function (props) { return props.dark && (0, _styledComponents.css)(["background-color:", ";color:", ";border:1px solid ", ";"], function (props) { return props.theme.palette.darkestGray; }, function (props) { return props.theme.palette.white; }, function (props) { return props.theme.palette.offBlack; }); }, function (props) { return props.black && (0, _styledComponents.css)(["background-color:", ";color:", ";border:1px solid ", ";"], function (props) { return props.theme.palette.black; }, function (props) { return props.theme.palette.white; }, function (props) { return props.theme.palette.offBlack; }); }, function (props) { return props.darkBlue && (0, _styledComponents.css)(["background-color:", ";color:", ";border:1px solid ", ";"], function (props) { return props.theme.palette.Brand_Blue_250; }, function (props) { return props.theme.palette.white; }, function (props) { return props.theme.palette.darkerBlue; }); }, function (props) { return props.blue && (0, _styledComponents.css)(["background-color:", ";color:", ";border:1px solid ", ";"], function (props) { return props.theme.palette.blue; }, function (props) { return props.theme.palette.white; }, function (props) { return props.theme.palette.darkBlue; }); }, function (props) { return props.lightBlue && (0, _styledComponents.css)(["background-color:", ";color:", ";border:1px solid ", ";"], function (props) { return props.theme.palette.lightBlue; }, function (props) { return props.theme.palette.black; }, function (props) { return props.theme.palette.blue; }); }, function (props) { return props.white && (0, _styledComponents.css)(["background-color:", ";border:1px solid ", ";code{background-color:", ";}"], function (props) { return props.theme.palette.white; }, function (props) { return props.theme.palette.lightestGray; }, function (props) { return props.theme.palette.offWhite; }); }, function (props) { return props.noBorder && (0, _styledComponents.css)(["border:none;"]); }, function (props) { return props.noPadding && (0, _styledComponents.css)(["padding:0;"]); }); exports.StyledPanel = StyledPanel; StyledPanel.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledPanelText = _styledComponents.default.div.withConfig({ displayName: "StyledPanelText", componentId: "xhibc5-1" })([""]); exports.StyledPanelText = StyledPanelText; StyledPanelText.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledPanelTitle = (0, _styledComponents.default)(_Elements.CalciteH4).withConfig({ displayName: "StyledPanelTitle", componentId: "xhibc5-2" })(["margin-bottom:0.775rem;"]); exports.StyledPanelTitle = StyledPanelTitle; StyledPanelTitle.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme };