@elastic/eui 88.0.0 → 88.2.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 (148) hide show
  1. package/dist/eui_charts_theme.js +9 -8
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +11 -41
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +11 -41
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/accordion/accordion.js +34 -9
  8. package/es/components/accordion/accordion.styles.js +29 -9
  9. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +10 -2
  10. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +10 -26
  11. package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +10 -1
  12. package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  13. package/es/components/description_list/description_list.js +40 -3
  14. package/es/components/flyout/flyout.styles.js +1 -1
  15. package/es/components/header/header.js +120 -25
  16. package/es/components/header/header.styles.js +1 -1
  17. package/es/components/index.js +1 -0
  18. package/es/components/markdown_editor/markdown_format.styles.js +3 -6
  19. package/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  20. package/es/components/page/page_sidebar/page_sidebar.js +2 -4
  21. package/es/components/page_template/page_template.js +4 -31
  22. package/es/components/text/text.styles.js +3 -6
  23. package/es/components/text_truncate/index.js +10 -0
  24. package/es/components/text_truncate/text_truncate.js +232 -0
  25. package/es/components/text_truncate/text_truncate.styles.js +49 -0
  26. package/es/components/text_truncate/utils.js +348 -0
  27. package/es/global_styling/functions/typography.js +8 -8
  28. package/es/global_styling/variables/typography.js +1 -1
  29. package/es/services/theme/context.js +3 -1
  30. package/es/services/theme/hooks.js +19 -1
  31. package/es/services/theme/index.js +1 -1
  32. package/es/services/theme/provider.js +37 -8
  33. package/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  34. package/eui.d.ts +282 -24
  35. package/i18ntokens.json +112 -112
  36. package/lib/components/accordion/accordion.js +33 -8
  37. package/lib/components/accordion/accordion.styles.js +31 -10
  38. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +10 -2
  39. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +10 -26
  40. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +10 -1
  41. package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  42. package/lib/components/description_list/description_list.js +39 -3
  43. package/lib/components/flyout/flyout.styles.js +1 -1
  44. package/lib/components/header/header.js +120 -23
  45. package/lib/components/header/header.styles.js +1 -1
  46. package/lib/components/index.js +11 -0
  47. package/lib/components/markdown_editor/markdown_format.styles.js +3 -6
  48. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  49. package/lib/components/page/page_sidebar/page_sidebar.js +2 -4
  50. package/lib/components/page_template/page_template.js +2 -29
  51. package/lib/components/text/text.styles.js +3 -6
  52. package/lib/components/text_truncate/index.js +25 -0
  53. package/lib/components/text_truncate/text_truncate.js +242 -0
  54. package/lib/components/text_truncate/text_truncate.styles.js +54 -0
  55. package/lib/components/text_truncate/utils.js +352 -0
  56. package/lib/global_styling/functions/typography.js +8 -8
  57. package/lib/global_styling/variables/typography.js +3 -3
  58. package/lib/services/theme/context.js +3 -1
  59. package/lib/services/theme/hooks.js +21 -2
  60. package/lib/services/theme/index.js +6 -0
  61. package/lib/services/theme/provider.js +62 -35
  62. package/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  63. package/optimize/es/components/accordion/accordion.js +19 -7
  64. package/optimize/es/components/accordion/accordion.styles.js +29 -9
  65. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -26
  66. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +10 -1
  67. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  68. package/optimize/es/components/description_list/description_list.js +22 -2
  69. package/optimize/es/components/flyout/flyout.styles.js +1 -1
  70. package/optimize/es/components/header/header.js +75 -25
  71. package/optimize/es/components/header/header.styles.js +1 -1
  72. package/optimize/es/components/index.js +1 -0
  73. package/optimize/es/components/markdown_editor/markdown_format.styles.js +3 -6
  74. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  75. package/optimize/es/components/page/page_sidebar/page_sidebar.js +2 -4
  76. package/optimize/es/components/page_template/page_template.js +4 -26
  77. package/optimize/es/components/text/text.styles.js +3 -6
  78. package/optimize/es/components/text_truncate/index.js +10 -0
  79. package/optimize/es/components/text_truncate/text_truncate.js +148 -0
  80. package/optimize/es/components/text_truncate/text_truncate.styles.js +49 -0
  81. package/optimize/es/components/text_truncate/utils.js +337 -0
  82. package/optimize/es/global_styling/functions/typography.js +8 -8
  83. package/optimize/es/global_styling/variables/typography.js +1 -1
  84. package/optimize/es/services/theme/context.js +3 -1
  85. package/optimize/es/services/theme/hooks.js +19 -1
  86. package/optimize/es/services/theme/index.js +1 -1
  87. package/optimize/es/services/theme/provider.js +37 -8
  88. package/optimize/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  89. package/optimize/lib/components/accordion/accordion.js +18 -6
  90. package/optimize/lib/components/accordion/accordion.styles.js +31 -10
  91. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -26
  92. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +10 -1
  93. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  94. package/optimize/lib/components/description_list/description_list.js +22 -2
  95. package/optimize/lib/components/flyout/flyout.styles.js +1 -1
  96. package/optimize/lib/components/header/header.js +77 -24
  97. package/optimize/lib/components/header/header.styles.js +1 -1
  98. package/optimize/lib/components/index.js +11 -0
  99. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +3 -6
  100. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  101. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +2 -4
  102. package/optimize/lib/components/page_template/page_template.js +2 -24
  103. package/optimize/lib/components/text/text.styles.js +3 -6
  104. package/optimize/lib/components/text_truncate/index.js +25 -0
  105. package/optimize/lib/components/text_truncate/text_truncate.js +158 -0
  106. package/optimize/lib/components/text_truncate/text_truncate.styles.js +54 -0
  107. package/optimize/lib/components/text_truncate/utils.js +342 -0
  108. package/optimize/lib/global_styling/functions/typography.js +8 -8
  109. package/optimize/lib/global_styling/variables/typography.js +3 -3
  110. package/optimize/lib/services/theme/context.js +3 -1
  111. package/optimize/lib/services/theme/hooks.js +21 -2
  112. package/optimize/lib/services/theme/index.js +6 -0
  113. package/optimize/lib/services/theme/provider.js +62 -35
  114. package/optimize/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  115. package/package.json +1 -1
  116. package/src/components/datagrid/_data_grid.scss +13 -2
  117. package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +1 -7
  118. package/src/components/index.scss +0 -1
  119. package/src/global_styling/mixins/_header.scss +2 -0
  120. package/test-env/components/accordion/accordion.js +28 -8
  121. package/test-env/components/accordion/accordion.styles.js +31 -10
  122. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +10 -2
  123. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +10 -26
  124. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +10 -1
  125. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  126. package/test-env/components/description_list/description_list.js +37 -3
  127. package/test-env/components/flyout/flyout.styles.js +1 -1
  128. package/test-env/components/header/header.js +113 -23
  129. package/test-env/components/header/header.styles.js +1 -1
  130. package/test-env/components/index.js +11 -0
  131. package/test-env/components/markdown_editor/markdown_format.styles.js +3 -6
  132. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -1
  133. package/test-env/components/page/page_sidebar/page_sidebar.js +2 -4
  134. package/test-env/components/page_template/page_template.js +2 -24
  135. package/test-env/components/text/text.styles.js +3 -6
  136. package/test-env/components/text_truncate/index.js +25 -0
  137. package/test-env/components/text_truncate/text_truncate.js +236 -0
  138. package/test-env/components/text_truncate/text_truncate.styles.js +54 -0
  139. package/test-env/components/text_truncate/utils.js +342 -0
  140. package/test-env/global_styling/functions/typography.js +8 -8
  141. package/test-env/global_styling/variables/typography.js +3 -3
  142. package/test-env/services/theme/context.js +3 -1
  143. package/test-env/services/theme/hooks.js +21 -2
  144. package/test-env/services/theme/index.js +6 -0
  145. package/test-env/services/theme/provider.js +62 -35
  146. package/test-env/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  147. package/src/components/accordion/_accordion_form.scss +0 -40
  148. package/src/components/accordion/_index.scss +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "88.0.0",
