@elastic/eui 64.0.1 → 65.0.2

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 (374) 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 +164 -1249
  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 +136 -1221
  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 +1 -1
  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/button/button.js +112 -215
  21. package/es/components/button/button_display/_button_display.js +90 -40
  22. package/es/components/button/button_display/_button_display.styles.js +7 -16
  23. package/es/components/button/button_display/_button_display_content.js +6 -3
  24. package/es/components/button/button_display/_button_display_content.styles.js +7 -17
  25. package/es/components/button/button_empty/button_empty.js +63 -53
  26. package/es/components/button/button_empty/index.js +1 -1
  27. package/es/components/button/button_group/button_group.js +4 -12
  28. package/es/components/button/button_group/button_group_button.js +14 -4
  29. package/es/components/button/button_icon/button_icon.js +61 -42
  30. package/es/components/call_out/call_out.styles.js +2 -1
  31. package/es/components/card/card.js +173 -89
  32. package/es/components/card/card.styles.js +136 -0
  33. package/es/components/card/card_select/card_select.js +133 -0
  34. package/es/components/card/card_select/card_select.styles.js +25 -0
  35. package/es/components/card/card_select/index.js +8 -0
  36. package/es/components/card/checkable_card/checkable_card.js +14 -9
  37. package/es/components/card/checkable_card/checkable_card.styles.js +22 -0
  38. package/es/components/comment_list/comment_event.styles.js +1 -1
  39. package/es/components/datagrid/body/data_grid_body.js +7 -6
  40. package/es/components/datagrid/body/data_grid_cell.js +13 -12
  41. package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  42. package/es/components/datagrid/body/header/data_grid_header_row.js +7 -6
  43. package/es/components/datagrid/data_grid.js +7 -6
  44. package/es/components/datagrid/utils/in_memory.js +7 -6
  45. package/es/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  46. package/es/components/date_picker/react-datepicker/original.package.json +124 -0
  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/icon/icon.js +2 -1
  54. package/es/components/image/image_button.styles.js +1 -1
  55. package/es/components/image/image_wrapper.styles.js +3 -3
  56. package/es/components/link/link.styles.js +2 -2
  57. package/es/components/list_group/list_group.js +2 -1
  58. package/es/components/list_group/list_group_item.js +2 -1
  59. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  60. package/es/components/loading/loading_chart.styles.js +16 -26
  61. package/es/components/loading/loading_content.styles.js +2 -2
  62. package/es/components/loading/loading_logo.styles.js +4 -4
  63. package/es/components/loading/loading_spinner.styles.js +6 -6
  64. package/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  65. package/es/components/modal/confirm_modal.js +1 -1
  66. package/es/components/notification/notification_event.js +5 -3
  67. package/es/components/notification/notification_event_read_button.js +2 -1
  68. package/es/components/page/page_template.js +2 -2
  69. package/es/components/page_template/inner/page_inner.styles.js +2 -2
  70. package/es/components/page_template/outer/page_outer.styles.js +3 -1
  71. package/es/components/pagination/pagination_button.js +5 -3
  72. package/es/components/panel/panel.js +1 -1
  73. package/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
  74. package/es/components/progress/progress.styles.js +2 -2
  75. package/es/components/title/title.styles.js +2 -2
  76. package/es/components/toast/toast.styles.js +4 -4
  77. package/es/components/tool_tip/icon_tip.js +11 -1
  78. package/es/components/tool_tip/tool_tip.js +18 -6
  79. package/es/global_styling/functions/logicals.js +2 -72
  80. package/es/global_styling/functions/logicals.json +56 -0
  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 +7 -1
  84. package/es/global_styling/reset/global_styles.js +2 -1
  85. package/es/themes/amsterdam/global_styling/mixins/button.js +165 -16
  86. package/eui.d.ts +1062 -936
  87. package/i18ntokens.json +15 -15
  88. package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  89. package/lib/components/accessibility/skip_link/skip_link.js +4 -54
  90. package/lib/components/accordion/accordion.js +3 -1
  91. package/lib/components/accordion/accordion.styles.js +17 -26
  92. package/lib/components/badge/beta_badge/beta_badge.js +16 -3
  93. package/lib/components/basic_table/basic_table.js +1 -1
  94. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  95. package/lib/components/basic_table/in_memory_table.js +1 -1
  96. package/lib/components/beacon/beacon.styles.js +1 -1
  97. package/lib/components/button/button.js +124 -229
  98. package/lib/components/button/button_display/_button_display.js +94 -33
  99. package/lib/components/button/button_display/_button_display.styles.js +7 -16
  100. package/lib/components/button/button_display/_button_display_content.js +7 -3
  101. package/lib/components/button/button_display/_button_display_content.styles.js +7 -17
  102. package/lib/components/button/button_empty/button_empty.js +64 -54
  103. package/lib/components/button/button_empty/index.js +0 -6
  104. package/lib/components/button/button_group/button_group.js +4 -12
  105. package/lib/components/button/button_group/button_group_button.js +15 -4
  106. package/lib/components/button/button_icon/button_icon.js +61 -43
  107. package/lib/components/call_out/call_out.styles.js +2 -1
  108. package/lib/components/card/card.js +174 -88
  109. package/lib/components/card/card.styles.js +146 -0
  110. package/lib/components/card/card_select/card_select.js +144 -0
  111. package/lib/components/card/card_select/card_select.styles.js +27 -0
  112. package/lib/components/card/card_select/index.js +19 -0
  113. package/lib/components/card/checkable_card/checkable_card.js +16 -9
  114. package/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
  115. package/lib/components/comment_list/comment_event.styles.js +1 -1
  116. package/lib/components/datagrid/body/data_grid_body.js +7 -6
  117. package/lib/components/datagrid/body/data_grid_cell.js +13 -12
  118. package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  119. package/lib/components/datagrid/body/header/data_grid_header_row.js +7 -6
  120. package/lib/components/datagrid/data_grid.js +7 -6
  121. package/lib/components/datagrid/utils/in_memory.js +7 -6
  122. package/lib/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  123. package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  124. package/lib/components/date_picker/super_date_picker/super_date_picker.js +17 -1
  125. package/lib/components/date_picker/super_date_picker/super_update_button.js +11 -1
  126. package/lib/components/description_list/description_list_title.js +1 -1
  127. package/lib/components/expression/expression.styles.js +12 -30
  128. package/lib/components/facet/facet_button.js +4 -3
  129. package/lib/components/header/header_links/header_link.js +5 -3
  130. package/lib/components/icon/icon.js +2 -1
  131. package/lib/components/image/image_button.styles.js +1 -1
  132. package/lib/components/image/image_wrapper.styles.js +2 -2
  133. package/lib/components/link/link.styles.js +1 -1
  134. package/lib/components/list_group/list_group.js +2 -1
  135. package/lib/components/list_group/list_group_item.js +2 -1
  136. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  137. package/lib/components/loading/loading_chart.styles.js +16 -25
  138. package/lib/components/loading/loading_content.styles.js +1 -1
  139. package/lib/components/loading/loading_logo.styles.js +4 -4
  140. package/lib/components/loading/loading_spinner.styles.js +5 -5
  141. package/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  142. package/lib/components/modal/confirm_modal.js +1 -1
  143. package/lib/components/notification/notification_event.js +5 -3
  144. package/lib/components/notification/notification_event_read_button.js +2 -1
  145. package/lib/components/page/page_template.js +1 -1
  146. package/lib/components/page_template/inner/page_inner.styles.js +2 -2
  147. package/lib/components/page_template/outer/page_outer.styles.js +4 -1
  148. package/lib/components/panel/panel.js +1 -1
  149. package/{optimize/lib/components/panel/panel.style.js → lib/components/panel/panel.styles.js} +1 -1
  150. package/lib/components/progress/progress.styles.js +2 -2
  151. package/lib/components/title/title.styles.js +1 -1
  152. package/lib/components/toast/toast.styles.js +4 -4
  153. package/lib/components/tool_tip/icon_tip.js +11 -1
  154. package/lib/components/tool_tip/tool_tip.js +18 -6
  155. package/lib/global_styling/functions/logicals.js +3 -72
  156. package/lib/global_styling/functions/logicals.json +56 -0
  157. package/lib/global_styling/functions/typography.js +3 -1
  158. package/lib/global_styling/mixins/_color.js +1 -1
  159. package/lib/global_styling/mixins/_helpers.js +9 -2
  160. package/lib/global_styling/reset/global_styles.js +3 -1
  161. package/lib/themes/amsterdam/global_styling/mixins/button.js +178 -24
  162. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +2 -1
  163. package/optimize/es/components/accordion/accordion.js +2 -1
  164. package/optimize/es/components/accordion/accordion.styles.js +17 -27
  165. package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -3
  166. package/optimize/es/components/beacon/beacon.styles.js +2 -2
  167. package/optimize/es/components/button/button.js +88 -100
  168. package/optimize/es/components/button/button_display/_button_display.js +67 -32
  169. package/optimize/es/components/button/button_display/_button_display.styles.js +7 -16
  170. package/optimize/es/components/button/button_display/_button_display_content.js +5 -2
  171. package/optimize/es/components/button/button_display/_button_display_content.styles.js +7 -17
  172. package/optimize/es/components/button/button_empty/button_empty.js +55 -47
  173. package/optimize/es/components/button/button_empty/index.js +1 -1
  174. package/optimize/es/components/button/button_group/button_group.js +2 -10
  175. package/optimize/es/components/button/button_group/button_group_button.js +13 -3
  176. package/optimize/es/components/button/button_icon/button_icon.js +54 -41
  177. package/optimize/es/components/call_out/call_out.styles.js +2 -1
  178. package/optimize/es/components/card/card.js +97 -31
  179. package/optimize/es/components/card/card.styles.js +136 -0
  180. package/optimize/es/components/card/{card_select.js → card_select/card_select.js} +16 -14
  181. package/optimize/es/components/card/card_select/card_select.styles.js +25 -0
  182. package/optimize/es/components/card/card_select/index.js +8 -0
  183. package/optimize/es/components/card/checkable_card/checkable_card.js +14 -9
  184. package/optimize/es/components/card/checkable_card/checkable_card.styles.js +22 -0
  185. package/optimize/es/components/comment_list/comment_event.styles.js +1 -1
  186. package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
  187. package/optimize/es/components/description_list/description_list_title.js +1 -1
  188. package/optimize/es/components/expression/expression.styles.js +13 -31
  189. package/optimize/es/components/facet/facet_button.js +5 -3
  190. package/optimize/es/components/icon/icon.js +2 -1
  191. package/optimize/es/components/image/image_button.styles.js +1 -1
  192. package/optimize/es/components/image/image_wrapper.styles.js +3 -3
  193. package/optimize/es/components/link/link.styles.js +2 -2
  194. package/optimize/es/components/loading/loading_chart.styles.js +16 -26
  195. package/optimize/es/components/loading/loading_content.styles.js +2 -2
  196. package/optimize/es/components/loading/loading_logo.styles.js +4 -4
  197. package/optimize/es/components/loading/loading_spinner.styles.js +6 -6
  198. package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  199. package/optimize/es/components/page/page_template.js +2 -2
  200. package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
  201. package/optimize/es/components/page_template/outer/page_outer.styles.js +3 -1
  202. package/optimize/es/components/panel/panel.js +1 -1
  203. package/optimize/es/components/panel/{panel.style.js → panel.styles.js} +2 -2
  204. package/optimize/es/components/progress/progress.styles.js +2 -2
  205. package/optimize/es/components/title/title.styles.js +2 -2
  206. package/optimize/es/components/toast/toast.styles.js +4 -4
  207. package/optimize/es/components/tool_tip/tool_tip.js +7 -5
  208. package/optimize/es/global_styling/functions/logicals.js +2 -72
  209. package/optimize/es/global_styling/functions/logicals.json +56 -0
  210. package/optimize/es/global_styling/functions/typography.js +2 -1
  211. package/optimize/es/global_styling/mixins/_color.js +1 -1
  212. package/optimize/es/global_styling/mixins/_helpers.js +7 -1
  213. package/optimize/es/global_styling/reset/global_styles.js +2 -1
  214. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +155 -16
  215. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  216. package/optimize/lib/components/accordion/accordion.js +3 -1
  217. package/optimize/lib/components/accordion/accordion.styles.js +17 -26
  218. package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -3
  219. package/optimize/lib/components/beacon/beacon.styles.js +1 -1
  220. package/optimize/lib/components/button/button.js +92 -103
  221. package/optimize/lib/components/button/button_display/_button_display.js +71 -25
  222. package/optimize/lib/components/button/button_display/_button_display.styles.js +7 -16
  223. package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
  224. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +7 -17
  225. package/optimize/lib/components/button/button_empty/button_empty.js +59 -50
  226. package/optimize/lib/components/button/button_empty/index.js +0 -6
  227. package/optimize/lib/components/button/button_group/button_group.js +2 -10
  228. package/optimize/lib/components/button/button_group/button_group_button.js +15 -3
  229. package/optimize/lib/components/button/button_icon/button_icon.js +54 -41
  230. package/optimize/lib/components/call_out/call_out.styles.js +2 -1
  231. package/optimize/lib/components/card/card.js +97 -30
  232. package/optimize/lib/components/card/card.styles.js +146 -0
  233. package/optimize/lib/components/card/{card_select.js → card_select/card_select.js} +16 -14
  234. package/optimize/lib/components/card/card_select/card_select.styles.js +27 -0
  235. package/optimize/lib/components/card/card_select/index.js +19 -0
  236. package/optimize/lib/components/card/checkable_card/checkable_card.js +16 -9
  237. package/optimize/lib/components/card/checkable_card/checkable_card.styles.js +33 -0
  238. package/optimize/lib/components/comment_list/comment_event.styles.js +1 -1
  239. package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  240. package/optimize/lib/components/description_list/description_list_title.js +1 -1
  241. package/optimize/lib/components/expression/expression.styles.js +12 -30
  242. package/optimize/lib/components/facet/facet_button.js +4 -2
  243. package/optimize/lib/components/icon/icon.js +2 -1
  244. package/optimize/lib/components/image/image_button.styles.js +1 -1
  245. package/optimize/lib/components/image/image_wrapper.styles.js +2 -2
  246. package/optimize/lib/components/link/link.styles.js +1 -1
  247. package/optimize/lib/components/loading/loading_chart.styles.js +16 -25
  248. package/optimize/lib/components/loading/loading_content.styles.js +1 -1
  249. package/optimize/lib/components/loading/loading_logo.styles.js +4 -4
  250. package/optimize/lib/components/loading/loading_spinner.styles.js +5 -5
  251. package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  252. package/optimize/lib/components/page/page_template.js +1 -1
  253. package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
  254. package/optimize/lib/components/page_template/outer/page_outer.styles.js +4 -1
  255. package/optimize/lib/components/panel/panel.js +1 -1
  256. package/{test-env/components/panel/panel.style.js → optimize/lib/components/panel/panel.styles.js} +1 -1
  257. package/optimize/lib/components/progress/progress.styles.js +2 -2
  258. package/optimize/lib/components/title/title.styles.js +1 -1
  259. package/optimize/lib/components/toast/toast.styles.js +4 -4
  260. package/optimize/lib/components/tool_tip/tool_tip.js +7 -5
  261. package/optimize/lib/global_styling/functions/logicals.js +10 -73
  262. package/optimize/lib/global_styling/functions/logicals.json +56 -0
  263. package/optimize/lib/global_styling/functions/typography.js +3 -1
  264. package/optimize/lib/global_styling/mixins/_color.js +1 -1
  265. package/optimize/lib/global_styling/mixins/_helpers.js +9 -2
  266. package/optimize/lib/global_styling/reset/global_styles.js +3 -1
  267. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +170 -17
  268. package/package.json +2 -2
  269. package/src/components/badge/beta_badge/_beta_badge.scss +5 -1
  270. package/src/components/button/_index.scss +0 -1
  271. package/src/components/button/button_empty/_button_empty.scss +4 -48
  272. package/src/components/button/button_group/_button_group.scss +0 -1
  273. package/src/components/button/button_group/_button_group_button.scss +55 -83
  274. package/src/components/button/button_icon/_button_icon.scss +3 -103
  275. package/src/components/control_bar/_control_bar.scss +2 -6
  276. package/src/components/datagrid/_data_grid_data_row.scss +7 -0
  277. package/src/components/flyout/_flyout.scss +4 -1
  278. package/src/components/index.scss +0 -1
  279. package/src/global_styling/mixins/_button.scss +55 -11
  280. package/src/global_styling/mixins/_index.scss +0 -1
  281. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -2
  282. package/src/themes/amsterdam/overrides/_header.scss +0 -2
  283. package/src/themes/amsterdam/overrides/_index.scss +0 -4
  284. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -1
  285. package/test-env/components/accessibility/skip_link/skip_link.js +4 -54
  286. package/test-env/components/accordion/accordion.js +3 -1
  287. package/test-env/components/accordion/accordion.styles.js +17 -26
  288. package/test-env/components/badge/beta_badge/beta_badge.js +16 -3
  289. package/test-env/components/basic_table/basic_table.js +1 -1
  290. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  291. package/test-env/components/basic_table/in_memory_table.js +1 -1
  292. package/test-env/components/beacon/beacon.styles.js +1 -1
  293. package/test-env/components/button/button.js +111 -225
  294. package/test-env/components/button/button_display/_button_display.js +93 -32
  295. package/test-env/components/button/button_display/_button_display.styles.js +7 -16
  296. package/test-env/components/button/button_display/_button_display_content.js +7 -3
  297. package/test-env/components/button/button_display/_button_display_content.styles.js +7 -17
  298. package/test-env/components/button/button_empty/button_empty.js +64 -53
  299. package/test-env/components/button/button_empty/index.js +0 -6
  300. package/test-env/components/button/button_group/button_group.js +4 -12
  301. package/test-env/components/button/button_group/button_group_button.js +16 -4
  302. package/test-env/components/button/button_icon/button_icon.js +61 -42
  303. package/test-env/components/call_out/call_out.styles.js +2 -1
  304. package/test-env/components/card/card.js +172 -88
  305. package/test-env/components/card/card.styles.js +146 -0
  306. package/test-env/components/card/card_select/card_select.js +141 -0
  307. package/test-env/components/card/card_select/card_select.styles.js +27 -0
  308. package/test-env/components/card/card_select/index.js +19 -0
  309. package/test-env/components/card/checkable_card/checkable_card.js +16 -9
  310. package/test-env/components/card/checkable_card/checkable_card.styles.js +33 -0
  311. package/test-env/components/comment_list/comment_event.styles.js +1 -1
  312. package/test-env/components/datagrid/body/data_grid_body.js +7 -6
  313. package/test-env/components/datagrid/body/data_grid_cell.js +13 -12
  314. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -6
  315. package/test-env/components/datagrid/body/header/data_grid_header_row.js +7 -6
  316. package/test-env/components/datagrid/data_grid.js +7 -6
  317. package/test-env/components/datagrid/utils/in_memory.js +7 -6
  318. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +3 -2
  319. package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
  320. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +17 -1
  321. package/test-env/components/date_picker/super_date_picker/super_update_button.js +11 -1
  322. package/test-env/components/description_list/description_list_title.js +1 -1
  323. package/test-env/components/expression/expression.styles.js +12 -30
  324. package/test-env/components/facet/facet_button.js +4 -3
  325. package/test-env/components/header/header_links/header_link.js +5 -3
  326. package/test-env/components/image/image_button.styles.js +1 -1
  327. package/test-env/components/image/image_wrapper.styles.js +2 -2
  328. package/test-env/components/link/link.styles.js +1 -1
  329. package/test-env/components/list_group/list_group.js +2 -1
  330. package/test-env/components/list_group/list_group_item.js +2 -1
  331. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +3 -2
  332. package/test-env/components/loading/loading_chart.styles.js +16 -25
  333. package/test-env/components/loading/loading_content.styles.js +1 -1
  334. package/test-env/components/loading/loading_logo.styles.js +4 -4
  335. package/test-env/components/loading/loading_spinner.styles.js +5 -5
  336. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +2 -0
  337. package/test-env/components/modal/confirm_modal.js +1 -1
  338. package/test-env/components/notification/notification_event.js +5 -3
  339. package/test-env/components/notification/notification_event_read_button.js +2 -1
  340. package/test-env/components/page/page_template.js +1 -1
  341. package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
  342. package/test-env/components/page_template/outer/page_outer.styles.js +4 -1
  343. package/test-env/components/panel/panel.js +1 -1
  344. package/{lib/components/panel/panel.style.js → test-env/components/panel/panel.styles.js} +1 -1
  345. package/test-env/components/progress/progress.styles.js +2 -2
  346. package/test-env/components/title/title.styles.js +1 -1
  347. package/test-env/components/toast/toast.styles.js +4 -4
  348. package/test-env/components/tool_tip/icon_tip.js +11 -1
  349. package/test-env/components/tool_tip/tool_tip.js +18 -6
  350. package/test-env/global_styling/functions/logicals.js +10 -73
  351. package/test-env/global_styling/functions/logicals.json +56 -0
  352. package/test-env/global_styling/functions/typography.js +3 -1
  353. package/test-env/global_styling/mixins/_color.js +1 -1
  354. package/test-env/global_styling/mixins/_helpers.js +9 -2
  355. package/test-env/global_styling/reset/global_styles.js +3 -1
  356. package/test-env/themes/amsterdam/global_styling/mixins/button.js +170 -17
  357. package/es/components/card/card_select.js +0 -176
  358. package/lib/components/card/card_select.js +0 -187
  359. package/src/components/button/_button.scss +0 -143
  360. package/src/components/button/button_icon/_variables.scss +0 -11
  361. package/src/components/card/_card.scss +0 -239
  362. package/src/components/card/_card_select.scss +0 -21
  363. package/src/components/card/_index.scss +0 -5
  364. package/src/components/card/_mixins.scss +0 -11
  365. package/src/components/card/_variables.scss +0 -25
  366. package/src/components/card/checkable_card/_checkable_card.scss +0 -29
  367. package/src/components/card/checkable_card/_index.scss +0 -1
  368. package/src/global_styling/mixins/_beta_badge.scss +0 -30
  369. package/src/themes/amsterdam/global_styling/mixins/_button.scss +0 -60
  370. package/src/themes/amsterdam/overrides/_button.scss +0 -119
  371. package/src/themes/amsterdam/overrides/_button_empty.scss +0 -20
  372. package/src/themes/amsterdam/overrides/_button_group.scss +0 -91
  373. package/src/themes/amsterdam/overrides/_card.scss +0 -6
  374. package/test-env/components/card/card_select.js +0 -184
