@elastic/eui 64.0.0 → 65.0.1

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 (393) hide show
  1. package/dist/eui_charts_theme.js +330 -330
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +217 -1614
  4. package/dist/eui_theme_dark.json +0 -32
  5. package/dist/eui_theme_dark.json.d.ts +0 -32
  6. package/dist/eui_theme_dark.min.css +1 -1
  7. package/dist/eui_theme_light.css +244 -1641
  8. package/dist/eui_theme_light.json +0 -32
  9. package/dist/eui_theme_light.json.d.ts +0 -32
  10. package/dist/eui_theme_light.min.css +1 -1
  11. package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
  12. package/es/components/accessibility/skip_link/skip_link.js +4 -54
  13. package/es/components/accordion/accordion.js +2 -1
  14. package/es/components/accordion/accordion.styles.js +17 -27
  15. package/es/components/badge/beta_badge/beta_badge.js +16 -3
  16. package/es/components/basic_table/basic_table.js +1 -1
  17. package/es/components/basic_table/collapsed_item_actions.js +2 -3
  18. package/es/components/basic_table/in_memory_table.js +1 -1
  19. package/es/components/beacon/beacon.styles.js +2 -2
  20. package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  21. package/es/components/button/button.js +112 -215
  22. package/es/components/button/button_display/_button_display.js +90 -40
  23. package/es/components/button/button_display/_button_display.styles.js +7 -16
  24. package/es/components/button/button_display/_button_display_content.js +6 -3
  25. package/es/components/button/button_display/_button_display_content.styles.js +7 -17
  26. package/es/components/button/button_empty/button_empty.js +63 -53
  27. package/es/components/button/button_empty/index.js +1 -1
  28. package/es/components/button/button_group/button_group.js +4 -12
  29. package/es/components/button/button_group/button_group_button.js +14 -4
  30. package/es/components/button/button_icon/button_icon.js +61 -42
  31. package/es/components/call_out/call_out.styles.js +2 -1
  32. package/es/components/card/card.js +173 -89
  33. package/es/components/card/card.styles.js +136 -0
  34. package/es/components/card/card_select/card_select.js +133 -0
  35. package/es/components/card/card_select/card_select.styles.js +25 -0
  36. package/es/components/card/card_select/index.js +8 -0
  37. package/es/components/card/checkable_card/checkable_card.js +14 -9
  38. package/es/components/card/checkable_card/checkable_card.styles.js +22 -0
  39. package/es/components/comment_list/comment_event.styles.js +1 -1
  40. package/es/components/datagrid/body/data_grid_body.js +7 -6
  41. package/es/components/datagrid/body/data_grid_cell.js +13 -12
  42. package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  43. package/es/components/datagrid/body/header/data_grid_header_row.js +7 -6
  44. package/es/components/datagrid/data_grid.js +7 -6
  45. package/es/components/datagrid/utils/in_memory.js +7 -6
  46. package/es/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  47. package/es/components/date_picker/super_date_picker/super_date_picker.js +17 -1
  48. package/es/components/date_picker/super_date_picker/super_update_button.js +11 -1
  49. package/es/components/description_list/description_list_title.js +1 -1
  50. package/es/components/expression/expression.styles.js +13 -31
  51. package/es/components/facet/facet_button.js +5 -4
  52. package/es/components/header/header_links/header_link.js +5 -3
  53. package/es/components/image/image_button.styles.js +1 -1
  54. package/es/components/image/image_wrapper.styles.js +3 -3
  55. package/es/components/link/link.styles.js +7 -6
  56. package/es/components/list_group/list_group.js +2 -1
  57. package/es/components/list_group/list_group_item.js +2 -1
  58. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  59. package/es/components/loading/loading_chart.styles.js +16 -26
  60. package/es/components/loading/loading_content.styles.js +2 -2
  61. package/es/components/loading/loading_logo.styles.js +4 -4
  62. package/es/components/loading/loading_spinner.styles.js +6 -6
  63. package/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  64. package/es/components/modal/confirm_modal.js +1 -1
  65. package/es/components/notification/notification_event.js +5 -3
  66. package/es/components/notification/notification_event_read_button.js +2 -1
  67. package/es/components/page/page_template.js +2 -2
  68. package/es/components/page_template/inner/page_inner.styles.js +2 -2
  69. package/es/components/page_template/outer/page_outer.styles.js +3 -1
  70. package/es/components/pagination/pagination_button.js +5 -3
  71. package/es/components/panel/panel.js +1 -1
  72. package/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
  73. package/es/components/progress/progress.styles.js +2 -2
  74. package/es/components/text/text.styles.js +1 -1
  75. package/es/components/title/title.styles.js +2 -2
  76. package/es/components/toast/global_toast_list.styles.js +2 -2
  77. package/es/components/toast/toast.styles.js +4 -4
  78. package/es/components/tool_tip/icon_tip.js +11 -1
  79. package/es/components/tool_tip/tool_tip.js +18 -6
  80. package/es/global_styling/functions/logicals.js +16 -72
  81. package/es/global_styling/functions/typography.js +2 -1
  82. package/es/global_styling/mixins/_color.js +1 -1
  83. package/es/global_styling/mixins/_helpers.js +18 -5
  84. package/es/global_styling/mixins/_states.js +3 -4
  85. package/es/global_styling/mixins/_typography.js +3 -1
  86. package/es/global_styling/reset/global_styles.js +2 -1
  87. package/es/global_styling/utility/utility.js +10 -2
  88. package/es/themes/amsterdam/global_styling/mixins/button.js +165 -16
  89. package/eui.d.ts +1156 -1013
  90. package/i18ntokens.json +19 -19
  91. package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  92. package/lib/components/accessibility/skip_link/skip_link.js +4 -54
  93. package/lib/components/accordion/accordion.js +3 -1
  94. package/lib/components/accordion/accordion.styles.js +17 -26
  95. package/lib/components/badge/beta_badge/beta_badge.js +16 -3
  96. package/lib/components/basic_table/basic_table.js +1 -1
  97. package/lib/components/basic_table/collapsed_item_actions.js +2 -3
  98. package/lib/components/basic_table/in_memory_table.js +1 -1
  99. package/lib/components/beacon/beacon.styles.js +1 -1
  100. package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  101. package/lib/components/button/button.js +124 -229
  102. package/lib/components/button/button_display/_button_display.js +94 -33
  103. package/lib/components/button/button_display/_button_display.styles.js +7 -16
  104. package/lib/components/button/button_display/_button_display_content.js +7 -3
  105. package/lib/components/button/button_display/_button_display_content.styles.js +7 -17
  106. package/lib/components/button/button_empty/button_empty.js +64 -54
  107. package/lib/components/button/button_empty/index.js +0 -6
  108. package/lib/components/button/button_group/button_group.js +4 -12
  109. package/lib/components/button/button_group/button_group_button.js +15 -4
  110. package/lib/components/button/button_icon/button_icon.js +61 -43
  111. package/lib/components/call_out/call_out.styles.js +2 -1
  112. package/lib/components/card/card.js +174 -88
  113. package/lib/components/card/card.styles.js +146 -0
  114. package/lib/components/card/card_select/card_select.js +144 -0
  115. package/lib/components/card/card_select/card_select.styles.js +27 -0
  116. package/lib/components/card/card_select/index.js +19 -0
  117. package/lib/components/card/checkable_card/checkable_card.js +16 -9
  118. package/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
  119. package/lib/components/comment_list/comment_event.styles.js +1 -1
  120. package/lib/components/datagrid/body/data_grid_body.js +7 -6
  121. package/lib/components/datagrid/body/data_grid_cell.js +13 -12
  122. package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  123. package/lib/components/datagrid/body/header/data_grid_header_row.js +7 -6
  124. package/lib/components/datagrid/data_grid.js +7 -6
  125. package/lib/components/datagrid/utils/in_memory.js +7 -6
  126. package/lib/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  127. package/lib/components/date_picker/super_date_picker/super_date_picker.js +17 -1
  128. package/lib/components/date_picker/super_date_picker/super_update_button.js +11 -1
  129. package/lib/components/description_list/description_list_title.js +1 -1
  130. package/lib/components/expression/expression.styles.js +12 -30
  131. package/lib/components/facet/facet_button.js +4 -3
  132. package/lib/components/header/header_links/header_link.js +5 -3
  133. package/lib/components/image/image_button.styles.js +1 -1
  134. package/lib/components/image/image_wrapper.styles.js +2 -2
  135. package/lib/components/link/link.styles.js +6 -5
  136. package/lib/components/list_group/list_group.js +2 -1
  137. package/lib/components/list_group/list_group_item.js +2 -1
  138. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  139. package/lib/components/loading/loading_chart.styles.js +16 -25
  140. package/lib/components/loading/loading_content.styles.js +1 -1
  141. package/lib/components/loading/loading_logo.styles.js +4 -4
  142. package/lib/components/loading/loading_spinner.styles.js +5 -5
  143. package/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  144. package/lib/components/modal/confirm_modal.js +1 -1
  145. package/lib/components/notification/notification_event.js +5 -3
  146. package/lib/components/notification/notification_event_read_button.js +2 -1
  147. package/lib/components/page/page_template.js +1 -1
  148. package/lib/components/page_template/inner/page_inner.styles.js +2 -2
  149. package/lib/components/page_template/outer/page_outer.styles.js +4 -1
  150. package/lib/components/panel/panel.js +1 -1
  151. package/{optimize/lib/components/panel/panel.style.js → lib/components/panel/panel.styles.js} +1 -1
  152. package/lib/components/progress/progress.styles.js +2 -2
  153. package/lib/components/text/text.styles.js +1 -1
  154. package/lib/components/title/title.styles.js +1 -1
  155. package/lib/components/toast/global_toast_list.styles.js +1 -1
  156. package/lib/components/toast/toast.styles.js +4 -4
  157. package/lib/components/tool_tip/icon_tip.js +11 -1
  158. package/lib/components/tool_tip/tool_tip.js +18 -6
  159. package/lib/global_styling/functions/logicals.js +22 -74
  160. package/lib/global_styling/functions/typography.js +3 -1
  161. package/lib/global_styling/mixins/_color.js +1 -1
  162. package/lib/global_styling/mixins/_helpers.js +24 -6
  163. package/lib/global_styling/mixins/_states.js +3 -4
  164. package/lib/global_styling/mixins/_typography.js +4 -1
  165. package/lib/global_styling/reset/global_styles.js +3 -1
  166. package/lib/global_styling/utility/utility.js +16 -3
  167. package/lib/themes/amsterdam/global_styling/mixins/button.js +178 -24
  168. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
  169. package/optimize/es/components/accordion/accordion.js +2 -1
  170. package/optimize/es/components/accordion/accordion.styles.js +17 -27
  171. package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -3
  172. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
  173. package/optimize/es/components/beacon/beacon.styles.js +2 -2
  174. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
  175. package/optimize/es/components/button/button.js +88 -100
  176. package/optimize/es/components/button/button_display/_button_display.js +67 -32
  177. package/optimize/es/components/button/button_display/_button_display.styles.js +7 -16
  178. package/optimize/es/components/button/button_display/_button_display_content.js +5 -2
  179. package/optimize/es/components/button/button_display/_button_display_content.styles.js +7 -17
  180. package/optimize/es/components/button/button_empty/button_empty.js +55 -47
  181. package/optimize/es/components/button/button_empty/index.js +1 -1
  182. package/optimize/es/components/button/button_group/button_group.js +2 -10
  183. package/optimize/es/components/button/button_group/button_group_button.js +13 -3
  184. package/optimize/es/components/button/button_icon/button_icon.js +54 -41
  185. package/optimize/es/components/call_out/call_out.styles.js +2 -1
  186. package/optimize/es/components/card/card.js +97 -31
  187. package/optimize/es/components/card/card.styles.js +136 -0
  188. package/optimize/es/components/card/{card_select.js → card_select/card_select.js} +16 -14
  189. package/optimize/es/components/card/card_select/card_select.styles.js +25 -0
  190. package/optimize/es/components/card/card_select/index.js +8 -0
  191. package/optimize/es/components/card/checkable_card/checkable_card.js +14 -9
  192. package/optimize/es/components/card/checkable_card/checkable_card.styles.js +22 -0
  193. package/optimize/es/components/comment_list/comment_event.styles.js +1 -1
  194. package/optimize/es/components/description_list/description_list_title.js +1 -1
  195. package/optimize/es/components/expression/expression.styles.js +13 -31
  196. package/optimize/es/components/facet/facet_button.js +5 -3
  197. package/optimize/es/components/image/image_button.styles.js +1 -1
  198. package/optimize/es/components/image/image_wrapper.styles.js +3 -3
  199. package/optimize/es/components/link/link.styles.js +7 -6
  200. package/optimize/es/components/loading/loading_chart.styles.js +16 -26
  201. package/optimize/es/components/loading/loading_content.styles.js +2 -2
  202. package/optimize/es/components/loading/loading_logo.styles.js +4 -4
  203. package/optimize/es/components/loading/loading_spinner.styles.js +6 -6
  204. package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  205. package/optimize/es/components/page/page_template.js +2 -2
  206. package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
  207. package/optimize/es/components/page_template/outer/page_outer.styles.js +3 -1
  208. package/optimize/es/components/panel/panel.js +1 -1
  209. package/optimize/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
  210. package/optimize/es/components/progress/progress.styles.js +2 -2
  211. package/optimize/es/components/text/text.styles.js +1 -1
  212. package/optimize/es/components/title/title.styles.js +2 -2
  213. package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
  214. package/optimize/es/components/toast/toast.styles.js +4 -4
  215. package/optimize/es/components/tool_tip/tool_tip.js +7 -5
  216. package/optimize/es/global_styling/functions/logicals.js +16 -72
  217. package/optimize/es/global_styling/functions/typography.js +2 -1
  218. package/optimize/es/global_styling/mixins/_color.js +1 -1
  219. package/optimize/es/global_styling/mixins/_helpers.js +18 -5
  220. package/optimize/es/global_styling/mixins/_states.js +3 -4
  221. package/optimize/es/global_styling/mixins/_typography.js +3 -1
  222. package/optimize/es/global_styling/reset/global_styles.js +2 -1
  223. package/optimize/es/global_styling/utility/utility.js +10 -2
  224. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +155 -16
  225. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  226. package/optimize/lib/components/accordion/accordion.js +3 -1
  227. package/optimize/lib/components/accordion/accordion.styles.js +17 -26
  228. package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -3
  229. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
  230. package/optimize/lib/components/beacon/beacon.styles.js +1 -1
  231. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
  232. package/optimize/lib/components/button/button.js +92 -103
  233. package/optimize/lib/components/button/button_display/_button_display.js +71 -25
  234. package/optimize/lib/components/button/button_display/_button_display.styles.js +7 -16
  235. package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
  236. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +7 -17
  237. package/optimize/lib/components/button/button_empty/button_empty.js +59 -50
  238. package/optimize/lib/components/button/button_empty/index.js +0 -6
  239. package/optimize/lib/components/button/button_group/button_group.js +2 -10
  240. package/optimize/lib/components/button/button_group/button_group_button.js +15 -3
  241. package/optimize/lib/components/button/button_icon/button_icon.js +54 -41
  242. package/optimize/lib/components/call_out/call_out.styles.js +2 -1
  243. package/optimize/lib/components/card/card.js +97 -30
  244. package/optimize/lib/components/card/card.styles.js +146 -0
  245. package/optimize/lib/components/card/{card_select.js → card_select/card_select.js} +16 -14
  246. package/optimize/lib/components/card/card_select/card_select.styles.js +27 -0
  247. package/optimize/lib/components/card/card_select/index.js +19 -0
  248. package/optimize/lib/components/card/checkable_card/checkable_card.js +16 -9
  249. package/optimize/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
  250. package/optimize/lib/components/comment_list/comment_event.styles.js +1 -1
  251. package/optimize/lib/components/description_list/description_list_title.js +1 -1
  252. package/optimize/lib/components/expression/expression.styles.js +12 -30
  253. package/optimize/lib/components/facet/facet_button.js +4 -2
  254. package/optimize/lib/components/image/image_button.styles.js +1 -1
  255. package/optimize/lib/components/image/image_wrapper.styles.js +2 -2
  256. package/optimize/lib/components/link/link.styles.js +6 -5
  257. package/optimize/lib/components/loading/loading_chart.styles.js +16 -25
  258. package/optimize/lib/components/loading/loading_content.styles.js +1 -1
  259. package/optimize/lib/components/loading/loading_logo.styles.js +4 -4
  260. package/optimize/lib/components/loading/loading_spinner.styles.js +5 -5
  261. package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  262. package/optimize/lib/components/page/page_template.js +1 -1
  263. package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
  264. package/optimize/lib/components/page_template/outer/page_outer.styles.js +4 -1
  265. package/optimize/lib/components/panel/panel.js +1 -1
  266. package/{test-env/components/panel/panel.style.js → optimize/lib/components/panel/panel.styles.js} +1 -1
  267. package/optimize/lib/components/progress/progress.styles.js +2 -2
  268. package/optimize/lib/components/text/text.styles.js +1 -1
  269. package/optimize/lib/components/title/title.styles.js +1 -1
  270. package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
  271. package/optimize/lib/components/toast/toast.styles.js +4 -4
  272. package/optimize/lib/components/tool_tip/tool_tip.js +7 -5
  273. package/optimize/lib/global_styling/functions/logicals.js +28 -74
  274. package/optimize/lib/global_styling/functions/typography.js +3 -1
  275. package/optimize/lib/global_styling/mixins/_color.js +1 -1
  276. package/optimize/lib/global_styling/mixins/_helpers.js +24 -6
  277. package/optimize/lib/global_styling/mixins/_states.js +3 -4
  278. package/optimize/lib/global_styling/mixins/_typography.js +4 -1
  279. package/optimize/lib/global_styling/reset/global_styles.js +3 -1
  280. package/optimize/lib/global_styling/utility/utility.js +16 -3
  281. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +170 -17
  282. package/package.json +2 -2
  283. package/src/components/badge/beta_badge/_beta_badge.scss +5 -1
  284. package/src/components/button/_index.scss +0 -1
  285. package/src/components/button/button_empty/_button_empty.scss +4 -48
  286. package/src/components/button/button_group/_button_group.scss +0 -1
  287. package/src/components/button/button_group/_button_group_button.scss +55 -83
  288. package/src/components/button/button_icon/_button_icon.scss +3 -103
  289. package/src/components/control_bar/_control_bar.scss +2 -6
  290. package/src/components/flyout/_flyout.scss +4 -1
  291. package/src/components/index.scss +0 -1
  292. package/src/global_styling/mixins/_button.scss +55 -11
  293. package/src/global_styling/mixins/_helpers.scss +9 -0
  294. package/src/global_styling/mixins/_index.scss +0 -1
  295. package/src/global_styling/utility/_utility.scss +0 -127
  296. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -2
  297. package/src/themes/amsterdam/overrides/_header.scss +0 -2
  298. package/src/themes/amsterdam/overrides/_index.scss +0 -4
  299. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  300. package/test-env/components/accessibility/skip_link/skip_link.js +4 -54
  301. package/test-env/components/accordion/accordion.js +3 -1
  302. package/test-env/components/accordion/accordion.styles.js +17 -26
  303. package/test-env/components/badge/beta_badge/beta_badge.js +16 -3
  304. package/test-env/components/basic_table/basic_table.js +1 -1
  305. package/test-env/components/basic_table/collapsed_item_actions.js +2 -3
  306. package/test-env/components/basic_table/in_memory_table.js +1 -1
  307. package/test-env/components/beacon/beacon.styles.js +1 -1
  308. package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
  309. package/test-env/components/button/button.js +111 -225
  310. package/test-env/components/button/button_display/_button_display.js +93 -32
  311. package/test-env/components/button/button_display/_button_display.styles.js +7 -16
  312. package/test-env/components/button/button_display/_button_display_content.js +7 -3
  313. package/test-env/components/button/button_display/_button_display_content.styles.js +7 -17
  314. package/test-env/components/button/button_empty/button_empty.js +64 -53
  315. package/test-env/components/button/button_empty/index.js +0 -6
  316. package/test-env/components/button/button_group/button_group.js +4 -12
  317. package/test-env/components/button/button_group/button_group_button.js +16 -4
  318. package/test-env/components/button/button_icon/button_icon.js +61 -42
  319. package/test-env/components/call_out/call_out.styles.js +2 -1
  320. package/test-env/components/card/card.js +172 -88
  321. package/test-env/components/card/card.styles.js +146 -0
  322. package/test-env/components/card/card_select/card_select.js +141 -0
  323. package/test-env/components/card/card_select/card_select.styles.js +27 -0
  324. package/test-env/components/card/card_select/index.js +19 -0
  325. package/test-env/components/card/checkable_card/checkable_card.js +16 -9
  326. package/test-env/components/card/checkable_card/checkable_card.styles.js +33 -0
  327. package/test-env/components/comment_list/comment_event.styles.js +1 -1
  328. package/test-env/components/datagrid/body/data_grid_body.js +7 -6
  329. package/test-env/components/datagrid/body/data_grid_cell.js +13 -12
  330. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  331. package/test-env/components/datagrid/body/header/data_grid_header_row.js +7 -6
  332. package/test-env/components/datagrid/data_grid.js +7 -6
  333. package/test-env/components/datagrid/utils/in_memory.js +7 -6
  334. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  335. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +17 -1
  336. package/test-env/components/date_picker/super_date_picker/super_update_button.js +11 -1
  337. package/test-env/components/description_list/description_list_title.js +1 -1
  338. package/test-env/components/expression/expression.styles.js +12 -30
  339. package/test-env/components/facet/facet_button.js +4 -3
  340. package/test-env/components/header/header_links/header_link.js +5 -3
  341. package/test-env/components/image/image_button.styles.js +1 -1
  342. package/test-env/components/image/image_wrapper.styles.js +2 -2
  343. package/test-env/components/link/link.styles.js +6 -5
  344. package/test-env/components/list_group/list_group.js +2 -1
  345. package/test-env/components/list_group/list_group_item.js +2 -1
  346. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  347. package/test-env/components/loading/loading_chart.styles.js +16 -25
  348. package/test-env/components/loading/loading_content.styles.js +1 -1
  349. package/test-env/components/loading/loading_logo.styles.js +4 -4
  350. package/test-env/components/loading/loading_spinner.styles.js +5 -5
  351. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  352. package/test-env/components/modal/confirm_modal.js +1 -1
  353. package/test-env/components/notification/notification_event.js +5 -3
  354. package/test-env/components/notification/notification_event_read_button.js +2 -1
  355. package/test-env/components/page/page_template.js +1 -1
  356. package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
  357. package/test-env/components/page_template/outer/page_outer.styles.js +4 -1
  358. package/test-env/components/panel/panel.js +1 -1
  359. package/{lib/components/panel/panel.style.js → test-env/components/panel/panel.styles.js} +1 -1
  360. package/test-env/components/progress/progress.styles.js +2 -2
  361. package/test-env/components/text/text.styles.js +1 -1
  362. package/test-env/components/title/title.styles.js +1 -1
  363. package/test-env/components/toast/global_toast_list.styles.js +1 -1
  364. package/test-env/components/toast/toast.styles.js +4 -4
  365. package/test-env/components/tool_tip/icon_tip.js +11 -1
  366. package/test-env/components/tool_tip/tool_tip.js +18 -6
  367. package/test-env/global_styling/functions/logicals.js +28 -74
  368. package/test-env/global_styling/functions/typography.js +3 -1
  369. package/test-env/global_styling/mixins/_color.js +1 -1
  370. package/test-env/global_styling/mixins/_helpers.js +24 -6
  371. package/test-env/global_styling/mixins/_states.js +3 -4
  372. package/test-env/global_styling/mixins/_typography.js +4 -1
  373. package/test-env/global_styling/reset/global_styles.js +3 -1
  374. package/test-env/global_styling/utility/utility.js +16 -3
  375. package/test-env/themes/amsterdam/global_styling/mixins/button.js +170 -17
  376. package/es/components/card/card_select.js +0 -176
  377. package/lib/components/card/card_select.js +0 -187
  378. package/src/components/button/_button.scss +0 -143
  379. package/src/components/button/button_icon/_variables.scss +0 -11
  380. package/src/components/card/_card.scss +0 -239
  381. package/src/components/card/_card_select.scss +0 -21
  382. package/src/components/card/_index.scss +0 -5
  383. package/src/components/card/_mixins.scss +0 -11
  384. package/src/components/card/_variables.scss +0 -25
  385. package/src/components/card/checkable_card/_checkable_card.scss +0 -29
  386. package/src/components/card/checkable_card/_index.scss +0 -1
  387. package/src/global_styling/mixins/_beta_badge.scss +0 -30
  388. package/src/themes/amsterdam/global_styling/mixins/_button.scss +0 -60
  389. package/src/themes/amsterdam/overrides/_button.scss +0 -119
  390. package/src/themes/amsterdam/overrides/_button_empty.scss +0 -20
  391. package/src/themes/amsterdam/overrides/_button_group.scss +0 -91
  392. package/src/themes/amsterdam/overrides/_card.scss +0 -6
  393. package/test-env/components/card/card_select.js +0 -184
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.useEuiButtonColorCSS = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
8
+ exports.useEuiButtonRadiusCSS = exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_COLORS = void 0;
9
+
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
7
11
 
