@elastic/eui 74.0.0 → 74.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 (333) hide show
  1. package/dist/eui_charts_theme.js +2 -1
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/es/components/avatar/avatar.js +1 -1
  4. package/es/components/badge/badge.js +1 -1
  5. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  6. package/es/components/basic_table/basic_table.js +1 -1
  7. package/es/components/basic_table/collapsed_item_actions.js +1 -1
  8. package/es/components/basic_table/in_memory_table.js +1 -1
  9. package/es/components/basic_table/table.a11y.js +146 -104
  10. package/es/components/button/_button_content_deprecated.js +1 -1
  11. package/es/components/button/button_display/_button_display.js +1 -1
  12. package/es/components/button/button_display/_button_display_content.js +1 -1
  13. package/es/components/button/button_empty/button_empty.js +1 -1
  14. package/es/components/button/button_group/button_group.js +1 -1
  15. package/es/components/button/button_group/button_group_button.js +1 -1
  16. package/es/components/button/button_icon/button_icon.js +1 -1
  17. package/es/components/call_out/call_out.js +1 -1
  18. package/es/components/card/card.js +2 -2
  19. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  20. package/es/components/comment_list/comment.js +2 -2
  21. package/es/components/comment_list/comment_event.js +1 -1
  22. package/es/components/comment_list/comment_list.js +2 -2
  23. package/es/components/comment_list/comment_timeline.js +1 -1
  24. package/es/components/datagrid/body/data_grid_body.js +13 -13
  25. package/es/components/datagrid/body/data_grid_cell.js +24 -24
  26. package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  27. package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
  28. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  29. package/es/components/datagrid/data_grid.a11y.js +1 -1
  30. package/es/components/datagrid/data_grid.js +13 -13
  31. package/es/components/datagrid/utils/in_memory.js +12 -12
  32. package/es/components/date_picker/date_picker.js +2 -2
  33. package/es/components/date_picker/date_picker_range.js +1 -1
  34. package/es/components/empty_prompt/empty_prompt.js +1 -1
  35. package/es/components/facet/facet_button.js +1 -1
  36. package/es/components/form/field_number/field_number.js +1 -1
  37. package/es/components/form/field_text/field_text.js +2 -2
  38. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  39. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  40. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  41. package/es/components/form/range/range.a11y.js +216 -0
  42. package/es/components/form/super_select/super_select.js +1 -1
  43. package/es/components/header/header_links/header_link.js +1 -1
  44. package/es/components/header/header_links/header_links.js +1 -1
  45. package/es/components/header/header_logo.js +1 -1
  46. package/es/components/icon/assets/alert.js +3 -2
  47. package/es/components/icon/assets/error.js +39 -0
  48. package/es/components/icon/icon.js +1 -1
  49. package/es/components/icon/icon_map.js +1 -0
  50. package/es/components/index.js +1 -0
  51. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  52. package/es/components/list_group/list_group.js +2 -2
  53. package/es/components/list_group/list_group_item.js +2 -2
  54. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  55. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  56. package/es/components/loading/loading_content.js +37 -38
  57. package/es/components/loading/loading_logo.js +1 -1
  58. package/es/components/markdown_editor/markdown_editor.js +1 -1
  59. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  60. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  61. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  62. package/es/components/modal/modal_header_title.js +0 -5
  63. package/es/components/notification/notification_event.js +2 -2
  64. package/es/components/notification/notification_event_meta.js +1 -1
  65. package/es/components/page/page_header/page_header_content.js +1 -1
  66. package/es/components/pagination/pagination_button.js +1 -1
  67. package/es/components/popover/popover.js +1 -1
  68. package/es/components/progress/progress.a11y.js +84 -0
  69. package/es/components/resizable_container/resizable_container.a11y.js +110 -0
  70. package/es/components/selectable/selectable_list/selectable_list.js +1 -1
  71. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  72. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  73. package/es/components/skeleton/index.js +12 -0
  74. package/es/components/skeleton/skeleton_circle.js +71 -0
  75. package/es/components/skeleton/skeleton_circle.styles.js +26 -0
  76. package/es/components/skeleton/skeleton_loading.js +59 -0
  77. package/es/components/skeleton/skeleton_rectangle.js +89 -0
  78. package/es/components/skeleton/skeleton_rectangle.styles.js +34 -0
  79. package/es/components/skeleton/skeleton_text.js +90 -0
  80. package/es/components/skeleton/skeleton_text.styles.js +34 -0
  81. package/es/components/skeleton/skeleton_title.js +74 -0
  82. package/es/components/skeleton/skeleton_title.styles.js +24 -0
  83. package/es/components/skeleton/utils.js +25 -0
  84. package/es/components/suggest/suggest.js +1 -1
  85. package/es/components/suggest/suggest_item.js +1 -1
  86. package/es/components/table/table_header_button.js +1 -1
  87. package/es/components/timeline/timeline_item_icon.js +1 -1
  88. package/es/components/toast/global_toast_list.js +1 -1
  89. package/es/components/toast/toast.js +1 -1
  90. package/es/components/tool_tip/icon_tip.js +1 -1
  91. package/es/global_styling/functions/logicals.js +2 -1
  92. package/es/global_styling/utility/animations.js +4 -1
  93. package/eui.d.ts +373 -203
  94. package/i18ntokens.json +34 -2
  95. package/lib/components/avatar/avatar.js +1 -1
  96. package/lib/components/badge/badge.js +1 -1
  97. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  98. package/lib/components/basic_table/basic_table.js +1 -1
  99. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  100. package/lib/components/basic_table/in_memory_table.js +1 -1
  101. package/lib/components/basic_table/table.a11y.js +147 -105
  102. package/lib/components/button/_button_content_deprecated.js +1 -1
  103. package/lib/components/button/button_display/_button_display.js +1 -1
  104. package/lib/components/button/button_display/_button_display_content.js +1 -1
  105. package/lib/components/button/button_empty/button_empty.js +1 -1
  106. package/lib/components/button/button_group/button_group.js +1 -1
  107. package/lib/components/button/button_group/button_group_button.js +1 -1
  108. package/lib/components/button/button_icon/button_icon.js +1 -1
  109. package/lib/components/call_out/call_out.js +1 -1
  110. package/lib/components/card/card.js +2 -2
  111. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  112. package/lib/components/comment_list/comment.js +2 -2
  113. package/lib/components/comment_list/comment_event.js +1 -1
  114. package/lib/components/comment_list/comment_list.js +2 -2
  115. package/lib/components/comment_list/comment_timeline.js +1 -1
  116. package/lib/components/datagrid/body/data_grid_body.js +13 -13
  117. package/lib/components/datagrid/body/data_grid_cell.js +24 -24
  118. package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  119. package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
  120. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  121. package/lib/components/datagrid/data_grid.a11y.js +1 -1
  122. package/lib/components/datagrid/data_grid.js +13 -13
  123. package/lib/components/datagrid/utils/in_memory.js +12 -12
  124. package/lib/components/date_picker/date_picker.js +2 -2
  125. package/lib/components/date_picker/date_picker_range.js +1 -1
  126. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  127. package/lib/components/facet/facet_button.js +1 -1
  128. package/lib/components/form/field_number/field_number.js +1 -1
  129. package/lib/components/form/field_text/field_text.js +2 -2
  130. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  131. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  132. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  133. package/lib/components/form/range/range.a11y.js +220 -0
  134. package/lib/components/form/super_select/super_select.js +1 -1
  135. package/lib/components/header/header_links/header_link.js +1 -1
  136. package/lib/components/header/header_links/header_links.js +1 -1
  137. package/lib/components/header/header_logo.js +1 -1
  138. package/lib/components/icon/assets/alert.js +3 -2
  139. package/lib/components/icon/assets/error.js +46 -0
  140. package/lib/components/icon/icon.js +1 -1
  141. package/lib/components/icon/icon_map.js +1 -0
  142. package/lib/components/icon/svgs/alert.svg +2 -1
  143. package/lib/components/icon/svgs/error.svg +3 -0
  144. package/lib/components/index.js +13 -0
  145. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  146. package/lib/components/list_group/list_group.js +2 -2
  147. package/lib/components/list_group/list_group_item.js +2 -2
  148. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  149. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  150. package/lib/components/loading/loading_content.js +41 -42
  151. package/lib/components/loading/loading_logo.js +1 -1
  152. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  153. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  154. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  155. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  156. package/lib/components/modal/modal_header_title.js +0 -5
  157. package/lib/components/notification/notification_event.js +2 -2
  158. package/lib/components/notification/notification_event_meta.js +1 -1
  159. package/lib/components/page/page_header/page_header_content.js +1 -1
  160. package/lib/components/popover/popover.js +1 -1
  161. package/lib/components/progress/progress.a11y.js +84 -0
  162. package/lib/components/resizable_container/resizable_container.a11y.js +117 -0
  163. package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
  164. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  165. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  166. package/lib/components/skeleton/index.js +45 -0
  167. package/lib/components/skeleton/skeleton_circle.js +84 -0
  168. package/lib/components/skeleton/skeleton_circle.styles.js +38 -0
  169. package/lib/components/skeleton/skeleton_loading.js +68 -0
  170. package/lib/components/skeleton/skeleton_rectangle.js +103 -0
  171. package/lib/components/skeleton/skeleton_rectangle.styles.js +37 -0
  172. package/lib/components/skeleton/skeleton_text.js +103 -0
  173. package/lib/components/skeleton/skeleton_text.styles.js +45 -0
  174. package/lib/components/skeleton/skeleton_title.js +85 -0
  175. package/lib/components/skeleton/skeleton_title.styles.js +37 -0
  176. package/lib/components/skeleton/utils.js +38 -0
  177. package/lib/components/suggest/suggest.js +1 -1
  178. package/lib/components/suggest/suggest_item.js +1 -1
  179. package/lib/components/table/table_header_button.js +1 -1
  180. package/lib/components/timeline/timeline_item_icon.js +1 -1
  181. package/lib/components/toast/global_toast_list.js +1 -1
  182. package/lib/components/toast/toast.js +1 -1
  183. package/lib/components/tool_tip/icon_tip.js +1 -1
  184. package/lib/global_styling/functions/logicals.js +2 -1
  185. package/lib/global_styling/utility/animations.js +9 -3
  186. package/optimize/es/components/basic_table/table.a11y.js +146 -104
  187. package/optimize/es/components/card/card.js +1 -1
  188. package/optimize/es/components/datagrid/data_grid.a11y.js +1 -1
  189. package/optimize/es/components/form/range/range.a11y.js +206 -0
  190. package/optimize/es/components/form/super_select/super_select.js +1 -1
  191. package/optimize/es/components/icon/assets/alert.js +3 -2
  192. package/optimize/es/components/icon/assets/error.js +35 -0
  193. package/optimize/es/components/icon/icon_map.js +1 -0
  194. package/optimize/es/components/index.js +1 -0
  195. package/optimize/es/components/loading/loading_content.js +10 -33
  196. package/optimize/es/components/popover/popover.js +1 -1
  197. package/optimize/es/components/progress/progress.a11y.js +84 -0
  198. package/optimize/es/components/resizable_container/resizable_container.a11y.js +110 -0
  199. package/optimize/es/components/skeleton/index.js +12 -0
  200. package/optimize/es/components/skeleton/skeleton_circle.js +42 -0
  201. package/optimize/es/components/skeleton/skeleton_circle.styles.js +26 -0
  202. package/optimize/es/components/skeleton/skeleton_loading.js +38 -0
  203. package/optimize/es/components/skeleton/skeleton_rectangle.js +57 -0
  204. package/optimize/es/components/skeleton/skeleton_rectangle.styles.js +34 -0
  205. package/optimize/es/components/skeleton/skeleton_text.js +52 -0
  206. package/optimize/es/components/skeleton/skeleton_text.styles.js +34 -0
  207. package/optimize/es/components/skeleton/skeleton_title.js +41 -0
  208. package/optimize/es/components/skeleton/skeleton_title.styles.js +24 -0
  209. package/optimize/es/components/skeleton/utils.js +25 -0
  210. package/optimize/es/global_styling/functions/logicals.js +2 -1
  211. package/optimize/es/global_styling/utility/animations.js +4 -1
  212. package/optimize/lib/components/basic_table/table.a11y.js +147 -105
  213. package/optimize/lib/components/card/card.js +1 -1
  214. package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -1
  215. package/optimize/lib/components/form/range/range.a11y.js +220 -0
  216. package/optimize/lib/components/form/super_select/super_select.js +1 -1
  217. package/optimize/lib/components/icon/assets/alert.js +3 -2
  218. package/optimize/lib/components/icon/assets/error.js +45 -0
  219. package/optimize/lib/components/icon/icon_map.js +1 -0
  220. package/optimize/lib/components/icon/svgs/alert.svg +2 -1
  221. package/optimize/lib/components/icon/svgs/error.svg +3 -0
  222. package/optimize/lib/components/index.js +13 -0
  223. package/optimize/lib/components/loading/loading_content.js +14 -38
  224. package/optimize/lib/components/popover/popover.js +1 -1
  225. package/optimize/lib/components/progress/progress.a11y.js +92 -0
  226. package/optimize/lib/components/resizable_container/resizable_container.a11y.js +117 -0
  227. package/optimize/lib/components/skeleton/index.js +45 -0
  228. package/optimize/lib/components/skeleton/skeleton_circle.js +54 -0
  229. package/optimize/lib/components/skeleton/skeleton_circle.styles.js +38 -0
  230. package/optimize/lib/components/skeleton/skeleton_loading.js +47 -0
  231. package/optimize/lib/components/skeleton/skeleton_rectangle.js +72 -0
  232. package/optimize/lib/components/skeleton/skeleton_rectangle.styles.js +37 -0
  233. package/optimize/lib/components/skeleton/skeleton_text.js +64 -0
  234. package/optimize/lib/components/skeleton/skeleton_text.styles.js +45 -0
  235. package/optimize/lib/components/skeleton/skeleton_title.js +52 -0
  236. package/optimize/lib/components/skeleton/skeleton_title.styles.js +37 -0
  237. package/optimize/lib/components/skeleton/utils.js +38 -0
  238. package/optimize/lib/global_styling/functions/logicals.js +2 -1
  239. package/optimize/lib/global_styling/utility/animations.js +9 -3
  240. package/package.json +2 -2
  241. package/test-env/components/avatar/avatar.js +1 -1
  242. package/test-env/components/badge/badge.js +1 -1
  243. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  244. package/test-env/components/basic_table/basic_table.js +1 -1
  245. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  246. package/test-env/components/basic_table/in_memory_table.js +1 -1
  247. package/test-env/components/basic_table/table.a11y.js +147 -105
  248. package/test-env/components/button/_button_content_deprecated.js +1 -1
  249. package/test-env/components/button/button_display/_button_display.js +1 -1
  250. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  251. package/test-env/components/button/button_empty/button_empty.js +1 -1
  252. package/test-env/components/button/button_group/button_group.js +1 -1
  253. package/test-env/components/button/button_group/button_group_button.js +1 -1
  254. package/test-env/components/button/button_icon/button_icon.js +1 -1
  255. package/test-env/components/call_out/call_out.js +1 -1
  256. package/test-env/components/card/card.js +2 -2
  257. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  258. package/test-env/components/comment_list/comment.js +2 -2
  259. package/test-env/components/comment_list/comment_event.js +1 -1
  260. package/test-env/components/comment_list/comment_list.js +2 -2
  261. package/test-env/components/comment_list/comment_timeline.js +1 -1
  262. package/test-env/components/datagrid/body/data_grid_body.js +13 -13
  263. package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
  264. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  265. package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
  266. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  267. package/test-env/components/datagrid/data_grid.a11y.js +1 -1
  268. package/test-env/components/datagrid/data_grid.js +13 -13
  269. package/test-env/components/datagrid/utils/in_memory.js +12 -12
  270. package/test-env/components/date_picker/date_picker.js +2 -2
  271. package/test-env/components/date_picker/date_picker_range.js +1 -1
  272. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  273. package/test-env/components/facet/facet_button.js +1 -1
  274. package/test-env/components/form/field_number/field_number.js +1 -1
  275. package/test-env/components/form/field_text/field_text.js +2 -2
  276. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  277. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  278. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  279. package/test-env/components/form/range/range.a11y.js +220 -0
  280. package/test-env/components/form/super_select/super_select.js +1 -1
  281. package/test-env/components/header/header_links/header_link.js +1 -1
  282. package/test-env/components/header/header_links/header_links.js +1 -1
  283. package/test-env/components/header/header_logo.js +1 -1
  284. package/test-env/components/icon/assets/alert.js +3 -2
  285. package/test-env/components/icon/assets/error.js +45 -0
  286. package/test-env/components/icon/icon_map.js +1 -0
  287. package/test-env/components/index.js +13 -0
  288. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  289. package/test-env/components/list_group/list_group.js +2 -2
  290. package/test-env/components/list_group/list_group_item.js +2 -2
  291. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  292. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  293. package/test-env/components/loading/loading_content.js +41 -39
  294. package/test-env/components/loading/loading_logo.js +1 -1
  295. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  296. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  297. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  298. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  299. package/test-env/components/modal/modal_header_title.js +0 -5
  300. package/test-env/components/notification/notification_event.js +2 -2
  301. package/test-env/components/notification/notification_event_meta.js +1 -1
  302. package/test-env/components/page/page_header/page_header_content.js +1 -1
  303. package/test-env/components/popover/popover.js +1 -1
  304. package/test-env/components/progress/progress.a11y.js +92 -0
  305. package/test-env/components/resizable_container/resizable_container.a11y.js +117 -0
  306. package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
  307. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  308. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  309. package/test-env/components/skeleton/index.js +45 -0
  310. package/test-env/components/skeleton/skeleton_circle.js +80 -0
  311. package/test-env/components/skeleton/skeleton_circle.styles.js +38 -0
  312. package/test-env/components/skeleton/skeleton_loading.js +65 -0
  313. package/test-env/components/skeleton/skeleton_rectangle.js +100 -0
  314. package/test-env/components/skeleton/skeleton_rectangle.styles.js +37 -0
  315. package/test-env/components/skeleton/skeleton_text.js +99 -0
  316. package/test-env/components/skeleton/skeleton_text.styles.js +45 -0
  317. package/test-env/components/skeleton/skeleton_title.js +82 -0
  318. package/test-env/components/skeleton/skeleton_title.styles.js +37 -0
  319. package/test-env/components/skeleton/utils.js +38 -0
  320. package/test-env/components/suggest/suggest.js +1 -1
  321. package/test-env/components/suggest/suggest_item.js +1 -1
  322. package/test-env/components/table/table_header_button.js +1 -1
  323. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  324. package/test-env/components/toast/global_toast_list.js +1 -1
  325. package/test-env/components/toast/toast.js +1 -1
  326. package/test-env/components/tool_tip/icon_tip.js +1 -1
  327. package/test-env/global_styling/functions/logicals.js +2 -1
  328. package/test-env/global_styling/utility/animations.js +9 -3
  329. package/es/components/loading/loading_content.styles.js +0 -24
  330. package/lib/components/loading/loading_content.styles.js +0 -30
  331. package/optimize/es/components/loading/loading_content.styles.js +0 -24
  332. package/optimize/lib/components/loading/loading_content.styles.js +0 -32
  333. package/test-env/components/loading/loading_content.styles.js +0 -32