4
+ "version": "88.2.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -49,12 +49,23 @@
49
49
  }
50
50
 
51
51
  // This is used to remove extra scrollbars on the body when fullscreen is enabled
52
+ // and tweak any components that account for fixed headers
52
53
  .euiDataGrid__restrictBody {
53
54
  height: 100vh;
54
55
  overflow: hidden;
55
56
 
56
- .euiHeader {
57
- z-index: $euiZHeaderBelowDataGrid;
57
+ .euiHeader[data-fixed-header] {
58
+ // !important needed to override header inline styles
59
+ z-index: $euiZHeaderBelowDataGrid !important; // stylelint-disable-line declaration-no-important
60
+ }
61
+
62
+ .euiOverlayMask[data-relative-to-header='below'] {
63
+ top: 0;
64
+ }
65
+
66
+ .euiFlyout {
67
+ top: 0;
68
+ height: 100%;
58
69
  }
59
70
  }
60
71
 
@@ -6,12 +6,6 @@
6
6
  overflow-block: auto;
7
7
 
8
8
  .euiDescriptionList {
9
- .euiDescriptionList__title {
10
- width: 25%;
11
- }
12
-
13
- .euiDescriptionList__description {
14
- width: 75%;
15
- }
9
+ row-gap: 0; // Row spacing handled by default EuiText dd/dt styles
16
10
  }
17
11
  }