8
12
  var _react = require("@emotion/react");
9
13
 
14
+ var _global_styling = require("../../../../global_styling");
15
+
10
16
  var _services = require("../../../../services");
11
17
 
12
18
  /*
@@ -16,42 +22,189 @@ var _services = require("../../../../services");
16
22
  * in compliance with, at your election, the Elastic License 2.0 or the Server
17
23
  * Side Public License, v 1.
18
24
  */
19
- var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger', 'disabled'];
25
+ var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'];
20
26
  exports.BUTTON_COLORS = BUTTON_COLORS;
21
27
 
22
- var euiButtonColor = function euiButtonColor(color, _ref) {
23
- var euiTheme = _ref.euiTheme,
24
- colorMode = _ref.colorMode;
28
+ /**
29
+ * Creates the `base` version of button styles with proper text contrast.
30
+ * @param euiThemeContext
31
+ * @param color One of the named button colors or 'disabled'
32
+ * @returns Style object `{ backgroundColor, color }`
33
+ */
34
+ var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
35
+ var euiTheme = euiThemeContext.euiTheme,
36
+ colorMode = euiThemeContext.colorMode;
25
37
 
26
38
  function tintOrShade(color) {
27
39
  return colorMode === 'DARK' ? (0, _services.shade)(color, 0.7) : (0, _services.tint)(color, 0.8);
28
40
  }
29
41
 
42
+ var foreground;
43
+ var background;
44
+
30
45
  switch (color) {
31
46
  case 'disabled':
32
- return (0, _services.transparentize)(euiTheme.colors.lightShade, 0.15);
47
+ return {
48
+ color: euiTheme.colors.disabledText,
49
+ backgroundColor: (0, _services.transparentize)(euiTheme.colors.lightShade, 0.15)
50
+ };
33
51
 
34
52
  case 'text':
35
- return colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightShade, 0.2) : (0, _services.tint)(euiTheme.colors.lightShade, 0.5);
53
+ foreground = euiTheme.colors[color];
54
+ background = colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightShade, 0.2) : (0, _services.tint)(euiTheme.colors.lightShade, 0.5);
55
+ break;
36
56
 