@@ -0,0 +1,206 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ /// <reference types="../../../../cypress/support"/>
11
+ import React, { useState } from 'react';
12
+ import { EuiDualRange } from './dual_range';
13
+ import { EuiRange } from './range';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+ describe('Single EuiRange', function () {
16
+ var SingleRange = function SingleRange() {
17
+ var _useState = useState('100'),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ value = _useState2[0],
20
+ setValue = _useState2[1];
21
+
22
+ var onChange = function onChange(e) {
23
+ setValue(e.currentTarget.value);
24
+ };
25
+
26
+ return ___EmotionJSX(EuiRange, {
27
+ id: "cy-range-single",
28
+ min: 100,
29
+ max: 200,
30
+ value: value,
31
+ onChange: onChange,
32
+ showLabels: true,
33
+ showRange: true,
34
+ showValue: true,
35
+ valuePrepend: "100 - ",
36
+ "aria-label": "An example of EuiRange with valuePrepend prop"
37
+ });
38
+ };
39
+
40
+ beforeEach(function () {
41
+ cy.viewport(1024, 768); // medium breakpoint
42
+
43
+ cy.realMount(___EmotionJSX(SingleRange, null));
44
+ cy.get('div.euiRangeWrapper').should('exist');
45
+ });
46
+ describe('Automated accessibility check', function () {
47
+ it('has zero violations on first render', function () {
48
+ cy.checkAxe();
49
+ });
50
+ });
51
+ describe('Keyboard accessibility check', function () {
52
+ it('has zero violations when the range slider is increased', function () {
53
+ cy.realPress('Tab');
54
+ cy.get('input#cy-range-single').should('have.focus');
55
+ cy.repeatRealPress('ArrowRight', 10);
56
+ cy.get('output.euiRangeTooltip__value').contains('100 - 110');
57
+ cy.checkAxe();
58
+ });
59
+ it('has zero violations when the range slider is decreased', function () {
60
+ cy.realPress('Tab');
61
+ cy.get('input#cy-range-single').should('have.focus');
62
+ cy.repeatRealPress('ArrowLeft', 10);
63
+ cy.get('output.euiRangeTooltip__value').contains('100 - 100');
64
+ cy.checkAxe();
65
+ });
66
+ });
67
+ });
68
+ describe('Dual EuiRange', function () {
69
+ var DualRange = function DualRange() {
70
+ var _useState3 = useState(['100', '150']),
71
+ _useState4 = _slicedToArray(_useState3, 2),
72
+ dualValue = _useState4[0],
73
+ setDualValue = _useState4[1];
74
+
75
+ var onDualChange = function onDualChange(value) {
76
+ setDualValue(value);
77
+ };
78
+
79
+ return ___EmotionJSX(EuiDualRange, {
80
+ id: "cy-range-dual",
81
+ min: 0,
82
+ max: 300,
83
+ step: 10,
84
+ value: dualValue,
85
+ onChange: onDualChange,
86
+ showLabels: true,
87
+ "aria-label": "An example of EuiDualRange"
88
+ });
89
+ };
90
+
91
+ beforeEach(function () {
92
+ cy.viewport(1024, 768); // medium breakpoint
93
+
94
+ cy.realMount(___EmotionJSX(DualRange, null));
95
+ cy.get('div.euiRangeWrapper').should('exist');
96
+ });
97
+ describe('Automated accessibility check', function () {
98
+ it('has zero violations on first render', function () {
99
+ cy.checkAxe();
100
+ });
101
+ });
102
+ describe('Keyboard accessibility check', function () {
103
+ it('has zero violations when the range sliders are adjusted', function () {
104
+ cy.realPress('Tab');
105
+ cy.get('div[role="slider"]').first().should('have.focus');
106
+ cy.repeatRealPress('ArrowLeft', 3);
107
+ cy.get('div[role="slider"]').first().invoke('attr', 'aria-valuenow').should('eq', '70');
108
+ cy.realPress('Tab');
109
+ cy.get('div[role="slider"]').last().should('have.focus');
110
+ cy.repeatRealPress('ArrowRight', 3);
111
+ cy.get('div[role="slider"]').last().invoke('attr', 'aria-valuenow').should('eq', '180');
112
+ cy.checkAxe();
113
+ });
114
+ });
115
+ });
116
+ describe('Highlight Area EuiRange', function () {
117
+ var DraggableRange = function DraggableRange() {
118
+ var _useState5 = useState(['40', '60']),
119
+ _useState6 = _slicedToArray(_useState5, 2),
120
+ dualValue = _useState6[0],
121
+ setDualValue = _useState6[1];
122
+
123
+ return ___EmotionJSX(EuiDualRange, {
124
+ id: "cy-range-draggable",
125
+ min: 0,
126
+ max: 100,
127
+ step: 1,
128
+ value: dualValue,
129
+ onChange: setDualValue,
130
+ showLabels: true,
131
+ "aria-label": "An example of EuiDualRange with isDraggable='true'",
132
+ isDraggable: true
133
+ });
134
+ };
135
+
136
+ beforeEach(function () {
137
+ cy.viewport(1024, 768); // medium breakpoint
138
+
139
+ cy.realMount(___EmotionJSX(DraggableRange, null));
140
+ cy.get('div.euiRangeWrapper').should('exist');
141
+ });
142
+ describe('Automated accessibility check', function () {
143
+ it('has zero violations on first render', function () {
144
+ cy.checkAxe();
145
+ });
146
+ });
147
+ describe('Keyboard accessibility check', function () {
148
+ it('has zero violations when the highlight area is adjusted using arrow keys', function () {
149
+ cy.realPress('Tab');
150
+ cy.get('div[role="slider"]').first().should('have.focus');
151
+ cy.repeatRealPress('ArrowLeft', 3);
152
+ cy.get('div[role="slider"]').first().invoke('attr', 'aria-valuetext').should('eq', '37, 57');
153
+ cy.checkAxe();
154
+ });
155
+ });
156
+ describe('Drag and drop accessibility check', function () {
157
+ it('has zero violations when the higlight area is dragged using a mouse', function () {
158
+ cy.get('.euiRangeDraggable__inner').realMouseDown({
159
+ position: 'center'
160
+ }).realMouseMove(100, 0, {}).realMouseUp();
161
+ cy.checkAxe();
162
+ });
163
+ });
164
+ describe('EuiRange in a dropdown', function () {
165
+ var InputWithRange = function InputWithRange() {
166
+ var _useState7 = useState('20'),
167
+ _useState8 = _slicedToArray(_useState7, 2),
168
+ value = _useState8[0],
169
+ setValue = _useState8[1];
170
+
171
+ return ___EmotionJSX(EuiRange, {
172
+ id: "cy-range-in-dropdown",
173
+ min: 0,
174
+ max: 100,
175
+ value: value,
176
+ onChange: function onChange(e) {
177
+ return setValue(e.currentTarget.value);
178
+ },
179
+ showInput: "inputWithPopover",
180
+ showLabels: true,
181
+ "aria-label": "An example of EuiRange with showInput prop"
182
+ });
183
+ };
184
+
185
+ beforeEach(function () {
186
+ cy.viewport(1024, 768); // medium breakpoint
187
+
188
+ cy.realMount(___EmotionJSX(InputWithRange, null));
189
+ cy.get('input#cy-range-in-dropdown').should('exist');
190
+ });
191
+ describe('Automated accessibility check', function () {
192
+ it('has zero violations on first render', function () {
193
+ cy.checkAxe();
194
+ });
195
+ });
196
+ describe('Keyboard accessibility check', function () {
197
+ it('updates the range value using arrow keys with input[type="number"]', function () {
198
+ cy.realPress('Tab');
199
+ cy.get('input#cy-range-in-dropdown').should('have.focus');
200
+ cy.repeatRealPress('ArrowUp', 10);
201
+ cy.get('input[type="range"]').first().invoke('attr', 'value').should('eq', '30');
202
+ cy.checkAxe();
203
+ });
204
+ });
205
+ });
206
+ });
@@ -292,7 +292,7 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
292
292
  id: this.describedById
