@elastic/eui 64.0.0 → 64.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +3 -312
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -312
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -2
- package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/es/components/image/image_button.styles.js +1 -1
- package/es/components/link/link.styles.js +6 -5
- package/es/components/text/text.styles.js +1 -1
- package/es/components/toast/global_toast_list.styles.js +2 -2
- package/es/global_styling/functions/logicals.js +16 -2
- package/es/global_styling/mixins/_helpers.js +11 -4
- package/es/global_styling/mixins/_states.js +3 -4
- package/es/global_styling/mixins/_typography.js +3 -1
- package/es/global_styling/reset/global_styles.js +1 -1
- package/es/global_styling/utility/utility.js +10 -2
- package/eui.d.ts +72 -55
- package/i18ntokens.json +4 -4
- package/lib/components/basic_table/collapsed_item_actions.js +1 -2
- package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/lib/components/image/image_button.styles.js +1 -1
- package/lib/components/link/link.styles.js +6 -5
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/toast/global_toast_list.styles.js +1 -1
- package/lib/global_styling/functions/logicals.js +21 -4
- package/lib/global_styling/mixins/_helpers.js +17 -6
- package/lib/global_styling/mixins/_states.js +3 -4
- package/lib/global_styling/mixins/_typography.js +4 -1
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/utility/utility.js +16 -3
- package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/optimize/es/components/image/image_button.styles.js +1 -1
- package/optimize/es/components/link/link.styles.js +6 -5
- package/optimize/es/components/text/text.styles.js +1 -1
- package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
- package/optimize/es/global_styling/functions/logicals.js +16 -2
- package/optimize/es/global_styling/mixins/_helpers.js +11 -4
- package/optimize/es/global_styling/mixins/_states.js +3 -4
- package/optimize/es/global_styling/mixins/_typography.js +3 -1
- package/optimize/es/global_styling/reset/global_styles.js +1 -1
- package/optimize/es/global_styling/utility/utility.js +10 -2
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/optimize/lib/components/image/image_button.styles.js +1 -1
- package/optimize/lib/components/link/link.styles.js +6 -5
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
- package/optimize/lib/global_styling/functions/logicals.js +21 -4
- package/optimize/lib/global_styling/mixins/_helpers.js +17 -6
- package/optimize/lib/global_styling/mixins/_states.js +3 -4
- package/optimize/lib/global_styling/mixins/_typography.js +4 -1
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/utility/utility.js +16 -3
- package/package.json +1 -1
- package/src/global_styling/mixins/_helpers.scss +9 -0
- package/src/global_styling/utility/_utility.scss +0 -127
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/test-env/components/image/image_button.styles.js +1 -1
- package/test-env/components/link/link.styles.js +6 -5
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/toast/global_toast_list.styles.js +1 -1
- package/test-env/global_styling/functions/logicals.js +21 -4
- package/test-env/global_styling/mixins/_helpers.js +17 -6
- package/test-env/global_styling/mixins/_states.js +3 -4
- package/test-env/global_styling/mixins/_typography.js +4 -1
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/utility/utility.js +16 -3
|
@@ -94,8 +94,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
|
|
|
94
94
|
_defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
|
|
95
95
|
if (!_this.popoverDiv) {
|
|
96
96
|
_this.popoverDiv = popoverDiv;
|
|
97
|
-
|
|
98
|
-
_this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
97
|
+
_this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
100
|
|
|
@@ -50,8 +50,8 @@ export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiT
|
|
|
50
50
|
isTruncated: /*#__PURE__*/css(euiTextTruncate("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
|
|
51
51
|
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
52
52
|
// Types
|
|
53
|
-
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(
|
|
54
|
-
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(
|
|
53
|
+
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
54
|
+
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
55
55
|
applicationStyles: {
|
|
56
56
|
onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ",;;label:onlyChild;"),
|
|
57
57
|
firstChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, " 0 0 ", euiTheme.border.radius.medium, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ",;;label:firstChild;"),
|
|
@@ -14,7 +14,7 @@ export var euiImageButtonStyles = function euiImageButtonStyles(euiThemeContext)
|
|
|
14
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
15
|
return {
|
|
16
16
|
// Base
|
|
17
|
-
euiImageButton: /*#__PURE__*/css("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", euiFocusRing(
|
|
17
|
+
euiImageButton: /*#__PURE__*/css("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right: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;"),
|
|
18
18
|
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
19
19
|
shadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 's'), ";};label:shadowHover;"),
|
|
20
20
|
hasShadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 'm'), ";};label:hasShadowHover;")
|
|
@@ -20,8 +20,9 @@ export var euiLinkHoverCSS = function euiLinkHoverCSS() {
|
|
|
20
20
|
export var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
21
21
|
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, " !important;\n ");
|
|
22
22
|
};
|
|
23
|
-
export var euiLinkCSS = function euiLinkCSS(
|
|
24
|
-
|
|
23
|
+
export var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n text-align: left;\n\n &:hover {\n ").concat(euiLinkHoverCSS(), "\n }\n\n &:focus {\n ").concat(euiFocusRing(euiThemeContext, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -33,10 +34,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
33
34
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
34
35
|
};
|
|
35
36
|
|
|
36
|
-
export var euiLinkStyles = function euiLinkStyles(
|
|
37
|
-
var euiTheme =
|
|
37
|
+
export var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
38
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
38
39
|
return {
|
|
39
|
-
euiLink: /*#__PURE__*/css(euiLinkCSS(
|
|
40
|
+
euiLink: /*#__PURE__*/css(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
|
|
40
41
|
disabled: _ref,
|
|
41
42
|
// Color styles
|
|
42
43
|
primary: /*#__PURE__*/css(_colorCSS(euiTheme.colors.primaryText), ";label:primary;"),
|
|
@@ -58,7 +58,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
58
58
|
export var euiTextStyles = function euiTextStyles(euiThemeContext) {
|
|
59
59
|
var euiTheme = euiThemeContext.euiTheme;
|
|
60
60
|
return {
|
|
61
|
-
euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(
|
|
61
|
+
euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", logicalTextAlignCSS('center'), " ", logicalCSS('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", logicalCSS('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", logicalCSS('height', euiTheme.border.width.thick), " ", logicalCSS('width', '50%'), " ", logicalCSS('left', '25%'), " ", logicalCSS('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", logicalCSS('top', '0'), ";}&:after{", logicalCSS('bottom', '0'), ";}}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:calc(", euiTheme.border.radius.small, " / 2);};label:euiText;"),
|
|
62
62
|
constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
|
|
63
63
|
// Sizes
|
|
64
64
|
m: /*#__PURE__*/css(euiScaleText(euiThemeContext, {
|
|
@@ -10,7 +10,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import { css, keyframes } from '@emotion/react';
|
|
13
|
-
import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalSizeCSS } from '../../global_styling';
|
|
13
|
+
import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalCSSWithFallback, logicalSizeCSS } from '../../global_styling';
|
|
14
14
|
export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext) {
|
|
15
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
16
|
var euiToastWidth = euiTheme.base * 20;
|
|
@@ -20,7 +20,7 @@ export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiTheme
|
|
|
20
20
|
* 2. Allow some padding for shadow
|
|
21
21
|
*/
|
|
22
22
|
// Base
|
|
23
|
-
euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";
|
|
23
|
+
euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";", logicalCSSWithFallback('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", logicalSizeCSS(0, 0), ";}&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";", logicalCSS('padding-right', euiTheme.size.base), ";", logicalCSS('padding-vertical', euiTheme.size.base), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('width', '100%'), ";}};label:euiGlobalToastList;"),
|
|
24
24
|
// Variants
|
|
25
25
|
right: /*#__PURE__*/css("&:not(:empty){", logicalCSS('right', 0), ";", logicalCSS('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";}};label:right;"),
|
|
26
26
|
left: /*#__PURE__*/css("&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-right', euiTheme.size.base), ";}};label:left;")
|
|
@@ -62,8 +62,8 @@ var logicalSize = {
|
|
|
62
62
|
'min-width': 'min-inline-size'
|
|
63
63
|
};
|
|
64
64
|
var logicalOverflow = {
|
|
65
|
-
'overflow-x': 'overflow-
|
|
66
|
-
'overflow-y': 'overflow-
|
|
65
|
+
'overflow-x': 'overflow-inline',
|
|
66
|
+
'overflow-y': 'overflow-block'
|
|
67
67
|
};
|
|
68
68
|
var logicalBorders = {
|
|
69
69
|
'border-horizontal': 'border-inline',
|
|
@@ -107,6 +107,20 @@ export var LOGICAL_PROPERTIES = keysOf(logicals);
|
|
|
107
107
|
export var logicalCSS = function logicalCSS(property, value) {
|
|
108
108
|
return "".concat(logicals[property], ": ").concat(value, ";");
|
|
109
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Some logical properties are not yet fully supported by all browsers.
|
|
112
|
+
* For those cases, we should use the old property as a fallback for
|
|
113
|
+
* browsers missing support, while allowing supporting browsers to use
|
|
114
|
+
* the logical properties.
|
|
115
|
+
*
|
|
116
|
+
* Examples:
|
|
117
|
+
* https://caniuse.com/?search=overflow-block
|
|
118
|
+
* https://caniuse.com/mdn-css_properties_float_flow_relative_values
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
export var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
|
|
122
|
+
return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
|
|
123
|
+
};
|
|
110
124
|
/**
|
|
111
125
|
*
|
|
112
126
|
* @param property A string that is a valid CSS logical property
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { useEuiTheme } from '../../services/theme';
|
|
9
9
|
import { transparentize } from '../../services/color';
|
|
10
|
+
import { logicalCSS, logicalCSSWithFallback } from '../functions';
|
|
10
11
|
/**
|
|
11
12
|
* Set scroll bar appearance on Chrome (and firefox).
|
|
12
13
|
* All parameters are optional and default to specific global settings.
|
|
@@ -34,7 +35,7 @@ export var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
|
|
|
34
35
|
// so it's being added to this mixin for allowing support wherever custom scrollbars are
|
|
35
36
|
|
|
36
37
|
var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
|
|
37
|
-
return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n
|
|
38
|
+
return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat(logicalCSS('width', scrollBarSize), "\n ").concat(logicalCSS('height', scrollBarSize), "\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
|
|
38
39
|
};
|
|
39
40
|
export var useEuiScrollBar = function useEuiScrollBar(options) {
|
|
40
41
|
var euiTheme = useEuiTheme();
|
|
@@ -82,12 +83,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
|
|
|
82
83
|
*/
|
|
83
84
|
|
|
84
85
|
|
|
85
|
-
// TODO: How do we use Emotion to output the CSS class utilities instead?
|
|
86
86
|
export var euiYScroll = function euiYScroll(euiTheme) {
|
|
87
87
|
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
88
88
|
height = _ref5.height;
|
|
89
89
|
|
|
90
|
-
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n
|
|
90
|
+
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat(logicalCSS('height', height || '100%'), "\n ").concat(logicalCSSWithFallback('overflow-y', 'auto'), "\n ").concat(logicalCSSWithFallback('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
|
|
91
91
|
};
|
|
92
92
|
export var useEuiYScroll = function useEuiYScroll() {
|
|
93
93
|
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -118,7 +118,7 @@ export var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
|
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
120
|
export var euiXScroll = function euiXScroll(euiTheme) {
|
|
121
|
-
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x
|
|
121
|
+
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat(logicalCSSWithFallback('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
|
|
122
122
|
};
|
|
123
123
|
export var useEuiXScroll = function useEuiXScroll() {
|
|
124
124
|
var euiTheme = useEuiTheme();
|
|
@@ -158,4 +158,11 @@ export var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
|
|
|
158
158
|
direction: direction,
|
|
159
159
|
mask: mask
|
|
160
160
|
});
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* For quickly applying a full-height element whether using flex or not
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
export var euiFullHeight = function euiFullHeight() {
|
|
167
|
+
return "\n ".concat(logicalCSS('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
|
|
161
168
|
};
|
|
@@ -15,7 +15,8 @@ import { useEuiTheme } from '../../services';
|
|
|
15
15
|
* @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
|
|
16
16
|
* @param color Accepts any CSS color, **Note: only works in -webkit-**
|
|
17
17
|
*/
|
|
18
|
-
export var euiFocusRing = function euiFocusRing(
|
|
18
|
+
export var euiFocusRing = function euiFocusRing(_ref) {
|
|
19
|
+
var euiTheme = _ref.euiTheme;
|
|
19
20
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
|
|
20
21
|
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
21
22
|
// Width is enforced as a constant at the global theme layer
|
|
@@ -40,9 +41,7 @@ export var euiFocusRing = function euiFocusRing(euiTheme) {
|
|
|
40
41
|
return "\n outline: ".concat(outlineWidth, " solid ").concat(outlineColor, ";\n outline-offset: ").concat(outlineOffset, ";\n\n // \uD83D\uDC40 Chrome respects :focus-visible and allows coloring the `auto` style\n &:focus-visible {\n outline-style: auto;\n }\n\n // \uD83D\uDE45\u200D\u2640\uFE0F But Chrome also needs to have the outline forcefully removed from regular `:focus` state\n &:not(:focus-visible) {\n outline: none;\n }\n ");
|
|
41
42
|
};
|
|
42
43
|
export var useEuiFocusRing = function useEuiFocusRing(offset, color) {
|
|
43
|
-
var
|
|
44
|
-
euiTheme = _useEuiTheme.euiTheme;
|
|
45
|
-
|
|
44
|
+
var euiTheme = useEuiTheme();
|
|
46
45
|
return euiFocusRing(euiTheme, offset, {
|
|
47
46
|
color: color
|
|
48
47
|
});
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { euiLineHeightFromBaseline, euiFontSizeFromScale } from '../functions/typography';
|
|
9
9
|
import { useEuiTheme } from '../../services/theme/hooks';
|
|
10
|
+
import { logicalCSS } from '../functions';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Returns font-size and line-height
|
|
@@ -36,7 +37,8 @@ export var euiTextBreakWord = function euiTextBreakWord() {
|
|
|
36
37
|
|
|
37
38
|
export var euiTextTruncate = function euiTextTruncate() {
|
|
38
39
|
var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
39
|
-
return "\n
|
|
40
|
+
return "\n ".concat(logicalCSS('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
|
|
41
|
+
, "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
|
|
40
42
|
};
|
|
41
43
|
/**
|
|
42
44
|
* Fixed-width numbers for tabular data
|
|
@@ -42,7 +42,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
42
42
|
* Final styles
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(
|
|
45
|
+
var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
|
|
46
46
|
return ___EmotionJSX(Global, {
|
|
47
47
|
styles: styles
|
|
48
48
|
});
|
|
@@ -7,11 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Global, css } from '@emotion/react';
|
|
10
|
+
import { useEuiTheme } from '../../services/theme/hooks';
|
|
10
11
|
import { euiScreenReaderOnly } from '../../components/accessibility/screen_reader_only/screen_reader_only.styles';
|
|
12
|
+
import { euiFullHeight, euiTextBreakWord, euiTextTruncate, euiNumberFormat, euiScrollBarStyles, euiYScroll, euiXScroll, euiYScrollWithShadows, euiXScrollWithShadows, euiBreakpoint } from '../mixins';
|
|
13
|
+
import { logicalCSS } from '../functions';
|
|
11
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
12
|
-
var globalStyles =
|
|
15
|
+
export var globalStyles = function globalStyles(euiThemeContext) {
|
|
16
|
+
return /*#__PURE__*/css(".euiScreenReaderOnly{", euiScreenReaderOnly(), ";}.eui-alignBaseline{vertical-align:baseline!important;}.eui-alignBottom{vertical-align:bottom!important;}.eui-alignMiddle{vertical-align:middle!important;}.eui-alignTop{vertical-align:top!important;}.eui-displayBlock{display:block!important;}.eui-displayInline{display:inline!important;}.eui-displayInlineBlock{display:inline-block!important;}.eui-fullWidth{display:block!important;", logicalCSS('width', '100% !important'), ";}.eui-fullHeight{", euiFullHeight(), ";}.eui-textCenter{text-align:center!important;}.eui-textLeft{text-align:start!important;}.eui-textRight{text-align:end!important;}.eui-textNoWrap{white-space:nowrap!important;}.eui-textInheritColor{color:inherit!important;}.eui-textBreakWord{", euiTextBreakWord(), ";}.eui-textBreakAll{overflow-wrap:break-word!important;word-break:break-all!important;}.eui-textBreakNormal{overflow-wrap:normal!important;word-wrap:normal!important;word-break:normal!important;}.eui-textTruncate{", euiTextTruncate(), ";}.eui-textNumber{", euiNumberFormat(euiThemeContext), ";}.eui-scrollBar{", euiScrollBarStyles(euiThemeContext), ";}.eui-yScroll{", euiYScroll(euiThemeContext), ";}.eui-xScroll{", euiXScroll(euiThemeContext), ";}.eui-yScrollWithShadows{", euiYScrollWithShadows(euiThemeContext), ";}.eui-xScrollWithShadows{", euiXScrollWithShadows(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
|
|
17
|
+
return "\n .eui-hideFor--".concat(size, " {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat(euiBreakpoint(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
|
|
18
|
+
}), ";;label:globalStyles;");
|
|
19
|
+
};
|
|
13
20
|
export var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
21
|
+
var euiTheme = useEuiTheme();
|
|
14
22
|
return ___EmotionJSX(Global, {
|
|
15
|
-
styles: globalStyles
|
|
23
|
+
styles: globalStyles(euiTheme)
|
|
16
24
|
});
|
|
17
25
|
};
|
package/eui.d.ts
CHANGED
|
@@ -1500,57 +1500,6 @@ declare module '@elastic/eui/src/global_styling/mixins/_color' {
|
|
|
1500
1500
|
danger: import("@emotion/utils").SerializedStyles;
|
|
1501
1501
|
};
|
|
1502
1502
|
|
|
1503
|
-
}
|
|
1504
|
-
declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
|
|
1505
|
-
import { CSSProperties } from 'react';
|
|
1506
|
-
import { UseEuiTheme } from '@elastic/eui/src/services/theme';
|
|
1507
|
-
/**
|
|
1508
|
-
* Set scroll bar appearance on Chrome (and firefox).
|
|
1509
|
-
* All parameters are optional and default to specific global settings.
|
|
1510
|
-
*/
|
|
1511
|
-
export interface EuiScrollBarStyles {
|
|
1512
|
-
thumbColor?: CSSProperties['backgroundColor'];
|
|
1513
|
-
trackColor?: CSSProperties['backgroundColor'];
|
|
1514
|
-
/**
|
|
1515
|
-
* Defaults to `thin`. Use `auto` only for large page scrollbars
|
|
1516
|
-
*/
|
|
1517
|
-
width?: CSSProperties['scrollbarWidth'];
|
|
1518
|
-
/**
|
|
1519
|
-
* Overall width (height for horizontal scrollbars)
|
|
1520
|
-
*/
|
|
1521
|
-
size?: CSSProperties['width'];
|
|
1522
|
-
/**
|
|
1523
|
-
* Corner sizes are usually determined by `width` and
|
|
1524
|
-
* are used as an inset border and therefore a smaller corner size means a larger thumb
|
|
1525
|
-
*/
|
|
1526
|
-
corner?: CSSProperties['borderWidth'];
|
|
1527
|
-
}
|
|
1528
|
-
export const euiScrollBarStyles: ({ euiTheme: { colors, size } }: UseEuiTheme, { thumbColor: _thumbColor, trackColor, width, size: _size, corner: _corner, }?: EuiScrollBarStyles) => string;
|
|
1529
|
-
export const useEuiScrollBar: (options?: EuiScrollBarStyles | undefined) => string;
|
|
1530
|
-
/**
|
|
1531
|
-
* 1. Focus rings shouldn't be visible on scrollable regions, but a11y requires them to be focusable.
|
|
1532
|
-
* Browser's supporting `:focus-visible` will still show outline on keyboard focus only.
|
|
1533
|
-
* Others like Safari, won't show anything at all.
|
|
1534
|
-
*/
|
|
1535
|
-
interface _EuiYScroll {
|
|
1536
|
-
height?: CSSProperties['height'];
|
|
1537
|
-
}
|
|
1538
|
-
export const euiYScroll: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
|
|
1539
|
-
export const useEuiYScroll: ({ height }?: _EuiYScroll) => string;
|
|
1540
|
-
export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
|
|
1541
|
-
export const useEuiYScrollWithShadows: ({ height }?: _EuiYScroll) => string;
|
|
1542
|
-
export const euiXScroll: (euiTheme: UseEuiTheme) => string;
|
|
1543
|
-
export const useEuiXScroll: () => string;
|
|
1544
|
-
export const euiXScrollWithShadows: (euiTheme: UseEuiTheme) => string;
|
|
1545
|
-
export const useEuiXScrollWithShadows: () => string;
|
|
1546
|
-
interface EuiScrollOverflowStyles {
|
|
1547
|
-
direction?: 'y' | 'x';
|
|
1548
|
-
mask?: boolean;
|
|
1549
|
-
}
|
|
1550
|
-
export const euiOverflowScroll: (euiTheme: UseEuiTheme, { direction, mask }?: EuiScrollOverflowStyles) => string;
|
|
1551
|
-
export const useEuiOverflowScroll: (direction: EuiScrollOverflowStyles['direction'], mask?: EuiScrollOverflowStyles['mask']) => string;
|
|
1552
|
-
export {};
|
|
1553
|
-
|
|
1554
1503
|
}
|
|
1555
1504
|
declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
1556
1505
|
/**
|
|
@@ -1635,6 +1584,17 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
|
|
|
1635
1584
|
* @returns `string` Returns the logical CSS property version for the given `property: value` pair
|
|
1636
1585
|
*/
|
|
1637
1586
|
export const logicalCSS: (property: LogicalProperties, value?: any) => string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Some logical properties are not yet fully supported by all browsers.
|
|
1589
|
+
* For those cases, we should use the old property as a fallback for
|
|
1590
|
+
* browsers missing support, while allowing supporting browsers to use
|
|
1591
|
+
* the logical properties.
|
|
1592
|
+
*
|
|
1593
|
+
* Examples:
|
|
1594
|
+
* https://caniuse.com/?search=overflow-block
|
|
1595
|
+
* https://caniuse.com/mdn-css_properties_float_flow_relative_values
|
|
1596
|
+
*/
|
|
1597
|
+
export const logicalCSSWithFallback: (property: LogicalProperties, value?: any) => string;
|
|
1638
1598
|
/**
|
|
1639
1599
|
*
|
|
1640
1600
|
* @param property A string that is a valid CSS logical property
|
|
@@ -1767,6 +1727,61 @@ declare module '@elastic/eui/src/global_styling/functions' {
|
|
|
1767
1727
|
export * from '@elastic/eui/src/global_styling/functions/size';
|
|
1768
1728
|
export * from '@elastic/eui/src/global_styling/functions/typography';
|
|
1769
1729
|
|
|
1730
|
+
}
|
|
1731
|
+
declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
|
|
1732
|
+
import { CSSProperties } from 'react';
|
|
1733
|
+
import { UseEuiTheme } from '@elastic/eui/src/services/theme';
|
|
1734
|
+
/**
|
|
1735
|
+
* Set scroll bar appearance on Chrome (and firefox).
|
|
1736
|
+
* All parameters are optional and default to specific global settings.
|
|
1737
|
+
*/
|
|
1738
|
+
export interface EuiScrollBarStyles {
|
|
1739
|
+
thumbColor?: CSSProperties['backgroundColor'];
|
|
1740
|
+
trackColor?: CSSProperties['backgroundColor'];
|
|
1741
|
+
/**
|
|
1742
|
+
* Defaults to `thin`. Use `auto` only for large page scrollbars
|
|
1743
|
+
*/
|
|
1744
|
+
width?: CSSProperties['scrollbarWidth'];
|
|
1745
|
+
/**
|
|
1746
|
+
* Overall width (height for horizontal scrollbars)
|
|
1747
|
+
*/
|
|
1748
|
+
size?: CSSProperties['width'];
|
|
1749
|
+
/**
|
|
1750
|
+
* Corner sizes are usually determined by `width` and
|
|
1751
|
+
* are used as an inset border and therefore a smaller corner size means a larger thumb
|
|
1752
|
+
*/
|
|
1753
|
+
corner?: CSSProperties['borderWidth'];
|
|
1754
|
+
}
|
|
1755
|
+
export const euiScrollBarStyles: ({ euiTheme: { colors, size } }: UseEuiTheme, { thumbColor: _thumbColor, trackColor, width, size: _size, corner: _corner, }?: EuiScrollBarStyles) => string;
|
|
1756
|
+
export const useEuiScrollBar: (options?: EuiScrollBarStyles | undefined) => string;
|
|
1757
|
+
/**
|
|
1758
|
+
* 1. Focus rings shouldn't be visible on scrollable regions, but a11y requires them to be focusable.
|
|
1759
|
+
* Browser's supporting `:focus-visible` will still show outline on keyboard focus only.
|
|
1760
|
+
* Others like Safari, won't show anything at all.
|
|
1761
|
+
*/
|
|
1762
|
+
interface _EuiYScroll {
|
|
1763
|
+
height?: CSSProperties['height'];
|
|
1764
|
+
}
|
|
1765
|
+
export const euiYScroll: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
|
|
1766
|
+
export const useEuiYScroll: ({ height }?: _EuiYScroll) => string;
|
|
1767
|
+
export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
|
|
1768
|
+
export const useEuiYScrollWithShadows: ({ height }?: _EuiYScroll) => string;
|
|
1769
|
+
export const euiXScroll: (euiTheme: UseEuiTheme) => string;
|
|
1770
|
+
export const useEuiXScroll: () => string;
|
|
1771
|
+
export const euiXScrollWithShadows: (euiTheme: UseEuiTheme) => string;
|
|
1772
|
+
export const useEuiXScrollWithShadows: () => string;
|
|
1773
|
+
interface EuiScrollOverflowStyles {
|
|
1774
|
+
direction?: 'y' | 'x';
|
|
1775
|
+
mask?: boolean;
|
|
1776
|
+
}
|
|
1777
|
+
export const euiOverflowScroll: (euiTheme: UseEuiTheme, { direction, mask }?: EuiScrollOverflowStyles) => string;
|
|
1778
|
+
export const useEuiOverflowScroll: (direction: EuiScrollOverflowStyles['direction'], mask?: EuiScrollOverflowStyles['mask']) => string;
|
|
1779
|
+
/**
|
|
1780
|
+
* For quickly applying a full-height element whether using flex or not
|
|
1781
|
+
*/
|
|
1782
|
+
export const euiFullHeight: () => string;
|
|
1783
|
+
export {};
|
|
1784
|
+
|
|
1770
1785
|
}
|
|
1771
1786
|
declare module '@elastic/eui/src/global_styling/mixins/_padding' {
|
|
1772
1787
|
import { UseEuiTheme } from '@elastic/eui/src/services/theme';
|
|
@@ -1796,7 +1811,7 @@ declare module '@elastic/eui/src/global_styling/mixins/_states' {
|
|
|
1796
1811
|
* @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
|
|
1797
1812
|
* @param color Accepts any CSS color, **Note: only works in -webkit-**
|
|
1798
1813
|
*/
|
|
1799
|
-
export const euiFocusRing: (euiTheme: UseEuiTheme
|
|
1814
|
+
export const euiFocusRing: ({ euiTheme }: UseEuiTheme, offset?: _EuiFocusRingOffset, options?: {
|
|
1800
1815
|
color?: CSSProperties['outlineColor'];
|
|
1801
1816
|
} | undefined) => string;
|
|
1802
1817
|
export const useEuiFocusRing: (offset?: _EuiFocusRingOffset, color?: CSSProperties['outlineColor']) => string;
|
|
@@ -2918,8 +2933,8 @@ declare module '@elastic/eui/src/components/link/link.styles' {
|
|
|
2918
2933
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
2919
2934
|
export const euiLinkHoverCSS: () => string;
|
|
2920
2935
|
export const euiLinkFocusCSS: (euiTheme: UseEuiTheme['euiTheme']) => string;
|
|
2921
|
-
export const euiLinkCSS: (
|
|
2922
|
-
export const euiLinkStyles: (
|
|
2936
|
+
export const euiLinkCSS: (euiThemeContext: UseEuiTheme) => string;
|
|
2937
|
+
export const euiLinkStyles: (euiThemeContext: UseEuiTheme) => {
|
|
2923
2938
|
euiLink: import("@emotion/utils").SerializedStyles;
|
|
2924
2939
|
disabled: import("@emotion/utils").SerializedStyles;
|
|
2925
2940
|
primary: import("@emotion/utils").SerializedStyles;
|
|
@@ -15619,6 +15634,8 @@ declare module '@elastic/eui/src/components/page_template' {
|
|
|
15619
15634
|
}
|
|
15620
15635
|
declare module '@elastic/eui/src/global_styling/utility/utility' {
|
|
15621
15636
|
|
|
15637
|
+
import { UseEuiTheme } from '@elastic/eui/src/services/theme/hooks';
|
|
15638
|
+
export const globalStyles: (euiThemeContext: UseEuiTheme) => import("@emotion/utils").SerializedStyles;
|
|
15622
15639
|
export const EuiUtilityClasses: () => JSX.Element;
|
|
15623
15640
|
|
|
15624
15641
|
}
|
|
@@ -18506,7 +18523,7 @@ declare module '@elastic/eui/src/components/basic_table/collapsed_item_actions'
|
|
|
18506
18523
|
togglePopover: () => void;
|
|
18507
18524
|
closePopover: () => void;
|
|
18508
18525
|
onPopoverBlur: () => void;
|
|
18509
|
-
registerPopoverDiv: (popoverDiv: HTMLDivElement) => void;
|
|
18526
|
+
registerPopoverDiv: (popoverDiv: HTMLDivElement | null) => void;
|
|
18510
18527
|
componentWillUnmount(): void;
|
|
18511
18528
|
onClickItem: (onClickAction: (() => void) | undefined) => void;
|
|
18512
18529
|
render(): JSX.Element;
|
package/i18ntokens.json
CHANGED
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
"highlighting": "string",
|
|
150
150
|
"loc": {
|
|
151
151
|
"start": {
|
|
152
|
-
"line":
|
|
152
|
+
"line": 170,
|
|
153
153
|
"column": 6
|
|
154
154
|
},
|
|
155
155
|
"end": {
|
|
156
|
-
"line":
|
|
156
|
+
"line": 170,
|
|
157
157
|
"column": 80
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -165,11 +165,11 @@
|
|
|
165
165
|
"highlighting": "string",
|
|
166
166
|
"loc": {
|
|
167
167
|
"start": {
|
|
168
|
-
"line":
|
|
168
|
+
"line": 187,
|
|
169
169
|
"column": 6
|
|
170
170
|
},
|
|
171
171
|
"end": {
|
|
172
|
-
"line":
|
|
172
|
+
"line": 187,
|
|
173
173
|
"column": 80
|
|
174
174
|
}
|
|
175
175
|
},
|
|
@@ -108,8 +108,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
|
|
|
108
108
|
_defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
|
|
109
109
|
if (!_this.popoverDiv) {
|
|
110
110
|
_this.popoverDiv = popoverDiv;
|
|
111
|
-
|
|
112
|
-
_this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
111
|
+
_this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
|
|
@@ -55,8 +55,8 @@ var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeCon
|
|
|
55
55
|
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
|
|
56
56
|
isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
|
|
57
57
|
// Types
|
|
58
|
-
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(
|
|
59
|
-
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";background-color:", (0, _color.transparentize)(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(
|
|
58
|
+
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
|
|
59
|
+
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";background-color:", (0, _color.transparentize)(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", (0, _color.transparentize)(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
60
60
|
applicationStyles: {
|
|
61
61
|
onlyChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.m), ",;;label:onlyChild;"),
|
|
62
62
|
firstChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, " 0 0 ", euiTheme.border.radius.medium, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), ",;;label:firstChild;"),
|
|
@@ -17,7 +17,7 @@ var euiImageButtonStyles = function euiImageButtonStyles(euiThemeContext) {
|
|
|
17
17
|
var euiTheme = euiThemeContext.euiTheme;
|
|
18
18
|
return {
|
|
19
19
|
// Base
|
|
20
|
-
euiImageButton: /*#__PURE__*/(0, _react.css)("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", _global_styling.euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", (0, _global_styling.euiFocusRing)(
|
|
20
|
+
euiImageButton: /*#__PURE__*/(0, _react.css)("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", _global_styling.euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), ";};label:euiImageButton;"),
|
|
21
21
|
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
22
22
|
shadowHover: /*#__PURE__*/(0, _react.css)("&::before{", (0, _mixins.euiShadow)(euiThemeContext, 's'), ";};label:shadowHover;"),
|
|
23
23
|
hasShadowHover: /*#__PURE__*/(0, _react.css)("&::before{", (0, _mixins.euiShadow)(euiThemeContext, 'm'), ";};label:hasShadowHover;")
|
|
@@ -27,8 +27,9 @@ var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
|
27
27
|
|
|
28
28
|
exports.euiLinkFocusCSS = euiLinkFocusCSS;
|
|
29
29
|
|
|
30
|
-
var euiLinkCSS = function euiLinkCSS(
|
|
31
|
-
|
|
30
|
+
var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
31
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
32
|
+
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n text-align: left;\n\n &:hover {\n ").concat(euiLinkHoverCSS(), "\n }\n\n &:focus {\n ").concat((0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
exports.euiLinkCSS = euiLinkCSS;
|
|
@@ -42,10 +43,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
42
43
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
var euiLinkStyles = function euiLinkStyles(
|
|
46
|
-
var euiTheme =
|
|
46
|
+
var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
47
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
47
48
|
return {
|
|
48
|
-
euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(
|
|
49
|
+
euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
|
|
49
50
|
disabled: _ref,
|
|
50
51
|
// Color styles
|
|
51
52
|
primary: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.primaryText), ";label:primary;"),
|
|
@@ -74,7 +74,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
74
74
|
var euiTextStyles = function euiTextStyles(euiThemeContext) {
|
|
75
75
|
var euiTheme = euiThemeContext.euiTheme;
|
|
76
76
|
return {
|
|
77
|
-
euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), ";clear:both;a:not([class]){", (0, _link.euiLinkCSS)(
|
|
77
|
+
euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), ";clear:both;a:not([class]){", (0, _link.euiLinkCSS)(euiThemeContext), ";}img{display:block;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", (0, _global_styling.logicalTextAlignCSS)('center'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", (0, _global_styling.logicalCSS)('height', euiTheme.border.width.thick), " ", (0, _global_styling.logicalCSS)('width', '50%'), " ", (0, _global_styling.logicalCSS)('left', '25%'), " ", (0, _global_styling.logicalCSS)('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", (0, _global_styling.logicalCSS)('top', '0'), ";}&:after{", (0, _global_styling.logicalCSS)('bottom', '0'), ";}}h1{", (0, _title.euiTitle)(euiThemeContext, 'l'), ";}h2{", (0, _title.euiTitle)(euiThemeContext, 'm'), ";}h3{", (0, _title.euiTitle)(euiThemeContext, 's'), ";}h4,dt{", (0, _title.euiTitle)(euiThemeContext, 'xs'), ";}h5{", (0, _title.euiTitle)(euiThemeContext, 'xxs'), ";}h6{", (0, _title.euiTitle)(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:calc(", euiTheme.border.radius.small, " / 2);};label:euiText;"),
|
|
78
78
|
constrainedWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
|
|
79
79
|
// Sizes
|
|
80
80
|
m: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
|
|
@@ -22,7 +22,7 @@ var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext
|
|
|
22
22
|
* 2. Allow some padding for shadow
|
|
23
23
|
*/
|
|
24
24
|
// Base
|
|
25
|
-
euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";
|
|
25
|
+
euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", (0, _global_styling.logicalSizeCSS)(0, 0), ";}&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiGlobalToastList;"),
|
|
26
26
|
// Variants
|
|
27
27
|
right: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('right', 0), ";", (0, _global_styling.logicalCSS)('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";}};label:right;"),
|
|
28
28
|
left: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";}};label:left;")
|