@elastic/eui 98.0.0 → 98.1.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 (170) hide show
  1. package/es/components/badge/beta_badge/beta_badge.js +2 -2
  2. package/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
  3. package/es/components/card/card.js +1 -1
  4. package/es/components/card/card.styles.js +3 -3
  5. package/es/components/code/code_block.js +9 -1
  6. package/es/components/code/code_block_copy.js +5 -4
  7. package/es/components/drag_and_drop/draggable.js +2 -3
  8. package/es/components/drag_and_drop/droppable.js +2 -3
  9. package/es/components/error_boundary/error_boundary.js +2 -3
  10. package/es/components/form/range/range_draggable.js +3 -3
  11. package/es/components/health/health.js +3 -4
  12. package/es/components/inline_edit/inline_edit_form.js +5 -6
  13. package/es/components/inline_edit/inline_edit_text.js +2 -3
  14. package/es/components/inline_edit/inline_edit_title.js +2 -3
  15. package/es/components/key_pad_menu/key_pad_menu.js +2 -3
  16. package/es/components/key_pad_menu/key_pad_menu_item.js +3 -6
  17. package/es/components/mark/mark.js +2 -3
  18. package/es/components/overlay_mask/overlay_mask.js +2 -3
  19. package/es/components/popover/popover.js +3 -1
  20. package/es/components/search_bar/filters/field_value_selection_filter.js +18 -9
  21. package/es/components/search_bar/search_bar.a11y.js +0 -1
  22. package/es/components/selectable/selectable_list/selectable_list.js +10 -1
  23. package/es/components/side_nav/side_nav_item.js +3 -4
  24. package/es/components/tabs/tab.js +2 -0
  25. package/es/components/tabs/tabs.js +18 -2
  26. package/es/components/text_diff/text_diff.js +2 -3
  27. package/es/components/toast/global_toast_list_item.js +3 -6
  28. package/es/components/tour/_tour_footer.js +2 -3
  29. package/es/components/tour/_tour_header.js +2 -3
  30. package/es/components/tour/tour_step.js +4 -5
  31. package/es/components/tree_view/tree_view_item.js +2 -3
  32. package/es/global_styling/mixins/_helpers.js +1 -7
  33. package/eui.d.ts +16 -22
  34. package/i18ntokens.json +66 -48
  35. package/lib/components/badge/beta_badge/beta_badge.js +2 -2
  36. package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
  37. package/lib/components/card/card.js +1 -1
  38. package/lib/components/card/card.styles.js +2 -2
  39. package/lib/components/code/code_block.js +9 -1
  40. package/lib/components/code/code_block_copy.js +5 -4
  41. package/lib/components/drag_and_drop/draggable.js +1 -2
  42. package/lib/components/drag_and_drop/droppable.js +1 -2
  43. package/lib/components/error_boundary/error_boundary.js +2 -3
  44. package/lib/components/form/range/range_draggable.js +2 -2
  45. package/lib/components/health/health.js +2 -3
  46. package/lib/components/inline_edit/inline_edit_form.js +4 -5
  47. package/lib/components/inline_edit/inline_edit_text.js +2 -3
  48. package/lib/components/inline_edit/inline_edit_title.js +2 -3
  49. package/lib/components/key_pad_menu/key_pad_menu.js +2 -3
  50. package/lib/components/key_pad_menu/key_pad_menu_item.js +2 -5
  51. package/lib/components/mark/mark.js +2 -3
  52. package/lib/components/overlay_mask/overlay_mask.js +1 -2
  53. package/lib/components/popover/popover.js +3 -1
  54. package/lib/components/search_bar/filters/field_value_selection_filter.js +18 -9
  55. package/lib/components/search_bar/search_bar.a11y.js +0 -1
  56. package/lib/components/selectable/selectable_list/selectable_list.js +10 -1
  57. package/lib/components/side_nav/side_nav_item.js +2 -3
  58. package/lib/components/tabs/tab.js +2 -0
  59. package/lib/components/tabs/tabs.js +17 -1
  60. package/lib/components/text_diff/text_diff.js +1 -2
  61. package/lib/components/toast/global_toast_list_item.js +2 -5
  62. package/lib/components/tour/_tour_footer.js +1 -2
  63. package/lib/components/tour/_tour_header.js +1 -2
  64. package/lib/components/tour/tour_step.js +4 -5
  65. package/lib/components/tree_view/tree_view_item.js +1 -2
  66. package/lib/global_styling/mixins/_helpers.js +2 -8
  67. package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -1
  68. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
  69. package/optimize/es/components/card/card.styles.js +3 -3
  70. package/optimize/es/components/code/code_block.js +3 -1
  71. package/optimize/es/components/code/code_block_copy.js +5 -4
  72. package/optimize/es/components/drag_and_drop/draggable.js +2 -3
  73. package/optimize/es/components/drag_and_drop/droppable.js +2 -3
  74. package/optimize/es/components/error_boundary/error_boundary.js +2 -3
  75. package/optimize/es/components/form/range/range_draggable.js +3 -3
  76. package/optimize/es/components/health/health.js +3 -4
  77. package/optimize/es/components/inline_edit/inline_edit_form.js +5 -6
  78. package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
  79. package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
  80. package/optimize/es/components/key_pad_menu/key_pad_menu.js +2 -3
  81. package/optimize/es/components/key_pad_menu/key_pad_menu_item.js +3 -6
  82. package/optimize/es/components/mark/mark.js +2 -3
  83. package/optimize/es/components/overlay_mask/overlay_mask.js +2 -3
  84. package/optimize/es/components/popover/popover.js +3 -1
  85. package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +18 -9
  86. package/optimize/es/components/search_bar/search_bar.a11y.js +0 -1
  87. package/optimize/es/components/selectable/selectable_list/selectable_list.js +10 -1
  88. package/optimize/es/components/side_nav/side_nav_item.js +3 -4
  89. package/optimize/es/components/tabs/tab.js +2 -0
  90. package/optimize/es/components/tabs/tabs.js +18 -2
  91. package/optimize/es/components/text_diff/text_diff.js +2 -3
  92. package/optimize/es/components/toast/global_toast_list_item.js +3 -6
  93. package/optimize/es/components/tour/_tour_footer.js +2 -3
  94. package/optimize/es/components/tour/_tour_header.js +2 -3
  95. package/optimize/es/components/tour/tour_step.js +4 -5
  96. package/optimize/es/components/tree_view/tree_view_item.js +2 -3
  97. package/optimize/es/global_styling/mixins/_helpers.js +1 -7
  98. package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -1
  99. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
  100. package/optimize/lib/components/card/card.styles.js +2 -2
  101. package/optimize/lib/components/code/code_block.js +3 -1
  102. package/optimize/lib/components/code/code_block_copy.js +5 -4
  103. package/optimize/lib/components/drag_and_drop/draggable.js +1 -2
  104. package/optimize/lib/components/drag_and_drop/droppable.js +1 -2
  105. package/optimize/lib/components/error_boundary/error_boundary.js +2 -3
  106. package/optimize/lib/components/form/range/range_draggable.js +2 -2
  107. package/optimize/lib/components/health/health.js +2 -3
  108. package/optimize/lib/components/inline_edit/inline_edit_form.js +4 -5
  109. package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
  110. package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
  111. package/optimize/lib/components/key_pad_menu/key_pad_menu.js +2 -3
  112. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.js +2 -5
  113. package/optimize/lib/components/mark/mark.js +2 -3
  114. package/optimize/lib/components/overlay_mask/overlay_mask.js +1 -2
  115. package/optimize/lib/components/popover/popover.js +3 -1
  116. package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +18 -9
  117. package/optimize/lib/components/search_bar/search_bar.a11y.js +0 -1
  118. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +10 -1
  119. package/optimize/lib/components/side_nav/side_nav_item.js +2 -3
  120. package/optimize/lib/components/tabs/tab.js +2 -0
  121. package/optimize/lib/components/tabs/tabs.js +17 -1
  122. package/optimize/lib/components/text_diff/text_diff.js +1 -2
  123. package/optimize/lib/components/toast/global_toast_list_item.js +2 -5
  124. package/optimize/lib/components/tour/_tour_footer.js +1 -2
  125. package/optimize/lib/components/tour/_tour_header.js +1 -2
  126. package/optimize/lib/components/tour/tour_step.js +4 -5
  127. package/optimize/lib/components/tree_view/tree_view_item.js +1 -2
  128. package/optimize/lib/global_styling/mixins/_helpers.js +2 -8
  129. package/package.json +13 -12
  130. package/src/global_styling/index.scss +0 -6
  131. package/src/global_styling/mixins/_helpers.scss +0 -9
  132. package/src/global_styling/mixins/_shadow.scss +0 -8
  133. package/src/global_styling/variables/_size.scss +0 -2
  134. package/src/themes/amsterdam/global_styling/index.scss +0 -3
  135. package/test-env/components/badge/beta_badge/beta_badge.js +2 -2
  136. package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -0
  137. package/test-env/components/card/card.js +1 -1
  138. package/test-env/components/card/card.styles.js +2 -2
  139. package/test-env/components/code/code_block_copy.js +5 -4
  140. package/test-env/components/drag_and_drop/draggable.js +1 -2
  141. package/test-env/components/drag_and_drop/droppable.js +1 -2
  142. package/test-env/components/error_boundary/error_boundary.js +2 -3
  143. package/test-env/components/form/range/range_draggable.js +2 -2
  144. package/test-env/components/health/health.js +2 -3
  145. package/test-env/components/inline_edit/inline_edit_form.js +4 -5
  146. package/test-env/components/inline_edit/inline_edit_text.js +2 -3
  147. package/test-env/components/inline_edit/inline_edit_title.js +2 -3
  148. package/test-env/components/key_pad_menu/key_pad_menu.js +2 -3
  149. package/test-env/components/key_pad_menu/key_pad_menu_item.js +2 -5
  150. package/test-env/components/mark/mark.js +2 -3
  151. package/test-env/components/overlay_mask/overlay_mask.js +1 -2
  152. package/test-env/components/popover/popover.js +3 -1
  153. package/test-env/components/search_bar/filters/field_value_selection_filter.js +18 -9
  154. package/test-env/components/search_bar/search_bar.a11y.js +0 -1
  155. package/test-env/components/selectable/selectable_list/selectable_list.js +10 -1
  156. package/test-env/components/side_nav/side_nav_item.js +2 -3
  157. package/test-env/components/tabs/tab.js +2 -0
  158. package/test-env/components/tabs/tabs.js +17 -1
  159. package/test-env/components/text_diff/text_diff.js +1 -2
  160. package/test-env/components/toast/global_toast_list_item.js +2 -5
  161. package/test-env/components/tour/_tour_footer.js +1 -2
  162. package/test-env/components/tour/_tour_header.js +1 -2
  163. package/test-env/components/tour/tour_step.js +4 -5
  164. package/test-env/components/tree_view/tree_view_item.js +1 -2
  165. package/test-env/global_styling/mixins/_helpers.js +2 -8
  166. package/src/global_styling/react_date_picker/_date_picker.scss +0 -772
  167. package/src/global_styling/react_date_picker/_index.scss +0 -2
  168. package/src/global_styling/react_date_picker/_variables.scss +0 -1
  169. package/src/global_styling/utility/_animations.scss +0 -55
  170. package/src/global_styling/utility/_index.scss +0 -1
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
13
13
  import React, { useMemo } from 'react';
