@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;
@@ -15,7 +15,9 @@ var _react = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _refractor = require("refractor");
17
17
 
18
- var _classnames = _interopRequireDefault(require("classnames"));
18
+ var _css = require("@emotion/css");
19
+
20
+ var _code_block_line = require("./code_block_line.styles");
19
21
 
20
22
  var _react2 = require("@emotion/react");
21
23
 
@@ -64,7 +66,7 @@ var nodeToHtml = function nodeToHtml(node, idx, nodes) {
64
66
  children = node.children;
65
67
  return /*#__PURE__*/(0, _react.createElement)(tagName, _objectSpread(_objectSpread({}, properties), {}, {
66
68
  key: key,
67
- className: (0, _classnames.default)(properties.className)
69
+ className: (0, _css.cx)(properties.className)
68
70
  }), children && children.map(function (el, i) {
69
71
  return nodeToHtml(el, i, nodes, depth + 1);
70
72
  }));
@@ -81,8 +83,7 @@ var nodeToHtml = function nodeToHtml(node, idx, nodes) {
81
83
 
82
84
  exports.nodeToHtml = nodeToHtml;
83
85
  // Approximate width of a single digit/character
84
- var CHAR_SIZE = 8;
85
- var $euiSizeS = 8; // Creates an array of numbers from comma-separeated
86
+ var CHAR_SIZE = 8; // Creates an array of numbers from comma-separeated
86
87
  // string of numbers or number ranges using `-`
87
88
  // (e.g., "1, 3-10, 15")
88
89
 
@@ -157,8 +158,7 @@ var addLineData = function addLineData(nodes, data) {
157
158
  }, []);
158
159
  };
159
160
 
160
- function wrapLines(nodes, options) {
161
- var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
161
+ function wrapLines(nodes, options, euiTheme) {
162
162
  var grouped = [];
163
163
  nodes.forEach(function (node) {
164
164
  var lineStart = node.lineStart - 1;
@@ -170,41 +170,44 @@ function wrapLines(nodes, options) {
170
170
  }
171
171
  });
172
172
  var wrapped = [];
173
- var digits = grouped.length.toString().length;
174
- var width = digits * CHAR_SIZE;
175
173
  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
- }, (0, _defineProperty2.default)(_properties, 'data-line-number', lineNumber), (0, _defineProperty2.default)(_properties, 'aria-hidden', true), (0, _defineProperty2.default)(_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)")
174
+ var children = node;
175
+ var styles = (0, _code_block_line.euiCodeBlockLineStyles)(euiTheme);
176
+ var lineStyles = (0, _css.cx)([styles.euiCodeBlock__line, options.showLineNumbers && styles.hasLineNumbers]);
177
+
178
+ if (options.showLineNumbers) {
179
+ var _properties;
180
+
181
+ var lineNumber = i + 1;
182
+ var digits = grouped.length.toString().length;
183
+ var width = digits * CHAR_SIZE;
184
+ var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
185
+ var lineTextStyles = (0, _css.cx)([styles.lineText.euiCodeBlock__lineText, highlights.includes(lineNumber) && styles.lineText.isHighlighted]);
186
+ var lineNumberStyles = (0, _css.cx)(styles.lineNumber.euiCodeBlock__lineNumber);
187
+ children = [{
188
+ type: 'element',
189
+ tagName: 'span',
190
+ properties: (_properties = {
191
+ style: {
192
+ inlineSize: width
193
+ }
194
+ }, (0, _defineProperty2.default)(_properties, 'data-line-number', lineNumber), (0, _defineProperty2.default)(_properties, 'aria-hidden', true), (0, _defineProperty2.default)(_properties, "className", ['euiCodeBlock__lineNumber', lineNumberStyles]), _properties),
195
+ children: []
196
+ }, {
197
+ type: 'element',
198
+ tagName: 'span',
199
+ properties: {
200
+ className: ['euiCodeBlock__lineText', lineTextStyles]
198
201
  },
199
- className: ['euiCodeBlock__lineText']
200
- },
201
- children: node
202
- }] : node;
202
+ children: node
203
+ }];
204
+ }
205
+
203
206
  wrapped.push({
204
207
  type: 'element',
205
208
  tagName: 'span',
206
209
  properties: {
207
- className: [classes]
210
+ className: ['euiCodeBlock__line', lineStyles]
208
211
  },
209
212
  children: children
210
213
  });
@@ -212,13 +215,13 @@ function wrapLines(nodes, options) {
212
215
  return wrapped;
213
216
  }
214
217
 
