@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
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
4
+ var _excluded = ["children", "iconType", "iconSide", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "type"];
5
5
 
6
6
  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; }
7
7
 
@@ -17,43 +17,56 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  import React, { forwardRef } from 'react'; // @ts-ignore module doesn't export `createElement`
18
18
 
19
19
  import { createElement } from '@emotion/react';
20
- import { useEuiTheme } from '../../../services';
20
+ import { getSecureRelForTarget, useEuiTheme } from '../../../services';
21
21
  import { euiButtonDisplayStyles } from './_button_display.styles';
22
22
  import { EuiButtonDisplayContent } from './_button_display_content';
23
- /**
24
- * Extends EuiButtonDisplayContentProps which provides
25
- * `iconType`, `iconSide`, and `textProps`
26
- */
27
-
23
+ import { validateHref } from '../../../services/security/href_validator';
24
+ import { useEuiButtonRadiusCSS } from '../../../themes/amsterdam/global_styling/mixins';
28
25
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
-
26
+ var SIZES = ['xs', 's', 'm'];
27
+ export function isButtonDisabled(_ref) {
28
+ var href = _ref.href,
29
+ isDisabled = _ref.isDisabled,
30
+ isLoading = _ref.isLoading;
31
+ var isHrefValid = !href || validateHref(href);
32
+ return isLoading || isDisabled || !isHrefValid;
33
+ }
30
34
  /**
31
35
  * EuiButtonDisplay is an internal-only component used for displaying
32
36
  * any element as a button.
33
37
  */
34
- export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref, ref) {
35
- var _ref$element = _ref.element,
36
- element = _ref$element === void 0 ? 'button' : _ref$element,
37
- children = _ref.children,
38
- iconType = _ref.iconType,
39
- iconSide = _ref.iconSide,
40
- _ref$size = _ref.size,
41
- size = _ref$size === void 0 ? 'm' : _ref$size,
42
- _ref$isDisabled = _ref.isDisabled,
43
- isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
44
- isLoading = _ref.isLoading,
45
- isSelected = _ref.isSelected,
46
- fullWidth = _ref.fullWidth,
47
- minWidth = _ref.minWidth,
48
- contentProps = _ref.contentProps,
49
- textProps = _ref.textProps,
50
- rest = _objectWithoutProperties(_ref, _excluded);
51
38
 
52
- var buttonIsDisabled = isLoading || isDisabled;
53
- var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
39
+ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
40
+ var children = _ref2.children,
41
+ iconType = _ref2.iconType,
42
+ iconSide = _ref2.iconSide,
43
+ _ref2$size = _ref2.size,
44
+ size = _ref2$size === void 0 ? 'm' : _ref2$size,
45
+ isDisabled = _ref2.isDisabled,
46
+ disabled = _ref2.disabled,
47
+ isLoading = _ref2.isLoading,
48
+ isSelected = _ref2.isSelected,
49
+ fullWidth = _ref2.fullWidth,
50
+ minWidth = _ref2.minWidth,
51
+ contentProps = _ref2.contentProps,
52
+ textProps = _ref2.textProps,
53
+ href = _ref2.href,
54
+ target = _ref2.target,
55
+ rel = _ref2.rel,
56
+ _ref2$type = _ref2.type,
57
+ type = _ref2$type === void 0 ? 'button' : _ref2$type,
58
+ rest = _objectWithoutProperties(_ref2, _excluded);
59
+
60
+ var buttonIsDisabled = isButtonDisabled({
61
+ href: href,
62
+ isDisabled: isDisabled || disabled,
63
+ isLoading: isLoading
64
+ });
65
+ var minWidthPx = typeof minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
54
66
  var theme = useEuiTheme();
55
67
  var styles = euiButtonDisplayStyles(theme, minWidthPx);
56
- var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
68
+ var buttonRadiusStyle = useEuiButtonRadiusCSS()[size];
69
+ var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
57
70
 
58
71
  var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
59
72
  isLoading: isLoading,
@@ -63,11 +76,33 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref, ref) {
63
76
  textProps: _objectSpread({}, textProps)
64
77
  }, contentProps), children);
