@elastic/eui
Version:
Elastic UI Component Library
43 lines (42 loc) • 2.66 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 { euiShadow } from '@elastic/eui-theme-common';
import { euiFocusRing, logicalCSS, euiCanAnimate } from '../../global_styling';
export var euiImageButtonStyles = function euiImageButtonStyles(euiThemeContext) {
var euiTheme = euiThemeContext.euiTheme;
return {
// Base
euiImageButton: /*#__PURE__*/css("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;inset:0;", euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", euiFocusRing(euiThemeContext, 'outset'), ";};label:euiImageButton;"),
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:fullWidth;"),
shadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 's', {
borderAllInHighContrastMode: true
}), ";};label:shadowHover;"),
hasShadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 'm', {
borderAllInHighContrastMode: true
}), ";};label:hasShadowHover;")
};
};
var _ref = process.env.NODE_ENV === "production" ? {
name: "xj4dsa-closeFullScreen",
styles: "pointer-events:none;label:closeFullScreen;"
} : {
name: "xj4dsa-closeFullScreen",
styles: "pointer-events:none;label:closeFullScreen;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiImageButtonIconStyles = function euiImageButtonIconStyles(_ref2) {
var euiTheme = _ref2.euiTheme;
return {
// Base
euiImageButton__icon: /*#__PURE__*/css("position:absolute;", logicalCSS('top', euiTheme.size.base), " ", logicalCSS('right', euiTheme.size.base), ";;label:euiImageButton__icon;"),
openFullScreen: /*#__PURE__*/css("opacity:0;cursor:pointer;", euiCanAnimate, "{transition:opacity ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:openFullScreen;"),
closeFullScreen: _ref
};
};