@elastic/eui 102.2.0 → 102.3.0-amsterdam.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 (177) hide show
  1. package/dist/eui_theme_borealis_dark.json +1 -1
  2. package/es/components/badge/color_utils.js +1 -3
  3. package/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
  4. package/es/components/basic_table/basic_table.js +4 -1
  5. package/es/components/basic_table/in_memory_table.js +4 -1
  6. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
  7. package/es/components/button/button_display/_button_display.js +1 -1
  8. package/es/components/button/button_display/_button_display.styles.js +11 -2
  9. package/es/components/button/button_display/_button_display_content.styles.js +6 -3
  10. package/es/components/button/button_empty/button_empty.styles.js +9 -12
  11. package/es/components/button/button_group/button_group.styles.js +5 -3
  12. package/es/components/button/button_group/button_group_button.js +19 -9
  13. package/es/components/button/button_group/button_group_button.styles.js +43 -19
  14. package/es/components/button/button_icon/button_icon.js +4 -2
  15. package/es/components/collapsible_nav/collapsible_nav.js +1 -0
  16. package/es/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
  17. package/es/components/datagrid/utils/focus.js +2 -2
  18. package/es/components/filter_group/filter_button.js +88 -23
  19. package/es/components/filter_group/filter_button.styles.js +51 -15
  20. package/es/components/filter_group/filter_group.styles.js +18 -6
  21. package/es/components/markdown_editor/markdown_editor_footer.js +9 -4
  22. package/es/components/provider/provider.js +2 -2
  23. package/es/components/search_bar/filters/field_value_selection_filter.js +1 -0
  24. package/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
  25. package/es/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
  26. package/es/components/search_bar/filters/is_filter.js +3 -1
  27. package/es/components/search_bar/search_bar.a11y.js +3 -3
  28. package/es/global_styling/mixins/_button.js +95 -28
  29. package/es/services/color/vis_color_store.js +1 -1
  30. package/es/services/theme/context.js +2 -2
  31. package/es/services/theme/index.js +2 -1
  32. package/es/services/theme/provider.js +28 -2
  33. package/es/services/theme/theme_variant.js +22 -0
  34. package/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
  35. package/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
  36. package/es/themes/amsterdam/theme.js +2 -1
  37. package/es/themes/json/eui_theme_borealis_dark.json +1 -1
  38. package/eui.d.ts +561 -528
  39. package/lib/components/badge/color_utils.js +1 -3
  40. package/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
  41. package/lib/components/basic_table/basic_table.js +4 -1
  42. package/lib/components/basic_table/in_memory_table.js +4 -1
  43. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
  44. package/lib/components/button/button_display/_button_display.js +1 -1
  45. package/lib/components/button/button_display/_button_display.styles.js +11 -2
  46. package/lib/components/button/button_display/_button_display_content.styles.js +6 -3
  47. package/lib/components/button/button_empty/button_empty.styles.js +10 -11
  48. package/lib/components/button/button_group/button_group.styles.js +5 -3
  49. package/lib/components/button/button_group/button_group_button.js +18 -8
  50. package/lib/components/button/button_group/button_group_button.styles.js +41 -17
  51. package/lib/components/button/button_icon/button_icon.js +3 -1
  52. package/lib/components/collapsible_nav/collapsible_nav.js +1 -0
  53. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
  54. package/lib/components/datagrid/utils/focus.js +1 -1
  55. package/lib/components/filter_group/filter_button.js +86 -21
  56. package/lib/components/filter_group/filter_button.styles.js +51 -15
  57. package/lib/components/filter_group/filter_group.styles.js +18 -6
  58. package/lib/components/markdown_editor/markdown_editor_footer.js +8 -3
  59. package/lib/components/provider/provider.js +2 -2
  60. package/lib/components/search_bar/filters/field_value_selection_filter.js +1 -0
  61. package/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
  62. package/lib/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
  63. package/lib/components/search_bar/filters/is_filter.js +3 -1
  64. package/lib/components/search_bar/search_bar.a11y.js +3 -3
  65. package/lib/global_styling/mixins/_button.js +94 -27
  66. package/lib/services/color/vis_color_store.js +2 -2
  67. package/lib/services/theme/context.js +2 -2
  68. package/lib/services/theme/index.js +42 -1
  69. package/lib/services/theme/provider.js +28 -2
  70. package/lib/services/theme/theme_variant.js +28 -0
  71. package/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
  72. package/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
  73. package/lib/themes/amsterdam/theme.js +2 -1
  74. package/lib/themes/json/eui_theme_borealis_dark.json +1 -1
  75. package/optimize/es/components/badge/color_utils.js +1 -3
  76. package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
  77. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
  78. package/optimize/es/components/button/button_display/_button_display.js +1 -1
  79. package/optimize/es/components/button/button_display/_button_display.styles.js +11 -2
  80. package/optimize/es/components/button/button_display/_button_display_content.styles.js +6 -3
  81. package/optimize/es/components/button/button_empty/button_empty.styles.js +9 -12
  82. package/optimize/es/components/button/button_group/button_group.styles.js +5 -3
  83. package/optimize/es/components/button/button_group/button_group_button.js +12 -8
  84. package/optimize/es/components/button/button_group/button_group_button.styles.js +43 -19
  85. package/optimize/es/components/button/button_icon/button_icon.js +4 -2
  86. package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
  87. package/optimize/es/components/datagrid/utils/focus.js +2 -2
  88. package/optimize/es/components/filter_group/filter_button.js +78 -21
  89. package/optimize/es/components/filter_group/filter_button.styles.js +51 -15
  90. package/optimize/es/components/filter_group/filter_group.styles.js +18 -6
  91. package/optimize/es/components/markdown_editor/markdown_editor_footer.js +9 -4
  92. package/optimize/es/components/provider/provider.js +2 -2
  93. package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +1 -0
  94. package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
  95. package/optimize/es/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
  96. package/optimize/es/components/search_bar/filters/is_filter.js +3 -1
  97. package/optimize/es/components/search_bar/search_bar.a11y.js +3 -3
  98. package/optimize/es/global_styling/mixins/_button.js +95 -28
  99. package/optimize/es/services/color/vis_color_store.js +1 -1
  100. package/optimize/es/services/theme/context.js +2 -2
  101. package/optimize/es/services/theme/index.js +2 -1
  102. package/optimize/es/services/theme/provider.js +28 -2
  103. package/optimize/es/services/theme/theme_variant.js +22 -0
  104. package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
  105. package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
  106. package/optimize/es/themes/amsterdam/theme.js +2 -1
  107. package/optimize/es/themes/json/eui_theme_borealis_dark.json +1 -1
  108. package/optimize/lib/components/badge/color_utils.js +1 -3
  109. package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
  110. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
  111. package/optimize/lib/components/button/button_display/_button_display.js +1 -1
  112. package/optimize/lib/components/button/button_display/_button_display.styles.js +11 -2
  113. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +6 -3
  114. package/optimize/lib/components/button/button_empty/button_empty.styles.js +10 -11
  115. package/optimize/lib/components/button/button_group/button_group.styles.js +5 -3
  116. package/optimize/lib/components/button/button_group/button_group_button.js +11 -7
  117. package/optimize/lib/components/button/button_group/button_group_button.styles.js +41 -17
  118. package/optimize/lib/components/button/button_icon/button_icon.js +3 -1
  119. package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
  120. package/optimize/lib/components/datagrid/utils/focus.js +1 -1
  121. package/optimize/lib/components/filter_group/filter_button.js +76 -19
  122. package/optimize/lib/components/filter_group/filter_button.styles.js +51 -15
  123. package/optimize/lib/components/filter_group/filter_group.styles.js +18 -6
  124. package/optimize/lib/components/markdown_editor/markdown_editor_footer.js +8 -3
  125. package/optimize/lib/components/provider/provider.js +2 -2
  126. package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +1 -0
  127. package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
  128. package/optimize/lib/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
  129. package/optimize/lib/components/search_bar/filters/is_filter.js +3 -1
  130. package/optimize/lib/components/search_bar/search_bar.a11y.js +3 -3
  131. package/optimize/lib/global_styling/mixins/_button.js +94 -27
  132. package/optimize/lib/services/color/vis_color_store.js +2 -2
  133. package/optimize/lib/services/theme/context.js +2 -2
  134. package/optimize/lib/services/theme/index.js +42 -1
  135. package/optimize/lib/services/theme/provider.js +28 -2
  136. package/optimize/lib/services/theme/theme_variant.js +28 -0
  137. package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
  138. package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
  139. package/optimize/lib/themes/amsterdam/theme.js +2 -1
  140. package/optimize/lib/themes/json/eui_theme_borealis_dark.json +1 -1
  141. package/package.json +4 -4
  142. package/test-env/components/badge/color_utils.js +1 -3
  143. package/test-env/components/badge/notification_badge/badge_notification.styles.js +6 -1
  144. package/test-env/components/basic_table/basic_table.js +4 -1
  145. package/test-env/components/basic_table/in_memory_table.js +4 -1
  146. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
  147. package/test-env/components/button/button_display/_button_display.js +1 -1
  148. package/test-env/components/button/button_display/_button_display.styles.js +11 -2
  149. package/test-env/components/button/button_display/_button_display_content.styles.js +6 -3
  150. package/test-env/components/button/button_empty/button_empty.styles.js +10 -11
  151. package/test-env/components/button/button_group/button_group.styles.js +5 -3
  152. package/test-env/components/button/button_group/button_group_button.js +18 -8
  153. package/test-env/components/button/button_group/button_group_button.styles.js +41 -17
  154. package/test-env/components/button/button_icon/button_icon.js +3 -1
  155. package/test-env/components/collapsible_nav/collapsible_nav.js +1 -0
  156. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
  157. package/test-env/components/datagrid/utils/focus.js +1 -1
  158. package/test-env/components/filter_group/filter_button.js +86 -21
  159. package/test-env/components/filter_group/filter_button.styles.js +51 -15
  160. package/test-env/components/filter_group/filter_group.styles.js +18 -6
  161. package/test-env/components/markdown_editor/markdown_editor_footer.js +8 -3
  162. package/test-env/components/provider/provider.js +2 -2
  163. package/test-env/components/search_bar/filters/field_value_selection_filter.js +1 -0
  164. package/test-env/components/search_bar/filters/field_value_toggle_filter.js +3 -1
  165. package/test-env/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
  166. package/test-env/components/search_bar/filters/is_filter.js +3 -1
  167. package/test-env/components/search_bar/search_bar.a11y.js +3 -3
  168. package/test-env/global_styling/mixins/_button.js +94 -27
  169. package/test-env/services/color/vis_color_store.js +2 -2
  170. package/test-env/services/theme/context.js +2 -2
  171. package/test-env/services/theme/index.js +42 -1
  172. package/test-env/services/theme/provider.js +28 -2
  173. package/test-env/services/theme/theme_variant.js +28 -0
  174. package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
  175. package/test-env/themes/amsterdam/global_styling/variables/_components.js +229 -224
  176. package/test-env/themes/amsterdam/theme.js +2 -1
  177. package/test-env/themes/json/eui_theme_borealis_dark.json +1 -1