@@ -1,6 +1,5 @@
1
1
  // Components
2
2
 
3
- @import 'accordion/index';
4
3
  @import 'color_picker/index';
5
4
  @import 'combo_box/index';
6
5
  @import 'context_menu/index';
@@ -1,6 +1,8 @@
1
1
  @import '../variables/header';
2
2
 
3
3
  @mixin euiHeaderAffordForFixed($headerHeight: $euiHeaderHeightCompensation) {
4
+ @warn 'This mixin will shortly be deprecated. Use the CSS variable var(--euiFixedHeadersOffset) instead, which updates dynamically based on the number of fixed headers on the page.';
5
+
4
6
  // The `@at-root #{&}` allows for grouping alongside another specific body class.
5
7
  // When not applied inside of another selector, it simply renders with the single class
6
8
  @at-root #{&}.euiBody--headerIsFixed {
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.PADDING_SIZES = exports.EuiAccordionClass = exports.EuiAccordion = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -28,7 +29,8 @@ var _button = require("../button");
28
29
  var _accordion = require("./accordion.styles");
29
30
  var _global_styling = require("../../global_styling");
30
31
  var _react2 = require("@emotion/react");
31
- var _excluded = ["children", "buttonContent", "className", "id", "element", "buttonClassName", "buttonContentClassName", "extraAction", "paddingSize", "initialIsOpen", "arrowDisplay", "forceState", "isLoading", "isLoadingMessage", "isDisabled", "buttonProps", "buttonElement", "arrowProps", "theme"];
32
+ var _excluded = ["children", "buttonContent", "className", "id", "element", "buttonClassName", "buttonContentClassName", "extraAction", "paddingSize", "borders", "initialIsOpen", "arrowDisplay", "forceState", "isLoading", "isLoadingMessage", "isDisabled", "buttonProps", "buttonElement", "arrowProps", "theme"],
33
+ _excluded2 = ["paddingSize", "className", "css"];
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
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
34
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -166,18 +168,24 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
166
168
  buttonContentClassName = _this$props3.buttonContentClassName,
167
169
  extraAction = _this$props3.extraAction,
168
170
  paddingSize = _this$props3.paddingSize,
171
+ borders = _this$props3.borders,
169
172
  initialIsOpen = _this$props3.initialIsOpen,
170
173
  arrowDisplay = _this$props3.arrowDisplay,
171
174
  forceState = _this$props3.forceState,
172
175
  isLoading = _this$props3.isLoading,
173
176
  isLoadingMessage = _this$props3.isLoadingMessage,
174
177
  isDisabled = _this$props3.isDisabled,
175
- buttonProps = _this$props3.buttonProps,
178
+ _buttonProps = _this$props3.buttonProps,
176
179
  _this$props3$buttonEl = _this$props3.buttonElement,
177
180
  _ButtonElement = _this$props3$buttonEl === void 0 ? 'button' : _this$props3$buttonEl,
178
181
  arrowProps = _this$props3.arrowProps,
179
182
  theme = _this$props3.theme,
180
183
  rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
184
+ var _ref = _buttonProps || {},
185
+ buttonPaddingSize = _ref.paddingSize,
186
+ buttonPropsClassName = _ref.className,
187
+ buttonPropsCss = _ref.css,
188
+ buttonProps = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
181
189
 
182
190
  // Force button element to be a legend if the element is a fieldset
183
191
  var ButtonElement = Element === 'fieldset' ? 'legend' : _ButtonElement;
@@ -188,10 +196,12 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
188
196
  var classes = (0, _classnames.default)('euiAccordion', {
189
197
  'euiAccordion-isOpen': this.isOpen
190
198
  }, className);
199
+ var styles = (0, _accordion.euiAccordionStyles)(theme);
200
+ var cssStyles = [styles.euiAccordion, borders !== 'none' && styles.borders.borders, borders !== 'none' && styles.borders[borders]];
191
201
  var childrenClasses = (0, _classnames.default)('euiAccordion__children', {
192
202
  'euiAccordion__children-isLoading': isLoading
193
203
  });
194
- var buttonClasses = (0, _classnames.default)('euiAccordion__button', buttonClassName, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className);
204
+ var buttonClasses = (0, _classnames.default)('euiAccordion__button', buttonClassName, buttonPropsClassName);
195
205
  var buttonContentClasses = (0, _classnames.default)('euiAccordion__buttonContent', buttonContentClassName);
196
206
  var iconButtonClasses = (0, _classnames.default)('euiAccordion__iconButton', {
197
207
  'euiAccordion__iconButton-isOpen': this.isOpen,
@@ -200,7 +210,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
200
210
 
201
211
  // Emotion styles
202
212
  var buttonStyles = (0, _accordion.euiAccordionButtonStyles)(theme);
203
- var cssButtonStyles = [buttonStyles.euiAccordion__button, isDisabled && buttonStyles.disabled, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.css];
213
+ var cssButtonStyles = [buttonStyles.euiAccordion__button, isDisabled && buttonStyles.disabled].concat((0, _toConsumableArray2.default)(buttonPaddingSize ? [buttonStyles[buttonPaddingSize], arrowDisplay === 'left' && buttonStyles.arrowLeft, arrowDisplay === 'right' && buttonStyles.arrowRight] : []), [buttonPropsCss]);
204
214
  var childrenStyles = (0, _accordion.euiAccordionChildrenStyles)(theme);
205
215
  var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
206
216
  var childWrapperStyles = (0, _accordion.euiAccordionChildWrapperStyles)(theme);
@@ -214,7 +224,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
214
224
  var triggerWrapperStyles = (0, _accordion.euiAccordionTriggerWrapperStyles)();
215
225
  var cssTriggerWrapperStyles = [triggerWrapperStyles.euiAccordion__triggerWrapper];
216
226
  var iconButton;
217
- var buttonId = (_buttonProps$id = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.id) !== null && _buttonProps$id !== void 0 ? _buttonProps$id : this.generatedId;
227
+ var buttonId = (_buttonProps$id = buttonProps.id) !== null && _buttonProps$id !== void 0 ? _buttonProps$id : this.generatedId;
218
228
  if (_arrowDisplay !== 'none') {
219
229
  iconButton = (0, _react2.jsx)(_button.EuiButtonIcon, (0, _extends2.default)({
220
230
  color: "text"
@@ -266,7 +276,8 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
266
276
  className: buttonContentClasses
267
277
  }, buttonContent));
268
278
  return (0, _react2.jsx)(Element, (0, _extends2.default)({
269
- className: classes
279
+ className: classes,
280
+ css: cssStyles
270
281
  }, rest), (0, _react2.jsx)("div", {
271
282
  className: "euiAccordion__triggerWrapper",
272
283
  css: cssTriggerWrapperStyles
@@ -298,6 +309,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
298
309
  exports.EuiAccordionClass = EuiAccordionClass;
299
310
  (0, _defineProperty2.default)(EuiAccordionClass, "defaultProps", {
300
311
  initialIsOpen: false,
312
+ borders: 'none',
301
313
  paddingSize: 'none',
302
314
  arrowDisplay: 'left',
303
315
  isLoading: false,
@@ -322,13 +334,17 @@ EuiAccordionClass.propTypes = {
322
334
  */
323
335
  buttonClassName: _propTypes.default.string,
324
336
  /**
325
- * Apply more props to the triggering button
337
+ * Apply more props to the triggering button.
338
+ *
339
+ * Includes optional `paddingSize` prop which allows sizes of `s`, `m`, or `l`.
340
+ * Note: Padding will not be present on the side closest to the accordion arrow.
326
341
  */
327
342
  buttonProps: _propTypes.default.shape({
328
343
  className: _propTypes.default.string,
329
344
  "aria-label": _propTypes.default.string,
330
345
  "data-test-subj": _propTypes.default.string,
331
- css: _propTypes.default.any
346
+ css: _propTypes.default.any,
347
+ paddingSize: _propTypes.default.oneOf(["s", "m", "l"])
332
348
  }),
333
349
  /**
334
350
  * Class that will apply to the trigger content for the accordion.
@@ -367,6 +383,10 @@ EuiAccordionClass.propTypes = {
367
383
  * Placement of the arrow indicator, or 'none' to hide it.
368
384
  */
369
385
  arrowDisplay: _propTypes.default.oneOf(["left", "right", "none"]),
386
+ /**
387
+ * Optional border styling. Defaults to 'none'.
388
+ */
389
+ borders: _propTypes.default.oneOf(["horizontal", "all", "none"]),
370
390
  /**
371
391
  * Control the opening of accordion via prop
372
392
  */
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.euiAccordionTriggerWrapperStyles = exports.euiAccordionSpinnerStyles = exports.euiAccordionOptionalActionStyles = exports.euiAccordionIconButtonStyles = exports.euiAccordionChildrenStyles = exports.euiAccordionChildWrapperStyles = exports.euiAccordionButtonStyles = void 0;
6
+ exports.euiAccordionTriggerWrapperStyles = exports.euiAccordionStyles = exports.euiAccordionSpinnerStyles = exports.euiAccordionOptionalActionStyles = exports.euiAccordionIconButtonStyles = exports.euiAccordionChildrenStyles = exports.euiAccordionChildWrapperStyles = exports.euiAccordionButtonStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  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,13 +13,34 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
13
13
  * in compliance with, at your election, the Elastic License 2.0 or the Server
14
14
  * Side Public License, v 1.
15
15
  */
16
+ var euiAccordionStyles = function euiAccordionStyles(_ref5) {
17
+ var euiTheme = _ref5.euiTheme;
18
+ return {
19
+ euiAccordion: /*#__PURE__*/(0, _react.css)(";label:euiAccordion;"),
20
+ // Borders
21
+ borders: {
22
+ // Prevent border repeats
23
+ borders: /*#__PURE__*/(0, _react.css)("&+[class*='euiAccordion-borders']{", (0, _global_styling.logicalCSS)('border-top', 'none'), ";};label:borders;"),
24
+ horizontal: /*#__PURE__*/(0, _react.css)("border-block:", euiTheme.border.thin, ";;label:horizontal;"),
25
+ all: /*#__PURE__*/(0, _react.css)("border:", euiTheme.border.thin, ";;label:all;")
26
+ }
27
+ };
28
+ };
29
+ exports.euiAccordionStyles = euiAccordionStyles;
16
30
  var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
17
31
  var euiTheme = euiThemeContext.euiTheme;
18
32
  return {
19
33
  euiAccordion__button: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), " align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";", (0, _global_styling.logicalTextAlignCSS)('left'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " &:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
20
34
  // Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
21
35
  // Hover pseudo selector for specificity
22
- disabled: /*#__PURE__*/(0, _react.css)("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;")
36
+ disabled: /*#__PURE__*/(0, _react.css)("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;"),
37
+ // Optional padding sizes
38
+ s: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.s, ";;label:s;"),
39
+ m: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.base, ";;label:m;"),
40
+ l: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.l, ";;label:l;"),
41
+ // Remove padding from the accordion button on the side that the arrow is on
42
+ arrowLeft: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', 0), ";;label:arrowLeft;"),
43
+ arrowRight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', 0), ";;label:arrowRight;")
23
44
  };
24
45
  };
25
46
  exports.euiAccordionButtonStyles = euiAccordionButtonStyles;
@@ -31,8 +52,8 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
31
52
  styles: "align-items:center;display:flex;label:isLoading;",
32
53
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
54
  };
34
- var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref5) {
35
- var euiTheme = _ref5.euiTheme;
55
+ var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref6) {
56
+ var euiTheme = _ref6.euiTheme;
36
57
  return {
37
58
  euiAccordion__children: /*#__PURE__*/(0, _react.css)(";label:euiAccordion__children;"),
38
59
  isLoading: _ref4,
@@ -44,8 +65,8 @@ var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref5) {
44
65
  };
45
66
  };
46
67
  exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
47
- var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
48
- var euiTheme = _ref6.euiTheme;
68
+ var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref7) {
69
+ var euiTheme = _ref7.euiTheme;
49
70
  return {
50
71
  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;"),
51
72
  isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
@@ -60,8 +81,8 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
60
81
  styles: "transform:rotate(\n 90deg\n )!important;label:isOpen;",
61
82
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
62
83
  };
63
- var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref7) {
64
- var euiTheme = _ref7.euiTheme;
84
+ var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref8) {
85
+ var euiTheme = _ref8.euiTheme;
65
86
  return {
66
87
  euiAccordion__iconButton: /*#__PURE__*/(0, _react.css)("flex-shrink:0;", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), " transform:rotate(\n 0deg\n )!important;;label:euiAccordion__iconButton;"),
67
88
  isOpen: _ref3,
@@ -83,8 +104,8 @@ var euiAccordionOptionalActionStyles = function euiAccordionOptionalActionStyles
83
104
  };
84
105
  };
85
106
  exports.euiAccordionOptionalActionStyles = euiAccordionOptionalActionStyles;
86
- var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref8) {
87
- var euiTheme = _ref8.euiTheme;
107
+ var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref9) {
108
+ var euiTheme = _ref9.euiTheme;
88
109
  return {
89
110
  euiAccordion__spinner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:euiAccordion__spinner;")
90
111
  };
@@ -198,13 +198,17 @@ EuiCollapsibleNavGroup.propTypes = {
198
198
  */
199
199
  buttonClassName: _propTypes.default.string,
200
200
  /**
201
- * Apply more props to the triggering button
201
+ * Apply more props to the triggering button.
202
+ *
203
+ * Includes optional `paddingSize` prop which allows sizes of `s`, `m`, or `l`.
204
+ * Note: Padding will not be present on the side closest to the accordion arrow.
202
205
  */
203
206
  buttonProps: _propTypes.default.shape({
204
207
  className: _propTypes.default.string,
205
208
  "aria-label": _propTypes.default.string,
206
209
  "data-test-subj": _propTypes.default.string,
207
- css: _propTypes.default.any
210
+ css: _propTypes.default.any,
211
+ paddingSize: _propTypes.default.oneOf(["s", "m", "l"])
208
212
  }),
209
213
  /**
210
214
  * Class that will apply to the trigger content for the accordion.
@@ -243,6 +247,10 @@ EuiCollapsibleNavGroup.propTypes = {
243
247
  * Placement of the arrow indicator, or 'none' to hide it.
244
248
  */
245
249
  arrowDisplay: _propTypes.default.oneOf(["left", "right", "none"]),
250
+ /**
251
+ * Optional border styling. Defaults to 'none'.
252
+ */
253
+ borders: _propTypes.default.oneOf(["horizontal", "all", "none"]),
246
254
  /**
247
255
  * Control the opening of accordion via prop
248
256
  */
@@ -15,7 +15,6 @@ var _react = _interopRequireWildcard(require("react"));
15
15
  var _propTypes = _interopRequireDefault(require("prop-types"));
16
16
  var _classnames = _interopRequireDefault(require("classnames"));
17
17
  var _services = require("../../services");
18
- var _global_styling = require("../../global_styling");
19
18
  var _flyout = require("../flyout");
20
19
  var _i18n = require("../i18n");
21
20
  var _header = require("../header/header.styles");
@@ -23,7 +22,7 @@ var _context = require("./context");
23
22
  var _collapsible_nav_button = require("./collapsible_nav_button");
24
23
  var _collapsible_nav_beta = require("./collapsible_nav_beta.styles");
25
24
  var _react2 = require("@emotion/react");
26
- var _excluded = ["id", "children", "className", "style", "initialIsCollapsed", "width", "side", "focusTrapProps"];
25
+ var _excluded = ["id", "children", "className", "initialIsCollapsed", "onCollapseToggle", "width", "side", "focusTrapProps"];
27
26
  /*
28
27
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
29
28
  * or more contributor license agreements. Licensed under the Elastic License
@@ -39,9 +38,9 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
39
38
  var id = _ref.id,
40
39
  children = _ref.children,
41
40
  className = _ref.className,
42
- style = _ref.style,
43
41
  _ref$initialIsCollaps = _ref.initialIsCollapsed,
44
42
  initialIsCollapsed = _ref$initialIsCollaps === void 0 ? false : _ref$initialIsCollaps,
43
+ onCollapseToggle = _ref.onCollapseToggle,
45
44
  _ref$width = _ref.width,
46
45
  _width = _ref$width === void 0 ? 248 : _ref$width,
47
46
  _ref$side = _ref.side,
@@ -60,9 +59,10 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
60
59
  setIsCollapsed = _useState2[1];
61
60
  var toggleCollapsed = (0, _react.useCallback)(function () {
62
61
  return setIsCollapsed(function (isCollapsed) {
62
+ onCollapseToggle === null || onCollapseToggle === void 0 ? void 0 : onCollapseToggle(!isCollapsed);
63
63
  return !isCollapsed;
64
64
  });
65
- }, []);
65
+ }, [onCollapseToggle]);
66
66
  var onClose = (0, _react.useCallback)(function () {
67
67
  return setIsCollapsed(true);
68
68
  }, []);
@@ -108,24 +108,6 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
108
108
  return _width;
109
109
  }, [_width, isOverlayFullWidth, isPush, isCollapsed, headerHeight]);
110
110
 
111
- /**
112
- * Header affordance
113
- */
114
- var _useState7 = (0, _react.useState)(false),
115
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
116
- fixedHeadersCount = _useState8[0],
117
- setFixedHeadersCount = _useState8[1];
118
- (0, _react.useEffect)(function () {
119
- setFixedHeadersCount(document.querySelectorAll('.euiHeader[data-fixed-header]').length);
120
- }, []);
121
- var stylesWithHeaderOffset = (0, _react.useMemo)(function () {
122
- if (!fixedHeadersCount) return style;
123
- var headersOffset = (0, _global_styling.mathWithUnits)(headerHeight, function (x) {
124
- return x * fixedHeadersCount;
125
- });
126
- return _objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('top', headersOffset)), (0, _global_styling.logicalStyle)('height', "calc(100% - ".concat(headersOffset, ")")));
127
- }, [fixedHeadersCount, style, headerHeight]);
128
-
129
111
  /**
130
112
  * Prop setup
131
113
  */
