UNPKG

@elastic/eui

Version:

Elastic UI Component Library

35 lines (34 loc) 2.04 kB
/* * 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 { logicalCSS, mathWithUnits, euiCanAnimate } from '../../global_styling'; import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles'; import { _tourFooterBgColor } from './_tour_footer.styles'; export var euiTourStyles = function euiTourStyles(euiThemeContext) { return { // Targets EuiPopoverPanel euiTour: /*#__PURE__*/css("[data-popover-arrow='top']{background-color:", _tourFooterBgColor(euiThemeContext), ";};label:euiTour;") }; }; export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref) { var euiTheme = _ref.euiTheme; var beaconSize = euiTheme.size.m; var beaconOffset = mathWithUnits(beaconSize, function (x) { return x / -2; }); return { // Base euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;z-index:1;", euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";};label:euiTourBeacon;"), isOpen: /*#__PURE__*/css(euiCanAnimate, "{opacity:1;};label:isOpen;"), // Positions right: /*#__PURE__*/css(logicalCSS('top', '50%'), " ", logicalCSS('left', '-50%'), " ", logicalCSS('margin-top', beaconOffset), ";;label:right;"), left: /*#__PURE__*/css(logicalCSS('top', '50%'), " ", logicalCSS('right', '-50%'), " ", logicalCSS('margin-top', beaconOffset), ";;label:left;"), top: /*#__PURE__*/css(logicalCSS('left', '50%'), " ", logicalCSS('bottom', '-50%'), " ", logicalCSS('margin-left', beaconOffset), ";;label:top;"), bottom: /*#__PURE__*/css(logicalCSS('left', '50%'), " ", logicalCSS('top', '-50%'), " ", logicalCSS('margin-left', beaconOffset), ";;label:bottom;") }; };