@elastic/eui 67.1.0 → 67.1.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 (153) hide show
  1. package/dist/eui_theme_dark.css +0 -292
  2. package/dist/eui_theme_dark.json +0 -24
  3. package/dist/eui_theme_dark.json.d.ts +0 -24
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -292
  6. package/dist/eui_theme_light.json +0 -24
  7. package/dist/eui_theme_light.json.d.ts +0 -24
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accordion/accordion.js +5 -4
  10. package/es/components/accordion/accordion.styles.js +1 -1
  11. package/es/components/badge/badge.styles.js +10 -4
  12. package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  13. package/es/components/button/button_icon/button_icon.js +11 -7
  14. package/es/components/collapsible_nav/collapsible_nav.js +8 -0
  15. package/es/components/expression/expression.styles.js +4 -2
  16. package/es/components/flyout/flyout.js +27 -48
  17. package/es/components/flyout/flyout.styles.js +111 -0
  18. package/es/components/flyout/flyout_body.js +14 -6
  19. package/es/components/flyout/flyout_body.styles.js +21 -0
  20. package/es/components/flyout/flyout_footer.js +8 -1
  21. package/es/components/flyout/flyout_footer.styles.js +14 -0
  22. package/es/components/flyout/flyout_header.js +9 -4
  23. package/es/components/flyout/flyout_header.styles.js +28 -0
  24. package/es/components/image/image_wrapper.js +3 -3
  25. package/es/components/markdown_editor/markdown_format.styles.js +11 -6
  26. package/es/components/page/page_header/page_header_content.js +1 -1
  27. package/es/components/page/page_section/page_section.js +3 -4
  28. package/es/components/pagination/pagination_button.styles.js +5 -3
  29. package/es/components/progress/progress.js +2 -2
  30. package/es/components/text/text.styles.js +6 -3
  31. package/es/components/tool_tip/tool_tip.styles.js +7 -6
  32. package/es/components/tour/tour.styles.js +11 -6
  33. package/es/global_styling/functions/index.js +1 -0
  34. package/es/global_styling/functions/math.js +46 -0
  35. package/es/global_styling/mixins/_helpers.js +5 -2
  36. package/eui.d.ts +95 -7
  37. package/i18ntokens.json +2 -2
  38. package/lib/components/accordion/accordion.js +5 -4
  39. package/lib/components/accordion/accordion.styles.js +1 -1
  40. package/lib/components/badge/badge.styles.js +9 -3
  41. package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  42. package/lib/components/button/button_icon/button_icon.js +11 -7
  43. package/lib/components/collapsible_nav/collapsible_nav.js +8 -0
  44. package/lib/components/expression/expression.styles.js +3 -1
  45. package/lib/components/flyout/flyout.js +27 -47
  46. package/lib/components/flyout/flyout.styles.js +122 -0
  47. package/lib/components/flyout/flyout_body.js +16 -6
  48. package/lib/components/flyout/flyout_body.styles.js +32 -0
  49. package/lib/components/flyout/flyout_footer.js +10 -1
  50. package/lib/components/flyout/flyout_footer.styles.js +24 -0
  51. package/lib/components/flyout/flyout_header.js +11 -4
  52. package/lib/components/flyout/flyout_header.styles.js +31 -0
  53. package/lib/components/image/image_wrapper.js +3 -3
  54. package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  55. package/lib/components/page/page_header/page_header_content.js +1 -1
  56. package/lib/components/page/page_section/page_section.js +3 -4
  57. package/lib/components/pagination/pagination_button.styles.js +4 -2
  58. package/lib/components/progress/progress.js +2 -2
  59. package/lib/components/text/text.styles.js +5 -2
  60. package/lib/components/tool_tip/tool_tip.styles.js +6 -5
  61. package/lib/components/tour/tour.styles.js +10 -5
  62. package/lib/global_styling/functions/index.js +13 -0
  63. package/lib/global_styling/functions/math.js +55 -0
  64. package/lib/global_styling/mixins/_helpers.js +5 -2
  65. package/optimize/es/components/accordion/accordion.js +5 -4
  66. package/optimize/es/components/accordion/accordion.styles.js +1 -1
  67. package/optimize/es/components/badge/badge.styles.js +10 -4
  68. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  69. package/optimize/es/components/button/button_icon/button_icon.js +11 -7
  70. package/optimize/es/components/expression/expression.styles.js +4 -2
  71. package/optimize/es/components/flyout/flyout.js +27 -48
  72. package/optimize/es/components/flyout/flyout.styles.js +111 -0
  73. package/optimize/es/components/flyout/flyout_body.js +14 -6
  74. package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
  75. package/optimize/es/components/flyout/flyout_footer.js +8 -1
  76. package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
  77. package/optimize/es/components/flyout/flyout_header.js +9 -4
  78. package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
  79. package/optimize/es/components/image/image_wrapper.js +3 -3
  80. package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
  81. package/optimize/es/components/page/page_header/page_header_content.js +1 -1
  82. package/optimize/es/components/page/page_section/page_section.js +3 -4
  83. package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
  84. package/optimize/es/components/progress/progress.js +2 -2
  85. package/optimize/es/components/text/text.styles.js +6 -3
  86. package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
  87. package/optimize/es/components/tour/tour.styles.js +11 -6
  88. package/optimize/es/global_styling/functions/index.js +1 -0
  89. package/optimize/es/global_styling/functions/math.js +44 -0
  90. package/optimize/es/global_styling/mixins/_helpers.js +5 -2
  91. package/optimize/lib/components/accordion/accordion.js +5 -4
  92. package/optimize/lib/components/accordion/accordion.styles.js +1 -1
  93. package/optimize/lib/components/badge/badge.styles.js +9 -3
  94. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  95. package/optimize/lib/components/button/button_icon/button_icon.js +11 -7
  96. package/optimize/lib/components/expression/expression.styles.js +3 -1
  97. package/optimize/lib/components/flyout/flyout.js +27 -47
  98. package/optimize/lib/components/flyout/flyout.styles.js +124 -0
  99. package/optimize/lib/components/flyout/flyout_body.js +16 -6
  100. package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
  101. package/optimize/lib/components/flyout/flyout_footer.js +10 -1
  102. package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
  103. package/optimize/lib/components/flyout/flyout_header.js +11 -4
  104. package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
  105. package/optimize/lib/components/image/image_wrapper.js +3 -3
  106. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  107. package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
  108. package/optimize/lib/components/page/page_section/page_section.js +3 -4
  109. package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
  110. package/optimize/lib/components/progress/progress.js +2 -2
  111. package/optimize/lib/components/text/text.styles.js +5 -2
  112. package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
  113. package/optimize/lib/components/tour/tour.styles.js +10 -5
  114. package/optimize/lib/global_styling/functions/index.js +13 -0
  115. package/optimize/lib/global_styling/functions/math.js +57 -0
  116. package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
  117. package/package.json +1 -1
  118. package/src/components/index.scss +0 -1
  119. package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
  120. package/test-env/components/accordion/accordion.js +5 -4
  121. package/test-env/components/accordion/accordion.styles.js +1 -1
  122. package/test-env/components/badge/badge.styles.js +9 -3
  123. package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
  124. package/test-env/components/button/button_icon/button_icon.js +11 -7
  125. package/test-env/components/collapsible_nav/collapsible_nav.js +8 -0
  126. package/test-env/components/expression/expression.styles.js +3 -1
  127. package/test-env/components/flyout/flyout.styles.js +124 -0
  128. package/test-env/components/flyout/flyout_body.js +16 -6
  129. package/test-env/components/flyout/flyout_body.styles.js +32 -0
  130. package/test-env/components/flyout/flyout_footer.js +10 -1
  131. package/test-env/components/flyout/flyout_footer.styles.js +24 -0
  132. package/test-env/components/flyout/flyout_header.js +11 -4
  133. package/test-env/components/flyout/flyout_header.styles.js +31 -0
  134. package/test-env/components/image/image_wrapper.js +3 -3
  135. package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
  136. package/test-env/components/page/page_header/page_header_content.js +1 -1
  137. package/test-env/components/page/page_section/page_section.js +3 -4
  138. package/test-env/components/pagination/pagination_button.styles.js +4 -2
  139. package/test-env/components/progress/progress.js +2 -2
  140. package/test-env/components/text/text.styles.js +5 -2
  141. package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
  142. package/test-env/components/tour/tour.styles.js +10 -5
  143. package/test-env/global_styling/functions/index.js +13 -0
  144. package/test-env/global_styling/functions/math.js +57 -0
  145. package/test-env/global_styling/mixins/_helpers.js +5 -2
  146. package/src/components/flyout/_flyout.scss +0 -196
  147. package/src/components/flyout/_flyout_body.scss +0 -18
  148. package/src/components/flyout/_flyout_footer.scss +0 -4
  149. package/src/components/flyout/_flyout_header.scss +0 -7
  150. package/src/components/flyout/_index.scss +0 -7
  151. package/src/components/flyout/_mixins.scss +0 -18
  152. package/src/components/flyout/_variables.scss +0 -8
  153. package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
