@elastic/eui
Version:
Elastic UI Component Library
42 lines (41 loc) • 2.81 kB
JavaScript
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { css } from '@emotion/react';
import { euiFocusRing, logicalTextAlignCSS } from '../../global_styling';
export var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
var euiTheme = euiThemeContext.euiTheme;
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n ").concat(logicalTextAlignCSS('left'), "\n\n &:hover {\n text-decoration: underline;\n }\n\n &:focus {\n ").concat(euiFocusRing(euiThemeContext, 'outset'), "\n text-decoration: underline;\n text-decoration-thickness: ").concat(euiTheme.border.width.thick, ";\n }\n ");
};
var _ref = process.env.NODE_ENV === "production" ? {
name: "9njbi5-disabled",
styles: "font-weight:inherit;&:hover{cursor:auto;}&:hover,&:focus,&:target{text-decoration:none;};label:disabled;"
} : {
name: "9njbi5-disabled",
styles: "font-weight:inherit;&:hover{cursor:auto;}&:hover,&:focus,&:target{text-decoration:none;};label:disabled;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
var euiTheme = euiThemeContext.euiTheme;
return {
euiLink: /*#__PURE__*/css(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
disabled: _ref,
// Color styles
primary: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textPrimary), ";label:primary;"),
subdued: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textSubdued), ";label:subdued;"),
success: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textSuccess), ";label:success;"),
accent: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textAccent), ";label:accent;"),
danger: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textDanger), ";label:danger;"),
warning: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textWarning), ";label:warning;"),
ghost: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textGhost), ";label:ghost;"),
text: /*#__PURE__*/css(_colorCSS(euiTheme.colors.textParagraph), ";label:text;")
};
};
var _colorCSS = function _colorCSS(color) {
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
};