37
57
  default:
38
- return tintOrShade(euiTheme.colors[color]);
58
+ foreground = euiTheme.colors["".concat(color, "Text")];
59
+ background = tintOrShade(euiTheme.colors[color]);
60
+ break;
39
61
  }
62
+
63
+ return {
64
+ color: (0, _services.makeHighContrastColor)(foreground)(background),
65
+ backgroundColor: background
66
+ };
40
67
  };
68
+ /**
69
+ * Creates the `fill` version of buttons styles with proper text contrast.
70
+ * @param euiThemeContext
71
+ * @param color One of the named button colors or 'disabled'
72
+ * @returns Style object `{ backgroundColor, color }`
73
+ */
74
+
41
75
 
42
76
  exports.euiButtonColor = euiButtonColor;
43
77
 
78
+ var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
79
+ var euiTheme = euiThemeContext.euiTheme,
80
+ colorMode = euiThemeContext.colorMode;
81
+ var background;
82
+ var foreground;
83
+
84
+ switch (color) {
85
+ case 'disabled':
86
+ background = euiButtonColor(euiThemeContext, color).backgroundColor;
87
+ foreground = euiButtonColor(euiThemeContext, color).color;
88
+ break;
89
+
90
+ case 'text':
91
+ background = colorMode === 'DARK' ? euiTheme.colors.text : euiTheme.colors.darkShade;
92
+ foreground = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _services.hexToRgb)(background))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
93
+ break;
94
+
95
+ default:
96
+ background = euiTheme.colors[color];
97
+ foreground = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _services.hexToRgb)(euiTheme.colors[color]))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
98
+ break;
99
+ }
100
+
101
+ return {
102
+ color: foreground,
103
+ backgroundColor: background
104
+ };
105
+ };
106
+ /**
107
+ * Creates the `empty` version of button styles using the text-variant and adding interactive styles.
108
+ * @param euiThemeContext
109
+ * @param color One of the named button colors or 'disabled'
110
+ * @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
111
+ */
112
+
113
+
114
+ exports.euiButtonFillColor = euiButtonFillColor;
115
+
116
+ var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
117
+ var foreground;
118
+ var background;
119
+
120
+ switch (color) {
121
+ case 'disabled':
122
+ foreground = euiButtonColor(euiThemeContext, color).color;
123
+ background = 'transparent';
124
+ break;
125
+
126
+ case 'text':
127
+ foreground = euiButtonColor(euiThemeContext, color).color;
128
+ background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued', {
129
+ method: 'transparent'
130
+ });
131
+ break;
132
+
133
+ default:
134
+ foreground = euiButtonColor(euiThemeContext, color).color;
135
+ background = (0, _global_styling.euiBackgroundColor)(euiThemeContext, color, {
136
+ method: 'transparent'
137
+ });
138
+ break;
139
+ }
140
+
141
+ return {
142
+ color: foreground,
143
+ backgroundColor: background
144
+ };
145
+ };
146
+ /**
147
+ * Given the button display type, returns the Emotion based color keys.
148
+ * @param options Button display type
149
+ * @returns An object of `_EuiButtonColor` keys including `disabled`
150
+ */
151
+
152
+
153
+ exports.euiButtonEmptyColor = euiButtonEmptyColor;
154
+
44
155
  var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