@@ -17,6 +17,19 @@ Object.keys(_logicals).forEach(function (key) {
17
17
  });
18
18
  });
19
19
 
20
+ var _math = require("./math");
21
+
22
+ Object.keys(_math).forEach(function (key) {
23
+ if (key === "default" || key === "__esModule") return;
24
+ if (key in exports && exports[key] === _math[key]) return;
25
+ Object.defineProperty(exports, key, {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _math[key];
29
+ }
30
+ });
31
+ });
32
+
20
33
  var _size = require("./size");
21
34
 
22
35
  Object.keys(_size).forEach(function (key) {
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.mathWithUnits = void 0;
11
+
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
+
14
+ var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
15
+
16
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return (0, _setPrototypeOf2.default)(_this, BabelRegExp.prototype); } (0, _inherits2.default)(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
17
+
18
+ /*
19
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
20
+ * or more contributor license agreements. Licensed under the Elastic License
21
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
22
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
23
+ * Side Public License, v 1.
24
+ */
25
+
26
+ /**
27
+ * Utility for performing math callbacks on a string with CSS units
28
+ * and returning a string with its unit preserved.
29
+ *
30
+ * Example usage:
31
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
32
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
33
+ */
34
+ var mathWithUnits = function mathWithUnits(value, callback) {
35
+ var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
36
+
37
+ if (typeof value === 'string') {
38
+ var _matches$groups;
39
+
40
+ var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
41
+ value: 1,
42
+ unit: 2
43
+ });
44
+
45
+ var matches = regex.exec(value);
46
+ if (!(matches !== null && matches !== void 0 && (_matches$groups = matches.groups) !== null && _matches$groups !== void 0 && _matches$groups.value)) return value;
47
+ var numericValue = Number(matches.groups.value);
48
+ var passedUnit = matches.groups.unit || unit;
49
+ return "".concat(callback(numericValue)).concat(passedUnit);
50
+ } else if (typeof value === 'number') {
51
+ return "".concat(callback(value)).concat(unit);
52
+ } else {
53
+ return value;
54
+ }
55
+ };
56
+
57
+ exports.mathWithUnits = mathWithUnits;
@@ -117,12 +117,15 @@ exports.useEuiYScroll = useEuiYScroll;
117
117
 
