calcite-react
Version:
Calcite components for React
94 lines (85 loc) • 4.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledSideNavLink = exports.StyledSideNavTitle = exports.StyledSideNav = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _helpers = require("../utils/helpers");
var _type = require("../utils/type");
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 StyledSideNav = _styledComponents.default.aside.withConfig({
displayName: "StyledSideNav",
componentId: "sc-75orq9-0"
})(["box-sizing:border-box;padding:0;border:1px solid ", ";border-top:none;font-family:", ";background-color:", ";border-radius:", ";"], function (props) {
return props.theme.palette.lightestGray;
}, function (props) {
return props.theme.fontFamily;
}, function (props) {
return props.theme.palette.white;
}, function (props) {
return props.theme.borderRadius;
});
exports.StyledSideNav = StyledSideNav;
StyledSideNav.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledSideNavTitle = (0, _styledComponents.default)(_Elements.CalciteH4).withConfig({
displayName: "StyledSideNavTitle",
componentId: "sc-75orq9-1"
})(["margin:0;padding:", ";", ";", ";background-color:", ";border-top:1px solid ", ";"], function (props) {
return (0, _helpers.unitCalc)(props.theme.baseline, 3, '/');
}, (0, _type.avenirRegular)(), (0, _helpers.fontSize)(-1), function (props) {
return props.theme.palette.offWhite;
}, function (props) {
return props.theme.palette.lightestGray;
});
exports.StyledSideNavTitle = StyledSideNavTitle;
StyledSideNavTitle.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};
var StyledSideNavLink = (0, _styledComponents.default)(_Elements.CalciteA).withConfig({
displayName: "StyledSideNavLink",
componentId: "sc-75orq9-2"
})(["position:relative;display:block;box-sizing:border-box;padding:", ";", ";color:", ";background-color:", ";border-top:1px solid ", ";cursor:pointer;&:hover{background-color:", ";text-decoration:none;color:", ";}", ";", ";"], function (props) {
return (0, _helpers.unitCalc)(props.theme.baseline, 3, '/');
}, (0, _helpers.fontSize)(-2), function (props) {
return props.theme.palette.darkestGray;
}, 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.theme.palette.offBlack;
}, function (props) {
return props.disabled && (0, _styledComponents.css)(["pointer-events:none;opacity:0.7;"]);
}, function (props) {
return props.active && (0, _styledComponents.css)(["text-indent:-3px;border-left:3px solid ", ";html[dir='rtl'] &{border-left:none;border-right:3px solid ", ";}"], function (props) {
return props.theme.palette.blue;
}, function (props) {
return props.theme.palette.blue;
});
});
exports.StyledSideNavLink = StyledSideNavLink;
StyledSideNavLink.defaultProps = {
theme: _CalciteThemeProvider.CalciteTheme
};