45
- var euiTheme = (0, _services.useEuiTheme)();
156
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
157
+ var euiThemeContext = (0, _services.useEuiTheme)();
158
+
159
+ function stylesByDisplay(color) {
160
+ return {
161
+ base: /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), ";;label:base;"),
162
+ fill: /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:fill;"),
163
+ empty: /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:empty;")
164
+ };
165
+ }
166
+
46
167
  return {
47
- text: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('text', euiTheme), ";;label:text;"),
48
- accent: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('accent', euiTheme), ";;label:accent;"),
49
- primary: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('primary', euiTheme), ";;label:primary;"),
50
- success: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('success', euiTheme), ";;label:success;"),
51
- warning: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('warning', euiTheme), ";;label:warning;"),
52
- danger: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('danger', euiTheme), ";;label:danger;"),
53
- disabled: /*#__PURE__*/(0, _react.css)("background-color:", euiButtonColor('disabled', euiTheme), ";;label:disabled;")
168
+ text: /*#__PURE__*/(0, _react.css)(stylesByDisplay('text')[options.display || 'base'], ";label:text;"),
169
+ accent: /*#__PURE__*/(0, _react.css)(stylesByDisplay('accent')[options.display || 'base'], ";label:accent;"),
170
+ primary: /*#__PURE__*/(0, _react.css)(stylesByDisplay('primary')[options.display || 'base'], ";label:primary;"),
171
+ success: /*#__PURE__*/(0, _react.css)(stylesByDisplay('success')[options.display || 'base'], ";label:success;"),
172
+ warning: /*#__PURE__*/(0, _react.css)(stylesByDisplay('warning')[options.display || 'base'], ";label:warning;"),
173
+ danger: /*#__PURE__*/(0, _react.css)(stylesByDisplay('danger')[options.display || 'base'], ";label:danger;"),
174
+ disabled: /*#__PURE__*/(0, _react.css)(stylesByDisplay('disabled')[options.display || 'base'], ";label:disabled;")
54
175
  };
