@elastic/eui
Version:
Elastic UI Component Library
55 lines (54 loc) • 3.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.euiHeaderSectionItemButtonStyles = void 0;
var _react = require("@emotion/react");
var _global_styling = require("../../../global_styling");
var _header = require("../header.styles");
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.
*/
var _ref = process.env.NODE_ENV === "production" ? {
name: "k09eot-euiHeaderSectionItemButton__notification",
styles: "position:absolute;label:euiHeaderSectionItemButton__notification;"
} : {
name: "k09eot-euiHeaderSectionItemButton__notification",
styles: "position:absolute;label:euiHeaderSectionItemButton__notification;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
var _ref2 = process.env.NODE_ENV === "production" ? {
name: "1f67s81-euiHeaderSectionItemButton__content",
styles: "display:inline-block;label:euiHeaderSectionItemButton__content;"
} : {
name: "1f67s81-euiHeaderSectionItemButton__content",
styles: "display:inline-block;label:euiHeaderSectionItemButton__content;",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
var euiHeaderSectionItemButtonStyles = exports.euiHeaderSectionItemButtonStyles = function euiHeaderSectionItemButtonStyles(euiThemeContext) {
var _euiHeaderVariables = (0, _header.euiHeaderVariables)(euiThemeContext),
childHeight = _euiHeaderVariables.childHeight;
var euiTheme = euiThemeContext.euiTheme;
var dotSize = euiTheme.size.base;
var dotOffset = (0, _global_styling.mathWithUnits)(dotSize, function (x) {
return x * -0.5;
});
var badgeOffset = (0, _global_styling.mathWithUnits)(euiTheme.size.s, function (x) {
return x * -0.5;
});
return {
euiHeaderSectionItemButton: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('height', childHeight), " ", (0, _global_styling.logicalCSS)('min-width', childHeight), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), " text-align:center;font-size:0;", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 's'), "{", (0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(childHeight, function (x) {
return x * 0.75;
})), ";};label:euiHeaderSectionItemButton;"),
euiHeaderSectionItemButton__content: _ref2,
notification: {
euiHeaderSectionItemButton__notification: _ref,
dot: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('right', dotOffset), " stroke:", euiTheme.colors.emptyShade, ";", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 's'), "{", (0, _global_styling.logicalSizeCSS)(dotSize), " ", (0, _global_styling.logicalCSS)('top', '9%'), ";};label:dot;"),
badge: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', '9%'), " ", (0, _global_styling.logicalCSS)('right', badgeOffset), " box-shadow:0 0 0 ", euiTheme.border.width.thin, " ", euiTheme.colors.emptyShade, ";;label:badge;")
}
};
};