UNPKG

calcite-react

Version:
71 lines (60 loc) 2.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledRadioGroup = exports.StyledRadioLabel = exports.StyledRadio = void 0; var _styledComponents = _interopRequireDefault(require("styled-components")); var _helpers = require("../utils/helpers"); var _commonElements = require("../utils/commonElements"); var _CalciteThemeProvider = require("../CalciteThemeProvider"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // 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 StyledRadio = (0, _styledComponents.default)(_commonElements.baseRadioCheckbox).withConfig({ displayName: "StyledRadio", componentId: "rojt2i-0" })(["-webkit-appearance:radio;flex-shrink:0;border-radius:50%;margin-right:", ";cursor:pointer;html[dir='rtl'] &{margin-right:0.125rem;margin-left:", ";}"], function (props) { return (0, _helpers.unitCalc)(props.theme.baseline, 4, '/'); }, function (props) { return (0, _helpers.unitCalc)(props.theme.baseline, 4, '/'); }); exports.StyledRadio = StyledRadio; StyledRadio.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledRadioLabel = _styledComponents.default.span.withConfig({ displayName: "StyledRadioLabel", componentId: "rojt2i-1" })(["", ";color:", ";width:auto;margin-right:", ";cursor:pointer;html[dir='rtl'] &{margin-right:initial;margin-left:", ";}"], (0, _helpers.fontSize)(-1), function (props) { return props.theme.palette.darkestGray; }, function (props) { return props.theme.baseline; }, function (props) { return props.theme.baseline; }); exports.StyledRadioLabel = StyledRadioLabel; StyledRadioLabel.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledRadioGroup = _styledComponents.default.label.withConfig({ displayName: "StyledRadioGroup", componentId: "rojt2i-2" })(["display:flex;align-items:center;"]); exports.StyledRadioGroup = StyledRadioGroup; StyledRadioGroup.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme };