@elastic/eui
Version:
Elastic UI Component Library
60 lines (59 loc) • 2.9 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 { euiTextTruncate, euiTextShift, logicalTextAlignCSS } from '../../global_styling';
import { euiLinkFocusCSS } from '../link/link.styles';
export var euiFacetButtonStyles = function euiFacetButtonStyles(_ref3) {
var euiTheme = _ref3.euiTheme;
return {
// Base
euiFacetButton: /*#__PURE__*/css(logicalTextAlignCSS('left'), " &:hover,&:focus{&:not(:disabled) [class*='euiFacetButton__text']{text-decoration:underline;}}&:focus:not(:disabled) [class*='euiFacetButton__text']{", euiLinkFocusCSS(euiTheme), ";}&:disabled{color:", euiTheme.colors.disabledText, ";pointer-events:none;&:hover,&:focus{text-decoration:none;}};label:euiFacetButton;")
};
};
export var euiFacetButtonTextStyles = function euiFacetButtonTextStyles(_ref4) {
var euiTheme = _ref4.euiTheme;
return {
euiFacetButton__text: /*#__PURE__*/css(euiTextShift('bold', 'data-text', euiTheme), " ", euiTextTruncate(), " flex-grow:1;;label:euiFacetButton__text;"),
isSelected: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";;label:isSelected;"),
unSelected: /*#__PURE__*/css(";label:unSelected;")
};
};
var _ref2 = process.env.NODE_ENV === "production" ? {
name: "mpq8zy-isDisabled",
styles: "opacity:0.5;label:isDisabled;"
} : {
name: "mpq8zy-isDisabled",
styles: "opacity:0.5;label:isDisabled;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiFacetButtonIconStyles = function euiFacetButtonIconStyles() {
return {
euiFacetButton__icon: /*#__PURE__*/css(";label:euiFacetButton__icon;"),
isDisabled: _ref2
};
};
export var euiFacetButtonLoadingSpinnerStyles = function euiFacetButtonLoadingSpinnerStyles() {
return {
euiFacetButton__loadingSpinner: /*#__PURE__*/css(";label:euiFacetButton__loadingSpinner;")
};
};
var _ref = process.env.NODE_ENV === "production" ? {
name: "mpq8zy-isDisabled",
styles: "opacity:0.5;label:isDisabled;"
} : {
name: "mpq8zy-isDisabled",
styles: "opacity:0.5;label:isDisabled;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export var euiFacetButtonQuantityStyles = function euiFacetButtonQuantityStyles() {
return {
euiFacetButton__quantity: /*#__PURE__*/css(";label:euiFacetButton__quantity;"),
isDisabled: _ref
};
};