293
293
  }, ___EmotionJSX(EuiI18n, {
294
294
  token: "euiSuperSelect.screenReaderAnnouncement",
295
- default: "You are in a form selector and must select a single option. Use the up and down keys to navigate or escape to close."
295
+ default: "You are in a form selector and must select a single option. Use the Up and Down arrow keys to navigate or Escape to close."
296
296
  }))), ___EmotionJSX("div", {
297
297
  "aria-labelledby": this.labelledById,
298
298
  "aria-describedby": this.describedById,
@@ -27,8 +27,9 @@ var EuiIconAlert = function EuiIconAlert(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- fillRule: "evenodd",
31
- d: "M7.59 10.059L7.35 5.18h1.3L8.4 10.06h-.81zm.394 1.901a.61.61 0 01-.448-.186.606.606 0 01-.186-.444c0-.174.062-.323.186-.446a.614.614 0 01.448-.184c.169 0 .315.06.44.182.124.122.186.27.186.448a.6.6 0 01-.189.446.607.607 0 01-.437.184zM2 14a1 1 0 01-.878-1.479l6-11a1 1 0 011.756 0l6 11A1 1 0 0114 14H2zm0-1h12L8 2 2 13z"
30
+ d: "M8.55 9.502l.35-3.507a.905.905 0 10-1.8 0l.35 3.507a.552.552 0 001.1 0zM9 12a1 1 0 11-2 0 1 1 0 012 0z"
31
+ }), ___EmotionJSX("path", {
32
+ d: "M8.864 1.496a1 1 0 00-1.728 0l-7 12A1 1 0 001 15h14a1 1 0 00.864-1.504l-7-12zM1 14L8 2l7 12H1z"
32
33
  }));
