@elastic/eui 69.0.0 → 70.0.0

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 (191) hide show
  1. package/dist/eui_theme_dark.css +0 -375
  2. package/dist/eui_theme_dark.json +0 -27
  3. package/dist/eui_theme_dark.json.d.ts +0 -27
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -375
  6. package/dist/eui_theme_light.json +0 -27
  7. package/dist/eui_theme_light.json.d.ts +0 -27
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/basic_table/in_memory_table.js +8 -2
  10. package/es/components/code/code.js +7 -3
  11. package/es/components/code/code.styles.js +32 -0
  12. package/es/components/code/code_block.js +72 -315
  13. package/es/components/code/code_block.styles.js +153 -0
  14. package/es/components/code/code_block_controls.js +29 -0
  15. package/es/components/code/code_block_controls.styles.js +43 -0
  16. package/es/components/code/code_block_copy.js +65 -0
  17. package/es/components/code/code_block_full_screen.js +90 -0
  18. package/es/components/code/code_block_line.styles.js +49 -0
  19. package/es/components/code/code_block_overflow.js +78 -0
  20. package/es/components/code/code_block_virtualized.js +59 -0
  21. package/es/components/code/code_syntax.styles.js +43 -0
  22. package/es/components/code/utils.js +43 -37
  23. package/es/components/collapsible_nav/collapsible_nav.js +0 -5
  24. package/es/components/overlay_mask/overlay_mask.js +8 -14
  25. package/es/components/overlay_mask/overlay_mask.styles.js +4 -14
  26. package/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
  27. package/es/components/provider/provider.js +1 -5
  28. package/es/components/resizable_container/helpers.js +2 -2
  29. package/es/components/resizable_container/resizable_container.js +6 -9
  30. package/es/components/resizable_container/resizable_container.styles.js +28 -0
  31. package/es/components/resizable_container/resizable_panel.js +25 -48
  32. package/es/components/resizable_container/resizable_panel.styles.js +69 -0
  33. package/es/components/search_bar/query/ast.js +14 -3
  34. package/es/components/tool_tip/tool_tip.js +3 -2
  35. package/es/components/tool_tip/tool_tip.styles.js +17 -22
  36. package/es/components/tool_tip/tool_tip_arrow.js +17 -3
  37. package/es/components/tool_tip/tool_tip_popover.js +7 -7
  38. package/es/components/tour/tour.styles.js +4 -3
  39. package/es/components/tour/tour_step.js +7 -5
  40. package/es/global_styling/functions/logicals.js +5 -3
  41. package/es/global_styling/functions/math.js +37 -19
  42. package/es/global_styling/mixins/_padding.js +13 -9
  43. package/eui.d.ts +291 -37
  44. package/i18ntokens.json +22 -22
  45. package/lib/components/basic_table/in_memory_table.js +8 -2
  46. package/lib/components/code/code.js +9 -3
  47. package/lib/components/code/code.styles.js +35 -0
  48. package/lib/components/code/code_block.js +72 -320
  49. package/lib/components/code/code_block.styles.js +154 -0
  50. package/lib/components/code/code_block_controls.js +48 -0
  51. package/lib/components/code/code_block_controls.styles.js +39 -0
  52. package/lib/components/code/code_block_copy.js +78 -0
  53. package/lib/components/code/code_block_full_screen.js +108 -0
  54. package/lib/components/code/code_block_line.styles.js +45 -0
  55. package/lib/components/code/code_block_overflow.js +82 -0
  56. package/lib/components/code/code_block_virtualized.js +72 -0
  57. package/lib/components/code/code_syntax.styles.js +57 -0
  58. package/lib/components/code/utils.js +40 -39
  59. package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
  60. package/lib/components/overlay_mask/overlay_mask.js +9 -14
  61. package/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
  62. package/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
  63. package/lib/components/provider/provider.js +7 -12
  64. package/lib/components/resizable_container/helpers.js +2 -2
  65. package/lib/components/resizable_container/resizable_container.js +7 -9
  66. package/lib/components/resizable_container/resizable_container.styles.js +31 -0
  67. package/lib/components/resizable_container/resizable_panel.js +28 -49
  68. package/lib/components/resizable_container/resizable_panel.styles.js +74 -0
  69. package/lib/components/search_bar/query/ast.js +14 -3
  70. package/lib/components/tool_tip/tool_tip.js +3 -2
  71. package/lib/components/tool_tip/tool_tip.styles.js +18 -26
  72. package/lib/components/tool_tip/tool_tip_arrow.js +19 -4
  73. package/lib/components/tool_tip/tool_tip_popover.js +6 -6
  74. package/lib/components/tour/tour.styles.js +3 -2
  75. package/lib/components/tour/tour_step.js +7 -5
  76. package/lib/global_styling/functions/logicals.js +5 -3
  77. package/lib/global_styling/functions/math.js +37 -19
  78. package/lib/global_styling/mixins/_padding.js +17 -10
  79. package/optimize/es/components/basic_table/in_memory_table.js +1 -1
  80. package/optimize/es/components/code/code.js +7 -3
  81. package/optimize/es/components/code/code.styles.js +32 -0
  82. package/optimize/es/components/code/code_block.js +70 -299
  83. package/optimize/es/components/code/code_block.styles.js +153 -0
  84. package/optimize/es/components/code/code_block_controls.js +29 -0
  85. package/optimize/es/components/code/code_block_controls.styles.js +43 -0
  86. package/optimize/es/components/code/code_block_copy.js +55 -0
  87. package/optimize/es/components/code/code_block_full_screen.js +80 -0
  88. package/optimize/es/components/code/code_block_line.styles.js +49 -0
  89. package/optimize/es/components/code/code_block_overflow.js +67 -0
  90. package/optimize/es/components/code/code_block_virtualized.js +59 -0
  91. package/optimize/es/components/code/code_syntax.styles.js +43 -0
  92. package/optimize/es/components/code/utils.js +43 -37
  93. package/optimize/es/components/overlay_mask/overlay_mask.js +8 -9
  94. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +4 -14
  95. package/optimize/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
  96. package/optimize/es/components/provider/provider.js +1 -5
  97. package/optimize/es/components/resizable_container/helpers.js +2 -2
  98. package/optimize/es/components/resizable_container/resizable_container.js +6 -9
  99. package/optimize/es/components/resizable_container/resizable_container.styles.js +28 -0
  100. package/optimize/es/components/resizable_container/resizable_panel.js +25 -48
  101. package/optimize/es/components/resizable_container/resizable_panel.styles.js +69 -0
  102. package/optimize/es/components/search_bar/query/ast.js +14 -3
  103. package/optimize/es/components/tool_tip/tool_tip.js +3 -2
  104. package/optimize/es/components/tool_tip/tool_tip.styles.js +17 -22
  105. package/optimize/es/components/tool_tip/tool_tip_arrow.js +9 -3
  106. package/optimize/es/components/tool_tip/tool_tip_popover.js +7 -7
  107. package/optimize/es/components/tour/tour.styles.js +4 -3
  108. package/optimize/es/components/tour/tour_step.js +7 -5
  109. package/optimize/es/global_styling/functions/logicals.js +5 -3
  110. package/optimize/es/global_styling/functions/math.js +35 -17
  111. package/optimize/es/global_styling/mixins/_padding.js +13 -9
  112. package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
  113. package/optimize/lib/components/code/code.js +9 -3
  114. package/optimize/lib/components/code/code.styles.js +35 -0
  115. package/optimize/lib/components/code/code_block.js +71 -306
  116. package/optimize/lib/components/code/code_block.styles.js +156 -0
  117. package/optimize/lib/components/code/code_block_controls.js +48 -0
  118. package/optimize/lib/components/code/code_block_controls.styles.js +39 -0
  119. package/optimize/lib/components/code/code_block_copy.js +78 -0
  120. package/optimize/lib/components/code/code_block_full_screen.js +108 -0
  121. package/optimize/lib/components/code/code_block_line.styles.js +45 -0
  122. package/optimize/lib/components/code/code_block_overflow.js +82 -0
  123. package/optimize/lib/components/code/code_block_virtualized.js +81 -0
  124. package/optimize/lib/components/code/code_syntax.styles.js +57 -0
  125. package/optimize/lib/components/code/utils.js +40 -37
  126. package/optimize/lib/components/overlay_mask/overlay_mask.js +9 -9
  127. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
  128. package/optimize/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
  129. package/optimize/lib/components/provider/provider.js +7 -12
  130. package/optimize/lib/components/resizable_container/helpers.js +2 -2
  131. package/optimize/lib/components/resizable_container/resizable_container.js +7 -9
  132. package/optimize/lib/components/resizable_container/resizable_container.styles.js +31 -0
  133. package/optimize/lib/components/resizable_container/resizable_panel.js +28 -49
  134. package/optimize/lib/components/resizable_container/resizable_panel.styles.js +76 -0
  135. package/optimize/lib/components/search_bar/query/ast.js +14 -3
  136. package/optimize/lib/components/tool_tip/tool_tip.js +3 -2
  137. package/optimize/lib/components/tool_tip/tool_tip.styles.js +18 -26
  138. package/optimize/lib/components/tool_tip/tool_tip_arrow.js +10 -10
  139. package/optimize/lib/components/tool_tip/tool_tip_popover.js +6 -6
  140. package/optimize/lib/components/tour/tour.styles.js +3 -2
  141. package/optimize/lib/components/tour/tour_step.js +7 -5
  142. package/optimize/lib/global_styling/functions/logicals.js +4 -10
  143. package/optimize/lib/global_styling/functions/math.js +37 -19
  144. package/optimize/lib/global_styling/mixins/_padding.js +17 -10
  145. package/package.json +8 -7
  146. package/src/components/index.scss +0 -1
  147. package/src/components/resizable_container/_index.scss +0 -2
  148. package/src/global_styling/mixins/_header.scss +1 -1
  149. package/src/global_styling/variables/_index.scss +0 -1
  150. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  151. package/test-env/components/basic_table/in_memory_table.js +8 -2
  152. package/test-env/components/code/code.styles.js +35 -0
  153. package/test-env/components/code/code_block.styles.js +156 -0
  154. package/test-env/components/code/code_block_controls.js +48 -0
  155. package/test-env/components/code/code_block_controls.styles.js +39 -0
  156. package/test-env/components/code/code_block_copy.js +78 -0
  157. package/test-env/components/code/code_block_full_screen.js +108 -0
  158. package/test-env/components/code/code_block_line.styles.js +45 -0
  159. package/test-env/components/code/code_block_overflow.js +82 -0
  160. package/test-env/components/code/code_block_virtualized.js +81 -0
  161. package/test-env/components/code/code_syntax.styles.js +57 -0
  162. package/test-env/components/code/utils.js +40 -37
  163. package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
  164. package/test-env/components/overlay_mask/overlay_mask.js +9 -14
  165. package/test-env/components/overlay_mask/overlay_mask.styles.js +13 -17
  166. package/test-env/components/overlay_mask/overlay_mask_body.styles.js +20 -0
  167. package/test-env/components/provider/provider.js +7 -12
  168. package/test-env/components/resizable_container/helpers.js +2 -2
  169. package/test-env/components/resizable_container/resizable_container.js +7 -9
  170. package/test-env/components/resizable_container/resizable_container.styles.js +31 -0
  171. package/test-env/components/resizable_container/resizable_panel.js +28 -49
  172. package/test-env/components/resizable_container/resizable_panel.styles.js +76 -0
  173. package/test-env/components/search_bar/query/ast.js +14 -3
  174. package/test-env/components/tool_tip/tool_tip.js +3 -2
  175. package/test-env/components/tool_tip/tool_tip.styles.js +18 -26
  176. package/test-env/components/tool_tip/tool_tip_arrow.js +16 -11
  177. package/test-env/components/tool_tip/tool_tip_popover.js +6 -6
  178. package/test-env/components/tour/tour.styles.js +3 -2
  179. package/test-env/components/tour/tour_step.js +7 -5
  180. package/test-env/global_styling/functions/logicals.js +4 -10
  181. package/test-env/global_styling/functions/math.js +37 -19
  182. package/test-env/global_styling/mixins/_padding.js +17 -10
  183. package/src/components/code/_code.scss +0 -15
  184. package/src/components/code/_code_block.scss +0 -177
  185. package/src/components/code/_index.scss +0 -4
  186. package/src/components/code/_mixins.scss +0 -127
  187. package/src/components/code/_variables.scss +0 -5
  188. package/src/components/resizable_container/_resizable_container.scss +0 -8
  189. package/src/components/resizable_container/_resizable_panel.scss +0 -51
  190. package/src/global_styling/variables/_colors_code.scss +0 -23
  191. package/src/themes/amsterdam/overrides/_code.scss +0 -9
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiCodeSyntaxTokens = exports.euiCodeSyntaxColors = void 0;
7
+
8
+ var _services = require("../../services");
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 visColors = (0, _services.euiPaletteColorBlind)();
18
+
19
+ var euiCodeSyntaxColors = function euiCodeSyntaxColors(euiThemeContext) {
20
+ var euiTheme = euiThemeContext.euiTheme;
21
+ var backgroundColor = euiTheme.colors.lightestShade;
22
+ return {
23
+ backgroundColor: backgroundColor,
24
+ color: (0, _services.makeHighContrastColor)(euiTheme.colors.text)(backgroundColor),
25
+ inlineCodeColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor),
26
+ selectedBackgroundColor: 'inherit',
27
+ commentColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
28
+ selectorTagColor: 'inherit',
29
+ stringColor: (0, _services.makeHighContrastColor)(visColors[2])(backgroundColor),
30
+ tagColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
31
+ nameColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
32
+ numberColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor),
33
+ keywordColor: (0, _services.makeHighContrastColor)(visColors[3])(backgroundColor),
34
+ functionTitleColor: 'inherit',
35
+ typeColor: (0, _services.makeHighContrastColor)(visColors[1])(backgroundColor),
36
+ attributeColor: 'inherit',
37
+ symbolColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor),
38
+ paramsColor: 'inherit',
39
+ metaColor: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
40
+ titleColor: (0, _services.makeHighContrastColor)(visColors[7])(backgroundColor),
41
+ sectionColor: (0, _services.makeHighContrastColor)(visColors[9])(backgroundColor),
42
+ additionColor: (0, _services.makeHighContrastColor)(visColors[0])(backgroundColor),
43
+ deletionColor: (0, _services.makeHighContrastColor)(euiTheme.colors.danger)(backgroundColor),
44
+ selectorClassColor: 'inherit',
45
+ selectorIdColor: 'inherit'
46
+ };
47
+ };
48
+
49
+ exports.euiCodeSyntaxColors = euiCodeSyntaxColors;
50
+
51
+ var euiCodeSyntaxTokens = function euiCodeSyntaxTokens(euiThemeContext) {
52
+ var euiTheme = euiThemeContext.euiTheme;
53
+ var euiCodeBlock = euiCodeSyntaxColors(euiThemeContext);
54
+ return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n \n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(euiCodeBlock.commentColor, ";\n font-style: italic;\n }\n \n .token.selector {\n color: ").concat(euiCodeBlock.selectorTagColor, ";\n }\n \n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(euiCodeBlock.stringColor, ";\n }\n \n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(euiCodeBlock.numberColor, ";\n }\n \n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(euiCodeBlock.keywordColor, ";\n }\n \n .token.function {\n color: ").concat(euiCodeBlock.functionTitleColor, ";\n }\n \n .token.tag {\n color: ").concat(euiCodeBlock.tagColor, ";\n }\n \n .token.class-name {\n color: ").concat(euiCodeBlock.typeColor, ";\n }\n \n .token.property {\n color: ").concat(euiCodeBlock.attributeColor, ";\n }\n \n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(euiCodeBlock.symbolColor, ";\n }\n \n .token.paramater {\n color: ").concat(euiCodeBlock.paramsColor, ";\n }\n \n .token.meta,\n .token.important {\n color: ").concat(euiCodeBlock.metaColor, ";\n }\n \n .token.title {\n color: ").concat(euiCodeBlock.titleColor, ";\n }\n \n .token.section {\n color: ").concat(euiCodeBlock.sectionColor, ";\n }\n \n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n \n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.additionColor, ";\n color: ").concat(euiCodeBlock.additionColor, ";\n }\n \n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.deletionColor, ";\n color: ").concat(euiCodeBlock.deletionColor, ";\n }\n \n .token.selector .token.class {\n color: ").concat(euiCodeBlock.selectorClassColor, ";\n }\n \n .token.selector .token.id {\n color: ").concat(euiCodeBlock.selectorIdColor, ";\n }\n \n .token.italic {\n font-style: italic;\n }\n \n .token.important,\n .token.bold {\n font-weight: $euiCodeFontWeightBold;\n }\n \n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n \n .token.entity {\n cursor: help;\n }\n ");
55
+ };
56
+
57
+ exports.euiCodeSyntaxTokens = euiCodeSyntaxTokens;
@@ -11,11 +11,11 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _refractor = require("refractor");
13
13
 