65
78
 
66
- return createElement(element, _objectSpread({
79
+ var element = href && !buttonIsDisabled ? 'a' : 'button';
80
+ var elementProps = {}; // Element-specific attributes
81
+
82
+ if (element === 'button') {
83
+ elementProps = _objectSpread(_objectSpread({}, elementProps), {}, {
84
+ disabled: buttonIsDisabled,
85
+ 'aria-pressed': isSelected
86
+ });
87
+ }
88
+
89
+ var relObj = {};
90
+
91
+ if (href && !buttonIsDisabled) {
92
+ relObj.href = href;
93
+ relObj.rel = getSecureRelForTarget({
94
+ href: href,
95
+ target: target,
96
+ rel: rel
97
+ });
98
+ relObj.target = target;
99
+ } else {
100
+ relObj.type = type;
101
+ }
102
+
103
+ return createElement(element, _objectSpread(_objectSpread(_objectSpread({
67
104
  css: cssStyles,
68
- disabled: element === 'button' && buttonIsDisabled,
69
- 'aria-pressed': element === 'button' ? isSelected : undefined,
70
105
  ref: ref
71
- }, rest), innerNode);
106
+ }, elementProps), relObj), rest), innerNode);
72
107
  });
73
108
  EuiButtonDisplay.displayName = 'EuiButtonDisplay';
@@ -20,20 +20,11 @@ var _buttonSize = function _buttonSize(size) {
20
20
  };
21
21
 
22
22
  var _ref = process.env.NODE_ENV === "production" ? {
23
- name: "15xpz7k-fullWidth",
24
- styles: "display:block;width:100%;label:fullWidth;"
23
+ name: "vifhyf-isDisabled",
24
+ styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;"
25
25
  } : {
26
- name: "15xpz7k-fullWidth",
27
- styles: "display:block;width:100%;label:fullWidth;",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
- };
30
-
31
- var _ref2 = process.env.NODE_ENV === "production" ? {
32
- name: "8595p9-isDisabled",
33
- styles: "cursor:not-allowed;label:isDisabled;"
34
- } : {
35
- name: "8595p9-isDisabled",
36
- styles: "cursor:not-allowed;label:isDisabled;",
26
+ name: "vifhyf-isDisabled",
27
+ styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;",
37
28
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
29
  };
39
30
 
@@ -41,10 +32,10 @@ export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeCont
41
32
  var euiTheme = euiThemeContext.euiTheme;
42
33
  return {
43
34
  // Base
44
- euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";", minWidth && logicalCSS('min-width', minWidth), ";;label:euiButtonDisplay;"),
35
+ euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";", minWidth && logicalCSS('min-width', minWidth), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
45
36
  // States
46
- isDisabled: _ref2,
47
- fullWidth: _ref,
37
+ isDisabled: _ref,
38
+ fullWidth: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), ";;label:fullWidth;"),
48
39
  // Sizes
49
40
  xs: /*#__PURE__*/css(_buttonSize(euiTheme.size.l), euiFontSize(euiThemeContext, 'xs'), ";label:xs;"),
50
41
  s: /*#__PURE__*/css(_buttonSize(euiTheme.size.xl), euiFontSize(euiThemeContext, 's'), ";label:s;"),
@@ -14,6 +14,7 @@ import { useEuiTheme } from '../../../services';
14
14
  import { EuiLoadingSpinner } from '../../loading';
15
15
  import { EuiIcon } from '../../icon';
16
16
  import { euiButtonDisplayContentStyles } from './_button_display_content.styles';
17
+ import classNames from 'classnames';
17
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
19
  export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
19
20
  var children = _ref.children,
@@ -30,7 +31,7 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
30
31
 
31
32
  var theme = useEuiTheme();
32
33
  var styles = euiButtonDisplayContentStyles(theme);
33
- var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide], isDisabled && styles.isDisabled];
34
+ var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
34
35
  var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