118
118
  var euiYScrollWithShadows = function euiYScrollWithShadows(euiTheme) {
119
119
  var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
120
- height = _ref7.height;
120
+ height = _ref7.height,
121
+ _ref7$side = _ref7.side,
122
+ side = _ref7$side === void 0 ? 'both' : _ref7$side;
121
123
 
122
124
  return "\n ".concat(euiYScroll(euiTheme, {
123
125
  height: height
124
126
  }), "\n ").concat(euiOverflowShadowStyles(euiTheme, {
125
- direction: 'y'
127
+ direction: 'y',
128
+ side: side
126
129
  }), "\n");
127
130
  };
128
131
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "67.1.0",
4
+ "version": "67.1.1",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -16,7 +16,6 @@
16
16
  @import 'empty_prompt/index';
17
17
  @import 'filter_group/index';
18
18
  @import 'flex/index';
19
- @import 'flyout/index';
20
19
  @import 'form/index';
21
20
  @import 'header/index';
22
21
  @import 'key_pad_menu/index';
@@ -4,7 +4,6 @@
4
4
 
5
5
  @import 'buttons';
6
6
  @import 'borders';
7
- @import 'flyout';
8
7
  @import 'form';
9
8
  @import 'header';
10
9
  @import 'page';
@@ -213,10 +213,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
213
213
 