14
- var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _css = require("@emotion/css");
15
15
 
16
- var _react2 = require("@emotion/react");
16
+ var _code_block_line = require("./code_block_line.styles");
17
17
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
21
 
@@ -64,7 +64,7 @@ var nodeToHtml = function nodeToHtml(node, idx, nodes) {
64
64
  children = node.children;
65
65
  return /*#__PURE__*/(0, _react.createElement)(tagName, _objectSpread(_objectSpread({}, properties), {}, {
66
66
  key: key,
67
- className: (0, _classnames.default)(properties.className)
67
+ className: (0, _css.cx)(properties.className)
68
68
  }), children && children.map(function (el, i) {
69
69
  return nodeToHtml(el, i, nodes, depth + 1);
70
70
  }));
@@ -81,8 +81,7 @@ var nodeToHtml = function nodeToHtml(node, idx, nodes) {
81
81
 
82
82
  exports.nodeToHtml = nodeToHtml;
83
83
  // Approximate width of a single digit/character
84
- var CHAR_SIZE = 8;
85
- var $euiSizeS = 8; // Creates an array of numbers from comma-separeated
84
+ var CHAR_SIZE = 8; // Creates an array of numbers from comma-separeated
86
85
  // string of numbers or number ranges using `-`
87
86
  // (e.g., "1, 3-10, 15")
88
87
 
@@ -157,8 +156,7 @@ var addLineData = function addLineData(nodes, data) {
157
156
  }, []);
158
157
  };
