@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.
Files changed (71) hide show
  1. package/dist/eui_charts_theme.js +330 -330
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +3 -312
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +3 -312
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/basic_table/collapsed_item_actions.js +1 -2
  8. package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  9. package/es/components/image/image_button.styles.js +1 -1
  10. package/es/components/link/link.styles.js +6 -5
  11. package/es/components/text/text.styles.js +1 -1
  12. package/es/components/toast/global_toast_list.styles.js +2 -2
  13. package/es/global_styling/functions/logicals.js +16 -2
  14. package/es/global_styling/mixins/_helpers.js +11 -4
  15. package/es/global_styling/mixins/_states.js +3 -4
  16. package/es/global_styling/mixins/_typography.js +3 -1
  17. package/es/global_styling/reset/global_styles.js +1 -1
  18. package/es/global_styling/utility/utility.js +10 -2
  19. package/eui.d.ts +72 -55
  20. package/i18ntokens.json +4 -4
  21. package/lib/components/basic_table/collapsed_item_actions.js +1 -2
  22. package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  23. package/lib/components/image/image_button.styles.js +1 -1
  24. package/lib/components/link/link.styles.js +6 -5
  25. package/lib/components/text/text.styles.js +1 -1
  26. package/lib/components/toast/global_toast_list.styles.js +1 -1
  27. package/lib/global_styling/functions/logicals.js +21 -4
  28. package/lib/global_styling/mixins/_helpers.js +17 -6
  29. package/lib/global_styling/mixins/_states.js +3 -4
  30. package/lib/global_styling/mixins/_typography.js +4 -1
  31. package/lib/global_styling/reset/global_styles.js +1 -1
  32. package/lib/global_styling/utility/utility.js +16 -3
  33. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
  34. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  35. package/optimize/es/components/image/image_button.styles.js +1 -1
  36. package/optimize/es/components/link/link.styles.js +6 -5
  37. package/optimize/es/components/text/text.styles.js +1 -1
  38. package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
  39. package/optimize/es/global_styling/functions/logicals.js +16 -2
  40. package/optimize/es/global_styling/mixins/_helpers.js +11 -4
  41. package/optimize/es/global_styling/mixins/_states.js +3 -4
  42. package/optimize/es/global_styling/mixins/_typography.js +3 -1
  43. package/optimize/es/global_styling/reset/global_styles.js +1 -1
  44. package/optimize/es/global_styling/utility/utility.js +10 -2
  45. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
  46. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  47. package/optimize/lib/components/image/image_button.styles.js +1 -1
  48. package/optimize/lib/components/link/link.styles.js +6 -5
  49. package/optimize/lib/components/text/text.styles.js +1 -1
  50. package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
  51. package/optimize/lib/global_styling/functions/logicals.js +21 -4
  52. package/optimize/lib/global_styling/mixins/_helpers.js +17 -6
  53. package/optimize/lib/global_styling/mixins/_states.js +3 -4
  54. package/optimize/lib/global_styling/mixins/_typography.js +4 -1
  55. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  56. package/optimize/lib/global_styling/utility/utility.js +16 -3
  57. package/package.json +1 -1
  58. package/src/global_styling/mixins/_helpers.scss +9 -0
  59. package/src/global_styling/utility/_utility.scss +0 -127
  60. package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
  61. package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
  62. package/test-env/components/image/image_button.styles.js +1 -1
  63. package/test-env/components/link/link.styles.js +6 -5
  64. package/test-env/components/text/text.styles.js +1 -1
  65. package/test-env/components/toast/global_toast_list.styles.js +1 -1
  66. package/test-env/global_styling/functions/logicals.js +21 -4
  67. package/test-env/global_styling/mixins/_helpers.js +17 -6
  68. package/test-env/global_styling/mixins/_states.js +3 -4
  69. package/test-env/global_styling/mixins/_typography.js +4 -1
  70. package/test-env/global_styling/reset/global_styles.js +1 -1
  71. package/test-env/global_styling/utility/utility.js +16 -3
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
8
+ exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSSWithFallback = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -66,8 +66,8 @@ var logicalSize = {
66
66
  'min-width': 'min-inline-size'
67
67
  };