214
214
  if (_arrowDisplay !== 'none') {
215
215
  iconButton = (0, _react2.jsx)(_button.EuiButtonIcon, (0, _extends2.default)({
216
- color: "text"
216
+ color: "text",
217
+ css: cssIconButtonStyles
217
218
  }, arrowProps, {
218
219
  className: iconButtonClasses,
219
- css: cssIconButtonStyles,
220
220
  iconType: "arrowRight",
221
221
  onClick: this.onToggle,
222
222
  "aria-controls": id,
@@ -252,10 +252,11 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
252
252
  childrenContent = children;
253
253
  }
254
254
 
255
- var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({}, buttonProps, {
255
+ var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({
256
+ css: cssButtonStyles
257
+ }, buttonProps, {
256
258
  id: buttonId,
257
259
  className: buttonClasses,
258
- css: cssButtonStyles,
259
260
  "aria-controls": id,
260
261
  "aria-expanded": isOpen,
261
262
  onClick: isDisabled ? undefined : this.onToggle,
@@ -50,7 +50,7 @@ exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
50
50
  var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
51
51
  var euiTheme = _ref6.euiTheme;
52
52
  return {
53
- euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", _global_styling.logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
53
+ euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
54
54
  isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
55
55
  };
56
56
  };
@@ -28,14 +28,18 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
28
28
  var euiTheme = euiThemeContext.euiTheme,
29
29
  colorMode = euiThemeContext.colorMode;
30
30
  return {
31
- euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", parseFloat(String(euiTheme.border.radius.medium)) / 2, "px;", (0, _global_styling.logicalTextAlignCSS)('left'), " &:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
31
+ euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.medium, function (x) {
32
+ return x / 2;
33
+ }), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " &:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
32
34
  clickable: /*#__PURE__*/(0, _react.css)("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
33
35
  disabled: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').color, "!important;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').backgroundColor, "!important;;label:disabled;"),
34
36
  // Hollow has a border and is mostly used for autocompleters.
35
37
  hollow: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";border-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.border.color, 0.15) : euiTheme.border.color, ";color:", euiTheme.colors.text, ";;label:hollow;"),
36
38
  // Content wrapper
37
39
  euiBadge__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)( // Ensure proper height in case of just displaying an icon
38
- 'min-height', "".concat(euiTheme.base + parseFloat(String(euiTheme.border.width.thin)) * 2, "px")), " display:flex;align-items:center;overflow:hidden;;label:euiBadge__content;"),
40
+ 'min-height', "".concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
41
+ return euiTheme.base + x * 2;
42
+ }))), " display:flex;align-items:center;overflow:hidden;;label:euiBadge__content;"),
39
43
  // Text
40
44
  text: {
41
45
  euiBadge__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " cursor:inherit;;label:euiBadge__text;"),
@@ -49,7 +53,9 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
49
53
  },
50
54
  // Clickable icons (iconOnClick)