33
34
  };
34
35
 
@@ -0,0 +1,35 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconError = function EuiIconError(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ xmlns: "http://www.w3.org/2000/svg",
23
+ width: 16,
24
+ height: 16,
25
+ viewBox: "0 0 16 16",
26
+ "aria-labelledby": titleId
27
+ }, props), title ? ___EmotionJSX("title", {
28
+ id: titleId
29
+ }, title) : null, ___EmotionJSX("path", {
30
+ fillRule: "evenodd",
31
+ d: "M10 1a1 1 0 01.707.293l4 4A1 1 0 0115 6v5a1 1 0 01-.293.707l-4 4A1 1 0 0110 16H5a1 1 0 01-.707-.293l-4-4A1 1 0 010 11V6a1 1 0 01.293-.707l4-4A1 1 0 015 1h5zM4.146 5.146a.5.5 0 01.708 0L7.5 7.793l2.646-2.647a.5.5 0 01.708.708L8.207 8.5l2.647 2.646a.5.5 0 01-.708.708L7.5 9.207l-2.646 2.647a.5.5 0 01-.708-.708L6.793 8.5 4.146 5.854a.5.5 0 010-.708z"
32
+ }));
33
+ };
34
+
35
+ export var icon = EuiIconError;
@@ -126,6 +126,7 @@ export var typeToPathMap = {
126
126
  emsApp: 'app_ems',
127
127
  eql: 'eql',
128
128
  eraser: 'eraser',
129
+ error: 'error',
129
130
  exit: 'exit',
130
131
  expand: 'expand',
131
132
  expandMini: 'expandMini',
@@ -73,6 +73,7 @@ export * from './observer/resize_observer';
73
73
  export * from './search_bar';
74
74
  export * from './selectable';
75
75
  export * from './side_nav';
76
+ export * from './skeleton';
76
77
  export * from './spacer';
77
78
  export * from './stat';
78
79
  export * from './steps';
@@ -1,7 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["lines", "className", "aria-label"];
4
-
5
1
  /*
6
2
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
3
  * or more contributor license agreements. Licensed under the Elastic License
@@ -10,35 +6,16 @@ var _excluded = ["lines", "className", "aria-label"];
10
6
  * Side Public License, v 1.
11
7
  */
12
8
  import React from 'react';
13
- import classNames from 'classnames';
14
- import { useEuiTheme } from '../../services';
15
- import { useLoadingAriaLabel } from './_loading_strings';
16
- import { euiLoadingContentStyles } from './loading_content.styles';
17
- import { jsx as ___EmotionJSX } from "@emotion/react";
18
- export var EuiLoadingContent = function EuiLoadingContent(_ref) {
19
- var _ref$lines = _ref.lines,
20
- lines = _ref$lines === void 0 ? 3 : _ref$lines,
21
- className = _ref.className,
22
- ariaLabel = _ref['aria-label'],
23
- rest = _objectWithoutProperties(_ref, _excluded);
24
-
25
- var euiTheme = useEuiTheme();
26
- var styles = euiLoadingContentStyles(euiTheme);
27
- var lineCssStyles = [styles.euiLoadingContent__singleLine];
28
- var defaultLabel = useLoadingAriaLabel();
29
- var classes = classNames('euiLoadingContent', className);
30
- var lineElements = [];
9
+ import { EuiSkeletonText } from '../skeleton';
10
+ /**
11
+ * @deprecated Use `EuiSkeletonTextProps` instead
12
+ */
31
13
 
32
- for (var i = 0; i < lines; i++) {
33
- lineElements.push(___EmotionJSX("span", {
34
- key: i,
35
- css: lineCssStyles
36
- }));
37
- }
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
38
15
 
39
- return ___EmotionJSX("span", _extends({
40
- className: classes,
41
- role: "progressbar",
42
- "aria-label": ariaLabel || defaultLabel
43
- }, rest), lineElements);
16
+ /**
17
+ * @deprecated Use `EuiSkeletonText` instead
18
+ */
19
+ export var EuiLoadingContent = function EuiLoadingContent(props) {
20
+ return ___EmotionJSX(EuiSkeletonText, props);
44
21
  };
@@ -463,7 +463,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
463
463
  id: this.descriptionId
464
464
  }, ownFocus && ___EmotionJSX(EuiI18n, {
465
465
  token: "euiPopover.screenReaderAnnouncement",
466
- default: "You are in a dialog. To close this dialog, hit escape."
466
+ default: "You are in a dialog. Press Escape, or tap/click outside the dialog to close."
467
467
  }), popoverScreenReaderText));