68
68
  var logicalOverflow = {
69
- 'overflow-x': 'overflow-block',
70
- 'overflow-y': 'overflow-inline'
69
+ 'overflow-x': 'overflow-inline',
70
+ 'overflow-y': 'overflow-block'
71
71
  };
72
72
  var logicalBorders = {
73
73
  'border-horizontal': 'border-inline',
@@ -115,6 +115,23 @@ exports.LOGICAL_PROPERTIES = LOGICAL_PROPERTIES;
115
115
  var logicalCSS = function logicalCSS(property, value) {
116
116
  return "".concat(logicals[property], ": ").concat(value, ";");
117
117
  };
118
+ /**
119
+ * Some logical properties are not yet fully supported by all browsers.
120
+ * For those cases, we should use the old property as a fallback for
121
+ * browsers missing support, while allowing supporting browsers to use
122
+ * the logical properties.
123
+ *
124
+ * Examples:
125
+ * https://caniuse.com/?search=overflow-block
126
+ * https://caniuse.com/mdn-css_properties_float_flow_relative_values
127
+ */
128
+
129
+
130
+ exports.logicalCSS = logicalCSS;
131
+
132
+ var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
133
+ return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
134
+ };
118
135
  /**
119
136
  *
120
137
  * @param property A string that is a valid CSS logical property
@@ -123,7 +140,7 @@ var logicalCSS = function logicalCSS(property, value) {
123
140
  */
124
141
 
125
142
 
126
- exports.logicalCSS = logicalCSS;
143
+ exports.logicalCSSWithFallback = logicalCSSWithFallback;
127
144
 
128
145
  var logicalStyle = function logicalStyle(property, value) {
129
146
  // Strip hyphens and camelCase the CSS logical property so React doesn't throw errors
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = void 0;
6
+ exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
7
7
 
8
8
  var _theme = require("../../services/theme");
9
9
 
10
10
  var _color = require("../../services/color");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -38,7 +40,7 @@ var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
38
40
  // so it's being added to this mixin for allowing support wherever custom scrollbars are
39
41
 
40
42
  var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
41
- return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n width: ").concat(scrollBarSize, ";\n height: ").concat(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 ");
43
+ return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat((0, _functions.logicalCSS)('width', scrollBarSize), "\n ").concat((0, _functions.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 ");
42
44
  };
43
45
 
44
46
  exports.euiScrollBarStyles = euiScrollBarStyles;
@@ -92,12 +94,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
92
94
  */
93
95
 
94
96
 
95
- // TODO: How do we use Emotion to output the CSS class utilities instead?
96
97
  var euiYScroll = function euiYScroll(euiTheme) {
97
98
  var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
98
99
  height = _ref5.height;
99
100
 
100
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n height: ").concat(height || '100%', ";\n overflow-y: auto;\n overflow-x: hidden;\n &:focus {\n outline: none; /* 1 */\n }\n");
101
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSS)('height', height || '100%'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-y', 'auto'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
101
102
  };
102
103
 
103
104
  exports.euiYScroll = euiYScroll;
@@ -140,7 +141,7 @@ var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
140
141
  exports.useEuiYScrollWithShadows = useEuiYScrollWithShadows;
141
142
 
142
143
  var euiXScroll = function euiXScroll(euiTheme) {
143
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x: auto;\n &:focus {\n outline: none; /* 1 */\n }\n");
144
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
144
145
  };
145
146
 
146
147
  exports.euiXScroll = euiXScroll;
@@ -196,5 +197,15 @@ var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
196
197
  mask: mask
197
198
  });
198
199
  };
200
+ /**
201
+ * For quickly applying a full-height element whether using flex or not
202
+ */
203
+
204
+
205
+ exports.useEuiOverflowScroll = useEuiOverflowScroll;
206
+
207
+ var euiFullHeight = function euiFullHeight() {
208
+ return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
209
+ };
199
210
 