215
- var highlightByLine = function highlightByLine(children, language, data) {
218
+ var highlightByLine = function highlightByLine(children, language, data, euiTheme) {
216
219
  return wrapLines(addLineData((0, _refractor.highlight)(children, language), {
217
220
  lineNumber: data.start
218
221
  }), {
219
222
  showLineNumbers: data.show,
220
223
  highlight: data.highlight
221
- });
224
+ }, euiTheme);
222
225
  };
223
226
 
224
227
  exports.highlightByLine = highlightByLine;
@@ -15,7 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
15
15
 
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
 
18
- var _classnames = _interopRequireDefault(require("classnames"));
18
+ var _css = require("@emotion/css");
19
19
 
20
20
  var _react2 = require("@emotion/react");
21
21
 
@@ -27,7 +27,9 @@ var _portal = require("../portal");
27
27
 
28
28
  var _overlay_mask = require("./overlay_mask.styles");
29
29
 
30
- var _excluded = ["className", "children", "headerZindexLocation", "maskRef", "css"];
30
+ var _overlay_mask_body = require("./overlay_mask_body.styles");
31
+
32
+ var _excluded = ["className", "children", "headerZindexLocation", "maskRef"];
31
33
 
32
34
  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); }
33
35
 
@@ -39,7 +41,6 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
39
41
  _ref$headerZindexLoca = _ref.headerZindexLocation,
40
42
  headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
41
43
  maskRef = _ref.maskRef,
42
- css = _ref.css,
43
44
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
44
45
 
45
46
  var _useState = (0, _react.useState)(null),
@@ -50,7 +51,7 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
50
51
  var combinedMaskRef = (0, _services.useCombinedRefs)([setOverlayMaskNode, maskRef]);
51
52
  var euiTheme = (0, _services.useEuiTheme)();
52
53
  var styles = (0, _overlay_mask.euiOverlayMaskStyles)(euiTheme);
53
- var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
54
+ var cssStyles = (0, _css.cx)([styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]]);
54
55
  (0, _react.useEffect)(function () {
55
56
  if (!overlayMaskNode) return;
56
57
  (0, _common.keysOf)(rest).forEach(function (key) {
@@ -66,14 +67,13 @@ var EuiOverlayMask = function EuiOverlayMask(_ref) {
66
67
 
67
68
  (0, _react.useEffect)(function () {
68
69
  if (!overlayMaskNode) return;
69
- overlayMaskNode.className = (0, _classnames.default)('euiOverlayMask', className);
70
- }, [overlayMaskNode, className]);
70
+ overlayMaskNode.className = (0, _css.cx)('euiOverlayMask', cssStyles, className);
71
+ overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
72
+ }, [overlayMaskNode, className, cssStyles, headerZindexLocation]);
71
73
  return (0, _react2.jsx)(_portal.EuiPortal, {
72
74
  portalRef: combinedMaskRef
73
75
  }, (0, _react2.jsx)(_react2.Global, {
74
- styles: _overlay_mask.euiOverlayMaskBodyStyles
75
- }), (0, _react2.jsx)(_react2.Global, {
76
- styles: cssStyles
76
+ styles: _overlay_mask_body.euiOverlayMaskBodyStyles
77
77
  }), children);
78
78
  };
79
79
 
@@ -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;
@@ -9,7 +9,7 @@ exports.EuiProvider = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _cache = _interopRequireDefault(require("@emotion/cache"));
12
+ var _css = require("@emotion/css");
13
13
 
14
14
  var _global_styles = require("../../global_styling/reset/global_styles");
15
15
 
@@ -19,7 +19,7 @@ var _services = require("../../services");
19
19
 
20
20
  var _themes = require("../../themes");
21
21
 
22
- var _cache2 = require("./cache");
22
+ var _cache = require("./cache");
23
23
 
24
24
  var _react2 = require("@emotion/react");
25
25
 
@@ -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)));
@@ -43,7 +43,7 @@ exports.sizesOnly = sizesOnly;
43
43
 