@@ -1,11 +1,11 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
3
- 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); }
2
+ var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isToggle", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
4
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
5
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ 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); }
9
9
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
11
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -25,12 +25,14 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
25
25
  import React from 'react';
26
26
  import PropTypes from "prop-types";
27
27
  import classNames from 'classnames';
28
- import { useEuiMemoizedStyles } from '../../services';
28
+ import { EuiThemeProvider, useEuiMemoizedStyles, useEuiTheme, useGeneratedHtmlId, useEuiThemeRefreshVariant } from '../../services';
29
29
  import { useEuiI18n } from '../i18n';
30
30
  import { useInnerText } from '../inner_text';
31
31
  import { EuiNotificationBadge } from '../badge';
32
32
  import { EuiButtonEmpty } from '../button/button_empty';
33
- import { euiFilterButtonStyles, euiFilterButtonChildStyles } from './filter_button.styles';
33
+ import { euiFilterButtonStyles, euiFilterButtonWrapperStyles, euiFilterButtonChildStyles } from './filter_button.styles';
34
+ import { EuiButtonGroupButton } from '../button/button_group/button_group_button';
35
+ import { _compressedButtonFocusColors } from '../button/button_group/button_group_button.styles';
34
36
  import { jsx as ___EmotionJSX } from "@emotion/react";