@@ -19,10 +19,10 @@ export var euiToastStyles = function euiToastStyles(euiThemeContext) {
19
19
  // Elements
20
20
  euiToast__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('top', euiTheme.size.base), ";", logicalCSS('right', euiTheme.size.base), ";;label:euiToast__closeButton;"),
21
21
  // Variants
22
- primary: /*#__PURE__*/css("border-top:2px solid ", euiTheme.colors.primary, ";;label:primary;"),
23
- success: /*#__PURE__*/css("border-top:2px solid ", euiTheme.colors.success, ";;label:success;"),
24
- warning: /*#__PURE__*/css("border-top:2px solid ", euiTheme.colors.warning, ";;label:warning;"),
25
- danger: /*#__PURE__*/css("border-top:2px solid ", euiTheme.colors.danger, ";;label:danger;")
22
+ primary: /*#__PURE__*/css(logicalCSS('border-top', "2px solid ".concat(euiTheme.colors.primary)), ";;label:primary;"),
23
+ success: /*#__PURE__*/css(logicalCSS('border-top', "2px solid ".concat(euiTheme.colors.success)), ";;label:success;"),
24
+ warning: /*#__PURE__*/css(logicalCSS('border-top', "2px solid ".concat(euiTheme.colors.warning)), ";;label:warning;"),
25
+ danger: /*#__PURE__*/css(logicalCSS('border-top', "2px solid ".concat(euiTheme.colors.danger)), ";;label:danger;")
26
26
  };