14
14
  import Diff from 'text-diff';
15
15
  import classNames from 'classnames';
16
- import { useEuiTheme } from '../../services';
16
+ import { useEuiMemoizedStyles } from '../../services';
17
17
  import { euiTextDiffStyles } from './text_diff.styles';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var useEuiTextDiff = function useEuiTextDiff(_ref) {
@@ -38,8 +38,7 @@ export var useEuiTextDiff = function useEuiTextDiff(_ref) {
38
38
  return diff.main(beforeText, afterText);
39
39
  }, [beforeText, afterText, timeout]); // produces diff array
40
40
 
41
- var euiTheme = useEuiTheme();
42
- var styles = euiTextDiffStyles(euiTheme);
41
+ var styles = useEuiMemoizedStyles(euiTextDiffStyles);
43
42
  var classes = classNames('euiTextDiff', className);
44
43
  var rendereredHtml = useMemo(function () {
45
44
  var html = [];
@@ -14,17 +14,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
14
14
 
15
15
  import classNames from 'classnames';
16
16
  import PropTypes from "prop-types";
17
- import { useEuiTheme, cloneElementWithCss } from '../../services';
17
+ import { useEuiMemoizedStyles, cloneElementWithCss } from '../../services';
18
18
  import { euiGlobalToastListItemStyles } from './global_toast_list.styles';
19
19
  export var EuiGlobalToastListItem = function EuiGlobalToastListItem(_ref) {
20
20
  var children = _ref.children,
21
21
  className = _ref.className,
22
22
  isDismissed = _ref.isDismissed;
23
- var euiTheme = useEuiTheme();
24
- if (!children) {
25
- return null;
26
- }
27
- var styles = euiGlobalToastListItemStyles(euiTheme);
23
+ var styles = useEuiMemoizedStyles(euiGlobalToastListItemStyles);
24
+ if (!children) return null;
28
25
  var cssStyles = [styles.euiGlobalToastListItem, isDismissed && styles.dismissed];
29
26
  var classes = classNames('euiGlobalToastListItem', children.props.className, className);
30
27
  return cloneElementWithCss(children, _objectSpread(_objectSpread({}, children.props), {
@@ -17,7 +17,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
17
17
  */
18
18
 
19
19
  import React, { useMemo, memo } from 'react';
20
- import { useEuiTheme } from '../../services';
20
+ import { useEuiMemoizedStyles } from '../../services';
21
21
  import { EuiI18n } from '../i18n';
22
22
  import { EuiPopoverFooter } from '../popover';
23
23
  import { EuiButtonEmpty } from '../button';
@@ -30,8 +30,7 @@ export var EuiTourFooter = /*#__PURE__*/memo(function (_ref) {
30
30
  step = _ref.step,
31
31
  stepsTotal = _ref.stepsTotal,
32
32
  onFinish = _ref.onFinish;
33
- var euiTheme = useEuiTheme();
34
- var footerStyles = euiTourFooterStyles(euiTheme);
33
+ var footerStyles = useEuiMemoizedStyles(euiTourFooterStyles);
35
34
  var customFooterAction = useMemo(function () {
36
35
  if (!footerAction) return null;
37
36
  return Array.isArray(footerAction) ? ___EmotionJSX(EuiFlexGroup, {
@@ -8,7 +8,7 @@
8
8
 
9
9
  import React, { memo } from 'react';
10
10
  import PropTypes from "prop-types";
11
- import { useEuiTheme } from '../../services';
11
+ import { useEuiMemoizedStyles } from '../../services';
12
12
  import { EuiPopoverTitle } from '../popover';
13
13
  import { EuiTitle } from '../title';
14
14
  import { euiTourHeaderStyles } from './_tour_header.styles';
@@ -17,8 +17,7 @@ export var EuiTourHeader = /*#__PURE__*/memo(function (_ref) {
17
17
  var id = _ref.id,
18
18
  title = _ref.title,
19
19
  subtitle = _ref.subtitle;
20
- var euiTheme = useEuiTheme();
21
- var headerStyles = euiTourHeaderStyles(euiTheme);
20
+ var headerStyles = useEuiMemoizedStyles(euiTourHeaderStyles);
22
21
  return ___EmotionJSX(EuiPopoverTitle, {
23
22
  css: headerStyles.euiTourHeader,
24
23
  className: "euiTourHeader",
@@ -25,10 +25,10 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
25
25
  import React, { useEffect, useState, useMemo, useCallback } from 'react';
26
26
  import PropTypes from "prop-types";
27
27
  import classNames from 'classnames';
28
+ import { useGeneratedHtmlId, findElementBySelectorOrRef, useEuiMemoizedStyles } from '../../services';
28
29
  import { logicalStyles } from '../../global_styling';
29
- import { EuiBeacon } from '../beacon';
30
30
  import { EuiPopover, EuiWrappingPopover } from '../popover';
31
- import { useGeneratedHtmlId, findElementBySelectorOrRef, useEuiTheme } from '../../services';
31
+ import { EuiBeacon } from '../beacon';
32
32
  import { EuiTourHeader } from './_tour_header';
33
33
  import { EuiTourFooter } from './_tour_footer';
34
34
  import { euiTourStyles, euiTourBeaconStyles } from './tour.styles';
@@ -94,9 +94,8 @@ export var EuiTourStep = function EuiTourStep(_ref) {
94
94
  }, [anchor]);
95
95
  var anchorClasses = classNames('euiTourAnchor', className);
96
96
  var popoverClasses = classNames('euiTour', panelClassName);
97
- var euiTheme = useEuiTheme();
98
- var tourStyles = euiTourStyles(euiTheme);
99
- var beaconStyles = euiTourBeaconStyles(euiTheme);
97
+ var tourStyles = useEuiMemoizedStyles(euiTourStyles);
98
+ var beaconStyles = useEuiMemoizedStyles(euiTourBeaconStyles);
100
99
  var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
101
100
  var hasBeacon = decoration === 'beacon';
102
101
  var widthStyles = useMemo(function () {
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
13
13
  import React, { memo } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
- import { useEuiTheme } from '../../services';
16
+ import { useEuiMemoizedStyles } from '../../services';
17
17
  import { EuiIcon } from '../icon';
18
18
  import { euiTreeViewItemStyles } from './tree_view_item.styles';
19
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -31,8 +31,7 @@ export var EuiTreeViewItem = /*#__PURE__*/memo(function (_ref) {
31
31
  buttonRef = _ref.buttonRef,
32
32
  wrapperProps = _ref.wrapperProps,
33
33
  rest = _objectWithoutProperties(_ref, _excluded);
34
- var euiTheme = useEuiTheme();
35
- var styles = euiTreeViewItemStyles(euiTheme);
34
+ var styles = useEuiMemoizedStyles(euiTreeViewItemStyles);
36
35
  var wrapperClasses = classNames('euiTreeView__node', {
37
36
  'euiTreeView__node--expanded': isExpanded
38
37
  }, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
@@ -166,10 +166,4 @@ export var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
166
166
  */
167
167
  export var euiFullHeight = function euiFullHeight() {
168
168
  return "\n ".concat(logicalCSS('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
169
- };
170
-
171
- /**
172
- * A constant storing the support for the `:has()` selector through a
173
- * media query that will only apply the content it is supported.
174
- */
175
- export var euiSupportsHas = '@supports(selector(:has(p)))';
169
+ };
package/eui.d.ts CHANGED
@@ -1487,11 +1487,6 @@ declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
1487
1487
  * For quickly applying a full-height element whether using flex or not
1488
1488
  */
1489
1489
  export const euiFullHeight: () => string;
1490
- /**
1491
- * A constant storing the support for the `:has()` selector through a
1492
- * media query that will only apply the content it is supported.
1493
- */
1494
- export const euiSupportsHas = "@supports(selector(:has(p)))";
1495
1490
  export {};
1496
1491
 
1497
1492
  }
@@ -4807,14 +4802,9 @@ declare module '@elastic/eui/src/components/flex/flex_group' {
4807
4802
  * such as `'div'` or `'span'`, a React component (a function, a class,
4808
4803
  * or an exotic component like `memo()`).
4809
4804
  *
4810
- * `<EuiFlexGroup>` accepts and forwards all extra props to the custom
4805
+ * `EuiFlexGroup` accepts and forwards all extra props to the custom
4811
4806
  * component.
4812
4807
  *
4813
- * @example
4814
- * // Renders a <button> element
4815
- * <EuiFlexGroup component="button">
4816
- * Submit form
4817
- * </EuiFlexGroup>
4818
4808
  * @default "div"
4819
4809
  */
4820
4810
  component?: TComponent;
@@ -4835,14 +4825,9 @@ declare module '@elastic/eui/src/components/flex/flex_group' {
4835
4825
  * such as `'div'` or `'span'`, a React component (a function, a class,
4836
4826
  * or an exotic component like `memo()`).
4837
4827
  *
4838
- * `<EuiFlexGroup>` accepts and forwards all extra props to the custom
4828
+ * `EuiFlexGroup` accepts and forwards all extra props to the custom
4839
4829
  * component.
4840
4830
  *
4841
- * @example
4842
- * // Renders a <button> element
4843
- * <EuiFlexGroup component="button">
4844
- * Submit form
4845
- * </EuiFlexGroup>
4846
4831
  * @default "div"
4847
4832
  */
4848
4833
  component?: TComponent | undefined;
@@ -8223,6 +8208,7 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge.styles'
8223
8208
  accent: import("@emotion/utils").SerializedStyles;
8224
8209
  subdued: import("@emotion/utils").SerializedStyles;
8225
8210
  hollow: import("@emotion/utils").SerializedStyles;
8211
+ warning: import("@emotion/utils").SerializedStyles;
8226
8212
  m: import("@emotion/utils").SerializedStyles;
8227
8213
  s: import("@emotion/utils").SerializedStyles;
8228
8214
  badgeSizes: {
@@ -8246,7 +8232,7 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge' {
8246
8232
  import { CommonProps, ExclusiveUnion } from '@elastic/eui/src/components/common';
8247
8233
  import { EuiToolTipProps, ToolTipPositions } from '@elastic/eui/src/components/tool_tip';
8248
8234
  import { IconType } from '@elastic/eui/src/components/icon';
8249
- export const COLORS: readonly ["accent", "subdued", "hollow"];
8235
+ export const COLORS: readonly ["accent", "subdued", "hollow", "warning"];
8250
8236
  export type BetaBadgeColor = (typeof COLORS)[number];
8251
8237
  export const SIZES: readonly ["s", "m"];
8252
8238
  export type BetaBadgeSize = (typeof SIZES)[number];
@@ -8304,7 +8290,7 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge' {
8304
8290
  */
8305
8291
  title?: string;
8306
8292
  /**
8307
- * Accepts accent, subdued and hollow.
8293
+ * Accepts accent, subdued, hollow and warning.
8308
8294
  */
8309
8295
  color?: BetaBadgeColor;
8310
8296
  size?: BetaBadgeSize;
@@ -11198,7 +11184,8 @@ declare module '@elastic/eui/src/components/code/code_block_copy' {
11198
11184
  /**
11199
11185
  * Hook that returns copy-related state/logic/utils
11200
11186
  */
11201
- export const useCopy: ({ isCopyable, isVirtualized, children, }: {
11187
+ export const useCopy: ({ copyAriaLabel, isCopyable, isVirtualized, children, }: {
11188
+ copyAriaLabel?: string | undefined;
11202
11189
  isCopyable: boolean;
11203
11190
  isVirtualized: boolean;
11204
11191
  children: ReactNode;
@@ -11396,6 +11383,12 @@ declare module '@elastic/eui/src/components/code/code_block' {
11396
11383
  * Displays an icon button to copy the code snippet to the clipboard.
11397
11384
  */
11398
11385
  isCopyable?: boolean;
11386
+ /**
11387
+ * Customizes the aria-label for the copy button.
11388
+ *
11389
+ * @default 'Copy'
11390
+ */
11391
+ copyAriaLabel?: string;
11399
11392
  /**
11400
11393
  * Displays line numbers.
11401
11394
  * Optionally accepts a configuration object for setting the starting number,
@@ -24131,9 +24124,9 @@ declare module '@elastic/eui/src/components/tour/tour.styles' {
24131
24124
  }
24132
24125
  declare module '@elastic/eui/src/components/tour/tour_step' {
24133
24126
  import { CSSProperties, HTMLAttributes, FunctionComponent, ReactElement, ReactNode } from 'react';
24127
+ import { ElementTarget } from '@elastic/eui/src/services';
24134
24128
  import { CommonProps, ExclusiveUnion, NoArgCallback } from '@elastic/eui/src/components/common';
24135
- import { EuiPopoverProps } from '@elastic/eui/src/components/popover';
24136
- import { ElementTarget } from '@elastic/eui/src/services'; type _EuiPopoverProps = EuiPopoverProps & Omit<HTMLAttributes<HTMLDivElement>, 'content' | 'title' | 'step'>; type _PopoverOverrides = 'button' | 'closePopover'; type _PopoverPartials = 'closePopover'; type ExtendedEuiPopoverProps = Omit<_EuiPopoverProps, _PopoverOverrides> & Partial<Pick<EuiPopoverProps, _PopoverPartials>>;
24129
+ import { EuiPopoverProps } from '@elastic/eui/src/components/popover'; type _EuiPopoverProps = EuiPopoverProps & Omit<HTMLAttributes<HTMLDivElement>, 'content' | 'title' | 'step'>; type _PopoverOverrides = 'button' | 'closePopover'; type _PopoverPartials = 'closePopover'; type ExtendedEuiPopoverProps = Omit<_EuiPopoverProps, _PopoverOverrides> & Partial<Pick<EuiPopoverProps, _PopoverPartials>>;
24137
24130
  export type EuiTourStepAnchorProps = ExclusiveUnion<{
24138
24131
  /**
24139
24132
  * Element to which the tour step popover attaches when open
@@ -31555,6 +31548,7 @@ declare module '@elastic/eui' {
31555
31548
  "euiResizableButton.horizontalResizerAriaLabel": any;
31556
31549
  "euiResizableButton.verticalResizerAriaLabel": any;
31557
31550
  "euiResizablePanel.toggleButtonAriaLabel": any;
31551
+ "euiFieldValueSelectionFilter.buttonLabelHint": any;
31558
31552
  "euiSearchBox.placeholder": any;
31559
31553
  "euiSearchBox.incrementalAriaLabel": any;
31560
31554
  "euiSearchBox.ariaLabel": any;
package/i18ntokens.json CHANGED
@@ -437,14 +437,14 @@
437
437
  "highlighting": "string",
438
438
  "loc": {
439
439
  "start": {
440
- "line": 44,
441
- "column": 24,
442
- "index": 1519
440
+ "line": 46,
441
+ "column": 31,
442
+ "index": 1569
443
443
  },
444
444
  "end": {
445
- "line": 44,
446
- "column": 67,
447
- "index": 1562
445
+ "line": 46,
446
+ "column": 74,
447
+ "index": 1612
448
448
  }
449
449
  },
450
450
  "filepath": "src/components/code/code_block_copy.tsx"
@@ -4721,14 +4721,14 @@
4721
4721
  "highlighting": "string",
4722
4722
  "loc": {
4723
4723
  "start": {
4724
- "line": 110,
4724
+ "line": 109,
4725
4725
  "column": 12,
4726
- "index": 3054
4726
+ "index": 3041
4727
4727
  },
4728
4728
  "end": {
4729
- "line": 110,
4729
+ "line": 109,
4730
4730
  "column": 70,
4731
- "index": 3112
4731
+ "index": 3099
4732
4732
  }
4733
4733
  },
4734
4734
  "filepath": "src/components/error_boundary/error_boundary.tsx"
@@ -5171,14 +5171,14 @@
5171
5171
  "highlighting": "string",
5172
5172
  "loc": {
5173
5173
  "start": {
5174
- "line": 172,
5174
+ "line": 171,
5175
5175
  "column": 37,
5176
- "index": 5274
5176
+ "index": 5264
5177
5177
  },
5178
5178
  "end": {
5179
- "line": 175,
5179
+ "line": 174,
5180
5180
  "column": 3,
5181
- "index": 5350
5181
+ "index": 5340
5182
5182
  }
5183
5183
  },
5184
5184
  "filepath": "src/components/inline_edit/inline_edit_form.tsx"
@@ -5189,14 +5189,14 @@
5189
5189
  "highlighting": "string",
5190
5190
  "loc": {
5191
5191
  "start": {
5192
- "line": 176,
5192
+ "line": 175,
5193
5193
  "column": 39,
5194
- "index": 5391
5194
+ "index": 5381
5195
5195
  },
5196
5196
  "end": {
5197
- "line": 179,
5197
+ "line": 178,
5198
5198
  "column": 3,
5199
- "index": 5471
5199
+ "index": 5461
5200
5200
  }
5201
5201
  },
5202
5202
  "filepath": "src/components/inline_edit/inline_edit_form.tsx"
@@ -5207,14 +5207,14 @@
5207
5207
  "highlighting": "string",
5208
5208
  "loc": {
5209
5209
  "start": {
5210
- "line": 300,
5210
+ "line": 299,
5211
5211
  "column": 10,
5212
- "index": 9596
5212
+ "index": 9598
5213
5213
  },
5214
5214
  "end": {
5215
- "line": 303,
5215
+ "line": 302,
5216
5216
  "column": 12,
5217
- "index": 9775
5217
+ "index": 9777
5218
5218
  }
5219
5219
  },
5220
5220
  "filepath": "src/components/inline_edit/inline_edit_form.tsx"
@@ -5225,14 +5225,14 @@
5225
5225
  "highlighting": "string",
5226
5226
  "loc": {
5227
5227
  "start": {
5228
- "line": 391,
5228
+ "line": 390,
5229
5229
  "column": 10,
5230
- "index": 12623
5230
+ "index": 12625
5231
5231
  },
5232
5232
  "end": {
5233
- "line": 394,
5233
+ "line": 393,
5234
5234
  "column": 12,
5235
- "index": 12764
5235
+ "index": 12766
5236
5236
  }
5237
5237
  },
5238
5238
  "filepath": "src/components/inline_edit/inline_edit_form.tsx"
@@ -5333,14 +5333,14 @@
5333
5333
  "highlighting": "string",
5334
5334
  "loc": {
5335
5335
  "start": {
5336
- "line": 45,
5336
+ "line": 44,
5337
5337
  "column": 25,
5338
- "index": 1302
5338
+ "index": 1289
5339
5339
  },
5340
5340
  "end": {
5341
- "line": 48,
5341
+ "line": 47,
5342
5342
  "column": 3,
5343
- "index": 1369
5343
+ "index": 1356
5344
5344
  }
5345
5345
  },
5346
5346
  "filepath": "src/components/mark/mark.tsx"
@@ -5351,14 +5351,14 @@
5351
5351
  "highlighting": "string",
5352
5352
  "loc": {
5353
5353
  "start": {
5354
- "line": 49,
5354
+ "line": 48,
5355
5355
  "column": 23,
5356
- "index": 1394
5356
+ "index": 1381
5357
5357
  },
5358
5358
  "end": {
5359
- "line": 49,
5359
+ "line": 48,
5360
5360
  "column": 74,
5361
- "index": 1445
5361
+ "index": 1432
5362
5362
  }
5363
5363
  },
5364
5364
  "filepath": "src/components/mark/mark.tsx"
@@ -5911,12 +5911,12 @@
5911
5911
  "start": {
5912
5912
  "line": 700,
5913
5913
  "column": 16,
5914
- "index": 20806
5914
+ "index": 20852
5915
5915
  },
5916
5916
  "end": {
5917
5917
  "line": 703,
5918
5918
  "column": 18,
5919
- "index": 21000
5919
+ "index": 21046
5920
5920
  }
5921
5921
  },
5922
5922
  "filepath": "src/components/popover/popover.tsx"
@@ -5993,6 +5993,24 @@
5993
5993
  },
5994
5994
  "filepath": "src/components/resizable_container/resizable_panel.tsx"
5995
5995
  },
5996
+ {
5997
+ "token": "euiFieldValueSelectionFilter.buttonLabelHint",
5998
+ "defString": "Selection",
5999
+ "highlighting": "string",
6000
+ "loc": {
6001
+ "start": {
6002
+ "line": 302,
6003
+ "column": 6,
6004
+ "index": 8608
6005
+ },
6006
+ "end": {
6007
+ "line": 305,
6008
+ "column": 7,
6009
+ "index": 8713
6010
+ }
6011
+ },
6012
+ "filepath": "src/components/search_bar/filters/field_value_selection_filter.tsx"
6013
+ },
5996
6014
  {
5997
6015
  "token": "euiSearchBox.placeholder",
5998
6016
  "defString": "Search...",
@@ -6989,14 +7007,14 @@
6989
7007
  "highlighting": "string",
6990
7008
  "loc": {
6991
7009
  "start": {
6992
- "line": 95,
7010
+ "line": 93,
6993
7011
  "column": 14,
6994
- "index": 2888
7012
+ "index": 2872
6995
7013
  },
6996
7014
  "end": {
6997
- "line": 102,
7015
+ "line": 100,
6998
7016
  "column": 15,
6999
- "index": 3156
7017
+ "index": 3140
7000
7018
  }
7001
7019
  },
7002
7020
  "filepath": "src/components/tour/_tour_footer.tsx"
@@ -7007,14 +7025,14 @@
7007
7025
  "highlighting": "string",
7008
7026
  "loc": {
7009
7027
  "start": {
7010
- "line": 95,
7028
+ "line": 93,
7011
7029
  "column": 14,
7012
- "index": 2888
7030
+ "index": 2872
7013
7031
  },
7014
7032
  "end": {
7015
- "line": 102,
7033
+ "line": 100,
7016
7034
  "column": 15,
7017
- "index": 3156
7035
+ "index": 3140
7018
7036
  }
7019
7037
  },
7020
7038
  "filepath": "src/components/tour/_tour_footer.tsx"
@@ -7025,14 +7043,14 @@
7025
7043
  "highlighting": "string",
7026
7044
  "loc": {
7027
7045
  "start": {
7028
- "line": 95,
7046
+ "line": 93,
7029
7047
  "column": 14,
7030
- "index": 2888
7048
+ "index": 2872
7031
7049
  },
7032
7050
  "end": {
7033
- "line": 102,
7051
+ "line": 100,
7034
7052
  "column": 15,
7035
- "index": 3156
7053
+ "index": 3140
7036
7054
  }
7037
7055
  },
7038
7056
  "filepath": "src/components/tour/_tour_footer.tsx"
@@ -25,7 +25,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
25
25
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
26
26
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
27
27
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
28
- var COLORS = exports.COLORS = ['accent', 'subdued', 'hollow'];
28
+ var COLORS = exports.COLORS = ['accent', 'subdued', 'hollow', 'warning'];
29
29
  var SIZES = exports.SIZES = ['s', 'm'];
30
30
  var ALIGNMENTS = exports.ALIGNMENTS = ['baseline', 'middle'];
31
31
 
@@ -178,7 +178,7 @@ EuiBetaBadge.propTypes = {
178
178
  */
179
179
  title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.string])]),
180
180
  /**
181
- * Accepts accent, subdued and hollow.
181
+ * Accepts accent, subdued, hollow and warning.
182
182
  */
183
183
  color: _propTypes.default.any,
184
184
  size: _propTypes.default.any,
@@ -50,6 +50,7 @@ var euiBetaBadgeStyles = exports.euiBetaBadgeStyles = function euiBetaBadgeStyle
50
50
  accent: /*#__PURE__*/(0, _react.css)(badgeColors.accentText, ";label:accent;"),
51
51
  subdued: /*#__PURE__*/(0, _react.css)(badgeColors.subdued, ";label:subdued;"),
52
52
  hollow: /*#__PURE__*/(0, _react.css)("color:", badgeColors.hollow.color, ";background-color:", badgeColors.hollow.backgroundColor, ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", badgeColors.hollow.borderColor, ";;label:hollow;"),
53
+ warning: /*#__PURE__*/(0, _react.css)(badgeColors.warning, ";label:warning;"),
53
54
  // Font sizes
54
55
  m: /*#__PURE__*/(0, _react.css)("font-size:", (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme), ";line-height:", euiTheme.size.l, ";;label:m;"),
55
56
  s: /*#__PURE__*/(0, _react.css)("font-size:0.625rem;line-height:", (0, _global_styling.mathWithUnits)(euiTheme.size.xs, function (x) {
@@ -389,7 +389,7 @@ EuiCard.propTypes = {
389
389
  */
390
390
  title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.string])]),
391
391
  /**
392
- * Accepts accent, subdued and hollow.
392
+ * Accepts accent, subdued, hollow and warning.
393
393
  */
394
394
  color: _propTypes.default.any,
395
395
  size: _propTypes.default.any,
@@ -128,7 +128,7 @@ var euiCardTextStyles = exports.euiCardTextStyles = function euiCardTextStyles(e
128
128
  var euiTheme = euiThemeContext.euiTheme;
129
129
  return {
130
130
  euiCard__text: _ref,
131
- interactive: /*#__PURE__*/(0, _react.css)("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;}", _global_styling.euiSupportsHas, "{outline:none!important;};label:interactive;"),
131
+ interactive: /*#__PURE__*/(0, _react.css)("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;};label:interactive;"),
132
132
  aligned: {
133
133
  center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
134
134
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
@@ -142,7 +142,7 @@ var euiCardBetaBadgeStyles = exports.euiCardBetaBadgeStyles = function euiCardBe
142
142
  var padding = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
143
143
  return {
144
144
  hasBetaBadge: /*#__PURE__*/(0, _react.css)("position:relative;overflow:visible;", (0, _global_styling.logicalCSS)('padding-top', "calc(".concat(padding, " + ").concat(euiTheme.size.s, ")")), ";;label:hasBetaBadge;"),
145
- euiCard__betaBadgeAnchor: /*#__PURE__*/(0, _react.css)("line-height:0;position:absolute;", (0, _global_styling.logicalCSS)('top', '0'), " ", (0, _global_styling.logicalCSS)('left', '50%'), " transform:translateX(-50%) translateY(-50%);z-index:3;", (0, _global_styling.logicalCSS)('min-width', 'min(30%, 112px)'), " ", (0, _global_styling.logicalCSS)('max-width', "calc(100% - (".concat(padding, " * 2))")), ";;label:euiCard__betaBadgeAnchor;"),
145
+ euiCard__betaBadgeAnchor: /*#__PURE__*/(0, _react.css)("line-height:0;position:absolute;", (0, _global_styling.logicalCSS)('top', '0'), " ", (0, _global_styling.logicalCSS)('left', '50%'), " transform:translateX(-50%) translateY(-50%);z-index:3;", (0, _global_styling.logicalCSS)('min-width', "min(30%, ".concat(euiTheme.base * 7, "px)")), " ", (0, _global_styling.logicalCSS)('max-width', "calc(100% - (".concat(padding, " * 2))")), ";;label:euiCard__betaBadgeAnchor;"),
146
146
  euiCard__betaBadge: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiCard__betaBadge;")
147
147
  };
148
148
  };
@@ -16,7 +16,7 @@ var _code_block_controls = require("./code_block_controls");
16
16
  var _code_block_virtualized = require("./code_block_virtualized");
17
17
  var _code_block = require("./code_block.styles");
18
18
  var _react2 = require("@emotion/react");
19
- var _excluded = ["language", "transparentBackground", "paddingSize", "fontSize", "isCopyable", "whiteSpace", "children", "className", "overflowHeight", "isVirtualized", "lineNumbers"];
19
+ var _excluded = ["language", "transparentBackground", "paddingSize", "fontSize", "isCopyable", "copyAriaLabel", "whiteSpace", "children", "className", "overflowHeight", "isVirtualized", "lineNumbers"];
20
20
  /*
21
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
22
  * or more contributor license agreements. Licensed under the Elastic License
@@ -64,6 +64,7 @@ var EuiCodeBlock = exports.EuiCodeBlock = function EuiCodeBlock(_ref) {
64
64
  fontSize = _ref$fontSize === void 0 ? 's' : _ref$fontSize,
65
65
  _ref$isCopyable = _ref.isCopyable,
66
66
  isCopyable = _ref$isCopyable === void 0 ? false : _ref$isCopyable,
67
+ copyAriaLabel = _ref.copyAriaLabel,
67
68
  _ref$whiteSpace = _ref.whiteSpace,
68
69
  whiteSpace = _ref$whiteSpace === void 0 ? 'pre-wrap' : _ref$whiteSpace,
69
70
  children = _ref.children,
@@ -104,6 +105,7 @@ var EuiCodeBlock = exports.EuiCodeBlock = function EuiCodeBlock(_ref) {
104
105
  return !!(_isVirtualized && Array.isArray(data));
105
106
  }, [_isVirtualized, data]);
106
107
  var _useCopy = (0, _code_block_copy.useCopy)({
108
+ copyAriaLabel: copyAriaLabel,
107
109
  isCopyable: isCopyable,
108
110
  isVirtualized: isVirtualized,
109
111
  children: children
@@ -207,6 +209,12 @@ EuiCodeBlock.propTypes = {
207
209
  * Displays an icon button to copy the code snippet to the clipboard.
208
210
  */
209
211
  isCopyable: _propTypes.default.bool,
212
+ /**
213
+ * Customizes the aria-label for the copy button.
214
+ *
215
+ * @default 'Copy'
216
+ */
217
+ copyAriaLabel: _propTypes.default.string,
210
218
  /**
211
219
  * Displays line numbers.
212
220
  * Optionally accepts a configuration object for setting the starting number,
@@ -29,7 +29,8 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
29
29
  * Hook that returns copy-related state/logic/utils
30
30
  */
31
31
  var useCopy = exports.useCopy = function useCopy(_ref) {
32
- var isCopyable = _ref.isCopyable,
32
+ var copyAriaLabel = _ref.copyAriaLabel,
33
+ isCopyable = _ref.isCopyable,
33
34
  isVirtualized = _ref.isVirtualized,
34
35
  children = _ref.children;
35
36
  var _useInnerText = (0, _inner_text.useInnerText)(''),
@@ -52,7 +53,7 @@ var useCopy = exports.useCopy = function useCopy(_ref) {
52
53
  var textToCopy = isVirtualized ? "".concat(children) : innerText; // Virtualized code blocks do not have inner text
53
54
 
54
55
  var showCopyButton = isCopyable && textToCopy;
55
- var copyAriaLabel = (0, _i18n.useEuiI18n)('euiCodeBlockCopy.copy', 'Copy');
56
+ var copyDefaultAriaLabel = (0, _i18n.useEuiI18n)('euiCodeBlockCopy.copy', 'Copy');
56
57
  var copyButton = (0, _react.useMemo)(function () {
57
58
  return showCopyButton ? (0, _react2.jsx)("div", {
58
59
  className: "euiCodeBlock__copyButton"
@@ -63,11 +64,11 @@ var useCopy = exports.useCopy = function useCopy(_ref) {
63
64
  onClick: copy,
64
65
  iconType: "copyClipboard",
65
66
  color: "text",
66
- "aria-label": copyAriaLabel,
67
+ "aria-label": copyAriaLabel || copyDefaultAriaLabel,
67
68
  "data-test-subj": "euiCodeBlockCopy"
68
69
  });
69
70
  })) : null;
70
- }, [showCopyButton, textToCopy, copyAriaLabel]);
71
+ }, [copyAriaLabel, copyDefaultAriaLabel, showCopyButton, textToCopy]);
71
72
  return {
72
73
  innerTextRef: innerTextRef,
73
74
  copyButton: copyButton
@@ -56,8 +56,7 @@ var EuiDraggable = exports.EuiDraggable = function EuiDraggable(_ref) {
56
56
  rest = _objectWithoutProperties(_ref, _excluded);
57
57
  var _useContext = (0, _react.useContext)(_droppable.EuiDroppableContext),
58
58
  cloneItems = _useContext.cloneItems;
59
- var euiTheme = (0, _services.useEuiTheme)();
60
- var styles = (0, _draggable.euiDraggableStyles)(euiTheme);
59
+ var styles = (0, _services.useEuiMemoizedStyles)(_draggable.euiDraggableStyles);
61
60
  var hasCustomDragHandle = customDragHandle !== false;
62
61
  return (0, _react2.jsx)(_dnd.Draggable, _extends({
63
62
  draggableId: draggableId,
@@ -56,8 +56,7 @@ var EuiDroppable = exports.EuiDroppable = function EuiDroppable(_ref) {
56
56
  var _useContext = (0, _react.useContext)(_drag_drop_context.EuiDragDropContextContext),
57
57
  isDraggingType = _useContext.isDraggingType;
58
58
  var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
59
- var euiTheme = (0, _services.useEuiTheme)();
60
- var styles = (0, _droppable.euiDroppableStyles)(euiTheme);
59
+ var styles = (0, _services.useEuiMemoizedStyles)(_droppable.euiDroppableStyles);
61
60
  return (0, _react2.jsx)(_dnd.Droppable, _extends({
62
61
  isDropDisabled: dropIsDisabled,
63
62
  droppableId: droppableId,