35
36
  var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
36
37
 
@@ -63,5 +64,7 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
63
64
  var isText = typeof children === 'string';
64
65
  return ___EmotionJSX("span", _extends({}, contentProps, {
65
66
  css: cssStyles
66
- }), icon, isText ? ___EmotionJSX("span", textProps, children) : children);
67
+ }), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
68
+ className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
69
+ }), children) : children);
67
70
  };
@@ -11,15 +11,6 @@ import { css } from '@emotion/react';
11
11
  import { logicalCSS } from '../../../global_styling';
12
12
 
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
- name: "ske5nx-isDisabled",
15
- styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
16
- } : {
17
- name: "ske5nx-isDisabled",
18
- styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
19
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
- };
21
-
22
- var _ref2 = process.env.NODE_ENV === "production" ? {
23
14
  name: "gtg6j-euiButtonDisplayContent__icon",
24
15
  styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
25
16
  } : {
@@ -28,7 +19,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
28
19
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
20
  };
30
21
 
31
- var _ref3 = process.env.NODE_ENV === "production" ? {
22
+ var _ref2 = process.env.NODE_ENV === "production" ? {
32
23
  name: "10wlo76-euiButtonDisplayContent__spinner",
33
24
  styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
34
25
  } : {
@@ -37,7 +28,7 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
37
28
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
29
  };
39
30
 
40
- var _ref4 = process.env.NODE_ENV === "production" ? {
31
+ var _ref3 = process.env.NODE_ENV === "production" ? {
41
32
  name: "qfl6yj-right",
42
33
  styles: "flex-direction:row-reverse;label:right;"
43
34
  } : {
@@ -46,16 +37,15 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
46
37
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
47
38
  };
48
39
 
49
- export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref5) {
50
- var euiTheme = _ref5.euiTheme;
40
+ export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
41
+ var euiTheme = _ref4.euiTheme;
51
42
  return {
52
43
  // Base
53
44
  euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), ";", logicalCSS('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
54
45
  // Icon side
55
46
  left: /*#__PURE__*/css(";label:left;"),
56
- right: _ref4,
57
- euiButtonDisplayContent__spinner: _ref3,
58
- euiButtonDisplayContent__icon: _ref2,
59
- isDisabled: _ref
47
+ right: _ref3,
48
+ euiButtonDisplayContent__spinner: _ref2,
49
+ euiButtonDisplayContent__icon: _ref
60
50
  };
61
51
  };
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"];
5
5
 
@@ -17,19 +17,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
17
17
  import React from 'react';
18
18
  import classNames from 'classnames';
19
19
  import { keysOf } from '../../common';
20
- import { getSecureRelForTarget } from '../../../services';
20
+ import { EuiThemeProvider, getSecureRelForTarget } from '../../../services';
21
21
  import { EuiButtonContentDeprecated as EuiButtonContent } from '../_button_content_deprecated';
22
- import { validateHref } from '../../../services/security/href_validator';
22
+ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
23
+ import { isButtonDisabled } from '../button_display/_button_display';
23
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
- var colorToClassNameMap = {
25
- primary: 'euiButtonEmpty--primary',
26
- danger: 'euiButtonEmpty--danger',
27
- text: 'euiButtonEmpty--text',
28
- ghost: 'euiButtonEmpty--ghost',
29
- success: 'euiButtonEmpty--success',
30
- warning: 'euiButtonEmpty--warning'
31
- };
32
- export var COLORS = keysOf(colorToClassNameMap);
33
25
  var sizeToClassNameMap = {
34
26
  xs: 'euiButtonEmpty--xSmall',
35
27
  s: 'euiButtonEmpty--small',
@@ -47,43 +39,57 @@ export var FLUSH_TYPES = keysOf(flushTypeToClassNameMap);
47
39
  * `iconType`, `iconSide`, and `textProps`
48
40
  */
49
41
 
50
- export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
51
- var children = _ref.children,
52
- className = _ref.className,
53
- iconType = _ref.iconType,
54
- _ref$iconSide = _ref.iconSide,
55
- iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
56
- _ref$iconSize = _ref.iconSize,
57
- iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
58
- _ref$color = _ref.color,
59
- color = _ref$color === void 0 ? 'primary' : _ref$color,
60
- _ref$size = _ref.size,
61
- size = _ref$size === void 0 ? 'm' : _ref$size,
62
- flush = _ref.flush,
63
- _isDisabled = _ref.isDisabled,
64
- _disabled = _ref.disabled,
65
- isLoading = _ref.isLoading,
66
- href = _ref.href,
67
- target = _ref.target,
68
- rel = _ref.rel,
69
- _ref$type = _ref.type,
70
- type = _ref$type === void 0 ? 'button' : _ref$type,
71
- buttonRef = _ref.buttonRef,
72
- contentProps = _ref.contentProps,
73
- textProps = _ref.textProps,
74
- isSelected = _ref.isSelected,
75
- rest = _objectWithoutProperties(_ref, _excluded);
42
+ export var EuiButtonEmpty = function EuiButtonEmpty(props) {
43
+ var children = props.children,
44
+ className = props.className,
45
+ iconType = props.iconType,
46
+ _props$iconSide = props.iconSide,
47
+ iconSide = _props$iconSide === void 0 ? 'left' : _props$iconSide,
48
+ _props$iconSize = props.iconSize,
49
+ iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
50
+ _props$color = props.color,
51
+ _color = _props$color === void 0 ? 'primary' : _props$color,
52
+ _props$size = props.size,
53
+ size = _props$size === void 0 ? 'm' : _props$size,
54
+ flush = props.flush,
55
+ _isDisabled = props.isDisabled,
56
+ disabled = props.disabled,
57
+ isLoading = props.isLoading,
58
+ href = props.href,
59
+ target = props.target,
60
+ rel = props.rel,
61
+ _props$type = props.type,
62
+ type = _props$type === void 0 ? 'button' : _props$type,
63
+ buttonRef = props.buttonRef,
64
+ contentProps = props.contentProps,
65
+ textProps = props.textProps,
66
+ isSelected = props.isSelected,
67
+ rest = _objectWithoutProperties(props, _excluded);
76
68
 
77
- var isHrefValid = !href || validateHref(href);
78
- var disabled = _disabled || !isHrefValid;
79
- var isDisabled = _isDisabled || !isHrefValid; // If in the loading state, force disabled to true
69
+ var isDisabled = isButtonDisabled({
70
+ isDisabled: _isDisabled || disabled,
71
+ href: href,
72
+ isLoading: isLoading
73
+ }); // eslint-disable-next-line no-nested-ternary
74
+
75
+ var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
76
+ var buttonColorStyles = useEuiButtonColorCSS({
77
+ display: 'empty'
78
+ })[color];
79
+
80
+ if (_color === 'ghost') {
81
+ // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
82
+ return ___EmotionJSX(EuiThemeProvider, {
83
+ colorMode: "dark"
84
+ }, ___EmotionJSX(EuiButtonEmpty, _extends({}, props, {
85
+ color: "text"
86
+ })));
87
+ }
80
88
 
81
- var buttonIsDisabled = isLoading || isDisabled || disabled;
82
- var classes = classNames('euiButtonEmpty', colorToClassNameMap[color], size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, {
83
- 'euiButtonEmpty-isDisabled': buttonIsDisabled
84
- }, className);
89
+ var classes = classNames('euiButtonEmpty', size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, className);
85
90
  var contentClassNames = classNames('euiButtonEmpty__content', contentProps && contentProps.className);
86
91
  var textClassNames = classNames('euiButtonEmpty__text', textProps && textProps.className);
92
+ var cssStyles = [buttonColorStyles];
87
93
 
88
94
  var innerNode = ___EmotionJSX(EuiButtonContent, _extends({
89
95
  isLoading: isLoading,
@@ -100,7 +106,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
100
106
  // this is a button and piggyback off its disabled styles.
101
107
 
102
108
 
103
- if (href && !buttonIsDisabled) {
109
+ if (href && !isDisabled) {
104
110
  var secureRel = getSecureRelForTarget({
105
111
  href: href,
106
112
  target: target,
@@ -108,6 +114,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
108
114
  });
109
115
  return ___EmotionJSX("a", _extends({
110
116
  className: classes,
117
+ css: cssStyles,
111
118
  href: href,
112
119
  target: target,
113
120
  rel: secureRel,
@@ -116,8 +123,9 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
116
123
  }
117
124
 
118
125
  return ___EmotionJSX("button", _extends({
119
- disabled: buttonIsDisabled,
126
+ disabled: isDisabled,
120
127
  className: classes,
128
+ css: cssStyles,
121
129
  type: type,
122
130
  ref: buttonRef,
123
131
  "aria-pressed": isSelected
@@ -5,4 +5,4 @@
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
- export { COLORS, EuiButtonEmpty } from './button_empty';
8
+ export { EuiButtonEmpty } from './button_empty';
@@ -46,15 +46,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
46
46
  type = _ref$type === void 0 ? 'single' : _ref$type,
47
47
  rest = _objectWithoutProperties(_ref, _excluded);
48
48
 
49
- // Compressed style can't support `ghost` color because it's more like a form field than a button
50
- var badColorCombo = buttonSize === 'compressed' && color === 'ghost';
51
- var resolvedColor = badColorCombo ? 'text' : color;
52
-
53
- if (badColorCombo) {
54
- console.warn('EuiButtonGroup of compressed size does not support the ghost color. It will render as text instead.');
55
- }
56
-
57
- var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[resolvedColor]), {
49
+ var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[color]), {
58
50
  'euiButtonGroup--fullWidth': isFullWidth,
59
51
  'euiButtonGroup--isDisabled': isDisabled
60
52
  }, className);
@@ -76,7 +68,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
76
68
  }, option, {
77
69
  element: typeIsSingle ? 'label' : 'button',
78
70
  isSelected: typeIsSingle ? option.id === idSelected : idToSelectedMap[option.id],
79
- color: resolvedColor,
71
+ color: color,
80
72
  size: buttonSize,
81
73
  isIconOnly: isIconOnly,
82
74
  onChange: onChange
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "element", "type"];
5
+ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "color", "element", "type"];
6
6
 
7
7
  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; }
8
8
 
@@ -20,6 +20,7 @@ import React from 'react';
20
20
  import { EuiButtonDisplayDeprecated as EuiButtonDisplay } from '../button';
21
21
  import { useInnerText } from '../../inner_text';
22
22
  import { useGeneratedHtmlId } from '../../../services';
23
+ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
23
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
25
  export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
25
26
  var className = _ref.className,
@@ -33,6 +34,8 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
33
34
  _onChange = _ref.onChange,
34
35
  size = _ref.size,
35
36
  value = _ref.value,
37
+ _ref$color = _ref.color,
38
+ _color = _ref$color === void 0 ? 'primary' : _ref$color,
36
39
  _ref$element = _ref.element,
37
40
  element = _ref$element === void 0 ? 'button' : _ref$element,
38
41
  _ref$type = _ref.type,
@@ -72,8 +75,15 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
72
75
  return _onChange(id);
73
76
  }
74
77
  });
75
- }
78
+ } // eslint-disable-next-line no-nested-ternary
76
79
 
80
+
81
+ var color = isDisabled ? 'disabled' : _color; // eslint-disable-next-line no-nested-ternary
82
+
83
+ var display = isSelected ? 'fill' : size === 'compressed' ? 'empty' : 'base';
84
+ var buttonColorStyles = useEuiButtonColorCSS({
85
+ display: display
86
+ })[color];
77
87
  var buttonClasses = classNames({
78
88
  'euiButtonGroupButton-isSelected': isSelected,
79
89
  'euiButtonGroupButton-isIconOnly': isIconOnly
@@ -90,10 +100,10 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
90
100
  innerText = _useInnerText2[1];
91
101
 
92
102
  return ___EmotionJSX(EuiButtonDisplay, _extends({
103
+ css: [buttonColorStyles, ";label:EuiButtonGroupButton;"],
93
104
  baseClassName: "euiButtonGroupButton",
94
105
  className: buttonClasses,
95
106
  element: el,
96
- fill: size !== 'compressed' && isSelected,
97
107
  isDisabled: isDisabled,
98
108
  size: size === 'compressed' ? 's' : size,
99
109
  textProps: {
@@ -11,11 +11,13 @@ var _excluded = ["className", "iconType", "iconSize", "color", "isDisabled", "di
11
11
  */
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { getSecureRelForTarget } from '../../../services';
14
+ import { EuiThemeProvider, getSecureRelForTarget, useEuiTheme } from '../../../services';
15
15
  import { keysOf } from '../../common';
16
16
  import { EuiIcon } from '../../icon';
17
17
  import { EuiLoadingSpinner } from '../../loading';
18
- import { validateHref } from '../../../services/security/href_validator';
18
+ import { euiButtonEmptyColor, useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
19
+ import { isButtonDisabled } from '../button_display/_button_display';
20
+ import { css } from '@emotion/react';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
22
  var displayToClassNameMap = {
21
23
  base: null,
@@ -23,57 +25,66 @@ var displayToClassNameMap = {
23
25
  fill: 'euiButtonIcon--fill'
24
26
  };
25
27
  export var DISPLAYS = keysOf(displayToClassNameMap);
26
- var colorToClassNameMap = {
27
- accent: 'euiButtonIcon--accent',
28
- danger: 'euiButtonIcon--danger',
29
- ghost: 'euiButtonIcon--ghost',
30
- primary: 'euiButtonIcon--primary',
31
- success: 'euiButtonIcon--success',
32
- text: 'euiButtonIcon--text',
33
- warning: 'euiButtonIcon--warning'
34
- };
35
- export var COLORS = keysOf(colorToClassNameMap);
36
28
  var sizeToClassNameMap = {
37
29
  xs: 'euiButtonIcon--xSmall',
38
30
  s: 'euiButtonIcon--small',
39
31
  m: 'euiButtonIcon--medium'
40
32
  };
41
33
  export var SIZES = keysOf(sizeToClassNameMap);
42
- export var EuiButtonIcon = function EuiButtonIcon(_ref) {
43
- var className = _ref.className,
44
- iconType = _ref.iconType,
45
- _ref$iconSize = _ref.iconSize,
46
- iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
47
- _ref$color = _ref.color,
48
- color = _ref$color === void 0 ? 'primary' : _ref$color,
49
- _isDisabled = _ref.isDisabled,
50
- disabled = _ref.disabled,
51
- href = _ref.href,
52
- _ref$type = _ref.type,
53
- type = _ref$type === void 0 ? 'button' : _ref$type,
54
- _ref$display = _ref.display,
55
- display = _ref$display === void 0 ? 'empty' : _ref$display,
56
- target = _ref.target,
57
- rel = _ref.rel,
58
- _ref$size = _ref.size,
59
- size = _ref$size === void 0 ? 'xs' : _ref$size,
60
- buttonRef = _ref.buttonRef,
61
- isSelected = _ref.isSelected,
62
- isLoading = _ref.isLoading,
63
- rest = _objectWithoutProperties(_ref, _excluded);
64
-
65
- var isHrefValid = !href || validateHref(href);
66
- var isDisabled = _isDisabled || disabled || !isHrefValid || isLoading;
34
+ export var EuiButtonIcon = function EuiButtonIcon(props) {
35
+ var className = props.className,
36
+ iconType = props.iconType,
37
+ _props$iconSize = props.iconSize,
38
+ iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
39
+ _props$color = props.color,
40
+ _color = _props$color === void 0 ? 'primary' : _props$color,
41
+ _isDisabled = props.isDisabled,
42
+ disabled = props.disabled,
43
+ href = props.href,
44
+ _props$type = props.type,
45
+ type = _props$type === void 0 ? 'button' : _props$type,
46
+ _props$display = props.display,
47
+ display = _props$display === void 0 ? 'empty' : _props$display,
48
+ target = props.target,
49
+ rel = props.rel,
50
+ _props$size = props.size,
51
+ size = _props$size === void 0 ? 'xs' : _props$size,
52
+ buttonRef = props.buttonRef,
53
+ isSelected = props.isSelected,
54
+ isLoading = props.isLoading,
55
+ rest = _objectWithoutProperties(props, _excluded);
56
+
57
+ var euiThemeContext = useEuiTheme();
58
+ var isDisabled = isButtonDisabled({
59
+ isDisabled: _isDisabled || disabled,
60
+ href: href,
61
+ isLoading: isLoading
62
+ });
67
63
  var ariaHidden = rest['aria-hidden'];
68
64
  var isAriaHidden = ariaHidden === 'true' || ariaHidden === true;
69
65
 
70
66
  if (!rest['aria-label'] && !rest['aria-labelledby'] && !isAriaHidden) {
71
67
  console.warn("EuiButtonIcon requires aria-label or aria-labelledby to be specified because icon-only\n buttons are screen-reader-inaccessible without them.");
72
- }
68
+ } // eslint-disable-next-line no-nested-ternary
69
+
70
+
71
+ var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
72
+ var buttonColorStyles = useEuiButtonColorCSS({
73
+ display: display
74
+ })[color]; // Temporary extra style for empty `:hover` state until we decide how to handle universally
75
+
76
+ var hoverStyles = display === 'empty' ? /*#__PURE__*/css("&:hover{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;") : /*#__PURE__*/css(";label:hoverStyles;");
77
+ var classes = classNames('euiButtonIcon', size && sizeToClassNameMap[size], className);
78
+
79
+ if (_color === 'ghost') {
80
+ // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
81
+ return ___EmotionJSX(EuiThemeProvider, {
82
+ colorMode: "dark"
83
+ }, ___EmotionJSX(EuiButtonIcon, _extends({}, props, {
84
+ color: "text"
85
+ })));
86
+ } // Add an icon to the button if one exists.
73
87
 
74
- var classes = classNames('euiButtonIcon', {
75
- 'euiButtonIcon-isDisabled': isDisabled
76
- }, colorToClassNameMap[color], display && displayToClassNameMap[display], size && sizeToClassNameMap[size], className); // Add an icon to the button if one exists.
77
88
 
78
89
  var buttonIcon;
79
90
 
@@ -108,6 +119,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
108
119
  rel: rel
109
120
  });
110
121
  return ___EmotionJSX("a", _extends({
122
+ css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
111
123
  tabIndex: isAriaHidden ? -1 : undefined,
112
124
  className: classes,
113
125
  href: href,
@@ -119,6 +131,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
119
131
 
120
132
  var buttonType;
121
133
  return ___EmotionJSX("button", _extends({
134
+ css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
122
135
  tabIndex: isAriaHidden ? -1 : undefined,
123
136
  disabled: isDisabled,
124
137
  className: classes,
@@ -18,7 +18,8 @@ export var euiCallOutStyles = function euiCallOutStyles(_ref) {
18
18
  export var euiCallOutHeadingStyles = function euiCallOutHeadingStyles(_ref2) {
19
19
  var euiTheme = _ref2.euiTheme;
20
20
  return {
21
- euiCallOutHeader: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";margin-bottom:0!important;;label:euiCallOutHeader;"),
21
+ euiCallOutHeader: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";", logicalCSS('margin-bottom', '0 !important' // In case it's nested inside EuiText
22
+ ), ";;label:euiCallOutHeader;"),
22
23
  primary: /*#__PURE__*/css("color:", euiTheme.colors.primaryText, ";;label:primary;"),
23
24
  success: /*#__PURE__*/css("color:", euiTheme.colors.successText, ";;label:success;"),
24
25
  warning: /*#__PURE__*/css("color:", euiTheme.colors.warningText, ";;label:warning;"),