35
37
  export var EuiFilterButton = function EuiFilterButton(_ref) {
36
38
  var children = _ref.children,
@@ -45,6 +47,7 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
45
47
  hasActiveFilters = _ref.hasActiveFilters,
46
48
  numFilters = _ref.numFilters,
47
49
  numActiveFilters = _ref.numActiveFilters,
50
+ isToggle = _ref.isToggle,
48
51
  isDisabled = _ref.isDisabled,
49
52
  isSelected = _ref.isSelected,
50
53
  _ref$type = _ref.type,
@@ -55,18 +58,37 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
55
58
  textProps = _ref.textProps,
56
59
  contentProps = _ref.contentProps,
57
60
  rest = _objectWithoutProperties(_ref, _excluded);
61
+ var id = useGeneratedHtmlId({
62
+ prefix: 'filter-button'
63
+ });
58
64
  var numFiltersDefined = numFilters != null; // != instead of !== to allow for null and undefined
59
65
  var numActiveFiltersDefined = numActiveFilters != null && numActiveFilters > 0;
66
+ var euiThemeContext = useEuiTheme();
67
+ var colorMode = euiThemeContext.colorMode;
68
+ var isRefreshVariant = useEuiThemeRefreshVariant('buttonVariant');
69
+
70
+ // assumption about type of usage based on icon usage
71
+ // requires manual override to apply correct aria attributes for more custom usages
72
+ var isCollapsible = !isToggle && iconType === 'arrowDown';
73
+ // NOTE: in Amsterdam `hasActiveFilters` applies selected styling while `isSelected` does not.
74
+ // With Borealis this is more granular as EuiFilterButton now supports proper toggle buttons next to regular buttons
75
+ var isExpanded = isCollapsible && (isSelected !== null && isSelected !== void 0 ? isSelected : hasActiveFilters);
60
76
  var styles = useEuiMemoizedStyles(euiFilterButtonStyles);
61
- var cssStyles = [styles.euiFilterButton, withNext && styles.withNext, !grow && styles.noGrow, hasActiveFilters && styles.hasActiveFilters, numFiltersDefined && styles.hasNotification];
77
+ var focusColorStyles = useEuiMemoizedStyles(_compressedButtonFocusColors);
78
+ var toggleVariantStyles = isRefreshVariant ? [isToggle && styles.buttonType.toggle, !isToggle && !isDisabled && focusColorStyles[color], !isToggle && styles.buttonType.default] : [isToggle && styles.buttonType.toggle];
79
+ var cssStyles = [styles.euiFilterButton, !isRefreshVariant && withNext && styles.withNext, hasActiveFilters && styles.hasActiveFilters].concat(toggleVariantStyles);
80
+ var wrapperStyles = useEuiMemoizedStyles(euiFilterButtonWrapperStyles);
81
+ var wrapperCssStyles = [wrapperStyles.wrapper, isRefreshVariant && withNext && styles.withNext, numFiltersDefined && styles.hasNotification, isToggle && wrapperStyles.hasToggle, !grow && styles.noGrow];
62
82
  var _useEuiMemoizedStyles = useEuiMemoizedStyles(euiFilterButtonChildStyles),
63
83
  contentStyles = _useEuiMemoizedStyles.content,
64
84
  textStyles = _useEuiMemoizedStyles.text,
65
85
  notificationStyles = _useEuiMemoizedStyles.notification;
86
+ var wrapperClasses = classNames('euiFilterButton__wrapper');
66
87
  var classes = classNames('euiFilterButton', {
67
88
  'euiFilterButton-isSelected': isSelected,
68
89
  'euiFilterButton-hasActiveFilters': hasActiveFilters,
69
- 'euiFilterButton-hasNotification': numFiltersDefined
90
+ 'euiFilterButton-hasNotification': numFiltersDefined,
91
+ 'euiFilterButton-isToggle': isRefreshVariant && isToggle
70
92
  }, className);
71
93
 
72
94
  /**
@@ -81,6 +103,16 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
81
103
  count: badgeCount
82
104
  });
83
105
  var badgeStyles = [notificationStyles.euiFilterButton__notification, isDisabled && notificationStyles.disabled];
106
+ var badgeContent = ___EmotionJSX(EuiNotificationBadge, {
107
+ className: "euiFilterButton__notification",
108
+ css: badgeStyles,
109
+ "aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
110
+ color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
111
+ role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
112
+ }, badgeCount);
113
+ var badgeElement = showBadge && (isRefreshVariant ? ___EmotionJSX(EuiThemeProvider, {
114
+ colorMode: isToggle && isSelected ? 'INVERSE' : colorMode
115
+ }, badgeContent) : badgeContent);
84
116
 
85
117
  /**
86
118
  * Text
@@ -94,7 +126,17 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
94
126
  ref = _useInnerText2[0],
95
127
  innerText = _useInnerText2[1];
96
128
  var dataText = children && typeof children === 'string' ? children : innerText;
97
- return ___EmotionJSX(EuiButtonEmpty, _extends({
129
+ var textContent = ___EmotionJSX("span", _extends({
130
+ ref: ref,
131
+ "data-text": dataText,
132
+ title: dataText
133
+ }, textProps, {
134
+ className: buttonTextClassNames,
135
+ css: textCssStyles
136
+ }), children);
137
+
138
+ /** Button element */
139
+ var button = ___EmotionJSX(EuiButtonEmpty, _extends({
98
140
  className: classes,
99
141
  css: cssStyles,
100
142
  color: color,
@@ -103,27 +145,42 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
103
145
  iconType: iconType,
104
146
  type: type,
105
147
  textProps: false,
148
+ contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
149
+ css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
150
+ }),
151
+ "aria-expanded": isCollapsible ? isExpanded : undefined
152
+ }, rest), textContent, badgeElement);
153
+ var onToggleClick = function onToggleClick(e) {
154
+ var _rest$onClick;
155
+ rest === null || rest === void 0 || (_rest$onClick = rest.onClick) === null || _rest$onClick === void 0 || _rest$onClick.call(rest, e);
156
+ };
157
+ return ___EmotionJSX("div", {
158
+ className: wrapperClasses,
159
+ css: wrapperCssStyles
160
+ }, isToggle && !isCollapsible ? ___EmotionJSX(EuiButtonGroupButton, _extends({
161
+ id: id,
162
+ label: ___EmotionJSX(React.Fragment, null, textContent, badgeElement),
163
+ className: classes,
164
+ css: cssStyles,
165
+ color: color,
166
+ isSelected: isSelected,
167
+ size: "compressed",
168
+ isDisabled: isDisabled,
169
+ iconSide: iconSide,
170
+ iconType: iconType,
171
+ isIconOnly: false,
172
+ type: type,
173
+ textProps: false,
106
174
  contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
107
175
  css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
108
176
  })
109
- }, rest), ___EmotionJSX("span", _extends({
110
- ref: ref,
111
- "data-text": dataText,
112
- title: dataText
113
- }, textProps, {
114
- className: buttonTextClassNames,
115
- css: textCssStyles
116
- }), children), showBadge && ___EmotionJSX(EuiNotificationBadge, {
117
- className: "euiFilterButton__notification",
118
- css: badgeStyles,
119
- "aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
120
- color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
121
- role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
122
- }, badgeCount));
177
+ }, rest, {
178
+ onClick: onToggleClick
179
+ })) : button);
123
180
  };