51
55
  iconButton: {
52
- euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:", parseFloat(String(euiTheme.border.radius.small)) / 2, "px;}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
56
+ euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
57
+ return x / 2;
58
+ }), ";}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
53
59
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:right;"),
54
60
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:left;")
55
61
  },
@@ -52,7 +52,9 @@ var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeCon
52
52
  var euiTheme = euiThemeContext.euiTheme;
53
53
  return {
54
54
  euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
55
- isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
55
+ isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
56
+ return x * 10;
57
+ })), ";;label:isTruncated;"),
56
58
  isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
57
59
  // Types
58
60
  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;"),
@@ -85,11 +85,15 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
85
85
 
86
86
 
87
87
  var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
88
- var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
89
- display: display
90
- })[color]; // Temporary extra style for empty `:hover` state until we decide how to handle universally
91
-
92
- var hoverStyles = display === 'empty' ? /*#__PURE__*/(0, _react2.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;") : /*#__PURE__*/(0, _react2.css)(";label:hoverStyles;");
88
+ var styles = {
89
+ euiButtonIcon: /*#__PURE__*/(0, _react2.css)(";label:euiButtonIcon;"),
90
+ colors: (0, _button.useEuiButtonColorCSS)({
91
+ display: display
92
+ }),
93
+ // Temporary extra style for empty `:hover` state until we decide how to handle universally
94
+ hoverStyles: /*#__PURE__*/(0, _react2.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;")
95
+ };
96
+ var cssStyles = [styles.euiButtonIcon, styles.colors[color], display === 'empty' && styles.hoverStyles];
93
97
  var classes = (0, _classnames.default)('euiButtonIcon', size && sizeToClassNameMap[size], className);
94
98
 
95
99
  if (_color === 'ghost') {
@@ -135,7 +139,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
135
139
  rel: rel
136
140
  });
137
141
  return (0, _react2.jsx)("a", (0, _extends2.default)({
138
- css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
142
+ css: cssStyles,
139
143
  tabIndex: isAriaHidden ? -1 : undefined,
140
144
  className: classes,
141
145
  href: href,
@@ -147,7 +151,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
147
151
 
148
152
  var buttonType;
149
153
  return (0, _react2.jsx)("button", (0, _extends2.default)({
150
- css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
154
+ css: cssStyles,
151
155
  tabIndex: isAriaHidden ? -1 : undefined,
152
156
  disabled: isDisabled,
153
157
  className: classes,
@@ -139,6 +139,7 @@ EuiCollapsibleNav.propTypes = {
139
139
  /**
140
140
  * Defines the width of the panel.
141
141
  * Pass a predefined size of `s | m | l`, or pass any number/string compatible with the CSS `width` attribute
142
+ * @default m
142
143
  */
143
144
  size: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
144
145
 
@@ -148,21 +149,25 @@ EuiCollapsibleNav.propTypes = {
148
149
  * set to `false` to not restrict the width,
149
150
  * set to a number for a custom width in px,
150
151
  * set to a string for a custom width in custom measurement.
152
+ * @default false
151
153
  */
152
154
  maxWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
153
155
 
154
156
  /**
155
157
  * Customize the padding around the content of the flyout header, body and footer
158
+ * @default l
156
159
  */
157
160
  paddingSize: _propTypes.default.any,
158
161
 
159
162
  /**
160
163
  * Adds an EuiOverlayMask and wraps in an EuiPortal
164
+ * @default true
161
165
  */
162
166
  ownFocus: _propTypes.default.bool,
163
167
 
164
168
  /**
165
169
  * Hides the default close button. You must provide another close button somewhere within the flyout.
170
+ * @default false
166
171
  */
167
172
  hideCloseButton: _propTypes.default.bool,
168
173
 
@@ -175,6 +180,7 @@ EuiCollapsibleNav.propTypes = {
175
180
  * Position of close button.
176
181
  * `inside`: Floating to just inside the flyout, always top right;
177
182
  * `outside`: Floating just outside the flyout near the top (side dependent on `side`). Helpful when the close button may cover other interactable content.
183
+ * @default inside
178
184
  */
179
185
  closeButtonPosition: _propTypes.default.oneOf(["inside", "outside"]),
180
186
 
@@ -212,12 +218,14 @@ EuiCollapsibleNav.propTypes = {
212
218
  /**
213
219
  * Which side of the window to attach to.
214
220
  * The `left` option should only be used for navigation.
221
+ * @default right
215
222
  */
216
223
  side: _propTypes.default.any,
217
224
 
218
225
  /**
219
226
  * Defaults to `dialog` which is best for most cases of the flyout.
220
227
  * Otherwise pass in your own, aria-role, or `null` to remove it and use the semantic `as` element instead
228
+ * @default dialog
221
229
  */
222
230
  role: _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.string.isRequired]),
223
231
 
@@ -24,7 +24,9 @@ var _colorCSS = function _colorCSS(color) {
24
24
  var euiExpressionStyles = function euiExpressionStyles(euiThemeContext) {
25
25
  var euiTheme = euiThemeContext.euiTheme;
26
26
  return {
27
- euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:", parseFloat(euiTheme.size.s) / 2, "px 0;color:", euiTheme.colors.text, ";&:focus{", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), ";}&+.euiExpression{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
27
+ euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:", (0, _global_styling.mathWithUnits)(euiTheme.size.s, function (x) {
28
+ return x / 2;
29
+ }), " 0;color:", euiTheme.colors.text, ";&:focus{", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), ";}&+.euiExpression{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
28
30
  // Variants
29
31
  columns: /*#__PURE__*/(0, _react.css)("border-color:transparent;", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('width', '100%'), " display:flex;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.size.xs, ";;label:columns;"),
30
32
  truncate: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:truncate;"),
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.euiFlyoutStyles = exports.euiFlyoutCloseButtonStyles = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
+
12
+ var _react = require("@emotion/react");
13
+
14
+ var _global_styling = require("../../global_styling");
15
+
16
+ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
17
+
18
+ var _color = require("../../services/color");
19
+
20
+ var _form = require("../form/form.styles");
21
+
22
+ var _templateObject, _templateObject2;
23
+
24
+ var euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
25
+ var euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n}\n"])));
26
+
27
+ var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
28
+ var euiTheme = euiThemeContext.euiTheme;
29
+ return {
30
+ euiFlyout__closeButton: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
31
+ inside: /*#__PURE__*/(0, _react.css)("background-color:", (0, _color.transparentize)(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
32
+ outside: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";animation:none!important;;label:outside;"),
33
+ outsideSide: {
34
+ // `transforms` pull in close buttons a little
35
+ // `!important` is necessary here to override the hover/focus transitions of buttons
36
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;};label:right;"),
37
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;};label:left;")
38
+ }
39
+ };
40
+ };
41
+
42
+ exports.euiFlyoutCloseButtonStyles = euiFlyoutCloseButtonStyles;
43
+
44
+ var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
45
+ var euiTheme = euiThemeContext.euiTheme;
46
+ return {
47
+ euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
48
+ // Flyout sizes
49
+ s: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
50
+ m: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
51
+ l: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'l'), ";;label:l;"),
52
+ noMaxWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', 'none'), ";;label:noMaxWidth;"),
53
+ // Side
54
+ right: /*#__PURE__*/(0, _react.css)("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", (0, _global_styling.logicalCSS)('right', 0), " ", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:right;"),
55
+ // Left-side flyouts should only be used for navigation
56
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, ";};label:left;"),
57
+ // Type
58
+ overlay: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";;label:overlay;"),
59
+ push: /*#__PURE__*/(0, _react.css)("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
60
+ pushSide: {
61
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thick), ";;label:right;"),
62
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-right', euiTheme.border.thick), ";;label:left;")
63
+ },
64
+ // Padding
65
+ paddingSizes: {
66
+ none: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
67
+ s: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 's'), ";;label:s;"),
68
+ m: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'm'), ";;label:m;"),
69
+ l: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'l'), ";;label:l;")
70
+ }
71
+ };
72
+ };
73
+
74
+ exports.euiFlyoutStyles = euiFlyoutStyles;
75
+
76
+ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
77
+ var euiTheme = euiThemeContext.euiTheme; // 1. Calculating the minimum width based on the screen takeover breakpoint
78
+
79
+ var flyoutSizes = {
80
+ s: {
81
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.5), "px"),
82
+ // 1.
83
+ width: '25vw',
84
+ max: "".concat(Math.round(euiTheme.breakpoint.s * 0.7), "px")
85
+ },
86
+ m: {
87
+ // Calculated for forms plus padding
88
+ min: "".concat((0, _global_styling.mathWithUnits)((0, _form.euiFormMaxWidth)(euiThemeContext), function (x) {
89
+ return x + 24;
90
+ })),
91
+ width: '50vw',
92
+ max: "".concat(euiTheme.breakpoint.m, "px")
93
+ },
94
+ l: {
95
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.9), "px"),
96
+ // 1.
97
+ width: '75vw',
98
+ max: "".concat(euiTheme.breakpoint.l, "px")
99
+ }
100
+ };
101
+ return "\n ".concat((0, _global_styling.logicalCSS)('max-width', flyoutSizes[size].max), "\n\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', flyoutSizes[size].min), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].width), "\n }\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].min), "\n }\n ");
102
+ };
103
+
104
+ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
105
+ var euiTheme = euiThemeContext.euiTheme;
106
+ var paddingModifierMap = {
107
+ none: 0,
108
+ s: euiTheme.size.s,
109
+ m: euiTheme.size.base,
110
+ l: euiTheme.size.l
111
+ }; // Footer padding
112
+
113
+ var footerPaddingSizes = {
114
+ none: 0,
115
+ s: euiTheme.size.s,
116
+ m: "".concat((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
117
+ return x * 0.75;
118
+ }), " ").concat(euiTheme.size.base, ";"),
119
+ l: "".concat((0, _global_styling.mathWithUnits)(euiTheme.size.l, function (x) {
120
+ return x / 1.5;
121
+ }), " ").concat(euiTheme.size.l, ";")
122
+ };
123
+ return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
124
+ };
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
+ var _services = require("../../services");
21
+
22
+ var _flyout_body = require("./flyout_body.styles");
23
+
20
24
  var _react2 = require("@emotion/react");