55
176
  };
177
+ /**
178
+ * Based on the button size, creates the style properties.
179
+ * @returns An object of button size keys with Emption styles for `border-radius`
180
+ */
181
+
182
+
183
+ exports.useEuiButtonColorCSS = useEuiButtonColorCSS;
184
+
185
+ var useEuiButtonRadiusCSS = function useEuiButtonRadiusCSS() {
186
+ var _useEuiTheme = (0, _services.useEuiTheme)(),
187
+ euiTheme = _useEuiTheme.euiTheme;
188
+
189
+ return {
190
+ xs: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
191
+ s: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
192
+ m: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";;label:m;")
193
+ };
194
+ };
195
+ /**
196
+ * Creates the translate animation when button is in focus.
197
+ * @returns string
198
+ */
199
+
200
+
201
+ exports.useEuiButtonRadiusCSS = useEuiButtonRadiusCSS;
202
+
203
+ var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
204
+ var _useEuiTheme2 = (0, _services.useEuiTheme)(),
205
+ euiTheme = _useEuiTheme2.euiTheme;
206
+
207
+ return "\n ".concat(_global_styling.euiCanAnimate, " {\n transition: transform ").concat(euiTheme.animation.normal, " ease-in-out,\n background-color ").concat(euiTheme.animation.normal, " ease-in-out;\n\n &:hover:not(:disabled) {\n transform: translateY(-1px);\n }\n\n &:focus {\n animation: euiButtonActive ").concat(euiTheme.animation.normal, "\n ").concat(euiTheme.animation.bounce, ";\n }\n\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n }\n ");
208
+ };
56
209
 