124
181
  EuiFilterButton.propTypes = {
125
182
  /**
126
- * Bolds the button if true
183
+ * Highlights active filters
127
184
  */
128
185
  hasActiveFilters: PropTypes.bool,
129
186
  /**
@@ -137,7 +194,15 @@ EuiFilterButton.propTypes = {
137
194
  */
138
195
  numActiveFilters: PropTypes.number,
139
196
  /**
140
- * Applies a visual state to the button useful when using with a popover.
197
+ * Switches between toggle and regular button
198
+ * @default false
199
+ */
200
+ isToggle: PropTypes.bool,
201
+ /**
202
+ * Applies a visual state to the button.
203
+ * Automatically applies `aria-pressed` when used with `isToggle={true}`.
204
+ * Otherwise applies `aria-expanded` when used with `isToggle={false}` and
205
+ * `iconType="arrowDown"` as trigger button for e.g. a popover.
141
206
  */
142
207
  isSelected: PropTypes.bool,
143
208
  /**
@@ -8,14 +8,17 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { logicalCSS, mathWithUnits, euiTextShift, euiTextTruncate } from '../../global_styling';
11
+ import { isEuiThemeRefreshVariant } from '../../services';
12
+ import { logicalCSS, mathWithUnits, euiTextShift, euiTextTruncate, highContrastModeStyles, preventForcedColors, euiButtonEmptyColor } from '../../global_styling';
13
+ import { cssSupportsHasWithNextSibling } from '../../global_styling/functions/supports';
12
14
  import { euiFormVariables } from '../form/form.styles';
13
- export var euiFilterButtonDisplay = function euiFilterButtonDisplay(_ref4) {
14
- var euiTheme = _ref4.euiTheme;
15
+ export var euiFilterButtonDisplay = function euiFilterButtonDisplay(euiThemeContext) {
16
+ var euiTheme = euiThemeContext.euiTheme;
17
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
15
18
  return {
16
19
  flex: '1 1 auto',
17
20
  minInlineSize: mathWithUnits(euiTheme.size.base, function (x) {
18
- return x * 3;
21
+ return x * (isRefreshVariant ? 2.75 : 3);
19
22
  })
20
23
  };
21
24
  };
@@ -29,9 +32,11 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
29
32
  };
30
33
  export var euiFilterButtonStyles = function euiFilterButtonStyles(euiThemeContext) {
31
34
  var euiTheme = euiThemeContext.euiTheme;
35
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
32
36
  var _euiFormVariables = euiFormVariables(euiThemeContext),
33
37
  controlHeight = _euiFormVariables.controlHeight,
34
38
  borderColor = _euiFormVariables.borderColor;
39
+ var selectedSelector = '.euiFilterButton-isSelected';
35
40
  var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor);
36
41
 
37
42
  // Pseudo elements create borders without affecting width. We also prefer them
@@ -39,14 +44,44 @@ export var euiFilterButtonStyles = function euiFilterButtonStyles(euiThemeContex
39
44
  var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n ".concat(logicalCSS('right', '100%'), "\n ").concat(logicalCSS('vertical', 0), "\n ").concat(logicalCSS('border-left', border), "\n }\n ");
40
45
  // Bottom borders are needed for responsive flex-wrap behavior
41
46
  var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n ".concat(logicalCSS('top', '100%'), "\n ").concat(logicalCSS('horizontal', 0), "\n ").concat(logicalCSS('border-bottom', border), "\n }\n ");
47
+ var buttonStyles = isRefreshVariant ? "\n ".concat(logicalCSS('width', '100%'), "\n\n &:not(").concat(selectedSelector, ") {\n &:hover,\n &:active {\n .euiFilterButton__notification[class*=\"subdued\"] {\n background-color: ").concat(euiTheme.components.filterButtonBadgeBackgroundHover, "\n }\n }\n }\n ") : "\n ".concat(logicalCSS('height', controlHeight), "\n border-radius: 0;\n ").concat(leftBorder, "\n ").concat(bottomBorder, "\n\n /* :not(:disabled) specificity needed to override EuiButtonEmpty styles */\n &:hover:not(:disabled),\n &:focus:not(:disabled) {\n /* Remove underline from whole button so notifications don't get the underline */\n text-decoration: none;\n\n .euiFilterButton__text {\n /* And put it only on the actual text part */\n text-decoration: underline;\n }\n }\n ");
48
+ var toggleTypeStyles = isRefreshVariant ? "\n ".concat(euiFilterButtonDisplay(euiThemeContext), ";\n\n ").concat(highContrastModeStyles(euiThemeContext, {
49
+ forced: "\n &:is(".concat(selectedSelector, ") {\n ").concat(preventForcedColors(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n }\n ")
50
+ }), "\n ") : "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n padding: 0;\n\n &:is(").concat(selectedSelector, ") {\n color: ").concat(euiButtonEmptyColor(euiThemeContext, 'text').color, ";\n background-color: transparent;\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n ");
51
+ var withNextSelector = isRefreshVariant ? '& + .euiFilterButton__wrapper' : '.euiFilterButton__wrapper:has(&) + .euiFilterButton__wrapper';
52
+ // handles display of borders between buttons
53
+ var withNextStyles = isRefreshVariant ? "\n &::before {\n border: none;\n }\n\n ".concat(cssSupportsHasWithNextSibling("\n &:has(+ :not(&)) {\n ".concat(logicalCSS('padding-right', '0'), "\n }\n ")), "\n ") : "\n .euiFilterButton {\n &::before {\n border: none;\n }\n }\n ";
42
54
  return {
43
- euiFilterButton: /*#__PURE__*/css("position:relative;", euiFilterButtonDisplay(euiThemeContext), " ", logicalCSS('height', controlHeight), " border-radius:0;", leftBorder, " ", bottomBorder, "&:hover:not(:disabled),&:focus:not(:disabled){text-decoration:none;.euiFilterButton__text{text-decoration:underline;}}&:focus-visible{outline-offset:-", euiTheme.focus.width, ";};label:euiFilterButton;"),
44
- withNext: /*#__PURE__*/css("&+.euiFilterButton{", logicalCSS('margin-left', "-".concat(euiTheme.size.xs)), "&::before{display:none;}};label:withNext;"),
55
+ euiFilterButton: /*#__PURE__*/css(!isRefreshVariant && euiFilterButtonDisplay(euiThemeContext), ";position:relative;", buttonStyles, ";;label:euiFilterButton;"),
56
+ buttonType: {
57
+ default: /*#__PURE__*/css(isRefreshVariant && "\n border-radius: 0;\n\n &:focus-visible {\n z-index: 1;\n outline-offset: -".concat(euiTheme.border.width.thick, ";\n border-radius: ").concat(euiTheme.border.radius.small, ";\n transition: none;\n }\n "), ";;label:default;"),
58
+ toggle: /*#__PURE__*/css("&:focus-visible{outline-offset:", mathWithUnits(euiTheme.focus.width, function (x) {
59
+ return isRefreshVariant ? x / 2 : x * -1;
60
+ }), ";}", toggleTypeStyles, ";;label:toggle;")
61
+ },
62
+ withNext: /*#__PURE__*/css(withNextSelector, "{", logicalCSS('margin-left', "-".concat(euiTheme.size.xs)), withNextStyles, ";};label:withNext;"),
45
63
  noGrow: _ref3,
46
64
  hasNotification: /*#__PURE__*/css(logicalCSS('min-width', mathWithUnits(euiTheme.size.base, function (x) {
47
65
  return x * 6;
48
66
  })), ";;label:hasNotification;"),
49
- hasActiveFilters: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";;label:hasActiveFilters;")
67
+ hasActiveFilters: /*#__PURE__*/css("font-weight:", isRefreshVariant ? euiTheme.font.weight.regular : euiTheme.font.weight.bold, ";;label:hasActiveFilters;")
68
+ };
69
+ };
70
+ export var euiFilterButtonWrapperStyles = function euiFilterButtonWrapperStyles(euiThemeContext) {
71
+ var euiTheme = euiThemeContext.euiTheme;
72
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
73
+ var _euiFormVariables2 = euiFormVariables(euiThemeContext),
74
+ borderColor = _euiFormVariables2.borderColor;
75
+ var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor);
76
+
77
+ // Pseudo elements create borders without affecting width. We also prefer them
78
+ // over box-shadow for Windows high contrast theme compatibility
79
+ var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n ".concat(logicalCSS('border-left', border), "\n\n pointer-events: none;\n }\n ");
80
+ // Bottom borders are needed for responsive flex-wrap behavior
81
+ var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n ".concat(logicalCSS('border-bottom', border), "\n pointer-events: none;\n }\n ");
82
+ return {
83
+ wrapper: /*#__PURE__*/css(euiFilterButtonDisplay(euiThemeContext), " position:relative;display:flex;align-items:center;", isRefreshVariant && "\n ".concat(leftBorder, "\n ").concat(bottomBorder, "\n "), " ", logicalCSS('padding-vertical', euiTheme.border.width.thin), ";;label:wrapper;"),
84
+ hasToggle: /*#__PURE__*/css(logicalCSS('padding-horizontal', isRefreshVariant ? euiTheme.border.width.thin : '0'), cssSupportsHasWithNextSibling("\n &:not([class*=\"withNext\"]):has(+ :not(&)) {\n ".concat(logicalCSS('padding-right', '0'), "\n }\n ")), ";;label:hasToggle;")
50
85
  };
