UNPKG

calcite-react

Version:
74 lines (63 loc) 3.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledCopyButton = exports.StyledCopyToClipboardInput = exports.StyledCopyToClipboard = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _helpers = require("../utils/helpers"); var _commonElements = require("../utils/commonElements"); var _CalciteThemeProvider = require("../CalciteThemeProvider"); var _Button = _interopRequireDefault(require("../Button")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 FadeIn = (0, _styledComponents.keyframes)(["from{opacity:0;}to{opacity:1;}"]); var StyledCopyToClipboard = _styledComponents.default.div.withConfig({ displayName: "StyledCopyToClipboard", componentId: "sc-1nvred8-0" })(["display:flex;svg{animation:", " ", ";}"], FadeIn, (0, _helpers.transition)()); exports.StyledCopyToClipboard = StyledCopyToClipboard; StyledCopyToClipboard.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledCopyToClipboardInput = (0, _styledComponents.default)(_commonElements.CalciteInput).withConfig({ displayName: "StyledCopyToClipboardInput", componentId: "sc-1nvred8-1" })(["flex:1 0 50px;width:auto;margin:0;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;html[dir='rtl'] &{border-right:1px solid ", ";border-top-right-radius:", ";border-bottom-right-radius:", ";border-left:none;border-top-left-radius:0;border-bottom-left-radius:0;}"], function (props) { return props.theme.palette.lightGray; }, function (props) { return props.theme.borderRadius; }, function (props) { return props.theme.borderRadius; }); exports.StyledCopyToClipboardInput = StyledCopyToClipboardInput; StyledCopyToClipboardInput.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme }; var StyledCopyButton = (0, _styledComponents.default)(_Button.default).withConfig({ displayName: "StyledCopyButton", componentId: "sc-1nvred8-2" })(["border-top-left-radius:0;border-bottom-left-radius:0;html[dir='rtl'] &{border-top-left-radius:", ";border-bottom-left-radius:", ";border-top-right-radius:0;border-bottom-right-radius:0;}svg{margin:0 !important;}"], function (props) { return props.theme.borderRadius; }, function (props) { return props.theme.borderRadius; }); exports.StyledCopyButton = StyledCopyButton; StyledCopyButton.defaultProps = { theme: _CalciteThemeProvider.CalciteTheme };