57
- exports.useEuiButtonColorCSS = useEuiButtonColorCSS;
210
+ exports.useEuiButtonFocusCSS = useEuiButtonFocusCSS;
@@ -1,176 +0,0 @@
1
- var _excluded = ["className", "isSelected", "isDisabled", "color", "children"];
2
-
3
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
- /*
10
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
- * or more contributor license agreements. Licensed under the Elastic License
12
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
- * in compliance with, at your election, the Elastic License 2.0 or the Server
14
- * Side Public License, v 1.
15
- */
16
- import React from 'react';
17
- import PropTypes from "prop-types";
18
- import classNames from 'classnames';
19
- import { EuiButtonEmpty } from '../button/button_empty';
20
- import { EuiI18n } from '../i18n';
21
- import { jsx as ___EmotionJSX } from "@emotion/react";
22
- export var EuiCardSelect = function EuiCardSelect(_ref) {
23
- var className = _ref.className,
24
- _ref$isSelected = _ref.isSelected,
25
- isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
26
- isDisabled = _ref.isDisabled,
27
- color = _ref.color,
28
- children = _ref.children,
29
- rest = _objectWithoutProperties(_ref, _excluded);
30
-
31
- var child = euiCardSelectableText(isSelected, isDisabled, children);
32
- var selectClasses = classNames('euiCardSelect', "euiCardSelect--".concat(euiCardSelectableColor(color, isSelected)), className);
33
- return ___EmotionJSX(EuiButtonEmpty, _extends({
34
- className: selectClasses,
35
- color: color || 'text',
36
- size: "xs",
37
- isDisabled: isDisabled,
38
- iconType: isSelected ? 'check' : undefined,
39
- role: "switch",
40
- "aria-checked": isSelected
41
- }, rest), child);
42
- };
43
- EuiCardSelect.propTypes = {
44
- href: PropTypes.string,
45
- onClick: PropTypes.func,
46
-
47
- /**
48
- * Any of our named colors
49
- */
50
-
51
- /**
52
- * Any of our named colors
53
- */
54
- color: PropTypes.oneOf(["primary", "danger", "text", "ghost", "success", "warning"]),
55
- size: PropTypes.oneOf(["xs", "s", "m"]),
56
-
57
- /**
58
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
59
- */
60
-
61
- /**
62
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
63
- */
64
- flush: PropTypes.oneOf(["left", "right", "both"]),
65
-
66
- /**
67
- * `disabled` is also allowed
68
- */
69
-
70
- /**
71
- * `disabled` is also allowed
72
- */
73
- isDisabled: PropTypes.bool,
74
-
75
- /**
76
- * Force disables the button and changes the icon to a loading spinner
77
- */
78
-
79
- /**
80
- * Force disables the button and changes the icon to a loading spinner
81
- */
82
- isLoading: PropTypes.bool,
83
-
84
- /**
85
- * Is in the selected state
86
- */
87
-
88
- /**
89
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
90
- * *Only use when the readable text does not change between states.*
91
- */
92
-
93
- /**
94
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
95
- * *Only use when the readable text does not change between states.*
96
- */
97
- isSelected: PropTypes.bool,
98
- target: PropTypes.string,
99
- rel: PropTypes.string,
100
- type: PropTypes.oneOf(["button", "submit"]),
101
- buttonRef: PropTypes.any,
102
-
103
- /**
104
- * Object of props passed to the <span/> wrapping the button's content
105
- */
106
- contentProps: PropTypes.any,
107
-
108
- /**
109
- * Any `type` accepted by EuiIcon
110
- */
111
- iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
112
-
113
- /**
114
- * Can only be one side `left` or `right`
115
- */
116
- iconSide: PropTypes.oneOf(["left", "right"]),
117
-
118
- /**
119
- * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
120
- * It doesn't apply to the icon.
121
- */
122
- textProps: PropTypes.shape({
123
- className: PropTypes.string,
124
- "aria-label": PropTypes.string,
125
- "data-test-subj": PropTypes.string,
126
- css: PropTypes.any,
127
- ref: PropTypes.any,
128
- "data-text": PropTypes.string
129
- }),
130
- iconSize: PropTypes.oneOf(["s", "m"]),
131
- className: PropTypes.string,
132
- "aria-label": PropTypes.string,
133
- "data-test-subj": PropTypes.string,
134
- css: PropTypes.any
135
- };
136
-
137
- function euiCardSelectableText(isSelected, isDisabled, children) {
138
- if (children) {
139
- return children;
140
- }
141
-
142
- var text;
143
-
144
- if (isSelected) {
145
- text = ___EmotionJSX(EuiI18n, {
146
- token: "euiCardSelect.selected",
147
- default: "Selected"
148
- });
149
- } else if (isDisabled) {
150
- text = ___EmotionJSX(EuiI18n, {
151
- token: "euiCardSelect.unavailable",
152
- default: "Unavailable"
153
- });
154
- } else {
155
- text = ___EmotionJSX(EuiI18n, {
156
- token: "euiCardSelect.select",
157
- default: "Select"
158
- });
159
- }
160
-
161
- return text;
162
- }
163
-
164
- export function euiCardSelectableColor(color, isSelected) {
165
- var calculatedColor;
166
-
167
- if (color) {
168
- calculatedColor = color;
169
- } else if (isSelected) {
170
- calculatedColor = 'success';
171
- } else {
172
- calculatedColor = 'text';
173
- }
174
-
175
- return calculatedColor;
176
- }
@@ -1,187 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EuiCardSelect = void 0;
7
- exports.euiCardSelectableColor = euiCardSelectableColor;
8
-
9
- var _react = _interopRequireDefault(require("react"));
10
-
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
-
13
- var _classnames = _interopRequireDefault(require("classnames"));
14
-
15
- var _button_empty = require("../button/button_empty");
16
-
17
- var _i18n = require("../i18n");
18
-
19
- var _react2 = require("@emotion/react");
20
-
21
- var _excluded = ["className", "isSelected", "isDisabled", "color", "children"];
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
-
25
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
-
27
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
28
-
29
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
30
-
31
- var EuiCardSelect = function EuiCardSelect(_ref) {
32
- var className = _ref.className,
33
- _ref$isSelected = _ref.isSelected,
34
- isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
35
- isDisabled = _ref.isDisabled,
36
- color = _ref.color,
37
- children = _ref.children,
38
- rest = _objectWithoutProperties(_ref, _excluded);
39
-
40
- var child = euiCardSelectableText(isSelected, isDisabled, children);
41
- var selectClasses = (0, _classnames.default)('euiCardSelect', "euiCardSelect--".concat(euiCardSelectableColor(color, isSelected)), className);
42
- return (0, _react2.jsx)(_button_empty.EuiButtonEmpty, _extends({
43
- className: selectClasses,
44
- color: color || 'text',
45
- size: "xs",
46
- isDisabled: isDisabled,
47
- iconType: isSelected ? 'check' : undefined,
48
- role: "switch",
49
- "aria-checked": isSelected
50
- }, rest), child);
51
- };
52
-
53
- exports.EuiCardSelect = EuiCardSelect;
54
- EuiCardSelect.propTypes = {
55
- href: _propTypes.default.string,
56
- onClick: _propTypes.default.func,
57
-
58
- /**
59
- * Any of our named colors
60
- */
61
-
62
- /**
63
- * Any of our named colors
64
- */
65
- color: _propTypes.default.oneOf(["primary", "danger", "text", "ghost", "success", "warning"]),
66
- size: _propTypes.default.oneOf(["xs", "s", "m"]),
67
-
68
- /**
69
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
70
- */
71
-
72
- /**
73
- * Ensure the text of the button sits flush to the left, right, or both sides of its container
74
- */
75
- flush: _propTypes.default.oneOf(["left", "right", "both"]),
76
-
77
- /**
78
- * `disabled` is also allowed
79
- */
80
-
81
- /**
82
- * `disabled` is also allowed
83
- */
84
- isDisabled: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.bool]),
85
-
86
- /**
87
- * Force disables the button and changes the icon to a loading spinner
88
- */
89
-
90
- /**
91
- * Force disables the button and changes the icon to a loading spinner
92
- */
93
- isLoading: _propTypes.default.bool,
94
-
95
- /**
96
- * Is in the selected state
97
- */
98
-
99
- /**
100
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
101
- * *Only use when the readable text does not change between states.*
102
- */
103
-
104
- /**
105
- * Applies the boolean state as the `aria-pressed` property to create a toggle button.
106
- * *Only use when the readable text does not change between states.*
107
- */
108
- isSelected: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.bool]),
109
- target: _propTypes.default.string,
110
- rel: _propTypes.default.string,
111
- type: _propTypes.default.oneOf(["button", "submit"]),
112
- buttonRef: _propTypes.default.any,
113
-
114
- /**
115
- * Object of props passed to the <span/> wrapping the button's content
116
- */
117
- contentProps: _propTypes.default.any,
118
-
119
- /**
120
- * Any `type` accepted by EuiIcon
121
- */
122
- iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
123
-
124
- /**
125
- * Can only be one side `left` or `right`
126
- */
127
- iconSide: _propTypes.default.oneOf(["left", "right"]),
128
-
129
- /**
130
- * Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
131
- * It doesn't apply to the icon.
132
- */
133
- textProps: _propTypes.default.shape({
134
- className: _propTypes.default.string,
135
- "aria-label": _propTypes.default.string,
136
- "data-test-subj": _propTypes.default.string,
137
- css: _propTypes.default.any,
138
- ref: _propTypes.default.any,
139
- "data-text": _propTypes.default.string
140
- }),
141
- iconSize: _propTypes.default.oneOf(["s", "m"]),
142
- className: _propTypes.default.string,
143
- "aria-label": _propTypes.default.string,
144
- "data-test-subj": _propTypes.default.string,
145
- css: _propTypes.default.any
146
- };
147
-
148
- function euiCardSelectableText(isSelected, isDisabled, children) {
149
- if (children) {
150
- return children;
151
- }
152
-
153
- var text;
154
-
155
- if (isSelected) {
156
- text = (0, _react2.jsx)(_i18n.EuiI18n, {
157
- token: "euiCardSelect.selected",
158
- default: "Selected"
159
- });
160
- } else if (isDisabled) {
161
- text = (0, _react2.jsx)(_i18n.EuiI18n, {
162
- token: "euiCardSelect.unavailable",
163
- default: "Unavailable"
164
- });
165
- } else {
166
- text = (0, _react2.jsx)(_i18n.EuiI18n, {
167
- token: "euiCardSelect.select",
168
- default: "Select"
169
- });
170
- }
171
-
172
- return text;
173
- }
174
-
175
- function euiCardSelectableColor(color, isSelected) {
176
- var calculatedColor;
177
-
178
- if (color) {
179
- calculatedColor = color;
180
- } else if (isSelected) {
181
- calculatedColor = 'success';
182
- } else {
183
- calculatedColor = 'text';
184
- }
185
-
186
- return calculatedColor;
187
- }