44
44
  var _getPanelMinSize = function _getPanelMinSize(panelMinSize, containerSize) {
45
45
  var panelMinSizePercent = 0;
46
- var panelMinSizeInt = parseInt(panelMinSize);
46
+ var panelMinSizeInt = parseFloat(panelMinSize);
47
47
 
48
48
  if (panelMinSize.indexOf('px') > -1) {
49
49
  panelMinSizePercent = pxToPercent(panelMinSizeInt, containerSize);
@@ -78,7 +78,7 @@ var getSiblingPanel = function getSiblingPanel(element, adjacency) {
78
78
  var sibling = element[method];
79
79
 
80
80
  while (sibling) {
81
- if (sibling.matches('.euiResizablePanel:not(.euiResizablePanel-isCollapsed)')) {
81
+ if (sibling.matches('.euiResizablePanel:not([data-collapsed])')) {
82
82
  return sibling;
83
83
  }
84
84
 
@@ -33,6 +33,8 @@ var _resizable_panel = require("./resizable_panel");
33
33
 
34
34
  var _helpers = require("./helpers");
35
35
 
36
+ var _resizable_container = require("./resizable_container.styles");
37
+
36
38
  var _react2 = require("@emotion/react");
37
39
 
38
40
  var _excluded = ["direction", "children", "className", "onPanelWidthChange", "onToggleCollapsed", "onResizeStart", "onResizeEnd"];
@@ -45,10 +47,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
45
47
 
46
48
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
47
49
 
48
- var containerDirections = {
49
- vertical: 'vertical',
50
- horizontal: 'horizontal'
51
- };
52
50
  var initialState = {
53
51
  isDragging: false,
54
52
  currentResizerPos: -1,
@@ -70,11 +68,10 @@ var EuiResizableContainer = function EuiResizableContainer(_ref) {
70
68
  onResizeEnd = _ref.onResizeEnd,
71
69
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
72
70
  var containerRef = (0, _react.useRef)(null);
73
- var isHorizontal = direction === containerDirections.horizontal;
74
- var classes = (0, _classnames.default)('euiResizableContainer', {
75
- 'euiResizableContainer--vertical': !isHorizontal,
76
- 'euiResizableContainer--horizontal': isHorizontal
77
- }, className);
71
+ var isHorizontal = direction === 'horizontal';
72
+ var classes = (0, _classnames.default)('euiResizableContainer', className);
73
+ var styles = (0, _resizable_container.euiResizableContainerStyles)();
74
+ var cssStyles = [styles.euiResizableContainer, styles[direction]];
78
75
 
79
76
  var _useContainerCallback = (0, _helpers.useContainerCallbacks)({
80
77
  initialState: _objectSpread(_objectSpread({}, initialState), {}, {
@@ -247,6 +244,7 @@ var EuiResizableContainer = function EuiResizableContainer(_ref) {
247
244
  resizers: reducerState.resizers
248
245
  }
249
246
  }, (0, _react2.jsx)("div", (0, _extends2.default)({
247
+ css: cssStyles,
250
248
  className: classes,
251
249
  ref: containerRef,
252
250
  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;
@@ -23,16 +23,20 @@ var _react = _interopRequireWildcard(require("react"));
23
23
 
24
24
  var _classnames = _interopRequireDefault(require("classnames"));
25
25
 
26
- var _context = require("./context");
27
-
28
26
  var _services = require("../../services");
29
27
 
28
+ var _global_styling = require("../../global_styling");
29
+
30
+ var _context = require("./context");
31
+
30
32
  var _panel = require("../panel");
31
33
 
32
34
  var _i18n = require("../i18n");
33
35
 
34
36
  var _resizable_collapse_button = require("./resizable_collapse_button");
35
37
 
38
+ var _resizable_panel = require("./resizable_panel.styles");
39
+
36
40
  var _react2 = require("@emotion/react");
37
41
 
38
42
  var _excluded = ["children", "className", "id", "isHorizontal", "size", "initialSize", "minSize", "scrollable", "mode", "registration", "onToggleCollapsed", "onToggleCollapsedInternal", "wrapperProps", "hasShadow", "borderRadius", "color", "paddingSize", "wrapperPadding"];
@@ -45,14 +49,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
45
49
 
46
50
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
47
51
 
48
- var panelPaddingValues = {
49
- none: 0,
50
- xs: 4,
51
- s: 8,
52
- m: 16,
53
- l: 24,
54
- xl: 32
55
- };
56
52
  var defaultToggleOptions = {
57
53
  className: null,
58
54
  'data-test-subj': undefined,
@@ -70,12 +66,6 @@ var getToggleOptions = function getToggleOptions(mode) {
70
66
  };
71
67
 
72
68
  exports.getToggleOptions = getToggleOptions;
73
- var paddingSizeToClassNameMap = {
74
- none: null,
75
- s: 'euiResizablePanel--paddingSmall',
76
- m: 'euiResizablePanel--paddingMedium',
77
- l: 'euiResizablePanel--paddingLarge'
78
- };
79
69
 
80
70
  var getPosition = function getPosition(ref) {
81
71
  var position = 'middle';
@@ -182,34 +172,18 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
182
172
 
183
173
  return direction;
184
174
  }, [isCollapsed, isCollapsible, position, panels, panelId]);
185
- var padding = (0, _react.useMemo)(function () {
186
- return "".concat(panelPaddingValues[paddingSize] * 2, "px");
187
- }, [paddingSize]);
188
- var classes = (0, _classnames.default)('euiResizablePanel', // @ts-expect-error EuiPanel increased its available sizes
189
- // When we convert this component to Emotion, we should also increase sizes to match EuiPanel and remove this comment.
190
- paddingSizeToClassNameMap[wrapperPadding], {
191
- 'euiResizablePanel--collapsible': isCollapsible,
192
- 'euiResizablePanel-isCollapsed': isCollapsed
193
- }, "euiResizablePanel--".concat(position), wrapperProps && wrapperProps.className);
194
- var panelClasses = (0, _classnames.default)('euiResizablePanel__content', {
195
- 'euiResizablePanel__content--scrollable': scrollable
196
- }, className);
197
- var dimensions;
198
-
199
- if (size) {
200
- dimensions = {
201
- width: isHorizontal ? "".concat(size, "%") : '100%',
202
- height: isHorizontal ? 'auto' : "".concat(size, "%")
203
- };
204
- } else {
205
- dimensions = {
206
- width: isHorizontal ? "".concat(innerSize, "%") : '100%',
207
- height: isHorizontal ? 'auto' : "".concat(innerSize, "%")
208
- };
209
- }
210
-
211
- var styles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), dimensions);
212
-
175
+ var axis = isHorizontal ? 'horizontal' : 'vertical';
176
+ var euiTheme = (0, _services.useEuiTheme)();
177
+ var styles = (0, _resizable_panel.euiResizablePanelStyles)(euiTheme);
178
+ var cssStyles = [styles.euiResizablePanel, isCollapsed && styles.collapsed, styles.paddingSizes[wrapperPadding]];
179
+ var contentStyles = (0, _resizable_panel.euiResizablePanelContentStyles)(euiTheme);
180
+ var contentCssStyles = [contentStyles.euiResizablePanel__content, scrollable && contentStyles.scrollable, isCollapsed && contentStyles.collapsedChildren, isCollapsed && !isCollapsible && contentStyles[axis].collapsed, isCollapsible && contentStyles[axis].hasCollapsibleButton];
181
+ var classes = (0, _classnames.default)('euiResizablePanel', wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
182
+ var panelClasses = (0, _classnames.default)('euiResizablePanel__content', className);
183
+
184
+ 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, "%")));
185
+
186
+ var padding = (0, _global_styling.euiPaddingSize)(euiTheme, paddingSize) || '0px';
213
187
  (0, _react.useEffect)(function () {
214
188
  if (!registration) return;
215
189
  var initSize = size !== null && size !== void 0 ? size : initialSize || 0;
@@ -261,7 +235,7 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
261
235
  theResizer = resizers[resizerIds.current[0]];
262
236
  theToggle = (0, _react2.jsx)(_resizable_collapse_button.EuiResizableCollapseButton, {
263
237
  externalPosition: "before",
264
- direction: isHorizontal ? 'horizontal' : 'vertical',
238
+ direction: axis,
265
239
  isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
266
240
  isCollapsed: theResizer && theResizer.isDisabled,
267
241
  internalPosition: toggleOpts.position,
@@ -273,7 +247,7 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
273
247
  theResizer = resizers[resizerIds.current[1]];
274
248
  theToggle = (0, _react2.jsx)(_resizable_collapse_button.EuiResizableCollapseButton, {
275
249
  externalPosition: "after",
276
- direction: isHorizontal ? 'horizontal' : 'vertical',
250
+ direction: axis,
277
251
  isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
278
252
  isCollapsed: theResizer && theResizer.isDisabled,
279
253
  internalPosition: toggleOpts.position,
@@ -283,12 +257,17 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
283
257
  });
284
258
  }
285
259
 
286
- return (0, _react2.jsx)("div", (0, _extends2.default)({}, wrapperProps, {
260
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
261
+ css: cssStyles
262
+ }, wrapperProps, {
287
263
  id: panelId,
288
264
  ref: divRef,
289
- style: styles,
290
- className: classes
265
+ style: inlineStyles,
266
+ className: classes,
267
+ "data-collapsed": isCollapsed || undefined,
268
+ "data-position": position
291
269
  }), hasVisibleToggle && hasLeftToggle && theToggle, (0, _react2.jsx)(_panel.EuiPanel, (0, _extends2.default)({
270
+ css: contentCssStyles,
292
271
  className: panelClasses,
293
272
  hasShadow: hasShadow,
294
273
  borderRadius: borderRadius,