21
25
 
22
26
  var _excluded = ["children", "className", "banner"];
@@ -27,16 +31,22 @@ var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
27
31
  banner = _ref.banner,
28
32
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
29
33
  var classes = (0, _classnames.default)('euiFlyoutBody', className);
30
- var overflowClasses = (0, _classnames.default)('euiFlyoutBody__overflow', {
31
- 'euiFlyoutBody__overflow--hasBanner': banner
32
- });
34
+ var euiTheme = (0, _services.useEuiTheme)();
35
+ var styles = (0, _flyout_body.euiFlyoutBodyStyles)(euiTheme);
36
+ var cssStyles = [styles.euiFlyoutBody];
37
+ var bannerCssStyles = [banner && styles.euiFlyoutBody__banner];
38
+ var overflowCssStyles = [banner ? styles.euiFlyoutBody__overflow.hasBanner : styles.euiFlyoutBody__overflow.noBanner];
33
39
  return (0, _react2.jsx)("div", (0, _extends2.default)({
34
40
  className: classes
35
- }, rest), (0, _react2.jsx)("div", {
41
+ }, rest, {
42
+ css: cssStyles
43
+ }), (0, _react2.jsx)("div", {
36
44
  tabIndex: 0,
37
- className: overflowClasses
45
+ className: "euiFlyoutBody__overflow",
46
+ css: overflowCssStyles
38
47
  }, banner && (0, _react2.jsx)("div", {
39
- className: "euiFlyoutBody__banner"
48
+ className: "euiFlyoutBody__banner",
49
+ css: bannerCssStyles
40
50
  }, banner), (0, _react2.jsx)("div", {
41
51
  className: "euiFlyoutBody__overflowContent"
42
52
  }, children)));
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutBodyStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ /*
13
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
+ * or more contributor license agreements. Licensed under the Elastic License
15
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
17
+ * Side Public License, v 1.
18
+ */
19
+ var euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
20
+ return {
21
+ euiFlyoutBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:euiFlyoutBody;"),
22
+ euiFlyoutBody__overflow: {
23
+ noBanner: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";;label:noBanner;"),
24
+ hasBanner: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext, {
25
+ side: 'end'
26
+ }), ";;label:hasBanner;")
27
+ },
28
+ euiFlyoutBody__banner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-x', 'hidden'), ";;label:euiFlyoutBody__banner;")
29
+ };
30
+ };
31
+
32
+ exports.euiFlyoutBodyStyles = euiFlyoutBodyStyles;
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
+ var _services = require("../../services");
21
+
22
+ var _flyout_footer = require("./flyout_footer.styles");
23
+
20
24
  var _react2 = require("@emotion/react");