@@ -143,16 +125,13 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
143
125
  var classes = (0, _classnames.default)('euiCollapsibleNav', 'euiCollapsibleNavBeta', className);
144
126
  var styles = (0, _collapsible_nav_beta.euiCollapsibleNavBetaStyles)(euiTheme);
145
127
  var cssStyles = [styles.euiCollapsibleNavBeta, styles[side], isPush && styles.isPush, isPush && isCollapsed && styles.isPushCollapsed, isOverlayFullWidth && styles.isOverlayFullWidth];
146
-
147
- // Wait for any fixed headers to be queried before rendering (prevents position jumping)
148
- var flyout = fixedHeadersCount !== false && (0, _react2.jsx)(_flyout.EuiFlyout, (0, _extends2.default)({
128
+ var flyout = (0, _react2.jsx)(_flyout.EuiFlyout, (0, _extends2.default)({
149
129
  "aria-label": defaultAriaLabel
150
130
  }, rest, {
151
131
  // EuiCollapsibleNav is significantly less permissive than EuiFlyout
152
132
  id: flyoutID,
153
133
  css: cssStyles,
154
134
  className: classes,
155
- style: stylesWithHeaderOffset,
156
135
  size: width,
157
136
  side: side,
158
137
  focusTrapProps: focusTrapProps,
@@ -200,6 +179,11 @@ EuiCollapsibleNavBeta.propTypes = {
200
179
  * Whether the navigation flyout should default to initially collapsed or expanded
201
180
  */
202
181
  initialIsCollapsed: _propTypes.default.bool,
182
+ /**
183
+ * Optional callback that fires when the user toggles the nav between
184
+ * collapsed and uncollapsed states
185
+ */
186
+ onCollapseToggle: _propTypes.default.func,
203
187
  /**
204
188
  * Defaults to 248px wide. The navigation width determines behavior at
205
189
  * various responsive breakpoints.
@@ -7,6 +7,7 @@ exports.euiCollapsibleNavBetaStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  var _themes = require("../../themes");
10
+ var _header = require("../header/header.styles");
10
11
  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
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
13
  * or more contributor license agreements. Licensed under the Elastic License
@@ -24,8 +25,16 @@ var _ref = process.env.NODE_ENV === "production" ? {
24
25
  };
25
26
  var euiCollapsibleNavBetaStyles = function euiCollapsibleNavBetaStyles(euiThemeContext) {
26
27
  var euiTheme = euiThemeContext.euiTheme;
28
+
29
+ // At least for serverless, EuiCollapsibleNav is only going to be used with 1
30
+ // fixed header. For those scenarios, we can prevent a minor layout jump on
31
+ // page load by setting the CSS var fallback to the height of a single header
32
+ var defaultHeaderHeight = (0, _header.euiHeaderVariables)(euiThemeContext).height;
33
+ var fixedHeaderOffset = "var(--euiFixedHeadersOffset, ".concat(defaultHeaderHeight, ")");
27
34
  return {
28
- euiCollapsibleNavBeta: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), (0, _global_styling.euiYScroll)(euiThemeContext), ".euiFlyoutBody{", (0, _global_styling.logicalCSS)('min-height', '50%'), ";}.euiFlyoutFooter{background-color:", euiTheme.colors.emptyShade, ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";};label:euiCollapsibleNavBeta;"),
35
+ euiCollapsibleNavBeta: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', fixedHeaderOffset), (0, _global_styling.euiYScroll)(euiThemeContext, {
36
+ height: 'inherit'
37
+ }), (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), ".euiFlyoutBody{", (0, _global_styling.logicalCSS)('min-height', '50%'), ";}.euiFlyoutFooter{background-color:", euiTheme.colors.emptyShade, ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";};label:euiCollapsibleNavBeta;"),
29
38
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-right', euiTheme.border.thin), ";;label:left;"),
30
39
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin), ";;label:right;"),
31
40
  isPush: /*#__PURE__*/(0, _react.css)((0, _themes.euiShadowFlat)(euiThemeContext), ";;label:isPush;"),
@@ -64,6 +64,7 @@ var useDataGridKeyboardShortcuts = function useDataGridKeyboardShortcuts() {
64
64
  }, (0, _react2.jsx)(_description_list.EuiDescriptionList, {
65
65
  "aria-labelledby": titleId,
66
66
  type: "column",
67
+ columnWidths: [1, 3],
67
68
  align: "center",
68
69
  compressed: true,
69
70
  listItems: [{
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.EuiDescriptionList = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
12
  var _react = _interopRequireWildcard(require("react"));
12
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -17,7 +18,7 @@ var _description_list_title = require("./description_list_title");
17
18
  var _description_list_description = require("./description_list_description");
18
19
  var _description_list = require("./description_list.styles");
19
20
  var _react2 = require("@emotion/react");
20
- var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "rowGutterSize", "columnGutterSize"];
21
+ var _excluded = ["align", "children", "className", "style", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "rowGutterSize", "columnGutterSize", "columnWidths"];
21
22
  /*
22
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -27,11 +28,14 @@ var _excluded = ["align", "children", "className", "compressed", "descriptionPro
27
28
  */
28
29
  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); }
29
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
32
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
30
33
  var EuiDescriptionList = function EuiDescriptionList(_ref) {
31
34
  var _ref$align = _ref.align,
32
35
  align = _ref$align === void 0 ? 'left' : _ref$align,
33
36
  children = _ref.children,
34
37
  className = _ref.className,
38
+ style = _ref.style,
35
39
  _ref$compressed = _ref.compressed,
36
40
  compressed = _ref$compressed === void 0 ? false : _ref$compressed,
37
41
  descriptionProps = _ref.descriptionProps,
@@ -45,6 +49,7 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
45
49
  rowGutterSize = _ref$rowGutterSize === void 0 ? 's' : _ref$rowGutterSize,
46
50
  _ref$columnGutterSize = _ref.columnGutterSize,
47
51
  columnGutterSize = _ref$columnGutterSize === void 0 ? 's' : _ref$columnGutterSize,
52
+ columnWidths = _ref.columnWidths,
48
53
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
54
  var showResponsiveColumns = (0, _services.useIsWithinBreakpoints)(['xs', 's']);
50
55
  var type = (0, _react.useMemo)(function () {
@@ -57,6 +62,20 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
57
62
  var euiTheme = (0, _services.useEuiTheme)();
58
63
  var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
59
64
  var cssStyles = [styles.euiDescriptionList, styles[type], styles[align], type === 'column' && styles.rowGap[rowGutterSize], type === 'column' && styles.columnGap[columnGutterSize]];
65
+ var inlineStyles = (0, _react.useMemo)(function () {
66
+ if (type === 'column' && columnWidths) {
67
+ // Leave string values as is - e.g. if a consumer passes in a specific '200px' or 'minmax()'
68
+ var convertNumbersToFr = function convertNumbersToFr(value) {
69
+ return typeof value === 'number' ? "".concat(value, "fr") : value;
70
+ };
71
+ var titleWidth = convertNumbersToFr(columnWidths[0]);
72
+ var descriptionWidth = convertNumbersToFr(columnWidths[1]);
73
+ return _objectSpread({
74
+ gridTemplateColumns: "".concat(titleWidth, " ").concat(descriptionWidth)
75
+ }, style);
76
+ }
77
+ return style;
78
+ }, [style, type, columnWidths]);
60
79
  var classes = (0, _classnames.default)('euiDescriptionList', className);
61
80
  var childrenOrListItems = null;
62
81
  if (listItems) {
@@ -80,7 +99,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
80
99
  }
81
100
  }, (0, _react2.jsx)("dl", (0, _extends2.default)({
82
101
  className: classes,
83
- css: cssStyles
102
+ css: cssStyles,
103
+ style: inlineStyles
84
104
  }, rest, {
85
105
  "data-type": _type
86
106
  }), childrenOrListItems));
@@ -139,5 +159,19 @@ EuiDescriptionList.propTypes = {
139
159
  *
140
160
  * Only applies to `column` and `responsiveColumn` types.
141
161
  */
142
- columnGutterSize: _propTypes.default.any
162
+ columnGutterSize: _propTypes.default.any,
163
+ /**
164
+ * Allows customizing specific column widths (e.g. `['100px', '200px']`). The first
165
+ * array value applies to the title column, and the second applies to the description column.
166
+ *
167
+ * Passing numbers instead of CSS width strings will use a ratio of widths.
168
+ * For example, [1, 3] will render a description column 3x the width of the title column.
169
+ * In other words, descriptions will have a width of `75%` and titles will have a width of `25%`.
170
+ *
171
+ * Only applies to `column` and `responsiveColumn` types.
172
+ *
173
+ * _Advanced usage note:_ column width strings also accept [CSS grid special units,
174
+ * sizing, keywords, and sizing functions](https://css-tricks.com/snippets/css/complete-guide-grid/#aa-special-units-functions).
175
+ */
176
+ columnWidths: _propTypes.default.any
143
177
  };
@@ -41,7 +41,7 @@ exports.euiFlyoutCloseButtonStyles = euiFlyoutCloseButtonStyles;
41
41
  var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
42
42
  var euiTheme = euiThemeContext.euiTheme;
43
43
  return {
44
- 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.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
44
+ euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
45
45
  // Flyout sizes
46
46
  s: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
47
47
  m: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),