UNPKG

@elastic/eui

Version:

Elastic UI Component Library

50 lines (47 loc) 4.14 kB
var _templateObject; function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } 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, keyframes } from '@emotion/react'; import { logicalCSS, euiCantAnimate, highContrastModeStyles, preventForcedColors, euiMinBreakpoint } from '../../global_styling'; import { EUI_BASIC_TABLE_PANEL_CLASS_NAME } from './use_panel_props'; var tableLoadingLine = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n ", "\n ", "\n }\n\n 20% {\n ", "\n ", "\n }\n\n 80% {\n ", "\n ", "\n }\n\n 100% {\n ", "\n ", "\n }\n"])), logicalCSS('left', 0), logicalCSS('width', 0), logicalCSS('left', 0), logicalCSS('width', '40%'), logicalCSS('left', '60%'), logicalCSS('width', '40%'), logicalCSS('left', '100%'), logicalCSS('width', 0)); export var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(euiThemeContext) { var euiTheme = euiThemeContext.euiTheme; return /*#__PURE__*/css("position:relative;overflow:hidden;&::before{position:absolute;content:'';", logicalCSS('width', '100%'), " ", logicalCSS('height', euiTheme.border.width.thick), " background-color:", euiTheme.colors.primary, ";animation:", tableLoadingLine, " 1s linear infinite;", euiCantAnimate, "{animation:none;background:repeating-linear-gradient(\n -45deg,\n ", euiTheme.colors.backgroundBasePlain, ",\n ", euiTheme.colors.backgroundBasePlain, " ", euiTheme.size.xs, ",\n ", euiTheme.colors.primary, " ", euiTheme.size.xs, ",\n ", euiTheme.colors.primary, " ", euiTheme.size.s, "\n );", highContrastModeStyles(euiThemeContext, { forced: "\n ".concat(preventForcedColors(euiThemeContext), "\n ") }), ";}};label:euiBasicTableBodyLoading;"); }; /** * @internal */ export var euiBasicTableWrapperPanelledStyles = function euiBasicTableWrapperPanelledStyles(responsiveBreakpoint) { return function (theme) { var euiTheme = theme.euiTheme; var styles = /*#__PURE__*/css("border:", euiTheme.border.thin, ";border-block-end-width:0;padding-block-start:", euiTheme.border.width.thin, ";border-radius:", euiTheme.border.radius.medium, ";.euiTable{border-radius:", euiTheme.border.radius.medium, ";}.", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "+.euiBasicTable &{border-start-start-radius:0;border-start-end-radius:0;.euiTable{border-start-start-radius:0;border-start-end-radius:0;}}&:not(:last-child),&:has(+ .", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "){border-end-start-radius:0;border-end-end-radius:0;.euiTable{border-end-start-radius:0;border-end-end-radius:0;}};label:styles;"); if (responsiveBreakpoint === true) { return null; } if (!responsiveBreakpoint) { return styles; } return /*#__PURE__*/css(euiMinBreakpoint(theme, responsiveBreakpoint), "{", styles, ";};label:euiBasicTableWrapperPanelledStyles;"); }; }; // Fix to make the loading indicator position correctly in Safari // For whatever annoying reason, Safari doesn't respect `position: relative;` // on `tbody` without `position: relative` on the parent `table` export var safariLoadingWorkaround = process.env.NODE_ENV === "production" ? { name: "6xbnw4-safariLoadingWorkaround", styles: "position:relative;label:safariLoadingWorkaround;" } : { name: "6xbnw4-safariLoadingWorkaround", styles: "position:relative;label:safariLoadingWorkaround;", toString: _EMOTION_STRINGIFIED_CSS_ERROR__ };