27
27
  };
28
28
  export var euiToastHeaderStyles = function euiToastHeaderStyles(euiThemeContext) {
@@ -7,7 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- var _excluded = ["children", "className", "anchorClassName", "content", "title", "delay", "display"];
10
+ var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
11
11
 
12
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
13
13
 
@@ -255,6 +255,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
255
255
  children = _this$props.children,
256
256
  className = _this$props.className,
257
257
  anchorClassName = _this$props.anchorClassName,
258
+ anchorProps = _this$props.anchorProps,
258
259
  content = _this$props.content,
259
260
  title = _this$props.title,
260
261
  delay = _this$props.delay,
@@ -267,7 +268,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
267
268
  toolTipStyles = _this$state.toolTipStyles,
268
269
  visible = _this$state.visible;
269
270
  var classes = classNames('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
270
- var anchorClasses = classNames('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName);
271
+ var anchorClasses = classNames('euiToolTipAnchor', display ? displayToClassNameMap[display] : null, anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
271
272
  var tooltip;
272
273
 
273
274
  if (visible && (content || title)) {
@@ -292,14 +293,15 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
292
293
  }
293
294
 
294
295
  var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
295
- ___EmotionJSX("span", {
296
+ ___EmotionJSX("span", _extends({
296
297
  ref: function ref(anchor) {
297
298
  return _this2.anchor = anchor;
298
- },
299
+ }
300
+ }, anchorProps, {
299
301
  className: anchorClasses,
300
302
  onMouseOver: this.showToolTip,
301
303
  onMouseOut: this.onMouseOut
302
- }, /*#__PURE__*/cloneElement(children, _objectSpread({
304
+ }), /*#__PURE__*/cloneElement(children, _objectSpread({
303
305
  onFocus: function onFocus(e) {
304
306
  _this2.onFocus();
305
307
 
@@ -1,9 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
4
-
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
-
7
3
  /*
8
4
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
5
  * or more contributor license agreements. Licensed under the Elastic License
@@ -12,6 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
12
8
  * Side Public License, v 1.
13
9
  */
14
10
  import { keysOf } from '../../components/common';
11
+ import LOGICALS from './logicals.json';
15
12
  /**
16
13
  * EUI utilizes logical CSS properties to enable directional writing-modes.
17
14
  * To encourage use of logical properties, we provide a few helper utilities to
@@ -28,74 +25,7 @@ export var logicalSide = {
28
25
  vertical: 'block'
29
26
  };
30
27
  export var LOGICAL_SIDES = keysOf(logicalSide);
31
- var logicalMargins = {
32
- 'margin-left': 'margin-inline-start',
33
- 'margin-right': 'margin-inline-end',
34
- 'margin-top': 'margin-block-start',
35
- 'margin-bottom': 'margin-block-end',
36
- 'margin-horizontal': 'margin-inline',
37
- 'margin-vertical': 'margin-block'
38
- };
39
- var logicalPaddings = {
40
- 'padding-left': 'padding-inline-start',
41
- 'padding-right': 'padding-inline-end',
42
- 'padding-top': 'padding-block-start',
43
- 'padding-bottom': 'padding-block-end',
44
- 'padding-horizontal': 'padding-inline',
45
- 'padding-vertical': 'padding-block'
46
- };
47
- var logicalPosition = {
48
- top: 'inset-block-start',
49
- right: 'inset-inline-end',
50
- bottom: 'inset-block-end',
51
- left: 'inset-inline-start',
52
- horizontal: 'inset-block',
53
- vertical: 'inset-inline',
54
- inset: 'inset'
55
- };
56
- var logicalSize = {
57
- height: 'block-size',
58
- width: 'inline-size',
59
- 'max-height': 'max-block-size',
60
- 'max-width': 'max-inline-size',
61
- 'min-height': 'min-block-size',
62
- 'min-width': 'min-inline-size'
63
- };
64
- var logicalOverflow = {
65
- 'overflow-x': 'overflow-inline',
66
- 'overflow-y': 'overflow-block'
67
- };
68
- var logicalBorders = {
69
- 'border-horizontal': 'border-inline',
70
- 'border-horizontal-color': 'border-inline-color',
71
- 'border-horizontal-width': 'border-inline-width',
72
- 'border-horizontal-style': 'border-inline-style',
73
- 'border-vertical': 'border-block',
74
- 'border-vertical-color': 'border-block-color',
75
- 'border-vertical-width': 'border-block-width',
76
- 'border-vertical-style': 'border-block-style',
77
- 'border-bottom': 'border-block-end',
78
- 'border-bottom-color': 'border-block-end-color',
79
- 'border-bottom-style': 'border-block-end-style',
80
- 'border-bottom-width': 'border-block-end-width',
81
- 'border-top': 'border-block-start',
82
- 'border-top-color': 'border-block-start-color',
83
- 'border-top-style': 'border-block-start-style',
84
- 'border-top-width': 'border-block-start-width',
85
- 'border-right': 'border-inline-end',
86
- 'border-right-color': 'border-inline-end-color',
87
- 'border-right-style': 'border-inline-end-style',
88
- 'border-right-width': 'border-inline-end-width',
89
- 'border-left': 'border-inline-start',
90
- 'border-left-color': 'border-inline-start-color',
91
- 'border-left-style': 'border-inline-start-style',
92
- 'border-left-width': 'border-inline-start-width',
93
- 'border-top-left-radius': 'border-start-start-radius',
94
- 'border-top-right-radius': 'border-start-end-radius',
95
- 'border-bottom-left-radius': 'border-end-start-radius',
96
- 'border-bottom-right-radius': 'border-end-end-radius'
97
- };
98
- export var logicals = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, logicalMargins), logicalPaddings), logicalPosition), logicalSize), logicalOverflow), logicalBorders);
28
+ export var logicals = LOGICALS;
99
29
  export var LOGICAL_PROPERTIES = keysOf(logicals);
100
30
 
101
31
  /**
@@ -0,0 +1,56 @@
1
+ {
2
+ "height": "block-size",
3
+ "width": "inline-size",
4
+ "max-height": "max-block-size",
5
+ "max-width": "max-inline-size",
6
+ "min-height": "min-block-size",
7
+ "min-width": "min-inline-size",
8
+ "top": "inset-block-start",
9
+ "right": "inset-inline-end",
10
+ "bottom": "inset-block-end",
11
+ "left": "inset-inline-start",
12
+ "horizontal": "inset-block",
13
+ "vertical": "inset-inline",
14
+ "margin-left": "margin-inline-start",
15
+ "margin-right": "margin-inline-end",
16
+ "margin-top": "margin-block-start",
17
+ "margin-bottom": "margin-block-end",
18
+ "margin-horizontal": "margin-inline",
19
+ "margin-vertical": "margin-block",
20
+ "padding-left": "padding-inline-start",
21
+ "padding-right": "padding-inline-end",
22
+ "padding-top": "padding-block-start",
23
+ "padding-bottom": "padding-block-end",
24
+ "padding-horizontal": "padding-inline",
25
+ "padding-vertical": "padding-block",
26
+ "overflow-x": "overflow-inline",
27
+ "overflow-y": "overflow-block",
28
+ "border-horizontal": "border-inline",
29
+ "border-horizontal-color": "border-inline-color",
30
+ "border-horizontal-width": "border-inline-width",
31
+ "border-horizontal-style": "border-inline-style",
32
+ "border-vertical": "border-block",
33
+ "border-vertical-color": "border-block-color",
34
+ "border-vertical-width": "border-block-width",
35
+ "border-vertical-style": "border-block-style",
36
+ "border-bottom": "border-block-end",
37
+ "border-bottom-color": "border-block-end-color",
38
+ "border-bottom-style": "border-block-end-style",
39
+ "border-bottom-width": "border-block-end-width",
40
+ "border-top": "border-block-start",
41
+ "border-top-color": "border-block-start-color",
42
+ "border-top-style": "border-block-start-style",
43
+ "border-top-width": "border-block-start-width",
44
+ "border-right": "border-inline-end",
45
+ "border-right-color": "border-inline-end-color",
46
+ "border-right-style": "border-inline-end-style",
47
+ "border-right-width": "border-inline-end-width",
48
+ "border-left": "border-inline-start",
49
+ "border-left-color": "border-inline-start-color",
50
+ "border-left-style": "border-inline-start-style",
51
+ "border-left-width": "border-inline-start-width",
52
+ "border-top-left-radius": "border-start-start-radius",
53
+ "border-top-right-radius": "border-start-end-radius",
54
+ "border-bottom-left-radius": "border-end-start-radius",
55
+ "border-bottom-right-radius": "border-end-end-radius"
56
+ }
@@ -5,6 +5,7 @@
5
5
  * in compliance with, at your election, the Elastic License 2.0 or the Server
6
6
  * Side Public License, v 1.
7
7
  */
8
+ import { logicalCSS } from './logicals';
8
9
 
9
10
  /**
10
11
  * Calculates the font-size value based on the provided scale key
@@ -82,5 +83,5 @@ export var euiTextShift = function euiTextShift() {
82
83
  var fontWeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bold';
83
84
  var attribute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'data-text';
84
85
  var euiTheme = arguments.length > 2 ? arguments[2] : undefined;
85
- return "\n &::after {\n display: block;\n content: attr(".concat(attribute, ");\n font-weight: ").concat(euiTheme.font.weight[fontWeight], ";\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }");
86
+ return "\n &::after {\n display: block;\n content: attr(".concat(attribute, ");\n font-weight: ").concat(euiTheme.font.weight[fontWeight], ";\n ").concat(logicalCSS('height', 0), "\n overflow: hidden;\n visibility: hidden;\n }");
86
87
  };
@@ -21,7 +21,7 @@ export var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
21
21
  if (color === 'plain') {
22
22
  return transparentize(euiTheme.colors.ghost, 0.2);
23
23
  } else if (color === 'subdued') {
24
- return transparentize(euiTheme.colors.lightShade, 0.2);
24
+ return colorMode === 'DARK' ? transparentize(euiTheme.colors.lightShade, 0.4) : transparentize(euiTheme.colors.lightShade, 0.2);
25
25
  } else {
26
26
  return transparentize(euiTheme.colors[color], 0.1);
27
27
  }
@@ -165,4 +165,10 @@ export var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
165
165
 
166
166
  export var euiFullHeight = function euiFullHeight() {
167
167
  return "\n ".concat(logicalCSS('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
168
- };
168
+ };
169
+ /**
170
+ * A constant storing the support for the `:has()` selector through a
171
+ * media query that will only apply the content it is supported.
172
+ */
173
+
174
+ export var euiSupportsHas = '@supports(selector(:has(p)))';
@@ -10,6 +10,7 @@ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructurin
10
10
  import React from 'react';
11
11
  import { Global, css } from '@emotion/react';
12
12
  import { euiFocusRing, euiScrollBarStyles } from '../mixins';
13
+ import { logicalCSS } from '../functions';
13
14
  import { shade, tint, transparentize } from '../../services/color';
14
15
  import { useEuiTheme } from '../../services/theme';
15
16
  import { resetStyles as reset } from './reset';
@@ -42,7 +43,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
42
43
  * Final styles
43
44
  */
44
45
 
45
- var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
46
+ var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;", logicalCSS('height', '100%'), " background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
46
47
  return ___EmotionJSX(Global, {
47
48
  styles: styles
48
49
  });
@@ -1,3 +1,5 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+
1
3
  /*
2
4
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
5
  * or more contributor license agreements. Licensed under the Elastic License
@@ -6,36 +8,173 @@
6
8
  * Side Public License, v 1.
7
9
  */
8
10
  import { css } from '@emotion/react';
9
- import { shade, tint, transparentize, useEuiTheme } from '../../../../services';
10
- export var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger', 'disabled'];
11
- export var euiButtonColor = function euiButtonColor(color, _ref) {
12
- var euiTheme = _ref.euiTheme,
13
- colorMode = _ref.colorMode;
11
+ import { euiBackgroundColor, euiCanAnimate } from '../../../../global_styling';
12
+ import { hexToRgb, isColorDark, makeHighContrastColor, shade, tint, transparentize, useEuiTheme } from '../../../../services';
13
+ export var BUTTON_COLORS = ['text', 'accent', 'primary', 'success', 'warning', 'danger'];
14
+
15
+ /**
16
+ * Creates the `base` version of button styles with proper text contrast.
17
+ * @param euiThemeContext
18
+ * @param color One of the named button colors or 'disabled'
19
+ * @returns Style object `{ backgroundColor, color }`
20
+ */
21
+ export var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
22
+ var euiTheme = euiThemeContext.euiTheme,
23
+ colorMode = euiThemeContext.colorMode;
14
24
 
15
25
  function tintOrShade(color) {
16
26
  return colorMode === 'DARK' ? shade(color, 0.7) : tint(color, 0.8);
17
27
  }
18
28
 
29
+ var foreground;
30
+ var background;
31
+
32
+ switch (color) {
33
+ case 'disabled':
34
+ return {
35
+ color: euiTheme.colors.disabledText,
36
+ backgroundColor: transparentize(euiTheme.colors.lightShade, 0.15)
37
+ };
38
+
39
+ case 'text':
40
+ foreground = euiTheme.colors[color];
41
+ background = colorMode === 'DARK' ? shade(euiTheme.colors.lightShade, 0.2) : tint(euiTheme.colors.lightShade, 0.5);
42
+ break;
43
+
44
+ default:
45
+ foreground = euiTheme.colors["".concat(color, "Text")];
46
+ background = tintOrShade(euiTheme.colors[color]);
47
+ break;
48
+ }
49
+
50
+ return {
51
+ color: makeHighContrastColor(foreground)(background),
52
+ backgroundColor: background
53
+ };
54
+ };
55
+ /**
56
+ * Creates the `fill` version of buttons styles with proper text contrast.
57
+ * @param euiThemeContext
58
+ * @param color One of the named button colors or 'disabled'
59
+ * @returns Style object `{ backgroundColor, color }`
60
+ */
61
+
62
+ export var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
63
+ var euiTheme = euiThemeContext.euiTheme,
64
+ colorMode = euiThemeContext.colorMode;
65
+ var background;
66
+ var foreground;
67
+
68
+ switch (color) {
69
+ case 'disabled':
70
+ background = euiButtonColor(euiThemeContext, color).backgroundColor;
71
+ foreground = euiButtonColor(euiThemeContext, color).color;
72
+ break;
73
+
74
+ case 'text':
75
+ background = colorMode === 'DARK' ? euiTheme.colors.text : euiTheme.colors.darkShade;
76
+ foreground = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(background))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
77
+ break;
78
+
79
+ default:
80
+ background = euiTheme.colors[color];
81
+ foreground = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(euiTheme.colors[color]))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
82
+ break;
83
+ }
84
+
85
+ return {
86
+ color: foreground,
87
+ backgroundColor: background
88
+ };
89
+ };
90
+ /**
91
+ * Creates the `empty` version of button styles using the text-variant and adding interactive styles.
92
+ * @param euiThemeContext
93
+ * @param color One of the named button colors or 'disabled'
94
+ * @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
95
+ */
96
+
97
+ export var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
98
+ var foreground;
99
+ var background;
100
+
19
101
  switch (color) {
20
102
  case 'disabled':
21
- return transparentize(euiTheme.colors.lightShade, 0.15);
103
+ foreground = euiButtonColor(euiThemeContext, color).color;
104
+ background = 'transparent';
105
+ break;
22
106
 
23
107
  case 'text':
24
- return colorMode === 'DARK' ? shade(euiTheme.colors.lightShade, 0.2) : tint(euiTheme.colors.lightShade, 0.5);
108
+ foreground = euiButtonColor(euiThemeContext, color).color;
109
+ background = euiBackgroundColor(euiThemeContext, 'subdued', {
110
+ method: 'transparent'
111
+ });
112
+ break;
25
113
 
26
114
  default:
27
- return tintOrShade(euiTheme.colors[color]);
115
+ foreground = euiButtonColor(euiThemeContext, color).color;
116
+ background = euiBackgroundColor(euiThemeContext, color, {
117
+ method: 'transparent'
118
+ });
119
+ break;
28
120
  }
121
+
122
+ return {
123
+ color: foreground,
124
+ backgroundColor: background
125
+ };
29
126
  };
127
+ /**
128
+ * Given the button display type, returns the Emotion based color keys.
129
+ * @param options Button display type
130
+ * @returns An object of `_EuiButtonColor` keys including `disabled`
131
+ */
132
+
30
133
  export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
31
- var euiTheme = useEuiTheme();
134
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
135
+ var euiThemeContext = useEuiTheme();
136
+
137
+ function stylesByDisplay(color) {
138
+ return {
139
+ base: /*#__PURE__*/css(euiButtonColor(euiThemeContext, color), ";;label:base;"),
140
+ fill: /*#__PURE__*/css(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:fill;"),
141
+ empty: /*#__PURE__*/css("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:empty;")
142
+ };
143
+ }
144
+
145
+ return {
146
+ text: /*#__PURE__*/css(stylesByDisplay('text')[options.display || 'base'], ";label:text;"),
147
+ accent: /*#__PURE__*/css(stylesByDisplay('accent')[options.display || 'base'], ";label:accent;"),
148
+ primary: /*#__PURE__*/css(stylesByDisplay('primary')[options.display || 'base'], ";label:primary;"),
149
+ success: /*#__PURE__*/css(stylesByDisplay('success')[options.display || 'base'], ";label:success;"),
150
+ warning: /*#__PURE__*/css(stylesByDisplay('warning')[options.display || 'base'], ";label:warning;"),
151
+ danger: /*#__PURE__*/css(stylesByDisplay('danger')[options.display || 'base'], ";label:danger;"),
152
+ disabled: /*#__PURE__*/css(stylesByDisplay('disabled')[options.display || 'base'], ";label:disabled;")
153
+ };
154
+ };
155
+ /**
156
+ * Based on the button size, creates the style properties.
157
+ * @returns An object of button size keys with Emption styles for `border-radius`
158
+ */
159
+
160
+ export var useEuiButtonRadiusCSS = function useEuiButtonRadiusCSS() {
161
+ var _useEuiTheme = useEuiTheme(),
162
+ euiTheme = _useEuiTheme.euiTheme;
163
+
32
164
  return {
33
- text: /*#__PURE__*/css("background-color:", euiButtonColor('text', euiTheme), ";;label:text;"),
34
- accent: /*#__PURE__*/css("background-color:", euiButtonColor('accent', euiTheme), ";;label:accent;"),
35
- primary: /*#__PURE__*/css("background-color:", euiButtonColor('primary', euiTheme), ";;label:primary;"),
36
- success: /*#__PURE__*/css("background-color:", euiButtonColor('success', euiTheme), ";;label:success;"),
37
- warning: /*#__PURE__*/css("background-color:", euiButtonColor('warning', euiTheme), ";;label:warning;"),
38
- danger: /*#__PURE__*/css("background-color:", euiButtonColor('danger', euiTheme), ";;label:danger;"),
39
- disabled: /*#__PURE__*/css("background-color:", euiButtonColor('disabled', euiTheme), ";;label:disabled;")
165
+ xs: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
166
+ s: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
167
+ m: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";;label:m;")
40
168
  };
169
+ };
170
+ /**
171
+ * Creates the translate animation when button is in focus.
172
+ * @returns string
173
+ */
174
+
175
+ export var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
176
+ var _useEuiTheme2 = useEuiTheme(),
177
+ euiTheme = _useEuiTheme2.euiTheme;
178
+
179
+ return "\n ".concat(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 ");
41
180
  };
@@ -7,6 +7,8 @@ exports.euiScreenReaderOnlyStyles = exports.euiScreenReaderOnly = void 0;
7
7
 
8
8
  var _react = require("@emotion/react");
9
9
 
10
+ var _global_styling = require("../../../global_styling");
11
+
10
12
  /*
11
13
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
14
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,7 +22,7 @@ var _react = require("@emotion/react");
20
22
  * See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
21
23
  */
22
24
  var euiScreenReaderOnly = function euiScreenReaderOnly() {
23
- return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n top: auto;\n // Chrome requires a left value, and Selenium (used by Kibana's FTR) requires an off-screen position for its .getVisibleText() to not register SR-only text\n left: -10000px;\n // The element must have a size (for some screen readers)\n width: 1px;\n height: 1px;\n // But reduce the visible size to nothing\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n // And ensure no overflows occur\n overflow: hidden;\n // Chrome requires the negative margin to not cause overflows of parent containers\n margin: -1px;\n";
25
+ return "\n // Take the element out of the layout\n position: absolute;\n // Keep it vertically inline\n ".concat((0, _global_styling.logicalCSS)('top', 'auto'), "\n // Chrome requires a left value, and Selenium (used by Kibana's FTR) requires an off-screen position for its .getVisibleText() to not register SR-only text\n ").concat((0, _global_styling.logicalCSS)('left', '-10000px'), "\n // The element must have a size (for some screen readers)\n ").concat((0, _global_styling.logicalSizeCSS)('1px', '1px'), "\n // But reduce the visible size to nothing\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n // And ensure no overflows occur\n overflow: hidden;\n // Chrome requires the negative margin to not cause overflows of parent containers\n margin: -1px;\n");
24
26
  };
25
27
  /*
26
28
  * Styles
@@ -47,6 +47,8 @@ var _button = require("../button");
47
47
 
48
48
  var _accordion = require("./accordion.styles");
49
49
 
50
+ var _global_styling = require("../../global_styling");
51
+
50
52
  var _react2 = require("@emotion/react");
51
53
 
52
54
  var _excluded = ["children", "buttonContent", "className", "id", "element", "buttonClassName", "buttonContentClassName", "extraAction", "paddingSize", "initialIsOpen", "arrowDisplay", "forceState", "isLoading", "isLoadingMessage", "isDisabled", "buttonProps", "buttonElement", "arrowProps", "theme"];
@@ -94,7 +96,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
94
96
  var forceState = _this.props.forceState;
95
97
  requestAnimationFrame(function () {
96
98
  var height = _this.childContent && (forceState ? forceState === 'open' : _this.state.isOpen) ? _this.childContent.clientHeight : 0;
97
- _this.childWrapper && _this.childWrapper.setAttribute('style', "height: ".concat(height, "px"));
99
+ _this.childWrapper && _this.childWrapper.setAttribute('style', (0, _global_styling.logicalCSS)('height', "".concat(height, "px")));
98
100
  });
99
101
  });
100
102
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onToggle", function () {
@@ -7,14 +7,14 @@ exports.euiAccordionTriggerWrapperStyles = exports.euiAccordionSpinnerStyles = e
7
7
 
8
8
  var _react = require("@emotion/react");
9
9
 
10
- var _mixins = require("../../global_styling/mixins");
10
+ var _global_styling = require("../../global_styling");
11
11
 
12
12
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
13
13
 
14
14
  var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
15
15
  var euiTheme = euiThemeContext.euiTheme;
16
16
  return {
17
- euiAccordion__button: /*#__PURE__*/(0, _react.css)((0, _mixins.euiFontSize)(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";text-align:left;width:100%;&:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
17
+ euiAccordion__button: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";", (0, _global_styling.logicalTextAlignCSS)('left'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " &:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
18
18
  // Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
19
19
  // Hover pseudo selector for specificity
20
20
  disabled: /*#__PURE__*/(0, _react.css)("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;")
@@ -23,7 +23,7 @@ var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext
23
23
 
24
24
  exports.euiAccordionButtonStyles = euiAccordionButtonStyles;
25
25
 
26
- var _ref5 = process.env.NODE_ENV === "production" ? {
26
+ var _ref4 = process.env.NODE_ENV === "production" ? {
27
27
  name: "1xvjonu-isLoading",
28
28
  styles: "align-items:center;display:flex;label:isLoading;"
29
29
  } : {
@@ -32,11 +32,11 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
32
32
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
33
  };
34
34
 
35
- var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref6) {
36
- var euiTheme = _ref6.euiTheme;
35
+ var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref5) {
36
+ var euiTheme = _ref5.euiTheme;
37
37
  return {
38
38
  euiAccordion__children: /*#__PURE__*/(0, _react.css)(";label:euiAccordion__children;"),
39
- isLoading: _ref5,
39
+ isLoading: _ref4,
40
40
  xs: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.xs, ";;label:xs;"),
41
41
  s: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.s, ";;label:s;"),
42
42
  m: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.base, ";;label:m;"),
@@ -47,20 +47,11 @@ var euiAccordionChildrenStyles = function euiAccordionChildrenStyles(_ref6) {
47
47
 
48
48
  exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
49
49
 
50
- var _ref4 = process.env.NODE_ENV === "production" ? {
51
- name: "xodlxj-isOpen",
52
- styles: "height:auto;opacity:1;visibility:visible;label:isOpen;"
53
- } : {
54
- name: "xodlxj-isOpen",
55
- styles: "height:auto;opacity:1;visibility:visible;label:isOpen;",
56
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
57
- };
58
-
59
- var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref7) {
60
- var euiTheme = _ref7.euiTheme;
50
+ var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
51
+ var euiTheme = _ref6.euiTheme;
61
52
  return {
62
- euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)("height:0;opacity:0;overflow:hidden;transition:height ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,height;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
63
- isOpen: _ref4
53
+ euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", _global_styling.logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
54
+ isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
64
55
  };
65
56
  };
66
57
 
@@ -75,12 +66,12 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
75
66
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
76
67
  };
77
68
 
78
- var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref8) {
79
- var euiTheme = _ref8.euiTheme;
69
+ var euiAccordionIconButtonStyles = function euiAccordionIconButtonStyles(_ref7) {
70
+ var euiTheme = _ref7.euiTheme;
80
71
  return {
81
- euiAccordion__iconButton: /*#__PURE__*/(0, _react.css)("flex-shrink:0;margin-inline-end:", euiTheme.size.xs, ";transform:rotate(0deg)!important;transform:rotate(0deg)!important;;label:euiAccordion__iconButton;"),
72
+ euiAccordion__iconButton: /*#__PURE__*/(0, _react.css)("flex-shrink:0;", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), " transform:rotate(0deg)!important;;label:euiAccordion__iconButton;"),
82
73
  isOpen: _ref3,
83
- arrowRight: /*#__PURE__*/(0, _react.css)("margin-left:", euiTheme.size.xs, ";margin-right:0;;label:arrowRight;")
74
+ arrowRight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-right', 0), ";;label:arrowRight;")
84
75
  };
85
76
  };
86
77
 
@@ -103,10 +94,10 @@ var euiAccordionOptionalActionStyles = function euiAccordionOptionalActionStyles
103
94
 
104
95
  exports.euiAccordionOptionalActionStyles = euiAccordionOptionalActionStyles;
105
96
 
106
- var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref9) {
107
- var euiTheme = _ref9.euiTheme;
97
+ var euiAccordionSpinnerStyles = function euiAccordionSpinnerStyles(_ref8) {
98
+ var euiTheme = _ref8.euiTheme;
108
99
  return {
109
- euiAccordion__spinner: /*#__PURE__*/(0, _react.css)("margin-right:", euiTheme.size.xs, ";;label:euiAccordion__spinner;")
100
+ euiAccordion__spinner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:euiAccordion__spinner;")
110
101
  };
111
102
  };
112
103
 
@@ -29,7 +29,7 @@ var _icon = require("../../icon");
29
29
 
30
30
  var _react2 = require("@emotion/react");
31
31
 
32
- var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
32
+ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
33
33
 
34
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
35
 
@@ -58,6 +58,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
58
58
  tooltipContent = _ref.tooltipContent,
59
59
  _ref$tooltipPosition = _ref.tooltipPosition,
60
60
  tooltipPosition = _ref$tooltipPosition === void 0 ? 'top' : _ref$tooltipPosition,
61
+ anchorProps = _ref.anchorProps,
61
62
  title = _ref.title,
62
63
  iconType = _ref.iconType,
63
64
  onClick = _ref.onClick,
@@ -122,7 +123,8 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
122
123
  return (0, _react2.jsx)(_tool_tip.EuiToolTip, {
123
124
  position: tooltipPosition,
124
125
  content: tooltipContent,
125
- title: title || label
126
+ title: title || label,
127
+ anchorProps: anchorProps
126
128
  }, content);
127
129
  } else {
128
130
  return (0, _react2.jsx)(_react.Fragment, null, content);
@@ -132,7 +134,8 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
132
134
  return (0, _react2.jsx)(_tool_tip.EuiToolTip, {
133
135
  position: tooltipPosition,
134
136
  content: tooltipContent,
135
- title: title || label
137
+ title: title || label,
138
+ anchorProps: anchorProps
136
139
  }, (0, _react2.jsx)("span", (0, _extends2.default)({
137
140
  tabIndex: 0,
138
141
  className: classes,