51
86
  };
52
87
  var _ref = process.env.NODE_ENV === "production" ? {
@@ -58,24 +93,25 @@ var _ref = process.env.NODE_ENV === "production" ? {
58
93
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
59
94
  };
60
95
  var _ref2 = process.env.NODE_ENV === "production" ? {
61
- name: "nd1u8j-euiFilterButton__notification",
62
- styles: "cursor:inherit;label:euiFilterButton__notification;"
96
+ name: "zxesfz-euiFilterButton__notification",
97
+ styles: "cursor:inherit;forced-color-adjust:auto;&{transition:none;};label:euiFilterButton__notification;"
63
98
  } : {
64
- name: "nd1u8j-euiFilterButton__notification",
65
- styles: "cursor:inherit;label:euiFilterButton__notification;",
99
+ name: "zxesfz-euiFilterButton__notification",
100
+ styles: "cursor:inherit;forced-color-adjust:auto;&{transition:none;};label:euiFilterButton__notification;",
66
101
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
67
102
  };
68
- export var euiFilterButtonChildStyles = function euiFilterButtonChildStyles(_ref5) {
69
- var euiTheme = _ref5.euiTheme;
103
+ export var euiFilterButtonChildStyles = function euiFilterButtonChildStyles(euiThemeContext) {
104
+ var euiTheme = euiThemeContext.euiTheme;
105
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
70
106
  return {
71
107
  content: {
72
- euiFilterButton__content: /*#__PURE__*/css(";label:euiFilterButton__content;"),
108
+ euiFilterButton__content: /*#__PURE__*/css(isRefreshVariant && "\n .euiThemeProvider {\n display: inline-flex;\n }\n ", ";;label:euiFilterButton__content;"),
73
109
  hasIcon: /*#__PURE__*/css("&>.euiIcon:last-child{", logicalCSS('margin-left', 'auto'), ";};label:hasIcon;")
74
110
  },
75
111
  text: {
76
112
  euiFilterButton__text: /*#__PURE__*/css(euiTextShift('bold', 'data-text', euiTheme), " ", euiTextTruncate(), ";;label:euiFilterButton__text;"),
77
113
  hasNotification: /*#__PURE__*/css(logicalCSS('min-width', mathWithUnits(euiTheme.size.base, function (x) {
78
- return x * 3;
114
+ return x * (isRefreshVariant ? 2 : 3);
79
115
  })), ";;label:hasNotification;")
80
116
  },
81
117
  notification: {
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
+ import { isEuiThemeRefreshVariant } from '../../services';
11
12
  import { logicalCSS, mathWithUnits, euiBreakpoint } from '../../global_styling';
12
13
  import { highContrastModeStyles } from '../../global_styling/functions/high_contrast';
13
14
  import { euiFormVariables } from '../form/form.styles';
@@ -22,20 +23,31 @@ var _ref = process.env.NODE_ENV === "production" ? {
22
23
  };
23
24
  export var euiFilterGroupStyles = function euiFilterGroupStyles(euiThemeContext) {
24
25
  var euiTheme = euiThemeContext.euiTheme;
26
+ var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
25
27
  var _euiFormVariables = euiFormVariables(euiThemeContext),
26
28
  backgroundColor = _euiFormVariables.backgroundColor,
27
29
  borderColor = _euiFormVariables.borderColor,
28
30
  controlBorderRadius = _euiFormVariables.controlBorderRadius,
31
+ controlHeight = _euiFormVariables.controlHeight,
29
32
  controlCompressedBorderRadius = _euiFormVariables.controlCompressedBorderRadius,
30
33
  controlCompressedHeight = _euiFormVariables.controlCompressedHeight;
34
+ var borderRadius = isRefreshVariant ? euiTheme.border.radius.small : controlBorderRadius;
35
+ var borderRadiusCompressed = isRefreshVariant ? euiTheme.border.radius.small : controlCompressedBorderRadius;
36
+ var borderStyle = isRefreshVariant ? "\n /* Adds the border on a pseudo element to prevent height differences between wrapper and buttons.\n Uses ::after to ensure overlap and prevents blocking by setting pointer-events: none */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain, ";\n border-radius: inherit;\n pointer-events: none;\n }\n ") : "\n ".concat(highContrastModeStyles(euiThemeContext, {
37
+ none: "box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(borderColor, ";"),
38
+ forced: "border: ".concat(euiTheme.border.thin, ";")
39
+ }), "\n ");
31
40
  return {
32
- euiFilterGroup: /*#__PURE__*/css("display:inline-flex;", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";", highContrastModeStyles(euiThemeContext, {
33
- none: "box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(borderColor, ";"),
34
- forced: "border: ".concat(euiTheme.border.thin, ";")
35
- }), ">*:not(.euiFilterButton){", euiFilterButtonDisplay(euiThemeContext), ";}.euiPopover>.euiFilterButton{", logicalCSS('width', '100%'), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", euiBreakpoint(euiThemeContext, ['xs']), "{display:flex;.euiFilterButton{flex-grow:1;}};label:euiFilterGroup;"),
41
+ euiFilterGroup: /*#__PURE__*/css(isRefreshVariant && "position: relative;", " display:inline-flex;", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";", borderStyle, ">*:not(.euiFilterButton__wrapper, .euiFilterButton){", euiFilterButtonDisplay(euiThemeContext), ";}.euiPopover>.euiFilterButton{", logicalCSS('width', '100%'), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", euiBreakpoint(euiThemeContext, ['xs']), "{display:flex;", isRefreshVariant && "\n .euiPopover:focus-within {\n z-index: 1;\n }\n \n .euiFilterButton__wrapper {\n flex-grow: 1;\n }\n ", ";.euiFilterButton__wrapper{flex-grow:1;}};label:euiFilterGroup;"),
36
42
  fullWidth: _ref,
37
- uncompressed: /*#__PURE__*/css("border-radius:", controlBorderRadius, ";", buttonChildrenBorderRadii(controlBorderRadius), ";;label:uncompressed;"),
38
- compressed: /*#__PURE__*/css("border-radius:", controlCompressedBorderRadius, ";", buttonChildrenBorderRadii(controlCompressedBorderRadius), " .euiFilterButton{", logicalCSS('height', controlCompressedHeight), ";};label:compressed;"),
43
+ uncompressed: /*#__PURE__*/css("border-radius:", borderRadius, ";.euiFilterButton__wrapper{", logicalCSS('height', controlHeight), ";}.euiFilterButton{", logicalCSS('height', controlHeight), ";}", !isRefreshVariant && buttonChildrenBorderRadii(borderRadius), " ", isRefreshVariant && "\n .euiFilterButton-isToggle {\n ".concat(logicalCSS('height', mathWithUnits([controlHeight, euiTheme.size.xxs], function (x, y) {
44
+ return x - 3 * y;
45
+ })), "\n }\n "), ";;label:uncompressed;"),
46
+ compressed: /*#__PURE__*/css("border-radius:", borderRadiusCompressed, ";", !isRefreshVariant && buttonChildrenBorderRadii(borderRadiusCompressed), " .euiFilterButton{", logicalCSS('height', isRefreshVariant ? mathWithUnits([controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
47
+ return x - 2 * y;
48
+ }) : controlCompressedHeight), ";}", isRefreshVariant && "\n .euiFilterButton-isToggle {\n ".concat(logicalCSS('height', mathWithUnits([controlCompressedHeight, euiTheme.size.xxs], function (x, y) {
49
+ return x - 3 * y;
50
+ })), "\n }\n "), ";;label:compressed;"),
39
51
  /**
40
52
  * Not used in EuiFilterGroup directly, but used by EuiSearchBar and consumers
41
53
  * A fixed width is required because of the shift in widths that can be caused
@@ -14,7 +14,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
14
14
 
15
15
  import React, { useState, useMemo, Fragment, forwardRef, useContext } from 'react';
16
16
  import PropTypes from "prop-types";
17
- import { useEuiMemoizedStyles } from '../../services';
17
+ import { useEuiMemoizedStyles, useGeneratedHtmlId } from '../../services';
18
18
  import { EuiLoadingSpinner } from '../loading';
19
19
  import { EuiButton, EuiButtonEmpty, EuiButtonIcon } from '../button';
20
20
  import { EuiTitle } from '../title';
@@ -79,6 +79,7 @@ export var EuiMarkdownEditorFooter = /*#__PURE__*/forwardRef(function (props, re
79
79
  var syntaxTitle = useEuiI18n('euiMarkdownEditorFooter.syntaxTitle', 'Syntax help');
80
80
  var _useContext = useContext(EuiMarkdownContext),
81
81
  readOnly = _useContext.readOnly;
82
+ var helpModalTitleId = useGeneratedHtmlId();
82
83
  if (isUploadingFiles) {
83
84
  uploadButton = ___EmotionJSX(EuiButtonIcon, {
84
85
  size: "s",
@@ -169,8 +170,11 @@ export var EuiMarkdownEditorFooter = /*#__PURE__*/forwardRef(function (props, re
169
170
  })), isShowingHelpModal && ___EmotionJSX(EuiModal, {
170
171
  onClose: function onClose() {
171
172
  return setIsShowingHelpModal(false);
172
- }
173
- }, ___EmotionJSX(EuiModalHeader, null, ___EmotionJSX(EuiTitle, null, ___EmotionJSX("h1", null, syntaxTitle))), ___EmotionJSX(EuiModalBody, null, ___EmotionJSX(EuiText, null, ___EmotionJSX(EuiI18n, {
173
+ },
174
+ "aria-labelledby": helpModalTitleId
175
+ }, ___EmotionJSX(EuiModalHeader, null, ___EmotionJSX(EuiTitle, null, ___EmotionJSX("h1", {
176
+ id: helpModalTitleId
177
+ }, syntaxTitle))), ___EmotionJSX(EuiModalBody, null, ___EmotionJSX(EuiText, null, ___EmotionJSX(EuiI18n, {
174
178
  tokens: ['euiMarkdownEditorFooter.syntaxModalDescriptionPrefix', 'euiMarkdownEditorFooter.syntaxModalDescriptionSuffix'],
175
179
  defaults: ['This editor uses', 'You can also utilize these additional syntax plugins to add rich content to your text.']
176
180
  }, function (_ref3) {
@@ -218,7 +222,8 @@ export var EuiMarkdownEditorFooter = /*#__PURE__*/forwardRef(function (props, re
218
222
  return setIsShowingHelpPopover(false);
219
223
  },
220
224
  panelPaddingSize: "s",
221
- anchorPosition: "upCenter"
225
+ anchorPosition: "upCenter",
226
+ "aria-labelledby": helpModalTitleId
222
227
  }, ___EmotionJSX(EuiI18n, {
223
228
  tokens: ['euiMarkdownEditorFooter.syntaxPopoverDescription'],
224
229
  defaults: ['This editor uses']
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import { EuiThemeBorealis } from '@elastic/eui-theme-borealis';
10
+ import { EuiThemeAmsterdam } from '../../themes';
11
11
  import { EuiThemeProvider } from '../../services';
12
12
  import { emitEuiProviderWarning } from '../../services/theme/warning';
13
13
  import { cache as fallbackCache } from '../../services/emotion/css';
@@ -26,7 +26,7 @@ export var EuiProvider = function EuiProvider(_ref) {
26
26
  var _ref$cache = _ref.cache,
27
27
  cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
28
28
  _ref$theme = _ref.theme,
29
- theme = _ref$theme === void 0 ? EuiThemeBorealis : _ref$theme,
29
+ theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
30
30
  _ref$globalStyles = _ref.globalStyles,
31
31
  Globals = _ref$globalStyles === void 0 ? EuiGlobalStyles : _ref$globalStyles,
32
32
  _ref$utilityClasses = _ref.utilityClasses,
@@ -297,6 +297,7 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
297
297
  return ___EmotionJSX(EuiFilterButton, {
298
298
  iconType: "arrowDown",
299
299
  iconSide: "right",
300
+ isSelected: active,
300
301
  hasActiveFilters: active,
301
302
  numActiveFilters: active ? activeItemsCount : undefined,
302
303
  grow: true,
@@ -78,8 +78,10 @@ export var FieldValueToggleFilter = /*#__PURE__*/function (_Component) {
78
78
  };
79
79
  return ___EmotionJSX(EuiFilterButton, {
80
80
  onClick: onClick,
81
+ isSelected: hasActiveFilters,
81
82
  hasActiveFilters: hasActiveFilters,
82
- "aria-pressed": !!hasActiveFilters
83
+ "aria-pressed": !!hasActiveFilters,
84
+ isToggle: true
83
85
  }, name);
84
86
  }
85
87
  }]);
@@ -79,9 +79,11 @@ export var FieldValueToggleGroupFilter = /*#__PURE__*/function (_Component) {
79
79
  return ___EmotionJSX(EuiFilterButton, {
80
80
  key: key,
81
81
  onClick: onClick,
82
+ isSelected: active,
82
83
  hasActiveFilters: active,
83
84
  "aria-pressed": !!active,
84
- withNext: !isLastItem
85
+ withNext: !isLastItem,
86
+ isToggle: true
85
87
  }, name);
86
88
  });
87
89
  }
@@ -74,8 +74,10 @@ export var IsFilter = /*#__PURE__*/function (_Component) {
74
74
  };
75
75
  return ___EmotionJSX(EuiFilterButton, {
76
76
  onClick: onClick,
77
+ isSelected: hasActiveFilters,
77
78
  hasActiveFilters: hasActiveFilters,
78
- "aria-pressed": !!hasActiveFilters
79
+ "aria-pressed": !!hasActiveFilters,
80
+ isToggle: true
79
81
  }, name);
80
82
  }
81
83
  }]);
@@ -189,7 +189,7 @@ describe('EuiSearchBar', function () {
189
189
  cy.checkAxe();
190
190
  });
191
191
  it('has zero violations after filtering on Open items', function () {
192
- cy.get('button.euiButtonEmpty').first().focus();
192
+ cy.get('button.euiFilterButton').first().focus();
193
193
  cy.realPress('Enter');
194
194
  cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
195
195
  cy.checkAxe();
@@ -200,12 +200,12 @@ describe('EuiSearchBar', function () {
200
200
  cy.checkAxe();
201
201
  });
202
202
  it('has zero violations after filtering by Tags', function () {
203
- cy.get('button.euiButtonEmpty').last().focus();
203
+ cy.get('button.euiFilterButton').last().focus();
204
204
  cy.realPress('Enter');
205
205
  cy.realPress('ArrowDown');
206
206
  cy.realPress('Enter');
207
207
  cy.realPress('Escape');
208
- cy.get('button.euiButtonEmpty').last().should('have.focus');
208
+ cy.get('button.euiFilterButton').last().should('have.focus');
209
209
  cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
210
210
  cy.checkAxe();
211
211
  cy.repeatRealPress(['Shift', 'Tab'], 3);