@elastic/eui 71.0.0 → 72.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/README.md +0 -7
  2. package/dist/eui_theme_dark.css +7747 -5854
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +7737 -5844
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/datagrid/data_grid.a11y.js +251 -0
  7. package/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
  8. package/es/components/date_picker/date_picker.a11y.js +83 -0
  9. package/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
  10. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
  11. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +160 -173
  12. package/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
  13. package/es/components/date_picker/super_date_picker/super_date_picker.js +16 -0
  14. package/es/components/delay_hide/delay_hide.a11y.js +106 -0
  15. package/es/components/delay_render/delay_render.a11y.js +106 -0
  16. package/es/components/empty_prompt/empty_prompt.a11y.js +63 -0
  17. package/es/components/error_boundary/error_boundary.a11y.js +67 -0
  18. package/es/components/error_boundary/error_boundary.js +45 -27
  19. package/es/components/expression/expression.a11y.js +254 -0
  20. package/es/components/filter_group/filter_group.a11y.js +281 -0
  21. package/es/components/focus_trap/focus_trap.a11y.js +131 -0
  22. package/es/components/form/file_picker/file_picker.js +1 -0
  23. package/es/components/header/header.a11y.js +374 -0
  24. package/es/components/icon/icon_ML.a11y.js +33 -0
  25. package/es/components/icon/icon_apps.a11y.js +33 -0
  26. package/es/components/icon/icon_editor.a11y.js +33 -0
  27. package/es/components/icon/icon_elastic.a11y.js +33 -0
  28. package/es/components/icon/icon_glyphs.a11y.js +33 -0
  29. package/es/components/icon/icon_tokens.a11y.js +33 -0
  30. package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +1 -1
  31. package/es/components/page/page_side_bar/page_side_bar.js +3 -0
  32. package/es/components/page/page_template.js +1 -15
  33. package/es/components/selectable/selectable.js +4 -3
  34. package/es/components/selectable/selectable_list/selectable_list.js +17 -5
  35. package/es/components/tabs/tab.js +7 -17
  36. package/es/components/tabs/tabbed_content/tabbed_content.js +0 -16
  37. package/es/components/tabs/tabs.js +7 -11
  38. package/es/components/tabs/tabs_context.js +13 -0
  39. package/eui.d.ts +60 -43
  40. package/i18ntokens.json +34 -18
  41. package/lib/components/datagrid/data_grid.a11y.js +255 -0
  42. package/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
  43. package/lib/components/date_picker/date_picker.a11y.js +89 -0
  44. package/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
  45. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
  46. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +155 -168
  47. package/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
  48. package/lib/components/date_picker/super_date_picker/super_date_picker.js +16 -0
  49. package/lib/components/delay_hide/delay_hide.a11y.js +111 -0
  50. package/lib/components/delay_render/delay_render.a11y.js +111 -0
  51. package/lib/components/empty_prompt/empty_prompt.a11y.js +72 -0
  52. package/lib/components/error_boundary/error_boundary.a11y.js +75 -0
  53. package/lib/components/error_boundary/error_boundary.js +49 -29
  54. package/lib/components/expression/expression.a11y.js +262 -0
  55. package/lib/components/filter_group/filter_group.a11y.js +287 -0
  56. package/lib/components/focus_trap/focus_trap.a11y.js +140 -0
  57. package/lib/components/form/file_picker/file_picker.js +1 -0
  58. package/lib/components/header/header.a11y.js +385 -0
  59. package/lib/components/icon/icon_ML.a11y.js +40 -0
  60. package/lib/components/icon/icon_apps.a11y.js +40 -0
  61. package/lib/components/icon/icon_editor.a11y.js +40 -0
  62. package/lib/components/icon/icon_elastic.a11y.js +40 -0
  63. package/lib/components/icon/icon_glyphs.a11y.js +40 -0
  64. package/lib/components/icon/icon_tokens.a11y.js +40 -0
  65. package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
  66. package/lib/components/page/page_side_bar/page_side_bar.js +4 -0
  67. package/lib/components/page/page_template.js +1 -15
  68. package/lib/components/selectable/selectable.js +4 -3
  69. package/lib/components/selectable/selectable_list/selectable_list.js +17 -5
  70. package/lib/components/tabs/tab.js +14 -17
  71. package/lib/components/tabs/tabbed_content/tabbed_content.js +0 -16
  72. package/lib/components/tabs/tabs.js +8 -14
  73. package/lib/components/tabs/tabs_context.js +23 -0
  74. package/optimize/es/components/datagrid/data_grid.a11y.js +234 -0
  75. package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
  76. package/optimize/es/components/date_picker/date_picker.a11y.js +73 -0
  77. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
  78. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
  79. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +145 -169
  80. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
  81. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +2 -0
  82. package/optimize/es/components/delay_hide/delay_hide.a11y.js +96 -0
  83. package/optimize/es/components/delay_render/delay_render.a11y.js +96 -0
  84. package/optimize/es/components/empty_prompt/empty_prompt.a11y.js +63 -0
  85. package/optimize/es/components/error_boundary/error_boundary.a11y.js +67 -0
  86. package/optimize/es/components/error_boundary/error_boundary.js +37 -26
  87. package/optimize/es/components/expression/expression.a11y.js +243 -0
  88. package/optimize/es/components/filter_group/filter_group.a11y.js +271 -0
  89. package/optimize/es/components/focus_trap/focus_trap.a11y.js +120 -0
  90. package/optimize/es/components/form/file_picker/file_picker.js +1 -0
  91. package/optimize/es/components/header/header.a11y.js +364 -0
  92. package/optimize/es/components/icon/icon_ML.a11y.js +33 -0
  93. package/optimize/es/components/icon/icon_apps.a11y.js +33 -0
  94. package/optimize/es/components/icon/icon_editor.a11y.js +33 -0
  95. package/optimize/es/components/icon/icon_elastic.a11y.js +33 -0
  96. package/optimize/es/components/icon/icon_glyphs.a11y.js +33 -0
  97. package/optimize/es/components/icon/icon_tokens.a11y.js +33 -0
  98. package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +1 -1
  99. package/optimize/es/components/page/page_side_bar/page_side_bar.js +3 -0
  100. package/optimize/es/components/selectable/selectable.js +2 -2
  101. package/optimize/es/components/selectable/selectable_list/selectable_list.js +15 -4
  102. package/optimize/es/components/tabs/tab.js +7 -5
  103. package/optimize/es/components/tabs/tabs.js +7 -11
  104. package/optimize/es/components/tabs/tabs_context.js +13 -0
  105. package/optimize/lib/components/datagrid/data_grid.a11y.js +248 -0
  106. package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
  107. package/optimize/lib/components/date_picker/date_picker.a11y.js +87 -0
  108. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
  109. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
  110. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +146 -167
  111. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
  112. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -0
  113. package/optimize/lib/components/delay_hide/delay_hide.a11y.js +111 -0
  114. package/optimize/lib/components/delay_render/delay_render.a11y.js +111 -0
  115. package/optimize/lib/components/empty_prompt/empty_prompt.a11y.js +72 -0
  116. package/optimize/lib/components/error_boundary/error_boundary.a11y.js +75 -0
  117. package/optimize/lib/components/error_boundary/error_boundary.js +41 -28
  118. package/optimize/lib/components/expression/expression.a11y.js +254 -0
  119. package/optimize/lib/components/filter_group/filter_group.a11y.js +287 -0
  120. package/optimize/lib/components/focus_trap/focus_trap.a11y.js +140 -0
  121. package/optimize/lib/components/form/file_picker/file_picker.js +1 -0
  122. package/optimize/lib/components/header/header.a11y.js +385 -0
  123. package/optimize/lib/components/icon/icon_ML.a11y.js +40 -0
  124. package/optimize/lib/components/icon/icon_apps.a11y.js +40 -0
  125. package/optimize/lib/components/icon/icon_editor.a11y.js +40 -0
  126. package/optimize/lib/components/icon/icon_elastic.a11y.js +40 -0
  127. package/optimize/lib/components/icon/icon_glyphs.a11y.js +40 -0
  128. package/optimize/lib/components/icon/icon_tokens.a11y.js +40 -0
  129. package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
  130. package/optimize/lib/components/page/page_side_bar/page_side_bar.js +4 -0
  131. package/optimize/lib/components/selectable/selectable.js +2 -2
  132. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +15 -4
  133. package/optimize/lib/components/tabs/tab.js +15 -5
  134. package/optimize/lib/components/tabs/tabs.js +8 -14
  135. package/optimize/lib/components/tabs/tabs_context.js +23 -0
  136. package/package.json +14 -19
  137. package/src/components/basic_table/_basic_table.scss +1 -4
  138. package/src/components/button/button_empty/_button_empty.scss +2 -4
  139. package/src/components/button/button_group/_button_group.scss +1 -1
  140. package/src/components/button/button_group/_button_group_button.scss +3 -4
  141. package/src/components/button/button_icon/_button_icon.scss +0 -3
  142. package/src/components/collapsible_nav/_collapsible_nav.scss +1 -1
  143. package/src/components/collapsible_nav/collapsible_nav_group/_collapsible_nav_group.scss +1 -1
  144. package/src/components/color_picker/_color_picker.scss +3 -2
  145. package/src/components/color_picker/_hue.scss +7 -7
  146. package/src/components/color_picker/_saturation.scss +1 -1
  147. package/src/components/color_picker/color_palette_display/_mixins.scss +1 -1
  148. package/src/components/color_picker/color_stops/_color_stops.scss +2 -3
  149. package/src/components/combo_box/_combo_box.scss +7 -6
  150. package/src/components/combo_box/combo_box_input/_combo_box_input.scss +2 -1
  151. package/src/components/combo_box/combo_box_input/_combo_box_placeholder.scss +1 -1
  152. package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +2 -3
  153. package/src/components/control_bar/_variables.scss +0 -1
  154. package/src/components/datagrid/_data_grid_data_row.scss +4 -5
  155. package/src/components/datagrid/_mixins.scss +1 -1
  156. package/src/components/datagrid/body/_data_grid_footer_row.scss +2 -1
  157. package/src/components/datagrid/body/header/_data_grid_column_resizer.scss +3 -4
  158. package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
  159. package/src/components/datagrid/controls/_data_grid_column_sorting.scss +1 -2
  160. package/src/components/date_picker/_date_picker_range.scss +1 -1
  161. package/src/components/date_picker/super_date_picker/_super_date_picker.scss +1 -4
  162. package/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss +15 -1
  163. package/src/components/drag_and_drop/_draggable.scss +3 -5
  164. package/src/components/drag_and_drop/_droppable.scss +1 -1
  165. package/src/components/empty_prompt/_empty_prompt.scss +1 -1
  166. package/src/components/filter_group/_filter_group.scss +2 -2
  167. package/src/components/filter_group/_filter_select_item.scss +0 -1
  168. package/src/components/form/checkbox/_checkbox.scss +5 -3
  169. package/src/components/form/described_form_group/_described_form_group.scss +0 -1
  170. package/src/components/form/field_password/_field_password.scss +1 -1
  171. package/src/components/form/field_search/_field_search.scss +1 -1
  172. package/src/components/form/file_picker/_file_picker.scss +15 -16
  173. package/src/components/form/form_control_layout/_form_control_layout.scss +6 -7
  174. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +4 -6
  175. package/src/components/form/form_row/_form_row.scss +3 -0
  176. package/src/components/form/radio/_radio.scss +5 -3
  177. package/src/components/form/select/_select.scss +1 -1
  178. package/src/components/form/switch/_switch.scss +3 -1
  179. package/src/components/header/_mixins.scss +1 -1
  180. package/src/components/header/header_section/_header_section_item.scss +4 -4
  181. package/src/components/header/header_section/_header_section_item_button.scss +0 -1
  182. package/src/components/key_pad_menu/_key_pad_menu_item.scss +2 -7
  183. package/src/components/markdown_editor/_markdown_editor_drop_zone.scss +4 -4
  184. package/src/components/markdown_editor/_markdown_editor_footer.scss +1 -1
  185. package/src/components/markdown_editor/_markdown_editor_text_area.scss +2 -3
  186. package/src/components/markdown_editor/_markdown_format.scss +4 -2
  187. package/src/components/notification/_notification_event.scss +2 -2
  188. package/src/components/page/page_content/_page_content_body.scss +0 -1
  189. package/src/components/page/page_content/_page_content_header_section.scss +0 -1
  190. package/src/components/page/page_side_bar/_page_side_bar.scss +0 -1
  191. package/src/components/panel/split_panel/_split_panel.scss +2 -2
  192. package/src/components/resizable_container/_resizable_button.scss +31 -31
  193. package/src/components/resizable_container/_resizable_collapse_button.scss +9 -9
  194. package/src/components/selectable/selectable_templates/_selectable_template_sitewide_option.scss +1 -1
  195. package/src/components/side_nav/_mixins.scss +1 -1
  196. package/src/components/side_nav/_side_nav.scss +2 -1
  197. package/src/components/side_nav/_side_nav_item.scss +2 -3
  198. package/src/components/steps/_steps.scss +2 -1
  199. package/src/components/suggest/_suggest_input.scss +1 -1
  200. package/src/components/suggest/_suggest_item.scss +4 -3
  201. package/src/components/table/_responsive.scss +5 -3
  202. package/src/components/table/_table.scss +2 -4
  203. package/src/components/table/mobile/_mobile.scss +0 -2
  204. package/src/components/tree_view/tree_view.scss +2 -2
  205. package/src/global_styling/mixins/_form.scss +7 -18
  206. package/src/global_styling/mixins/_header.scss +2 -2
  207. package/src/global_styling/mixins/_helpers.scss +1 -2
  208. package/src/global_styling/mixins/_icons.scss +1 -1
  209. package/src/global_styling/mixins/_range.scss +4 -8
  210. package/src/global_styling/mixins/_responsive.scss +3 -8
  211. package/src/global_styling/mixins/_shadow.scss +5 -9
  212. package/src/global_styling/mixins/_states.scss +2 -2
  213. package/src/global_styling/mixins/_typography.scss +16 -19
  214. package/src/global_styling/variables/_colors_vis.scss +1 -1
  215. package/src/global_styling/variables/_typography.scss +1 -3
  216. package/src/themes/amsterdam/_colors_dark.scss +2 -1
  217. package/src/themes/amsterdam/_colors_light.scss +2 -0
  218. package/src/themes/amsterdam/global_styling/mixins/_link.scss +1 -1
  219. package/src/themes/amsterdam/global_styling/mixins/_states.scss +0 -1
  220. package/src/themes/amsterdam/global_styling/mixins/_typography.scss +1 -2
  221. package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_days.scss +0 -1
  222. package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_month_year.scss +0 -1
  223. package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_times.scss +3 -4
  224. package/src/themes/amsterdam/global_styling/react_date_picker/_mixins.scss +0 -1
  225. package/src/themes/amsterdam/global_styling/variables/_typography.scss +1 -2
  226. package/src/themes/amsterdam/overrides/_color_stops.scss +4 -5
  227. package/src/themes/amsterdam/overrides/_combo_box.scss +3 -0
  228. package/src/themes/amsterdam/overrides/_form_control_layout.scss +3 -0
  229. package/src/themes/amsterdam/overrides/_form_control_layout_delimited.scss +5 -4
  230. package/src/themes/amsterdam/overrides/_header.scss +2 -2
  231. package/src/themes/amsterdam/overrides/_hue.scss +6 -6
  232. package/src/themes/amsterdam/overrides/_key_pad_menu.scss +2 -2
  233. package/src/themes/amsterdam/overrides/_steps.scss +1 -2
  234. package/src/themes/legacy/_colors_dark.scss +2 -1
  235. package/src/themes/legacy/_colors_light.scss +2 -0
  236. package/src/themes/legacy/reset/_reset.scss +8 -7
  237. package/test-env/components/datagrid/data_grid.a11y.js +248 -0
  238. package/test-env/components/date_picker/auto_refresh/refresh_interval.js +3 -1
  239. package/test-env/components/date_picker/date_picker.a11y.js +87 -0
  240. package/test-env/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
  241. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
  242. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +153 -166
  243. package/test-env/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
  244. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +16 -0
  245. package/test-env/components/delay_hide/delay_hide.a11y.js +111 -0
  246. package/test-env/components/delay_render/delay_render.a11y.js +111 -0
  247. package/test-env/components/empty_prompt/empty_prompt.a11y.js +72 -0
  248. package/test-env/components/error_boundary/error_boundary.a11y.js +75 -0
  249. package/test-env/components/error_boundary/error_boundary.js +48 -28
  250. package/test-env/components/expression/expression.a11y.js +254 -0
  251. package/test-env/components/filter_group/filter_group.a11y.js +287 -0
  252. package/test-env/components/focus_trap/focus_trap.a11y.js +140 -0
  253. package/test-env/components/form/file_picker/file_picker.js +1 -0
  254. package/test-env/components/header/header.a11y.js +385 -0
  255. package/test-env/components/icon/icon_ML.a11y.js +40 -0
  256. package/test-env/components/icon/icon_apps.a11y.js +40 -0
  257. package/test-env/components/icon/icon_editor.a11y.js +40 -0
  258. package/test-env/components/icon/icon_elastic.a11y.js +40 -0
  259. package/test-env/components/icon/icon_glyphs.a11y.js +40 -0
  260. package/test-env/components/icon/icon_tokens.a11y.js +40 -0
  261. package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
  262. package/test-env/components/page/page_side_bar/page_side_bar.js +4 -0
  263. package/test-env/components/page/page_template.js +1 -15
  264. package/test-env/components/selectable/selectable.js +4 -3
  265. package/test-env/components/selectable/selectable_list/selectable_list.js +17 -5
  266. package/test-env/components/tabs/tab.js +15 -17
  267. package/test-env/components/tabs/tabbed_content/tabbed_content.js +0 -16
  268. package/test-env/components/tabs/tabs.js +8 -14
  269. package/test-env/components/tabs/tabs_context.js +23 -0
  270. package/scripts/postinstall.js +0 -9
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ var _react = _interopRequireWildcard(require("react"));
6
+
7
+ var _index = require("./index");
8
+
9
+ var _faker = require("@faker-js/faker");
10
+
11
+ var _react2 = require("@emotion/react");
12
+
13
+ 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); }
14
+
15
+ 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; }
16
+
17
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
18
+
19
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
+
21
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
22
+
23
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
24
+
25
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
26
+
27
+ 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."); }
28
+
29
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
30
+
31
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
32
+
33
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
34
+
35
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
36
+
37
+ var columns = [{
38
+ id: 'Name'
39
+ }, {
40
+ id: 'Email',
41
+ cellActions: [function (_ref) {
42
+ var rowIndex = _ref.rowIndex,
43
+ columnId = _ref.columnId,
44
+ Component = _ref.Component;
45
+ var row = ++rowIndex;
46
+ return (0, _react2.jsx)(Component, {
47
+ onClick: function onClick() {},
48
+ iconType: "heart",
49
+ "aria-label": "Send love to ".concat(row, ", column \"").concat(columnId, "\" ")
50
+ }, "Send love");
51
+ }]
52
+ }, {
53
+ id: 'User ID',
54
+ schema: 'string'
55
+ }, {
56
+ id: 'Account balance'
57
+ }, {
58
+ id: 'Last purchase',
59
+ schema: 'datetime'
60
+ }, {
61
+ id: 'Favorite distro',
62
+ schema: 'favoriteDistro'
63
+ }];
64
+ var storeData = [];
65
+
66
+ for (var i = 1; i < 11; i++) {
67
+ storeData.push({
68
+ Name: "".concat(_faker.faker.name.lastName(), ", ").concat(_faker.faker.name.firstName(), " ").concat(_faker.faker.name.suffix()),
69
+ Email: "".concat(_faker.faker.internet.email()),
70
+ 'User ID': "".concat(_faker.faker.datatype.number({
71
+ min: 1000000,
72
+ max: 9999999
73
+ })),
74
+ 'Account balance': _faker.faker.finance.amount(),
75
+ 'Last purchase': "".concat(_faker.faker.date.past()),
76
+ 'Favorite distro': i % 2 === 0 ? 'Alma' : 'Debian'
77
+ });
78
+ }
79
+
80
+ var commaSeparateNumbers = function commaSeparateNumbers(numberString) {
81
+ // extract the groups-of-three digits that are right-aligned
82
+ return numberString.replace(/((\d{3})+)$/, function (match) {
83
+ return (// then replace each group of xyz digits with ,xyz
84
+ match.replace(/(\d{3})/g, ',$1')
85
+ );
86
+ });
87
+ };
88
+
89
+ var DataGrid = function DataGrid() {
90
+ var _useState = (0, _react.useState)(columns.map(function (_ref2) {
91
+ var id = _ref2.id;
92
+ return id;
93
+ })),
94
+ _useState2 = _slicedToArray(_useState, 2),
95
+ visibleColumns = _useState2[0],
96
+ setVisibleColumns = _useState2[1];
97
+
98
+ var _useState3 = (0, _react.useState)(storeData),
99
+ _useState4 = _slicedToArray(_useState3, 2),
100
+ data = _useState4[0],
101
+ setData = _useState4[1];
102
+
103
+ var _useState5 = (0, _react.useState)([{
104
+ id: 'custom',
105
+ direction: 'asc'
106
+ }]),
107
+ _useState6 = _slicedToArray(_useState5, 2),
108
+ sortingColumns = _useState6[0],
109
+ setSortingColumns = _useState6[1];
110
+
111
+ var setSorting = function setSorting(sortingColumns) {
112
+ var sortedData = _toConsumableArray(data).sort(function (a, b) {
113
+ for (var _i2 = 0; _i2 < sortingColumns.length; _i2++) {
114
+ var column = sortingColumns[_i2];
115
+ var aValue = a[column.id];
116
+ var bValue = b[column.id];
117
+ if (aValue < bValue) return column.direction === 'asc' ? -1 : 1;
118
+ if (aValue > bValue) return column.direction === 'asc' ? 1 : -1;
119
+ }
120
+
121
+ return 0;
122
+ });
123
+
124
+ setData(sortedData);
125
+ setSortingColumns(sortingColumns);
126
+ };
127
+
128
+ return (0, _react2.jsx)(_index.EuiDataGrid, {
129
+ "aria-label": "Data grid schema example",
130
+ columns: columns,
131
+ columnVisibility: {
132
+ visibleColumns: visibleColumns,
133
+ setVisibleColumns: setVisibleColumns
134
+ },
135
+ rowCount: data.length,
136
+ inMemory: {
137
+ level: 'sorting'
138
+ },
139
+ renderCellValue: function renderCellValue(_ref3) {
140
+ var rowIndex = _ref3.rowIndex,
141
+ columnId = _ref3.columnId,
142
+ schema = _ref3.schema;
143
+ var value = data[rowIndex][columnId];
144
+
145
+ if (schema === 'numeric') {
146
+ value = commaSeparateNumbers(value);
147
+ }
148
+
149
+ return value;
150
+ },
151
+ sorting: {
152
+ columns: sortingColumns,
153
+ onSort: setSorting
154
+ },
155
+ schemaDetectors: [{
156
+ type: 'favoriteDistro',
157
+ textTransform: 'capitalize',
158
+ detector: function detector(value) {
159
+ return value.toLowerCase() === 'alma' || value.toLowerCase() === 'debian' ? 1 : 0;
160
+ },
161
+ comparator: function comparator(a, b, direction) {
162
+ var aValue = a.toLowerCase() === 'alma';
163
+ var bValue = b.toLowerCase() === 'alma';
164
+ if (aValue < bValue) return direction === 'asc' ? 1 : -1;
165
+ if (aValue > bValue) return direction === 'asc' ? -1 : 1;
166
+ return 0;
167
+ },
168
+ sortTextAsc: 'Alma to Debian',
169
+ sortTextDesc: 'Debian to Alma',
170
+ icon: 'starFilled',
171
+ color: '#800080'
172
+ }]
173
+ });
174
+ };
175
+
176
+ beforeEach(function () {
177
+ cy.viewport(1280, 800); // large breakpoint
178
+
179
+ cy.mount((0, _react2.jsx)("div", {
180
+ style: {
181
+ width: '80%',
182
+ margin: '0 auto'
183
+ }
184
+ }, (0, _react2.jsx)(DataGrid, null)));
185
+ });
186
+ describe('EuiDataGrid', function () {
187
+ describe('Automated accessibility check', function () {
188
+ it('has zero violations on first render', function () {
189
+ cy.checkAxe();
190
+ });
191
+ it('has zero violations when the columns reorder menu is open', function () {
192
+ cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
193
+ cy.checkAxe();
194
+ });
195
+ it('has zero violations when the hide all columns button is clicked', function () {
196
+ cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
197
+ cy.get('button[data-test-subj="dataGridColumnSelectorHideAllButton"]').realClick(); // TODO: Log this issue and remove the skipFailures boolean when fixed
198
+
199
+ cy.checkAxe({
200
+ skipFailures: true
201
+ });
202
+ });
203
+ it('has zero violations when the columns reorder searchbox returns multiple results', function () {
204
+ cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
205
+ cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('a');
206
+ cy.get('div.euiSwitch--compressed').should(function ($s) {
207
+ expect($s).to.have.length(5);
208
+ });
209
+ cy.checkAxe();
210
+ });
211
+ it('has zero violations when the columns reorder searchbox returns 1 result', function () {
212
+ cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
213
+ cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('favorite');
214
+ cy.get('div.euiSwitch--compressed').should(function ($s) {
215
+ expect($s).to.have.length(1);
216
+ });
217
+ cy.checkAxe();
218
+ });
219
+ it('has zero violations when the columns reorder searchbox returns 0 results', function () {
220
+ cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
221
+ cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('x');
222
+ cy.get('div.euiSwitch--compressed').should(function ($s) {
223
+ expect($s).to.have.length(0);
224
+ });
225
+ cy.checkAxe();
226
+ });
227
+ it('has zero violations when the keyboard shortcut menu is open', function () {
228
+ cy.get('button[data-test-subj="dataGridKeyboardShortcutsButton"]').realClick();
229
+ cy.checkAxe();
230
+ });
231
+ it('has zero violations when the grid display menu is open', function () {
232
+ cy.get('button[data-test-subj="dataGridDisplaySelectorButton"]').realClick();
233
+ cy.checkAxe();
234
+ });
235
+ it('has zero violations when the column actions menu is open', function () {
236
+ cy.get('button.euiDataGridHeaderCell__button').first().realClick();
237
+ cy.checkAxe();
238
+ });
239
+ it('has zero violations when a cell expansion popover is open', function () {
240
+ cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').realClick();
241
+ cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').find('button.euiButtonIcon').last().realClick();
242
+ cy.checkAxe();
243
+ });
244
+ it('has zero violations when the Favorite Distro column has been sorted', function () {
245
+ cy.get('button.euiDataGridHeaderCell__button').last().realClick();
246
+ cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
247
+ cy.checkAxe();
248
+ });
249
+ it('has zero violations when fullscreen is open', function () {
250
+ cy.get('button[data-test-subj="dataGridFullScreenButton"]').realClick();
251
+ cy.get('div.euiDataGrid--fullScreen').should('exist');
252
+ cy.checkAxe();
253
+ });
254
+ });
255
+ });
@@ -241,7 +241,9 @@ var EuiRefreshInterval = /*#__PURE__*/function (_Component) {
241
241
  units = _this$state5.units;
242
242
  return (0, _react2.jsx)(_time_options.RenderI18nTimeOptions, null, function (_ref3) {
243
243
  var refreshUnitsOptions = _ref3.refreshUnitsOptions;
244
- return (0, _react2.jsx)("fieldset", null, (0, _react2.jsx)(_flex.EuiFlexGroup, {
244
+ return (0, _react2.jsx)("fieldset", {
245
+ className: "euiQuickSelectPopover__panel"
246
+ }, (0, _react2.jsx)(_flex.EuiFlexGroup, {
245
247
  alignItems: "center",
246
248
  gutterSize: "s",
247
249
  responsive: false,
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ var _react = _interopRequireWildcard(require("react"));
6
+
7
+ var _moment = _interopRequireDefault(require("moment"));
8
+
9
+ var _date_picker = require("./date_picker");
10
+
11
+ var _form = require("../form");
12
+
13
+ var _react2 = require("@emotion/react");
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ 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); }
18
+
19
+ 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; }
20
+
21
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
+
23
+ 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."); }
24
+
25
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
+
27
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
28
+
29
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
30
+
31
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
+
33
+ var DatePicker = function DatePicker() {
34
+ var _useState = (0, _react.useState)((0, _moment.default)()),
35
+ _useState2 = _slicedToArray(_useState, 2),
36
+ startDate = _useState2[0],
37
+ setStartDate = _useState2[1];
38
+
39
+ var handleChange = function handleChange(date) {
40
+ setStartDate(date);
41
+ };
42
+
43
+ return (0, _react2.jsx)(_form.EuiFormRow, {
44
+ label: "Select a date"
45
+ }, (0, _react2.jsx)(_date_picker.EuiDatePicker, {
46
+ selected: startDate,
47
+ onChange: handleChange
48
+ }));
49
+ };
50
+
51
+ beforeEach(function () {
52
+ cy.realMount((0, _react2.jsx)(DatePicker, null));
53
+ cy.get('input.euiDatePicker').should('exist');
54
+ });
55
+ describe('EuiDatePicker', function () {
56
+ describe('Automated accessibility check', function () {
57
+ it('has zero violations on first render', function () {
58
+ cy.checkAxe();
59
+ });
60
+ it('has zero violations when the calendar widget is expanded', function () {
61
+ cy.get('input.euiDatePicker').realClick();
62
+ cy.get('div.react-datepicker').should('exist');
63
+ cy.checkAxe();
64
+ });
65
+ it('has zero violations after picking a date with arrow keys', function () {
66
+ cy.realPress('Tab');
67
+ cy.get('div.react-datepicker').should('exist');
68
+ cy.repeatRealPress('ArrowDown');
69
+ cy.realPress('ArrowRight');
70
+ cy.realPress('Enter');
71
+ cy.get('div.react-datepicker').should('not.exist');
72
+ cy.checkAxe();
73
+ });
74
+ it('has zero violations after picking a date with dropdown menus', function () {
75
+ cy.realPress('Tab');
76
+ cy.get('div.react-datepicker').should('exist');
77
+ cy.repeatRealPress('Tab', 4);
78
+ cy.get('div.react-datepicker__month-read-view').should('have.focus');
79
+ cy.realPress('Space');
80
+ cy.repeatRealPress('ArrowDown');
81
+ cy.realPress('Enter');
82
+ cy.realPress('Tab');
83
+ cy.realPress('Space');
84
+ cy.repeatRealPress('ArrowDown');
85
+ cy.realPress('Enter');
86
+ cy.checkAxe();
87
+ });
88
+ });
89
+ });
@@ -56,10 +56,13 @@ var EuiCommonlyUsedTimeRanges = function EuiCommonlyUsedTimeRanges(_ref) {
56
56
  "data-test-subj": dataTestSubj
57
57
  }, label));
58
58
  });
59
- return (0, _react2.jsx)("fieldset", null, (0, _react2.jsx)(_title.EuiTitle, {
59
+ return (0, _react2.jsx)("fieldset", {
60
+ className: "euiQuickSelectPopover__panel"
61
+ }, (0, _react2.jsx)(_title.EuiTitle, {
60
62
  size: "xxxs"
61
63
  }, (0, _react2.jsx)("legend", {
62
- id: legendId
64
+ id: legendId,
65
+ className: "euiQuickSelectPopover__panelTitle"
63
66
  }, (0, _react2.jsx)(_i18n.EuiI18n, {
64
67
  token: "euiCommonlyUsedTimeRanges.legend",
65
68
  default: "Commonly used"
@@ -209,7 +209,9 @@ var EuiQuickSelect = /*#__PURE__*/function (_Component) {
209
209
  return value === timeUnits;
210
210
  });
211
211
  var timeUnit = matchedTimeUnit ? matchedTimeUnit.text : '';
212
- return (0, _react2.jsx)("fieldset", null, (0, _react2.jsx)(_i18n.EuiI18n, {
212
+ return (0, _react2.jsx)("fieldset", {
213
+ className: "euiQuickSelectPopover__panel"
214
+ }, (0, _react2.jsx)(_i18n.EuiI18n, {
213
215
  token: "euiQuickSelect.legendText",
214
216
  default: "Quick select a time range"
215
217
  }, function (legendText) {