21
25
 
22
26
  var _excluded = ["children", "className"];
@@ -26,9 +30,14 @@ var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
26
30
  className = _ref.className,
27
31
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
28
32
  var classes = (0, _classnames.default)('euiFlyoutFooter', className);
33
+ var euiTheme = (0, _services.useEuiTheme)();
34
+ var styles = (0, _flyout_footer.euiFlyoutFooterStyles)(euiTheme);
35
+ var cssStyles = [styles.euiFlyoutFooter];
29
36
  return (0, _react2.jsx)("div", (0, _extends2.default)({
30
37
  className: classes
31
- }, rest), children);
38
+ }, rest, {
39
+ css: cssStyles
40
+ }), children);
32
41
  };
33
42
 
34
43
  exports.EuiFlyoutFooter = EuiFlyoutFooter;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutFooterStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ /*
11
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
+ * or more contributor license agreements. Licensed under the Elastic License
13
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
15
+ * Side Public License, v 1.
16
+ */
17
+ var euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
18
+ var euiTheme = euiThemeContext.euiTheme;
19
+ return {
20
+ euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";flex-grow:0;;label:euiFlyoutFooter;")
21
+ };
22
+ };
23
+
24
+ exports.euiFlyoutFooterStyles = euiFlyoutFooterStyles;
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
+ var _services = require("../../services");
21
+
22
+ var _flyout_header = require("./flyout_header.styles");
23
+
20
24
  var _react2 = require("@emotion/react");
21
25
 
22
26
  var _excluded = ["children", "className", "hasBorder"];
@@ -27,12 +31,15 @@ var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
27
31
  _ref$hasBorder = _ref.hasBorder,
28
32
  hasBorder = _ref$hasBorder === void 0 ? false : _ref$hasBorder,
29
33
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
- var classes = (0, _classnames.default)('euiFlyoutHeader', {
31
- 'euiFlyoutHeader--hasBorder': hasBorder
32
- }, className);
34
+ var classes = (0, _classnames.default)('euiFlyoutHeader', className);
35
+ var euiTheme = (0, _services.useEuiTheme)();
36
+ var styles = (0, _flyout_header.euiFlyoutHeaderStyles)(euiTheme);
37
+ var cssStyles = [styles.euiFlyoutHeader, hasBorder && styles.hasBorder];
33
38
  return (0, _react2.jsx)("div", (0, _extends2.default)({
34
39
  className: classes
35
- }, rest), children);
40
+ }, rest, {
41
+ css: cssStyles
42
+ }), children);
36
43
  };
37
44
 
38
45
  exports.EuiFlyoutHeader = EuiFlyoutHeader;