200
- exports.useEuiOverflowScroll = useEuiOverflowScroll;
211
+ exports.euiFullHeight = euiFullHeight;
@@ -23,7 +23,8 @@ var _services = require("../../services");
23
23
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
24
24
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
25
25
  */
26
- var euiFocusRing = function euiFocusRing(euiTheme) {
26
+ var euiFocusRing = function euiFocusRing(_ref) {
27
+ var euiTheme = _ref.euiTheme;
27
28
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
28
29
  var options = arguments.length > 2 ? arguments[2] : undefined;
29
30
  // Width is enforced as a constant at the global theme layer
@@ -51,9 +52,7 @@ var euiFocusRing = function euiFocusRing(euiTheme) {
51
52
  exports.euiFocusRing = euiFocusRing;
52
53
 
53
54
  var useEuiFocusRing = function useEuiFocusRing(offset, color) {
54
- var _useEuiTheme = (0, _services.useEuiTheme)(),
55
- euiTheme = _useEuiTheme.euiTheme;
56
-
55
+ var euiTheme = (0, _services.useEuiTheme)();
57
56
  return euiFocusRing(euiTheme, offset, {
58
57
  color: color
59
58
  });
@@ -9,6 +9,8 @@ var _typography = require("../functions/typography");
9
9
 
10
10
  var _hooks = require("../../services/theme/hooks");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -54,7 +56,8 @@ exports.euiTextBreakWord = euiTextBreakWord;
54
56
 
55
57
  var euiTextTruncate = function euiTextTruncate() {
56
58
  var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
57
- return "\n max-width: ".concat(maxWidth, "; // Ensure that the node has a maximum width after which truncation can occur\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
59
+ return "\n ".concat((0, _functions.logicalCSS)('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
60
+ , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
58
61
  };
59
62
  /**
60
63
  * Fixed-width numbers for tabular data
@@ -55,7 +55,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
55
55
  * Final styles
56
56
  */
57
57
 
58
- var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " 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{", (0, _mixins.euiFocusRing)(euiTheme), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
58
+ var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " 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{", (0, _mixins.euiFocusRing)(euiThemeContext), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
59
59
  return (0, _react2.jsx)(_react2.Global, {
60
60
  styles: styles
61
61
  });
@@ -5,14 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.EuiUtilityClasses = void 0;
8
+ exports.globalStyles = exports.EuiUtilityClasses = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _react2 = require("@emotion/react");
13
13
 
14
+ var _hooks = require("../../services/theme/hooks");
15
+
14
16
  var _screen_reader_only = require("../../components/accessibility/screen_reader_only/screen_reader_only.styles");
15
17
 
18
+ var _mixins = require("../mixins");
19
+
20
+ var _functions = require("../functions");
21
+
16
22
  /*
17
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,11 +26,18 @@ var _screen_reader_only = require("../../components/accessibility/screen_reader_
20
26
  * in compliance with, at your election, the Elastic License 2.0 or the Server
21
27
  * Side Public License, v 1.
22
28
  */
23
- var globalStyles = /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";};label:globalStyles;");
29
+ var globalStyles = function globalStyles(euiThemeContext) {
30
+ return /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.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;", (0, _functions.logicalCSS)('width', '100% !important'), ";}.eui-fullHeight{", (0, _mixins.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{", (0, _mixins.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{", (0, _mixins.euiTextTruncate)(), ";}.eui-textNumber{", (0, _mixins.euiNumberFormat)(euiThemeContext), ";}.eui-scrollBar{", (0, _mixins.euiScrollBarStyles)(euiThemeContext), ";}.eui-yScroll{", (0, _mixins.euiYScroll)(euiThemeContext), ";}.eui-xScroll{", (0, _mixins.euiXScroll)(euiThemeContext), ";}.eui-yScrollWithShadows{", (0, _mixins.euiYScrollWithShadows)(euiThemeContext), ";}.eui-xScrollWithShadows{", (0, _mixins.euiXScrollWithShadows)(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
31
+ return "\n .eui-hideFor--".concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
32
+ }), ";;label:globalStyles;");
33
+ };
34
+
35
+ exports.globalStyles = globalStyles;
24
36
 
25
37
  var EuiUtilityClasses = function EuiUtilityClasses() {
38
+ var euiTheme = (0, _hooks.useEuiTheme)();
26
39
  return (0, _react2.jsx)(_react2.Global, {
27
- styles: globalStyles
40
+ styles: globalStyles(euiTheme)
28
41
  });
29
42
  };
30
43
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "64.0.0",
4
+ "version": "64.0.1",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -82,6 +82,15 @@
82
82
  @include euiOverflowShadow('x');
83
83
  }
84
84
 
85
+ /**
86
+ * For quickly applying a full-height element whether using flex or not
87
+ */
88
+ @mixin euiFullHeight {
89
+ height: 100%;
90
+ flex: 1 1 auto;
91
+ overflow: hidden;
92
+ }
93
+
85
94
  // Hiding elements offscreen to only be read by screen reader
86
95
  // See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
87
96
  @mixin euiScreenReaderOnly {
@@ -1,84 +1,6 @@
1
1
  // This file utilizes !importants on purpose
2
2
  // sass-lint:disable no-important
3
3
 
4
- // Vertical alignment
5
- .eui-alignBaseline { vertical-align: baseline !important; }
6
- .eui-alignBottom { vertical-align: bottom !important; }
7
- .eui-alignMiddle { vertical-align: middle !important; }
8
- .eui-alignTop { vertical-align: top !important; }
9
-
10
- // Display
11
- .eui-displayBlock {display: block !important;}
12
- .eui-displayInline {display: inline !important;}
13
- .eui-displayInlineBlock {display: inline-block !important;}
14
-
15
- .eui-fullWidth {
16
- display: block !important;
17
- width: 100% !important;
18
- }
19
-
20
- // Text
21
- .eui-textCenter {text-align: center !important;}
22
- .eui-textLeft {text-align: left !important;}
23
- .eui-textRight {text-align: right !important;}
24
- .eui-textNoWrap {white-space: nowrap !important;}
25
- .eui-textInheritColor {color: inherit !important;}
26
-
27
- .eui-textBreakWord {
28
- @include euiTextBreakWord;
29
- }
30
-
31
- .eui-textBreakAll {
32
- overflow-wrap: break-word !important; // Fixes FF when dashes are involved #2288
33
- word-break: break-all !important;
34
- }
35
-
36
- .eui-textBreakNormal {
37
- overflow-wrap: normal !important;
38
- word-wrap: normal !important;
39
- word-break: normal !important;
40
- }
41
-
42
- .eui-textTruncate {
43
- @include euiTextTruncate;
44
- }
45
-
46
- .eui-textNumber {
47
- @include euiNumberFormat;
48
- }
49
-
50
- /**
51
- * Responsive
52
- *
53
- * 1. Be sure to hide the element initially
54
- */
55
-
56
- [class*='eui-showFor'] {
57
- display: none !important; /* 1 */
58
- }
59
-
60
- @each $size in $euiBreakpointKeys {
61
- .eui-hideFor--#{$size} {
62
- @include euiBreakpoint($size) { display: none !important; }
63
- }
64
-
65
- .eui-showFor--#{$size} {
66
- @include euiBreakpoint($size) { display: inline !important; }
67
- }
68
-
69
- .eui-showFor--#{$size}--block {
70
- @include euiBreakpoint($size) { display: block !important; }
71
- }
72
-
73
- .eui-showFor--#{$size}--inlineBlock {
74
- @include euiBreakpoint($size) { display: inline-block !important; }
75
- }
76
-
77
- .eui-showFor--#{$size}--flex {
78
- @include euiBreakpoint($size) { display: flex !important; }
79
- }
80
- }
81
-
82
4
  /**
83
5
  * IE doesn't properly wrap groups if it is within a flex-item of a flex-group.
84
6
  * Adding the following styles to the flex-item that contains the wrapping group, will fix IE.
@@ -91,52 +13,3 @@
91
13
  flex-basis: 0%;
92
14
  }
93
15
  }
94
-
95
- /**
96
- * Scroll bar only
97
- */
98
- .eui-scrollBar {
99
- @include euiScrollBar;
100
- }
101
-
102
- /**
103
- * Overflow scrolling
104
- */
105
- .eui-yScroll {
106
- @include euiYScroll;
107
- }
108
-
109
- .eui-xScroll {
110
- @include euiXScroll;
111
- }
112
-
113
- /**
114
- * Overflow scrolling with shadows
115
- */
116
- .eui-yScrollWithShadows {
117
- @include euiYScrollWithShadows;
118
- }
119
-
120
- .eui-xScrollWithShadows {
121
- @include euiXScrollWithShadows;
122
- }
123
-
124
- /**
125
- * Forcing focus ring on non-EUI elements
126
- */
127
- .eui-isFocusable:focus {
128
- @include euiFocusRing('large');
129
- }
130
-
131
- /**
132
- * For quickly applying a full-height element whether using flex or not
133
- */
134
- @mixin euiFullHeight {
135
- height: 100%;
136
- flex: 1 1 auto;
137
- overflow: hidden;
138
- }
139
-
140
- .eui-fullHeight {
141
- @include euiFullHeight;
142
- }
@@ -98,8 +98,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
98
98
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
99
99
  if (!_this.popoverDiv) {
100
100
  _this.popoverDiv = popoverDiv;
101
-
102
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
103
102
  }