159
158
 
160
- function wrapLines(nodes, options) {
161
- var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
159
+ function wrapLines(nodes, options, euiTheme) {
162
160
  var grouped = [];
163
161
  nodes.forEach(function (node) {
164
162
  var lineStart = node.lineStart - 1;
@@ -170,41 +168,44 @@ function wrapLines(nodes, options) {
170
168
  }
171
169
  });
172
170
  var wrapped = [];
173
- var digits = grouped.length.toString().length;
174
- var width = digits * CHAR_SIZE;
175
171
  grouped.forEach(function (node, i) {
176
- var _properties;
177
-
178
- var lineNumber = i + 1;
179
- var classes = (0, _classnames.default)('euiCodeBlock__line', {
180
- 'euiCodeBlock__line--isHighlighted': highlights.includes(lineNumber)
181
- });
182
- var children = options.showLineNumbers ? [{
183
- type: 'element',
184
- tagName: 'span',
185
- properties: (_properties = {
186
- style: {
187
- width: width
188
- }
189
- }, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties, 'aria-hidden', true), _defineProperty(_properties, "className", ['euiCodeBlock__lineNumber']), _properties),
190
- children: []
191
- }, {
192
- type: 'element',
193
- tagName: 'span',
194
- properties: {
195
- style: {
196
- marginLeft: width + $euiSizeS,
197
- width: "calc(100% - ".concat(width, "px)")
172
+ var children = node;
173
+ var styles = (0, _code_block_line.euiCodeBlockLineStyles)(euiTheme);
174
+ var lineStyles = (0, _css.cx)([styles.euiCodeBlock__line, options.showLineNumbers && styles.hasLineNumbers]);
175
+
176
+ if (options.showLineNumbers) {
177
+ var _properties;
178
+
179
+ var lineNumber = i + 1;
180
+ var digits = grouped.length.toString().length;
181
+ var width = digits * CHAR_SIZE;
182
+ var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
183
+ var lineTextStyles = (0, _css.cx)([styles.lineText.euiCodeBlock__lineText, highlights.includes(lineNumber) && styles.lineText.isHighlighted]);
184
+ var lineNumberStyles = (0, _css.cx)(styles.lineNumber.euiCodeBlock__lineNumber);
185
+ children = [{
186
+ type: 'element',
187
+ tagName: 'span',
188
+ properties: (_properties = {
189
+ style: {
190
+ inlineSize: width
191
+ }
192
+ }, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties, 'aria-hidden', true), _defineProperty(_properties, "className", ['euiCodeBlock__lineNumber', lineNumberStyles]), _properties),
193
+ children: []
194
+ }, {
195
+ type: 'element',
196
+ tagName: 'span',
197
+ properties: {
198
+ className: ['euiCodeBlock__lineText', lineTextStyles]
198
199
  },
199
- className: ['euiCodeBlock__lineText']
200
- },
201
- children: node
202
- }] : node;
200
+ children: node
201
+ }];
202
+ }
203
+
203
204
  wrapped.push({
204
205
  type: 'element',
205
206
  tagName: 'span',
206
207
  properties: {
207
- className: [classes]
208
+ className: ['euiCodeBlock__line', lineStyles]
208
209
  },
209
210
  children: children
210
211
  });
@@ -212,13 +213,13 @@ function wrapLines(nodes, options) {
212
213
  return wrapped;
213
214
  }
214
215
 
215
- var highlightByLine = function highlightByLine(children, language, data) {
216
+ var highlightByLine = function highlightByLine(children, language, data, euiTheme) {
216
217
  return wrapLines(addLineData((0, _refractor.highlight)(children, language), {
217
218
  lineNumber: data.start
218
219
  }), {
219
220
  showLineNumbers: data.show,
220
221
  highlight: data.highlight
221
- });
222
+ }, euiTheme);
222
223
  };
223
224
 
224
225
  exports.highlightByLine = highlightByLine;
@@ -200,11 +200,6 @@ EuiCollapsibleNav.propTypes = {
200
200
  * Adjustments to the EuiOverlayMask that is added when `ownFocus = true`
201
201
  */
202
202
  maskProps: _propTypes.default.shape({
203
- className: _propTypes.default.string,
204
- "aria-label": _propTypes.default.string,
205
- "data-test-subj": _propTypes.default.string,
206
- css: _propTypes.default.any,
207
-
208
203
  /**
209
204
  * ReactNode to render as this component's content
210
205
  */
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
- var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _css = require("@emotion/css");
15
15
 
16
16
  var _react2 = require("@emotion/react");
17
17
 
@@ -23,7 +23,9 @@ var _portal = require("../portal");
23
23
 
24
24
  var _overlay_mask = require("./overlay_mask.styles");
25
25
 
26
- var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
26
+ var _overlay_mask_body = require("./overlay_mask_body.styles");
27
+
28
+ var _excluded = ["className", "children", "headerZindexLocation", "maskRef"];
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
31
 
@@ -53,7 +55,6 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
53
55
  _ref$headerZindexLoca = _ref.headerZindexLocation,
54
56
  headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
55
57
  maskRef = _ref.maskRef,
56
- css = _ref.css,
57
58
  rest = _objectWithoutProperties(_ref, _excluded);
58
59
 
59
60
  var _useState = (0, _react.useState)(null),
@@ -64,7 +65,7 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
64
65
  var combinedMaskRef = (0, _services.useCombinedRefs)([setOverlayMaskNode, maskRef]);
65
66
  var euiTheme = (0, _services.useEuiTheme)();
66
67
  var styles = (0, _overlay_mask.euiOverlayMaskStyles)(euiTheme);
67
- var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
68
+ var cssStyles = (0, _css.cx)([styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]]);
68
69
  (0, _react.useEffect)(function () {
69
70
  if (!overlayMaskNode) return;
70
71
  (0, _common.keysOf)(rest).forEach(function (key) {
@@ -80,24 +81,18 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
80
81
 
81
82
  (0, _react.useEffect)(function () {
82
83
  if (!overlayMaskNode) return;
83
- overlayMaskNode.className = (0, _classnames.default)('euiOverlayMask', className);
84
- }, [overlayMaskNode, className]);
84
+ overlayMaskNode.className = (0, _css.cx)('euiOverlayMask', cssStyles, className);
85
+ overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
86
+ }, [overlayMaskNode, className, cssStyles, headerZindexLocation]);
85
87
  return (0, _react2.jsx)(_portal.EuiPortal, {
86
88
  portalRef: combinedMaskRef
87
89
  }, (0, _react2.jsx)(_react2.Global, {
88
- styles: _overlay_mask.euiOverlayMaskBodyStyles
89
- }), (0, _react2.jsx)(_react2.Global, {
90
- styles: cssStyles
90
+ styles: _overlay_mask_body.euiOverlayMaskBodyStyles
91
91
  }), children);
92
92
  };
93
93
 
94
94
  exports.EuiOverlayMask = EuiOverlayMask;
95
95
  EuiOverlayMask.propTypes = {
96
- className: _propTypes.default.string,
97
- "aria-label": _propTypes.default.string,
98
- "data-test-subj": _propTypes.default.string,
99
- css: _propTypes.default.any,
100
-
101
96
  /**
102
97
  * ReactNode to render as this component's content
103
98
  */
@@ -3,32 +3,28 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.euiOverlayMaskStyles = exports.euiOverlayMaskBodyStyles = void 0;
6
+ exports.euiOverlayMaskStyles = void 0;
7
7
 
8
- var _react = require("@emotion/react");
8
+ var _css = require("@emotion/css");
9
9
 
10
10
  var _global_styling = require("../../global_styling");
11
11
 
12
12
  var _services = require("../../services");
13
13
 
14
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
15
-
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
16
21
  var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
17
22
  var euiTheme = _ref.euiTheme;
18
23
  return {
19
- euiOverlayMask: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " display:flex;align-items:center;justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', '10vh'), ";animation:", _global_styling.euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", (0, _services.transparentize)(euiTheme.colors.ink, 0.5), ";};label:euiOverlayMask;"),
20
- aboveHeader: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{z-index:", euiTheme.levels.mask, ";};label:aboveHeader;"),
21
- belowHeader: /*#__PURE__*/(0, _react.css)(".euiOverlayMask{z-index:", euiTheme.levels.maskBelowHeader, ";", (0, _global_styling.logicalCSS)('top', "".concat(euiTheme.base * 3, "px")), ";};label:belowHeader;")
24
+ euiOverlayMask: /*#__PURE__*/(0, _css.css)("position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " display:flex;align-items:center;justify-content:center;", (0, _global_styling.logicalCSS)('padding-bottom', '10vh'), ";animation:", _global_styling.euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", (0, _services.transparentize)(euiTheme.colors.ink, 0.5), ";;label:euiOverlayMask;"),
25
+ aboveHeader: /*#__PURE__*/(0, _css.css)("z-index:", euiTheme.levels.mask, ";;label:aboveHeader;"),
26
+ belowHeader: /*#__PURE__*/(0, _css.css)("z-index:", euiTheme.levels.maskBelowHeader, ";", (0, _global_styling.logicalCSS)('top', "".concat(euiTheme.base * 3, "px")), ";;label:belowHeader;")
22
27
  };
23
28
  };
24
29
 
25
- exports.euiOverlayMaskStyles = euiOverlayMaskStyles;
26
- var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
27
- name: "131160-euiOverlayMaskBodyStyles",
28
- styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
29
- } : {
30
- name: "131160-euiOverlayMaskBodyStyles",
31
- styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
32
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
- };
34
- exports.euiOverlayMaskBodyStyles = euiOverlayMaskBodyStyles;
30
+ exports.euiOverlayMaskStyles = euiOverlayMaskStyles;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiOverlayMaskBodyStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
11
+
12
+ var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
13
+ name: "131160-euiOverlayMaskBodyStyles",
14
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
15
+ } : {
16
+ name: "131160-euiOverlayMaskBodyStyles",
17
+ styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ };
20
+ exports.euiOverlayMaskBodyStyles = euiOverlayMaskBodyStyles;
@@ -7,7 +7,7 @@ exports.EuiProvider = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _cache = _interopRequireDefault(require("@emotion/cache"));
10
+ var _css = require("@emotion/css");
11
11
 
12
12
  var _global_styles = require("../../global_styling/reset/global_styles");
13
13
 
@@ -17,7 +17,7 @@ var _services = require("../../services");
17
17
 
18
18
  var _themes = require("../../themes");
19
19
 
20
- var _cache2 = require("./cache");
20
+ var _cache = require("./cache");
21
21
 
22
22
  var _react2 = require("@emotion/react");
23
23
 
@@ -34,16 +34,11 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
34
34
  return obj.hasOwnProperty('key');
35
35
  };
36
36
 
37
- var fallbackCache = (0, _cache.default)({
38
- key: 'css'
39
- });
40
- fallbackCache.compat = true;
41
-
42
37
  var EuiProvider = function EuiProvider(_ref) {
43
38
  var _defaultCache;
44
39
 
45
40
  var _ref$cache = _ref.cache,
46
- cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
41
+ cache = _ref$cache === void 0 ? _css.cache : _ref$cache,
47
42
  _ref$theme = _ref.theme,
48
43
  theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
49
44
  _ref$globalStyles = _ref.globalStyles,
@@ -82,16 +77,16 @@ var EuiProvider = function EuiProvider(_ref) {
82
77
  }
83
78
  }
84
79
 
85
- return (0, _react2.jsx)(_cache2.EuiCacheProvider, {
86
- cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
80
+ return (0, _react2.jsx)(_cache.EuiCacheProvider, {
81
+ cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : _css.cache
87
82
  }, (0, _react2.jsx)(_services.EuiThemeProvider, {
88
83
  theme: theme !== null && theme !== void 0 ? theme : undefined,
89
84
  colorMode: colorMode,
90
85
  modify: modify
91
- }, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache2.EuiCacheProvider, {
86
+ }, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache.EuiCacheProvider, {
92
87
  cache: globalCache,
93
88
  children: Globals && (0, _react2.jsx)(Globals, null)
94
- }), (0, _react2.jsx)(_cache2.EuiCacheProvider, {
89
+ }), (0, _react2.jsx)(_cache.EuiCacheProvider, {
95
90
  cache: utilityCache,
96
91
  children: Utilities && (0, _react2.jsx)(Utilities, null)
97
92
  })), (0, _react2.jsx)(_services.CurrentEuiBreakpointProvider, null, children)));
@@ -51,7 +51,7 @@ exports.sizesOnly = sizesOnly;
51
51
 
52
52
  var _getPanelMinSize = function _getPanelMinSize(panelMinSize, containerSize) {
53
53
  var panelMinSizePercent = 0;
54
- var panelMinSizeInt = parseInt(panelMinSize);
54
+ var panelMinSizeInt = parseFloat(panelMinSize);
55
55
 
56
56
  if (panelMinSize.indexOf('px') > -1) {
57
57
  panelMinSizePercent = pxToPercent(panelMinSizeInt, containerSize);
@@ -86,7 +86,7 @@ var getSiblingPanel = function getSiblingPanel(element, adjacency) {
86
86
  var sibling = element[method];
87
87
 
88
88
  while (sibling) {
89
- if (sibling.matches('.euiResizablePanel:not(.euiResizablePanel-isCollapsed)')) {
89
+ if (sibling.matches('.euiResizablePanel:not([data-collapsed])')) {
90
90
  return sibling;
91
91
  }
92
92
 
@@ -25,6 +25,8 @@ var _resizable_panel = require("./resizable_panel");
25
25
 
26
26
  var _helpers = require("./helpers");
27
27
 
28
+ var _resizable_container = require("./resizable_container.styles");
29
+
28
30
  var _react2 = require("@emotion/react");
29
31
 
30
32
  var _excluded = ["direction", "children", "className", "onPanelWidthChange", "onToggleCollapsed", "onResizeStart", "onResizeEnd"];
@@ -59,10 +61,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
59
61
 
60
62
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
61
63
 
62
- var containerDirections = {
63
- vertical: 'vertical',
64
- horizontal: 'horizontal'
65
- };
66
64
  var initialState = {
67
65
  isDragging: false,
68
66
  currentResizerPos: -1,
@@ -85,11 +83,10 @@ var EuiResizableContainer = function EuiResizableContainer(_ref) {
85
83
  rest = _objectWithoutProperties(_ref, _excluded);
86
84
 
87
85
  var containerRef = (0, _react.useRef)(null);
88
- var isHorizontal = direction === containerDirections.horizontal;
89
- var classes = (0, _classnames.default)('euiResizableContainer', {
90
- 'euiResizableContainer--vertical': !isHorizontal,
91
- 'euiResizableContainer--horizontal': isHorizontal
92
- }, className);
86
+ var isHorizontal = direction === 'horizontal';
87
+ var classes = (0, _classnames.default)('euiResizableContainer', className);
88
+ var styles = (0, _resizable_container.euiResizableContainerStyles)();
89
+ var cssStyles = [styles.euiResizableContainer, styles[direction]];
93
90
 
94
91
  var _useContainerCallback = (0, _helpers.useContainerCallbacks)({
95
92
  initialState: _objectSpread(_objectSpread({}, initialState), {}, {
@@ -262,6 +259,7 @@ var EuiResizableContainer = function EuiResizableContainer(_ref) {
262
259
  resizers: reducerState.resizers
263
260
  }
264
261
  }, (0, _react2.jsx)("div", _extends({
262
+ css: cssStyles,
265
263
  className: classes,
266
264
  ref: containerRef,
267
265
  onMouseMove: reducerState.isDragging ? onMouseMove : undefined,
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiResizableContainerStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
13
+
14
+ var _ref = process.env.NODE_ENV === "production" ? {
15
+ name: "omnk2l-vertical",
16
+ styles: "flex-direction:column;label:vertical;"
17
+ } : {
18
+ name: "omnk2l-vertical",
19
+ styles: "flex-direction:column;label:vertical;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
22
+
23
+ var euiResizableContainerStyles = function euiResizableContainerStyles() {
24
+ return {
25
+ euiResizableContainer: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiResizableContainer;"),
26
+ horizontal: /*#__PURE__*/(0, _react.css)(";label:horizontal;"),
27
+ vertical: _ref
28
+ };
29
+ };
30
+
31
+ exports.euiResizableContainerStyles = euiResizableContainerStyles;
@@ -13,16 +13,20 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
- var _context = require("./context");
17
-
18
16
  var _services = require("../../services");
19
17
 
18
+ var _global_styling = require("../../global_styling");
19
+
20
+ var _context = require("./context");
21
+
20
22
  var _panel = require("../panel");
21
23
 
22
24
  var _i18n = require("../i18n");
23
25
 
24
26
  var _resizable_collapse_button = require("./resizable_collapse_button");
25
27
 
28
+ var _resizable_panel = require("./resizable_panel.styles");
29
+
26
30
  var _react2 = require("@emotion/react");
27
31
 
28
32
  var _excluded = ["children", "className", "id", "isHorizontal", "size", "initialSize", "minSize", "scrollable", "mode", "registration", "onToggleCollapsed", "onToggleCollapsedInternal", "wrapperProps", "hasShadow", "borderRadius", "color", "paddingSize", "wrapperPadding"];
@@ -47,14 +51,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
47
51
 
48
52
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
49
53
 
50
- var panelPaddingValues = {
51
- none: 0,
52
- xs: 4,
53
- s: 8,
54
- m: 16,
55
- l: 24,
56
- xl: 32
57
- };
58
54
  var defaultToggleOptions = {
59
55
  className: null,
60
56
  'data-test-subj': undefined,
@@ -72,12 +68,6 @@ var getToggleOptions = function getToggleOptions(mode) {
72
68
  };
73
69
 
74
70
  exports.getToggleOptions = getToggleOptions;
75
- var paddingSizeToClassNameMap = {
76
- none: null,
77
- s: 'euiResizablePanel--paddingSmall',
78
- m: 'euiResizablePanel--paddingMedium',
79
- l: 'euiResizablePanel--paddingLarge'
80
- };
81
71
 
82
72
  var getPosition = function getPosition(ref) {
83
73
  var position = 'middle';
@@ -184,34 +174,18 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
184
174
 
185
175
  return direction;
186
176
  }, [isCollapsed, isCollapsible, position, panels, panelId]);
187
- var padding = (0, _react.useMemo)(function () {
188
- return "".concat(panelPaddingValues[paddingSize] * 2, "px");
189
- }, [paddingSize]);
190
- var classes = (0, _classnames.default)('euiResizablePanel', // @ts-expect-error EuiPanel increased its available sizes
191
- // When we convert this component to Emotion, we should also increase sizes to match EuiPanel and remove this comment.
192
- paddingSizeToClassNameMap[wrapperPadding], {
193
- 'euiResizablePanel--collapsible': isCollapsible,
194
- 'euiResizablePanel-isCollapsed': isCollapsed
195
- }, "euiResizablePanel--".concat(position), wrapperProps && wrapperProps.className);
196
- var panelClasses = (0, _classnames.default)('euiResizablePanel__content', {
197
- 'euiResizablePanel__content--scrollable': scrollable
198
- }, className);
199
- var dimensions;
200
-
201
- if (size) {
202
- dimensions = {
203
- width: isHorizontal ? "".concat(size, "%") : '100%',
204
- height: isHorizontal ? 'auto' : "".concat(size, "%")
205
- };
206
- } else {
207
- dimensions = {
208
- width: isHorizontal ? "".concat(innerSize, "%") : '100%',
209
- height: isHorizontal ? 'auto' : "".concat(innerSize, "%")
210
- };
211
- }
212
-
213
- var styles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), dimensions);
214
-
177
+ var axis = isHorizontal ? 'horizontal' : 'vertical';
178
+ var euiTheme = (0, _services.useEuiTheme)();
179
+ var styles = (0, _resizable_panel.euiResizablePanelStyles)(euiTheme);
180
+ var cssStyles = [styles.euiResizablePanel, isCollapsed && styles.collapsed, styles.paddingSizes[wrapperPadding]];
181
+ var contentStyles = (0, _resizable_panel.euiResizablePanelContentStyles)(euiTheme);
182
+ var contentCssStyles = [contentStyles.euiResizablePanel__content, scrollable && contentStyles.scrollable, isCollapsed && contentStyles.collapsedChildren, isCollapsed && !isCollapsible && contentStyles[axis].collapsed, isCollapsible && contentStyles[axis].hasCollapsibleButton];
183
+ var classes = (0, _classnames.default)('euiResizablePanel', wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
184
+ var panelClasses = (0, _classnames.default)('euiResizablePanel__content', className);
185
+
186
+ var inlineStyles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), isHorizontal ? (0, _global_styling.logicalSizeStyle)("".concat(size || innerSize, "%"), 'auto') : (0, _global_styling.logicalSizeStyle)('100%', "".concat(size || innerSize, "%")));
187
+
188
+ var padding = (0, _global_styling.euiPaddingSize)(euiTheme, paddingSize) || '0px';
215
189
  (0, _react.useEffect)(function () {
216
190
  if (!registration) return;
217
191
  var initSize = size !== null && size !== void 0 ? size : initialSize || 0;
@@ -263,7 +237,7 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
263
237
  theResizer = resizers[resizerIds.current[0]];
264
238
  theToggle = (0, _react2.jsx)(_resizable_collapse_button.EuiResizableCollapseButton, {
265
239
  externalPosition: "before",
266
- direction: isHorizontal ? 'horizontal' : 'vertical',
240
+ direction: axis,
267
241
  isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
268
242
  isCollapsed: theResizer && theResizer.isDisabled,
269
243
  internalPosition: toggleOpts.position,
@@ -275,7 +249,7 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
275
249
  theResizer = resizers[resizerIds.current[1]];
276
250
  theToggle = (0, _react2.jsx)(_resizable_collapse_button.EuiResizableCollapseButton, {
277
251
  externalPosition: "after",
278
- direction: isHorizontal ? 'horizontal' : 'vertical',
252
+ direction: axis,
279
253
  isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
280
254
  isCollapsed: theResizer && theResizer.isDisabled,
281
255
  internalPosition: toggleOpts.position,
@@ -285,12 +259,17 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
285
259
  });
286
260
  }
287
261
 
288
- return (0, _react2.jsx)("div", _extends({}, wrapperProps, {
262
+ return (0, _react2.jsx)("div", _extends({
263
+ css: cssStyles
264
+ }, wrapperProps, {
289
265
  id: panelId,
290
266
  ref: divRef,
291
- style: styles,
292
- className: classes
267
+ style: inlineStyles,
268
+ className: classes,
269
+ "data-collapsed": isCollapsed || undefined,
270
+ "data-position": position
293
271
  }), hasVisibleToggle && hasLeftToggle && theToggle, (0, _react2.jsx)(_panel.EuiPanel, _extends({
272
+ css: contentCssStyles,
294
273
  className: panelClasses,
295
274
  hasShadow: hasShadow,
296
275
  borderRadius: borderRadius,