468
468
  }
469
469
 
@@ -0,0 +1,84 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ /// <reference types="../../../cypress/support"/>
11
+ import React from 'react';
12
+ import { EuiProgress } from './progress';
13
+ import { EuiSpacer } from '../spacer';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+ var ProgressCommonProps = {
16
+ color: 'success',
17
+ max: 100
18
+ };
19
+
20
+ var ProgressBars = function ProgressBars() {
21
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
22
+ "data-test-subj": "cy-progress-1"
23
+ }, ___EmotionJSX(EuiProgress, _extends({
24
+ valueText: true,
25
+ size: "xs",
26
+ value: 0
27
+ }, ProgressCommonProps))), ___EmotionJSX("div", {
28
+ "data-test-subj": "cy-progress-2"
29
+ }, ___EmotionJSX(EuiProgress, _extends({
30
+ valueText: true,
31
+ size: "s",
32
+ value: 33
33
+ }, ProgressCommonProps))), ___EmotionJSX("div", {
34
+ "data-test-subj": "cy-progress-3"
35
+ }, ___EmotionJSX(EuiProgress, _extends({
36
+ valueText: true,
37
+ size: "m",
38
+ value: 66
39
+ }, ProgressCommonProps))), ___EmotionJSX("div", {
40
+ "data-test-subj": "cy-progress-4"
41
+ }, ___EmotionJSX(EuiProgress, _extends({
42
+ valueText: true,
43
+ size: "l",
44
+ value: 100
45
+ }, ProgressCommonProps))), ___EmotionJSX("div", {
46
+ "data-test-subj": "cy-progress-5"
47
+ }, ___EmotionJSX(EuiProgress, _extends({
48
+ valueText: true,
49
+ label: "Basic percentage",
50
+ size: "l",
51
+ value: 100
52
+ }, ProgressCommonProps))), ___EmotionJSX(EuiSpacer, {
53
+ size: "m"
54
+ }), ___EmotionJSX("div", {
55
+ "data-test-subj": "cy-progress-infinite"
56
+ }, ___EmotionJSX(EuiProgress, {
57
+ valueText: true,
58
+ size: "l",
59
+ color: "success"
60
+ })));
61
+ };
62
+
63
+ beforeEach(function () {
64
+ cy.viewport(1024, 768); // medium breakpoint
65
+
66
+ cy.realMount(___EmotionJSX(ProgressBars, null));
67
+ cy.get('div[data-test-subj="cy-progress-1"]').should('exist');
68
+ });
69
+ describe('EuiProgress', function () {
70
+ describe('Automated accessibility check', function () {
71
+ it('has zero violations on first render', function () {
72
+ cy.checkAxe();
73
+ });
74
+ it('displays correct progress values and labels', function () {
75
+ cy.get('div[data-test-subj="cy-progress-1"] span.euiProgress__valueText').contains('0');
76
+ cy.get('div[data-test-subj="cy-progress-2"] span.euiProgress__valueText').contains('33');
77
+ cy.get('div[data-test-subj="cy-progress-3"] span.euiProgress__valueText').contains('66');
78
+ cy.get('div[data-test-subj="cy-progress-4"] span.euiProgress__valueText').contains('100');
79
+ cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__label').contains('Basic percentage');
80
+ cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__valueText').contains('100');
81
+ cy.get('div[data-test-subj="cy-progress-infinite"] span.euiProgress__valueText').should('not.exist');
82
+ });
83
+ });
84
+ });
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ /// <reference types="../../../cypress/support"/>
9
+ import React from 'react';
10
+ import { EuiResizableContainer } from './resizable_container';
11
+ import { EuiText } from '../text';
12
+ import { faker } from '@faker-js/faker';
13
+ import { jsx as ___EmotionJSX } from "@emotion/react";
14
+
15
+ var text = ___EmotionJSX(React.Fragment, null, ___EmotionJSX("p", null, faker.lorem.paragraphs()), ___EmotionJSX("p", null, faker.lorem.paragraphs()), ___EmotionJSX("p", null, faker.lorem.paragraphs()));
16
+
17
+ describe('Horizontal EuiResizableContainer', function () {
18
+ var HorizontalContainer = function HorizontalContainer() {
19
+ return ___EmotionJSX(EuiResizableContainer, {
20
+ style: {
21
+ height: '200px'
22
+ }
23
+ }, function (EuiResizablePanel, EuiResizableButton) {
24
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiResizablePanel, {
25
+ initialSize: 50,
26
+ minSize: "30%",
27
+ tabIndex: 0
28
+ }, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text), ___EmotionJSX("a", {
29
+ href: "#",
30
+ "data-test-subj": "hello-world-link"
31
+ }, "Hello world"))), ___EmotionJSX(EuiResizableButton, null), ___EmotionJSX(EuiResizablePanel, {
32
+ initialSize: 50,
33
+ minSize: "200px",
34
+ tabIndex: 0
35
+ }, ___EmotionJSX(EuiText, null, text)));
36
+ });
37
+ };
38
+
39
+ beforeEach(function () {
40
+ cy.viewport(1024, 768); // medium breakpoint
41
+
42
+ cy.realMount(___EmotionJSX(HorizontalContainer, null));
43
+ cy.get('div.euiResizablePanel').should('exist');
44
+ });
45
+ describe('Automated accessibility check', function () {
46
+ it('has zero violations on first render', function () {
47
+ cy.checkAxe();
48
+ });
49
+ });
50
+ describe('Keyboard accessibility check', function () {
51
+ it('has zero violations when first panel is scrolled vertically', function () {
52
+ cy.realPress('Tab');
53
+ cy.get('div.euiPanel').first().should('have.focus');
54
+ cy.realPress('End');
55
+ cy.get('a[data-test-subj="hello-world-link"]').should('be.visible');
56
+ cy.checkAxe();
57
+ });
58
+ it('has zero violations when second panel is scrolled vertically', function () {
59
+ cy.repeatRealPress('Tab', 4);
60
+ cy.get('div.euiPanel').last().should('have.focus');
61
+ cy.realPress('End');
62
+ cy.realPress('Home');
63
+ cy.checkAxe();
64
+ });
65
+ it('has zero violations when the horizontal panels are resized', function () {
66
+ cy.repeatRealPress('Tab', 3);
67
+ cy.get('button.euiResizableButton').should('have.focus');
68
+ cy.repeatRealPress('ArrowRight', 10);
69
+ cy.checkAxe();
70
+ });
71
+ });
72
+ });
73
+ describe('Vertical EuiResizableContainer', function () {
74
+ var VerticalContainer = function VerticalContainer() {
75
+ return ___EmotionJSX(EuiResizableContainer, {
76
+ style: {
77
+ height: '400px'
78
+ },
79
+ direction: "vertical"
80
+ }, function (EuiResizablePanel, EuiResizableButton) {
81
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiResizablePanel, {
82
+ initialSize: 60,
83
+ minSize: "40%",
84
+ tabIndex: 0
85
+ }, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text))), ___EmotionJSX(EuiResizableButton, null), ___EmotionJSX(EuiResizablePanel, {
86
+ initialSize: 40,
87
+ minSize: "10%",
88
+ tabIndex: 0
89
+ }, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text))));
90
+ });
91
+ };
92
+
93
+ beforeEach(function () {
94
+ cy.viewport(1024, 768); // medium breakpoint
95
+
96
+ cy.realMount(___EmotionJSX(VerticalContainer, null));
97
+ cy.get('div.euiResizablePanel').should('exist');
98
+ });
99
+ describe('Automated accessibility check', function () {
100
+ it('has zero violations on first render', function () {
101
+ cy.checkAxe();
102
+ });
103
+ it('has zero violations when the vertical panels are resized', function () {
104
+ cy.repeatRealPress('Tab');
105
+ cy.get('button.euiResizableButton').should('have.focus');
106
+ cy.repeatRealPress('ArrowDown', 10);
107
+ cy.checkAxe();
108
+ });
109
+ });
110
+ });
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ export { EuiSkeletonLoading } from './skeleton_loading';
9
+ export { EuiSkeletonCircle } from './skeleton_circle';
10
+ export { EuiSkeletonText } from './skeleton_text';
11
+ export { EuiSkeletonRectangle } from './skeleton_rectangle';
12
+ export { EuiSkeletonTitle } from './skeleton_title';
@@ -0,0 +1,42 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ import React from 'react';
13
+ import classNames from 'classnames';
14
+ import { useEuiTheme } from '../../services';
15
+ import { EuiSkeletonLoading } from './skeleton_loading';
16
+ import { euiSkeletonCircleStyles } from './skeleton_circle.styles';
17
+ import { jsx as ___EmotionJSX } from "@emotion/react";
18
+ export var SIZES = ['s', 'm', 'l', 'xl'];
19
+ export var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
20
+ var _ref$isLoading = _ref.isLoading,
21
+ isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
22
+ _ref$size = _ref.size,
23
+ size = _ref$size === void 0 ? 'm' : _ref$size,
24
+ className = _ref.className,
25
+ contentAriaLabel = _ref.contentAriaLabel,
26
+ ariaWrapperProps = _ref.ariaWrapperProps,
27
+ children = _ref.children,
28
+ rest = _objectWithoutProperties(_ref, _excluded);
29
+
30
+ var euiTheme = useEuiTheme();
31
+ var styles = euiSkeletonCircleStyles(euiTheme);
32
+ var cssStyles = [styles.euiSkeletonCircle, styles[size]];
33
+ return ___EmotionJSX(EuiSkeletonLoading, _extends({
34
+ isLoading: isLoading,
35
+ loadingContent: ___EmotionJSX("div", _extends({
36
+ className: classNames('euiSkeletonCircle', className),
37
+ css: cssStyles
38
+ }, rest)),
39
+ loadedContent: children || '',
40
+ contentAriaLabel: contentAriaLabel
41
+ }, ariaWrapperProps));
42
+ };
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ import { css } from '@emotion/react';
9
+ import { logicalSizeCSS, mathWithUnits } from '../../global_styling';
10
+ import { euiSkeletonGradientAnimation } from './utils';
11
+ export var euiSkeletonCircleStyles = function euiSkeletonCircleStyles(euiThemeContext) {
12
+ var euiTheme = euiThemeContext.euiTheme;
13
+ return {
14
+ euiSkeletonCircle: /*#__PURE__*/css("display:block;border-radius:50%;", euiSkeletonGradientAnimation(euiThemeContext, {
15
+ slideSize: '-70%',
16
+ gradientSize: '280%'
17
+ }), ";;label:euiSkeletonCircle;"),
18
+ // Sizes
19
+ s: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.l), ";;label:s;"),
20
+ m: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.xl), ";;label:m;"),
21
+ l: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.xxl), ";;label:l;"),
22
+ xl: /*#__PURE__*/css(logicalSizeCSS(mathWithUnits(euiTheme.size.base, function (x) {
23
+ return x * 4;
24
+ })), ";;label:xl;")
25
+ };
26
+ };
@@ -0,0 +1,38 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ import React from 'react';
13
+ import { EuiScreenReaderLive } from '../accessibility/screen_reader_live';
14
+ import { useEuiI18n } from '../i18n';
15
+ import { jsx as ___EmotionJSX } from "@emotion/react";
16
+ export var EuiSkeletonLoading = function EuiSkeletonLoading(_ref) {
17
+ var _ref$isLoading = _ref.isLoading,
18
+ isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
19
+ contentAriaLabel = _ref.contentAriaLabel,
20
+ loadingContent = _ref.loadingContent,
21
+ loadedContent = _ref.loadedContent,
22
+ rest = _objectWithoutProperties(_ref, _excluded);
23
+
24
+ var loadingAriaLabel = useEuiI18n('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
25
+ contentAriaLabel: contentAriaLabel
26
+ });
27
+ var loadedAriaLive = useEuiI18n('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
28
+ contentAriaLabel: contentAriaLabel
29
+ });
30
+ var loadingProps = {
31
+ 'aria-label': loadingAriaLabel,
32
+ role: 'progressbar'
33
+ };
34
+ return ___EmotionJSX("div", _extends({
35
+ "aria-busy": isLoading,
36
+ "data-test-subj": "euiSkeletonLoadingAriaWrapper"
37
+ }, rest), isLoading ? /*#__PURE__*/React.cloneElement(loadingContent, loadingProps) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiScreenReaderLive, null, loadedAriaLive), loadedContent));
38
+ };