104
103
  });
105
104
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -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)(euiTheme, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiTheme, '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)(euiTheme, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
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)(euiTheme, 'outset'), ";};label:euiImageButton;"),
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(euiTheme) {
31
- 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)(euiTheme, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
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(_ref2) {
46
- var euiTheme = _ref2.euiTheme;
46
+ var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
47
+ var euiTheme = euiThemeContext.euiTheme;
47
48
  return {
48
- euiLink: /*#__PURE__*/(0, _react.css)(euiLinkCSS(euiTheme), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
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)(euiTheme), ";}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;"),
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, {
@@ -24,7 +24,7 @@ var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext
24
24
  * 2. Allow some padding for shadow
25
25
  */
26
26
  // Base
27
- 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'), ";overflow-y:auto;", (0, _global_styling.logicalCSS)('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;"),
27
+ 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;"),
28
28
  // Variants
29
29
  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;"),
30
30
  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;")
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
8
+ exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSSWithFallback = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -66,8 +66,8 @@ var logicalSize = {
66
66
  'min-width': 'min-inline-size'
67
67
  };
68
68
  var logicalOverflow = {
69
- 'overflow-x': 'overflow-block',
70
- 'overflow-y': 'overflow-inline'
69
+ 'overflow-x': 'overflow-inline',
70
+ 'overflow-y': 'overflow-block'
71
71
  };
72
72
  var logicalBorders = {
73
73
  'border-horizontal': 'border-inline',
@@ -115,6 +115,23 @@ exports.LOGICAL_PROPERTIES = LOGICAL_PROPERTIES;
115
115
  var logicalCSS = function logicalCSS(property, value) {
116
116
  return "".concat(logicals[property], ": ").concat(value, ";");
117
117
  };
118
+ /**
119
+ * Some logical properties are not yet fully supported by all browsers.
120
+ * For those cases, we should use the old property as a fallback for
121
+ * browsers missing support, while allowing supporting browsers to use
122
+ * the logical properties.
123
+ *
124
+ * Examples:
125
+ * https://caniuse.com/?search=overflow-block
126
+ * https://caniuse.com/mdn-css_properties_float_flow_relative_values
127
+ */
128
+
129
+
130
+ exports.logicalCSS = logicalCSS;
131
+
132
+ var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
133
+ return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
134
+ };
118
135
  /**
119
136
  *
120
137
  * @param property A string that is a valid CSS logical property
@@ -123,7 +140,7 @@ var logicalCSS = function logicalCSS(property, value) {
123
140
  */
124
141
 
125
142
 
126
- exports.logicalCSS = logicalCSS;
143
+ exports.logicalCSSWithFallback = logicalCSSWithFallback;
127
144
 
128
145
  var logicalStyle = function logicalStyle(property, value) {
129
146
  // Strip hyphens and camelCase the CSS logical property so React doesn't throw errors
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = void 0;
6
+ exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
7
7
 
8
8
  var _theme = require("../../services/theme");
9
9
 
10
10
  var _color = require("../../services/color");
11
11
 
12
+ var _functions = require("../functions");
13
+
12
14
  /*
13
15
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
16
  * or more contributor license agreements. Licensed under the Elastic License
@@ -38,7 +40,7 @@ var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
38
40
  // so it's being added to this mixin for allowing support wherever custom scrollbars are
39
41
 
40
42
  var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
41
- return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n width: ").concat(scrollBarSize, ";\n height: ").concat(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 ");
43
+ return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat((0, _functions.logicalCSS)('width', scrollBarSize), "\n ").concat((0, _functions.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 ");
42
44
  };
43
45
 
44
46
  exports.euiScrollBarStyles = euiScrollBarStyles;
@@ -92,12 +94,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
92
94
  */
93
95
 
94
96
 
95
- // TODO: How do we use Emotion to output the CSS class utilities instead?
96
97
  var euiYScroll = function euiYScroll(euiTheme) {
97
98
  var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
98
99
  height = _ref5.height;
99
100
 
100
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n height: ").concat(height || '100%', ";\n overflow-y: auto;\n overflow-x: hidden;\n &:focus {\n outline: none; /* 1 */\n }\n");
101
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSS)('height', height || '100%'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-y', 'auto'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
101
102
  };
102
103
 
103
104
  exports.euiYScroll = euiYScroll;
@@ -140,7 +141,7 @@ var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
140
141
  exports.useEuiYScrollWithShadows = useEuiYScrollWithShadows;
141
142
 
142
143
  var euiXScroll = function euiXScroll(euiTheme) {
143
- return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x: auto;\n &:focus {\n outline: none; /* 1 */\n }\n");
144
+ return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
144
145
  };
145
146
 
146
147
  exports.euiXScroll = euiXScroll;
@@ -196,5 +197,15 @@ var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
196
197
  mask: mask
197
198
  });
198
199
  };
200
+ /**
201
+ * For quickly applying a full-height element whether using flex or not
202
+ */
203
+
204
+
205
+ exports.useEuiOverflowScroll = useEuiOverflowScroll;
206
+
207
+ var euiFullHeight = function euiFullHeight() {
208
+ return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
209
+ };
199
210
 
200
- exports.useEuiOverflowScroll = useEuiOverflowScroll;
211
+ exports.euiFullHeight = euiFullHeight;
@@ -23,7 +23,8 @@ var _services = require("../../services");
23
23
  * @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
24
24
  * @param color Accepts any CSS color, **Note: only works in -webkit-**
25
25
  */
26
- var euiFocusRing = function euiFocusRing(euiTheme) {
26
+ var euiFocusRing = function euiFocusRing(_ref) {
27
+ var euiTheme = _ref.euiTheme;
27
28
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
28
29
  var options = arguments.length > 2 ? arguments[2] : undefined;
29
30
  // Width is enforced as a constant at the global theme layer
@@ -51,9 +52,7 @@ var euiFocusRing = function euiFocusRing(euiTheme) {
51
52
  exports.euiFocusRing = euiFocusRing;
52
53
 
53
54
  var useEuiFocusRing = function useEuiFocusRing(offset, color) {
54
- var _useEuiTheme = (0, _services.useEuiTheme)(),
55
- euiTheme = _useEuiTheme.euiTheme;
56
-
55
+ var euiTheme = (0, _services.useEuiTheme)();
57
56
  return euiFocusRing(euiTheme, offset, {
58
57
  color: color
59
58
  });