@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
@@ -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;"),
@@ -19,6 +19,7 @@ import { useEuiTheme } from '../../../services';
19
19
  import { EuiLoadingSpinner } from '../../loading';
20
20
  import { EuiIcon } from '../../icon';
21
21
  import { euiButtonDisplayContentStyles } from './_button_display_content.styles';
22
+ import classNames from 'classnames';
22
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
24
  export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
24
25
  var children = _ref.children,
@@ -35,7 +36,7 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
35
36
 
36
37
  var theme = useEuiTheme();
37
38
  var styles = euiButtonDisplayContentStyles(theme);
38
- var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide], isDisabled && styles.isDisabled];
39
+ var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
39
40
  var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
40
41
  var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
41
42
 
@@ -68,7 +69,9 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
68
69
  var isText = typeof children === 'string';
69
70
  return ___EmotionJSX("span", _extends({}, contentProps, {
70
71
  css: cssStyles
71
- }), icon, isText ? ___EmotionJSX("span", textProps, children) : children);
72
+ }), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
73
+ className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
74
+ }), children) : children);
72
75
  };
73
76
  EuiButtonDisplayContent.propTypes = {
74
77
  /**
@@ -94,7 +97,7 @@ EuiButtonDisplayContent.propTypes = {
94
97
  "data-text": PropTypes.string
95
98
  }),
96
99
  iconSize: PropTypes.oneOf(["s", "m"]),
97
- isDisabled: PropTypes.bool.isRequired,
100
+ isDisabled: PropTypes.bool,
98
101
  className: PropTypes.string,
99
102
  "aria-label": PropTypes.string,
100
103
  "data-test-subj": PropTypes.string,
@@ -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,13 +1,13 @@
1
1
  var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"];
2
2
 
3
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
-
5
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; }
6
4
 
7
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; }
8
6
 
9
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
8
 
9
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+
11
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
12
12
 
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -23,19 +23,11 @@ import React from 'react';
23
23
  import PropTypes from "prop-types";
24
24
  import classNames from 'classnames';
25
25
  import { keysOf } from '../../common';
26
- import { getSecureRelForTarget } from '../../../services';
26
+ import { EuiThemeProvider, getSecureRelForTarget } from '../../../services';
27
27
  import { EuiButtonContentDeprecated as EuiButtonContent } from '../_button_content_deprecated';
28
- import { validateHref } from '../../../services/security/href_validator';
28
+ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
29
+ import { isButtonDisabled } from '../button_display/_button_display';
29
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
30
- var colorToClassNameMap = {
31
- primary: 'euiButtonEmpty--primary',
32
- danger: 'euiButtonEmpty--danger',
33
- text: 'euiButtonEmpty--text',
34
- ghost: 'euiButtonEmpty--ghost',
35
- success: 'euiButtonEmpty--success',
36
- warning: 'euiButtonEmpty--warning'
37
- };
38
- export var COLORS = keysOf(colorToClassNameMap);
39
31
  var sizeToClassNameMap = {
40
32
  xs: 'euiButtonEmpty--xSmall',
41
33
  s: 'euiButtonEmpty--small',
@@ -53,43 +45,57 @@ export var FLUSH_TYPES = keysOf(flushTypeToClassNameMap);
53
45
  * `iconType`, `iconSide`, and `textProps`
54
46
  */
55
47
 
56
- export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
57
- var children = _ref.children,
58
- className = _ref.className,
59
- iconType = _ref.iconType,
60
- _ref$iconSide = _ref.iconSide,
61
- iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
62
- _ref$iconSize = _ref.iconSize,
63
- iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
64
- _ref$color = _ref.color,
65
- color = _ref$color === void 0 ? 'primary' : _ref$color,
66
- _ref$size = _ref.size,
67
- size = _ref$size === void 0 ? 'm' : _ref$size,
68
- flush = _ref.flush,
69
- _isDisabled = _ref.isDisabled,
70
- _disabled = _ref.disabled,
71
- isLoading = _ref.isLoading,
72
- href = _ref.href,
73
- target = _ref.target,
74
- rel = _ref.rel,
75
- _ref$type = _ref.type,
76
- type = _ref$type === void 0 ? 'button' : _ref$type,
77
- buttonRef = _ref.buttonRef,
78
- contentProps = _ref.contentProps,
79
- textProps = _ref.textProps,
80
- isSelected = _ref.isSelected,
81
- rest = _objectWithoutProperties(_ref, _excluded);
82
-
83
- var isHrefValid = !href || validateHref(href);
84
- var disabled = _disabled || !isHrefValid;
85
- var isDisabled = _isDisabled || !isHrefValid; // If in the loading state, force disabled to true
86
-
87
- var buttonIsDisabled = isLoading || isDisabled || disabled;
88
- var classes = classNames('euiButtonEmpty', colorToClassNameMap[color], size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, {
89
- 'euiButtonEmpty-isDisabled': buttonIsDisabled
90
- }, className);
48
+ export var EuiButtonEmpty = function EuiButtonEmpty(props) {
49
+ var children = props.children,
50
+ className = props.className,
51
+ iconType = props.iconType,
52
+ _props$iconSide = props.iconSide,
53
+ iconSide = _props$iconSide === void 0 ? 'left' : _props$iconSide,
54
+ _props$iconSize = props.iconSize,
55
+ iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
56
+ _props$color = props.color,
57
+ _color = _props$color === void 0 ? 'primary' : _props$color,
58
+ _props$size = props.size,
59
+ size = _props$size === void 0 ? 'm' : _props$size,
60
+ flush = props.flush,
61
+ _isDisabled = props.isDisabled,
62
+ disabled = props.disabled,
63
+ isLoading = props.isLoading,
64
+ href = props.href,
65
+ target = props.target,
66
+ rel = props.rel,
67
+ _props$type = props.type,
68
+ type = _props$type === void 0 ? 'button' : _props$type,
69
+ buttonRef = props.buttonRef,
70
+ contentProps = props.contentProps,
71
+ textProps = props.textProps,
72
+ isSelected = props.isSelected,
73
+ rest = _objectWithoutProperties(props, _excluded);
74
+
75
+ var isDisabled = isButtonDisabled({
76
+ isDisabled: _isDisabled || disabled,
77
+ href: href,
78
+ isLoading: isLoading
79
+ }); // eslint-disable-next-line no-nested-ternary
80
+
81
+ var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
82
+ var buttonColorStyles = useEuiButtonColorCSS({
83
+ display: 'empty'
84
+ })[color];
85
+
86
+ if (_color === 'ghost') {
87
+ // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
88
+ return ___EmotionJSX(EuiThemeProvider, {
89
+ colorMode: "dark"
90
+ }, ___EmotionJSX(EuiButtonEmpty, _extends({}, props, {
91
+ color: "text"
92
+ })));
93
+ }
94
+
95
+ var classes = classNames('euiButtonEmpty', size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, className);
91
96
  var contentClassNames = classNames('euiButtonEmpty__content', contentProps && contentProps.className);
92
97
  var textClassNames = classNames('euiButtonEmpty__text', textProps && textProps.className);
98
+ var cssStyles = [buttonColorStyles];
93
99
 
94
100
  var innerNode = ___EmotionJSX(EuiButtonContent, _extends({
95
101
  isLoading: isLoading,
@@ -106,7 +112,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
106
112
  // this is a button and piggyback off its disabled styles.
107
113
 
108
114
 
109
- if (href && !buttonIsDisabled) {
115
+ if (href && !isDisabled) {
110
116
  var secureRel = getSecureRelForTarget({
111
117
  href: href,
112
118
  target: target,
@@ -114,6 +120,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
114
120
  });
115
121
  return ___EmotionJSX("a", _extends({
116
122
  className: classes,
123
+ css: cssStyles,
117
124
  href: href,
118
125
  target: target,
119
126
  rel: secureRel,
@@ -122,8 +129,9 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
122
129
  }
123
130
 
124
131
  return ___EmotionJSX("button", _extends({
125
- disabled: buttonIsDisabled,
132
+ disabled: isDisabled,
126
133
  className: classes,
134
+ css: cssStyles,
127
135
  type: type,
128
136
  ref: buttonRef,
129
137
  "aria-pressed": isSelected
@@ -134,13 +142,15 @@ EuiButtonEmpty.propTypes = {
134
142
  onClick: PropTypes.func,
135
143
 
136
144
  /**
137
- * Any of our named colors
145
+ * Any of the named color palette options.
146
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
138
147
  */
139
148
 
140
149
  /**
141
- * Any of our named colors
150
+ * Any of the named color palette options.
151
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
142
152
  */
143
- color: PropTypes.oneOf(["primary", "danger", "text", "ghost", "success", "warning"]),
153
+ color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
144
154
  size: PropTypes.oneOf(["xs", "s", "m"]),
145
155
 
146
156
  /**
@@ -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';
@@ -51,15 +51,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
51
51
  type = _ref$type === void 0 ? 'single' : _ref$type,
52
52
  rest = _objectWithoutProperties(_ref, _excluded);
53
53
 
54
- // Compressed style can't support `ghost` color because it's more like a form field than a button
55
- var badColorCombo = buttonSize === 'compressed' && color === 'ghost';
56
- var resolvedColor = badColorCombo ? 'text' : color;
57
-
58
- if (badColorCombo) {
59
- console.warn('EuiButtonGroup of compressed size does not support the ghost color. It will render as text instead.');
60
- }
61
-
62
- var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[resolvedColor]), {
54
+ var classes = classNames('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(colorToClassNameMap[color]), {
63
55
  'euiButtonGroup--fullWidth': isFullWidth,
64
56
  'euiButtonGroup--isDisabled': isDisabled
65
57
  }, className);
@@ -81,7 +73,7 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
81
73
  }, option, {
82
74
  element: typeIsSingle ? 'label' : 'button',
83
75
  isSelected: typeIsSingle ? option.id === idSelected : idToSelectedMap[option.id],
84
- color: resolvedColor,
76
+ color: color,
85
77
  size: buttonSize,
86
78
  isIconOnly: isIconOnly,
87
79
  onChange: onChange
@@ -118,9 +110,9 @@ EuiButtonGroup.propTypes = {
118
110
  legend: PropTypes.string.isRequired,
119
111
 
120
112
  /**
121
- * Compressed styles don't support `ghost` color (Color will be changed to "text")
113
+ * Any of the named color palette options.
122
114
  */
123
- color: PropTypes.oneOf(["primary", "accent", "success", "warning", "danger", "ghost", "text"]),
115
+ color: PropTypes.any,
124
116
 
125
117
  /**
126
118
  * Default for `type` is single so it can also be excluded
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "element", "type"];
1
+ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "color", "element", "type"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -37,6 +37,7 @@ import React from 'react';
37
37
  import { EuiButtonDisplayDeprecated as EuiButtonDisplay } from '../button';
38
38
  import { useInnerText } from '../../inner_text';
39
39
  import { useGeneratedHtmlId } from '../../../services';
40
+ import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
40
41
  import { jsx as ___EmotionJSX } from "@emotion/react";
41
42
  export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
42
43
  var className = _ref.className,
@@ -50,6 +51,8 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
50
51
  _onChange = _ref.onChange,
51
52
  size = _ref.size,
52
53
  value = _ref.value,
54
+ _ref$color = _ref.color,
55
+ _color = _ref$color === void 0 ? 'primary' : _ref$color,
53
56
  _ref$element = _ref.element,
54
57
  element = _ref$element === void 0 ? 'button' : _ref$element,
55
58
  _ref$type = _ref.type,
@@ -89,8 +92,15 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
89
92
  return _onChange(id);
90
93
  }
91
94
  });
92
- }
95
+ } // eslint-disable-next-line no-nested-ternary
93
96
 
97
+
98
+ var color = isDisabled ? 'disabled' : _color; // eslint-disable-next-line no-nested-ternary
99
+
100
+ var display = isSelected ? 'fill' : size === 'compressed' ? 'empty' : 'base';
101
+ var buttonColorStyles = useEuiButtonColorCSS({
102
+ display: display
103
+ })[color];
94
104
  var buttonClasses = classNames({
95
105
  'euiButtonGroupButton-isSelected': isSelected,
96
106
  'euiButtonGroupButton-isIconOnly': isIconOnly
@@ -107,10 +117,10 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
107
117
  innerText = _useInnerText2[1];
108
118
 
109
119
  return ___EmotionJSX(EuiButtonDisplay, _extends({
120
+ css: [buttonColorStyles, ";label:EuiButtonGroupButton;"],
110
121
  baseClassName: "euiButtonGroupButton",
111
122
  className: buttonClasses,
112
123
  element: el,
113
- fill: size !== 'compressed' && isSelected,
114
124
  isDisabled: isDisabled,
115
125
  size: size === 'compressed' ? 's' : size,
116
126
  textProps: {
@@ -194,7 +204,7 @@ EuiButtonGroupButton.propTypes = {
194
204
  /**
195
205
  * Inherit from EuiButtonGroup
196
206
  */
197
- color: PropTypes.oneOf(["primary", "accent", "success", "warning", "danger", "ghost", "text"]).isRequired,
207
+ color: PropTypes.any.isRequired,
198
208
 
199
209
  /**
200
210
  * Inherit from EuiButtonGroup
@@ -16,11 +16,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import React from 'react';
17
17
  import PropTypes from "prop-types";
18
18
  import classNames from 'classnames';
19
- import { getSecureRelForTarget } from '../../../services';
19
+ import { EuiThemeProvider, getSecureRelForTarget, useEuiTheme } from '../../../services';
20
20
  import { keysOf } from '../../common';
21
21
  import { EuiIcon } from '../../icon';
22
22
  import { EuiLoadingSpinner } from '../../loading';
23
- import { validateHref } from '../../../services/security/href_validator';
23
+ import { euiButtonEmptyColor, useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
24
+ import { isButtonDisabled } from '../button_display/_button_display';
25
+ import { css } from '@emotion/react';
24
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
25
27
  var displayToClassNameMap = {
26
28
  base: null,
@@ -28,57 +30,66 @@ var displayToClassNameMap = {
28
30
  fill: 'euiButtonIcon--fill'
29
31
  };
30
32
  export var DISPLAYS = keysOf(displayToClassNameMap);
31
- var colorToClassNameMap = {
32
- accent: 'euiButtonIcon--accent',
33
- danger: 'euiButtonIcon--danger',
34
- ghost: 'euiButtonIcon--ghost',
35
- primary: 'euiButtonIcon--primary',
36
- success: 'euiButtonIcon--success',
37
- text: 'euiButtonIcon--text',
38
- warning: 'euiButtonIcon--warning'
39
- };
40
- export var COLORS = keysOf(colorToClassNameMap);
41
33
  var sizeToClassNameMap = {
42
34
  xs: 'euiButtonIcon--xSmall',
43
35
  s: 'euiButtonIcon--small',
44
36
  m: 'euiButtonIcon--medium'
45
37
  };
46
38
  export var SIZES = keysOf(sizeToClassNameMap);
47
- export var EuiButtonIcon = function EuiButtonIcon(_ref) {
48
- var className = _ref.className,
49
- iconType = _ref.iconType,
50
- _ref$iconSize = _ref.iconSize,
51
- iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
52
- _ref$color = _ref.color,
53
- color = _ref$color === void 0 ? 'primary' : _ref$color,
54
- _isDisabled = _ref.isDisabled,
55
- disabled = _ref.disabled,
56
- href = _ref.href,
57
- _ref$type = _ref.type,
58
- type = _ref$type === void 0 ? 'button' : _ref$type,
59
- _ref$display = _ref.display,
60
- display = _ref$display === void 0 ? 'empty' : _ref$display,
61
- target = _ref.target,
62
- rel = _ref.rel,
63
- _ref$size = _ref.size,
64
- size = _ref$size === void 0 ? 'xs' : _ref$size,
65
- buttonRef = _ref.buttonRef,
66
- isSelected = _ref.isSelected,
67
- isLoading = _ref.isLoading,
68
- rest = _objectWithoutProperties(_ref, _excluded);
69
-
70
- var isHrefValid = !href || validateHref(href);
71
- var isDisabled = _isDisabled || disabled || !isHrefValid || isLoading;
39
+ export var EuiButtonIcon = function EuiButtonIcon(props) {
40
+ var className = props.className,
41
+ iconType = props.iconType,
42
+ _props$iconSize = props.iconSize,
43
+ iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
44
+ _props$color = props.color,
45
+ _color = _props$color === void 0 ? 'primary' : _props$color,
46
+ _isDisabled = props.isDisabled,
47
+ disabled = props.disabled,
48
+ href = props.href,
49
+ _props$type = props.type,
50
+ type = _props$type === void 0 ? 'button' : _props$type,
51
+ _props$display = props.display,
52
+ display = _props$display === void 0 ? 'empty' : _props$display,
53
+ target = props.target,
54
+ rel = props.rel,
55
+ _props$size = props.size,
56
+ size = _props$size === void 0 ? 'xs' : _props$size,
57
+ buttonRef = props.buttonRef,
58
+ isSelected = props.isSelected,
59
+ isLoading = props.isLoading,
60
+ rest = _objectWithoutProperties(props, _excluded);
61
+
62
+ var euiThemeContext = useEuiTheme();
63
+ var isDisabled = isButtonDisabled({
64
+ isDisabled: _isDisabled || disabled,
65
+ href: href,
66
+ isLoading: isLoading
67
+ });
72
68
  var ariaHidden = rest['aria-hidden'];
73
69
  var isAriaHidden = ariaHidden === 'true' || ariaHidden === true;
74
70
 
75
71
  if (!rest['aria-label'] && !rest['aria-labelledby'] && !isAriaHidden) {
76
72
  console.warn("EuiButtonIcon requires aria-label or aria-labelledby to be specified because icon-only\n buttons are screen-reader-inaccessible without them.");
77
- }
73
+ } // eslint-disable-next-line no-nested-ternary
74
+
75
+
76
+ var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
77
+ var buttonColorStyles = useEuiButtonColorCSS({
78
+ display: display
79
+ })[color]; // Temporary extra style for empty `:hover` state until we decide how to handle universally
80
+
81
+ var hoverStyles = display === 'empty' ? /*#__PURE__*/css("&:hover{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;") : /*#__PURE__*/css(";label:hoverStyles;");
82
+ var classes = classNames('euiButtonIcon', size && sizeToClassNameMap[size], className);
83
+
84
+ if (_color === 'ghost') {
85
+ // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
86
+ return ___EmotionJSX(EuiThemeProvider, {
87
+ colorMode: "dark"
88
+ }, ___EmotionJSX(EuiButtonIcon, _extends({}, props, {
89
+ color: "text"
90
+ })));
91
+ } // Add an icon to the button if one exists.
78
92
 
79
- var classes = classNames('euiButtonIcon', {
80
- 'euiButtonIcon-isDisabled': isDisabled
81
- }, colorToClassNameMap[color], display && displayToClassNameMap[display], size && sizeToClassNameMap[size], className); // Add an icon to the button if one exists.
82
93
 
83
94
  var buttonIcon;
84
95
 
@@ -113,6 +124,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
113
124
  rel: rel
114
125
  });
115
126
  return ___EmotionJSX("a", _extends({
127
+ css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
116
128
  tabIndex: isAriaHidden ? -1 : undefined,
117
129
  className: classes,
118
130
  href: href,
@@ -124,6 +136,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
124
136
 
125
137
  var buttonType;
126
138
  return ___EmotionJSX("button", _extends({
139
+ css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
127
140
  tabIndex: isAriaHidden ? -1 : undefined,
128
141
  disabled: isDisabled,
129
142
  className: classes,
@@ -140,8 +153,14 @@ EuiButtonIcon.propTypes = {
140
153
 
141
154
  /**
142
155
  * Any of the named color palette options.
156
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
157
+ */
158
+
159
+ /**
160
+ * Any of the named color palette options.
161
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
143
162
  */
144
- color: PropTypes.oneOf(["primary", "accent", "success", "warning", "danger", "ghost", "text"]),
163
+ color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
145
164
  "aria-label": PropTypes.string,
146
165
  "aria-labelledby": PropTypes.string,
147
166
  isDisabled: PropTypes.bool,
@@ -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;"),