@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
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.EuiButtonDisplay = void 0;
9
+ exports.isButtonDisabled = isButtonDisabled;
9
10
 
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
 
@@ -19,7 +20,11 @@ var _button_display = require("./_button_display.styles");
19
20
 
20
21
  var _button_display_content = require("./_button_display_content");
21
22
 
22
- var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
23
+ var _href_validator = require("../../../services/security/href_validator");
24
+
25
+ var _mixins = require("../../../themes/amsterdam/global_styling/mixins");
26
+
27
+ var _excluded = ["children", "iconType", "iconSide", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "type"];
23
28
 
24
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
30
 
@@ -39,33 +44,52 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
39
44
 
40
45
  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; }
41
46
 
47
+ var SIZES = ['xs', 's', 'm'];
48
+
49
+ function isButtonDisabled(_ref) {
50
+ var href = _ref.href,
51
+ isDisabled = _ref.isDisabled,
52
+ isLoading = _ref.isLoading;
53
+ var isHrefValid = !href || (0, _href_validator.validateHref)(href);
54
+ return isLoading || isDisabled || !isHrefValid;
55
+ }
42
56
  /**
43
57
  * EuiButtonDisplay is an internal-only component used for displaying
44
58
  * any element as a button.
45
59
  */
46
- var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
47
- var _ref$element = _ref.element,
48
- element = _ref$element === void 0 ? 'button' : _ref$element,
49
- children = _ref.children,
50
- iconType = _ref.iconType,
51
- iconSide = _ref.iconSide,
52
- _ref$size = _ref.size,
53
- size = _ref$size === void 0 ? 'm' : _ref$size,
54
- _ref$isDisabled = _ref.isDisabled,
55
- isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
56
- isLoading = _ref.isLoading,
57
- isSelected = _ref.isSelected,
58
- fullWidth = _ref.fullWidth,
59
- minWidth = _ref.minWidth,
60
- contentProps = _ref.contentProps,
61
- textProps = _ref.textProps,
62
- rest = _objectWithoutProperties(_ref, _excluded);
63
-
64
- var buttonIsDisabled = isLoading || isDisabled;
65
- var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
60
+
61
+
62
+ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
63
+ var children = _ref2.children,
64
+ iconType = _ref2.iconType,
65
+ iconSide = _ref2.iconSide,
66
+ _ref2$size = _ref2.size,
67
+ size = _ref2$size === void 0 ? 'm' : _ref2$size,
68
+ isDisabled = _ref2.isDisabled,
69
+ disabled = _ref2.disabled,
70
+ isLoading = _ref2.isLoading,
71
+ isSelected = _ref2.isSelected,
72
+ fullWidth = _ref2.fullWidth,
73
+ minWidth = _ref2.minWidth,
74
+ contentProps = _ref2.contentProps,
75
+ textProps = _ref2.textProps,
76
+ href = _ref2.href,
77
+ target = _ref2.target,
78
+ rel = _ref2.rel,
79
+ _ref2$type = _ref2.type,
80
+ type = _ref2$type === void 0 ? 'button' : _ref2$type,
81
+ rest = _objectWithoutProperties(_ref2, _excluded);
82
+
83
+ var buttonIsDisabled = isButtonDisabled({
84
+ href: href,
85
+ isDisabled: isDisabled || disabled,
86
+ isLoading: isLoading
87
+ });
88
+ var minWidthPx = typeof minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
66
89
  var theme = (0, _services.useEuiTheme)();
67
90
  var styles = (0, _button_display.euiButtonDisplayStyles)(theme, minWidthPx);
68
- var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
91
+ var buttonRadiusStyle = (0, _mixins.useEuiButtonRadiusCSS)()[size];
92
+ var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
69
93
  var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, _extends({
70
94
  isLoading: isLoading,
71
95
  isDisabled: buttonIsDisabled,
@@ -73,17 +97,46 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
73
97
  iconSide: iconSide,
74
98
  textProps: _objectSpread({}, textProps)
75
99
  }, contentProps), children);
76
- return (0, _react2.createElement)(element, _objectSpread({
100
+ var element = href && !buttonIsDisabled ? 'a' : 'button';
101
+ var elementProps = {}; // Element-specific attributes
102
+
103
+ if (element === 'button') {
104
+ elementProps = _objectSpread(_objectSpread({}, elementProps), {}, {
105
+ disabled: buttonIsDisabled,
106
+ 'aria-pressed': isSelected
107
+ });
108
+ }
109
+
110
+ var relObj = {};
111
+
112
+ if (href && !buttonIsDisabled) {
113
+ relObj.href = href;
114
+ relObj.rel = (0, _services.getSecureRelForTarget)({
115
+ href: href,
116
+ target: target,
117
+ rel: rel
118
+ });
119
+ relObj.target = target;
120
+ } else {
121
+ relObj.type = type;
122
+ }
123
+
124
+ return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
77
125
  css: cssStyles,
78
- disabled: element === 'button' && buttonIsDisabled,
79
- 'aria-pressed': element === 'button' ? isSelected : undefined,
80
126
  ref: ref
81
- }, rest), innerNode);
127
+ }, elementProps), relObj), rest), innerNode);
82
128
  });
83
129
  exports.EuiButtonDisplay = EuiButtonDisplay;
84
130
  EuiButtonDisplay.propTypes = {
131
+ href: _propTypes.default.string,
132
+ onClick: _propTypes.default.func,
85
133
  children: _propTypes.default.node,
86
- size: _propTypes.default.oneOf(["xs", "s", "m"]),
134
+ size: _propTypes.default.any,
135
+
136
+ /**
137
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
138
+ * *Only use when the readable text does not change between states.*
139
+ */
87
140
 
88
141
  /**
89
142
  * Applies the boolean state as the `aria-pressed` property to create a toggle button.
@@ -91,16 +144,28 @@ EuiButtonDisplay.propTypes = {
91
144
  */
92
145
  isSelected: _propTypes.default.bool,
93
146
 
147
+ /**
148
+ * Extends the button to 100% width
149
+ */
150
+
94
151
  /**
95
152
  * Extends the button to 100% width
96
153
  */
97
154
  fullWidth: _propTypes.default.bool,
98
155
 
156
+ /**
157
+ * Override the default minimum width
158
+ */
159
+
99
160
  /**
100
161
  * Override the default minimum width
101
162
  */
102
163
  minWidth: _propTypes.default.any,
103
164
 
165
+ /**
166
+ * Force disables the button and changes the icon to a loading spinner
167
+ */
168
+
104
169
  /**
105
170
  * Force disables the button and changes the icon to a loading spinner
106
171
  */
@@ -134,15 +199,11 @@ EuiButtonDisplay.propTypes = {
134
199
  "data-text": _propTypes.default.string
135
200
  }),
136
201
  iconSize: _propTypes.default.oneOf(["s", "m"]),
137
- isDisabled: _propTypes.default.bool.isRequired,
202
+ isDisabled: _propTypes.default.bool,
138
203
  className: _propTypes.default.string,
139
204
  "aria-label": _propTypes.default.string,
140
205
  "data-test-subj": _propTypes.default.string,
141
206
  css: _propTypes.default.any,
142
-
143
- /**
144
- * Provide a valid element to render the element as
145
- */
146
- element: _propTypes.default.oneOf(["a", "button", "span", "label"])
207
+ buttonRef: _propTypes.default.any
147
208
  };
148
209
  EuiButtonDisplay.displayName = 'EuiButtonDisplay';
@@ -24,20 +24,11 @@ var _buttonSize = function _buttonSize(size) {
24
24
  };
25
25
 
26
26
  var _ref = process.env.NODE_ENV === "production" ? {
27
- name: "15xpz7k-fullWidth",
28
- styles: "display:block;width:100%;label:fullWidth;"
27
+ name: "vifhyf-isDisabled",
28
+ styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;"
29
29
  } : {
30
- name: "15xpz7k-fullWidth",
31
- styles: "display:block;width:100%;label:fullWidth;",
32
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
- };
34
-
35
- var _ref2 = process.env.NODE_ENV === "production" ? {
36
- name: "8595p9-isDisabled",
37
- styles: "cursor:not-allowed;label:isDisabled;"
38
- } : {
39
- name: "8595p9-isDisabled",
40
- styles: "cursor:not-allowed;label:isDisabled;",
30
+ name: "vifhyf-isDisabled",
31
+ styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;",
41
32
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
42
33
  };
43
34
 
@@ -45,10 +36,10 @@ var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, mi
45
36
  var euiTheme = euiThemeContext.euiTheme;
46
37
  return {
47
38
  // Base
48
- euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";;label:euiButtonDisplay;"),
39
+ euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
49
40
  // States
50
- isDisabled: _ref2,
51
- fullWidth: _ref,
41
+ isDisabled: _ref,
42
+ fullWidth: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
52
43
  // Sizes
53
44
  xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
54
45
  s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
@@ -17,6 +17,8 @@ var _icon = require("../../icon");
17
17
 
18
18
  var _button_display_content = require("./_button_display_content.styles");
19
19
 
20
+ var _classnames = _interopRequireDefault(require("classnames"));
21
+
20
22
  var _react2 = require("@emotion/react");
21
23
 
22
24
  var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
@@ -44,7 +46,7 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
44
46
 
45
47
  var theme = (0, _services.useEuiTheme)();
46
48
  var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
47
- var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide], isDisabled && styles.isDisabled];
49
+ var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
48
50
  var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
49
51
  var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
50
52
 
@@ -77,7 +79,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
77
79
  var isText = typeof children === 'string';
78
80
  return (0, _react2.jsx)("span", _extends({}, contentProps, {
79
81
  css: cssStyles
80
- }), icon, isText ? (0, _react2.jsx)("span", textProps, children) : children);
82
+ }), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
83
+ className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
84
+ }), children) : children);
81
85
  };
82
86
 
83
87
  exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
@@ -105,7 +109,7 @@ EuiButtonDisplayContent.propTypes = {
105
109
  "data-text": _propTypes.default.string
106
110
  }),
107
111
  iconSize: _propTypes.default.oneOf(["s", "m"]),
108
- isDisabled: _propTypes.default.bool.isRequired,
112
+ isDisabled: _propTypes.default.bool,
109
113
  className: _propTypes.default.string,
110
114
  "aria-label": _propTypes.default.string,
111
115
  "data-test-subj": _propTypes.default.string,
@@ -12,15 +12,6 @@ var _global_styling = require("../../../global_styling");
12
12
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
13
13
 
14
14
  var _ref = process.env.NODE_ENV === "production" ? {
15
- name: "ske5nx-isDisabled",
16
- styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
17
- } : {
18
- name: "ske5nx-isDisabled",
19
- styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
20
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
- };
22
-
23
- var _ref2 = process.env.NODE_ENV === "production" ? {
24
15
  name: "gtg6j-euiButtonDisplayContent__icon",
25
16
  styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
26
17
  } : {
@@ -29,7 +20,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
29
20
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
21
  };
31
22
 
32
- var _ref3 = process.env.NODE_ENV === "production" ? {
23
+ var _ref2 = process.env.NODE_ENV === "production" ? {
33
24
  name: "10wlo76-euiButtonDisplayContent__spinner",
34
25
  styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
35
26
  } : {
@@ -38,7 +29,7 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
38
29
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
30
  };
40
31
 
41
- var _ref4 = process.env.NODE_ENV === "production" ? {
32
+ var _ref3 = process.env.NODE_ENV === "production" ? {
42
33
  name: "qfl6yj-right",
43
34
  styles: "flex-direction:row-reverse;label:right;"
44
35
  } : {
@@ -47,17 +38,16 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
47
38
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
48
39
  };
49
40
 
50
- var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref5) {
51
- var euiTheme = _ref5.euiTheme;
41
+ var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
42
+ var euiTheme = _ref4.euiTheme;
52
43
  return {
53
44
  // Base
54
45
  euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
55
46
  // Icon side
56
47
  left: /*#__PURE__*/(0, _react.css)(";label:left;"),
57
- right: _ref4,
58
- euiButtonDisplayContent__spinner: _ref3,
59
- euiButtonDisplayContent__icon: _ref2,
60
- isDisabled: _ref
48
+ right: _ref3,
49
+ euiButtonDisplayContent__spinner: _ref2,
50
+ euiButtonDisplayContent__icon: _ref
61
51
  };
62
52
  };
63
53
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SIZES = exports.FLUSH_TYPES = exports.EuiButtonEmpty = exports.COLORS = void 0;
6
+ exports.SIZES = exports.FLUSH_TYPES = exports.EuiButtonEmpty = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -17,7 +17,9 @@ var _services = require("../../../services");
17
17
 
18
18
  var _button_content_deprecated = require("../_button_content_deprecated");
19
19
 
20
- var _href_validator = require("../../../services/security/href_validator");
20
+ var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
21
+
22
+ var _button_display = require("../button_display/_button_display");
21
23
 
22
24
  var _react2 = require("@emotion/react");
23
25
 
@@ -25,28 +27,18 @@ var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "c
25
27
 
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
28
- 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); }
29
-
30
30
  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; }
31
31
 
32
32
  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; }
33
33
 
34
34
  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; }
35
35
 
36
+ 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); }
37
+
36
38
  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; }
37
39
 
38
40
  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; }
39
41
 
40
- var colorToClassNameMap = {
41
- primary: 'euiButtonEmpty--primary',
42
- danger: 'euiButtonEmpty--danger',
43
- text: 'euiButtonEmpty--text',
44
- ghost: 'euiButtonEmpty--ghost',
45
- success: 'euiButtonEmpty--success',
46
- warning: 'euiButtonEmpty--warning'
47
- };
48
- var COLORS = (0, _common.keysOf)(colorToClassNameMap);
49
- exports.COLORS = COLORS;
50
42
  var sizeToClassNameMap = {
51
43
  xs: 'euiButtonEmpty--xSmall',
52
44
  s: 'euiButtonEmpty--small',
@@ -67,43 +59,57 @@ var FLUSH_TYPES = (0, _common.keysOf)(flushTypeToClassNameMap);
67
59
 
68
60
  exports.FLUSH_TYPES = FLUSH_TYPES;
69
61
 
70
- var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
71
- var children = _ref.children,
72
- className = _ref.className,
73
- iconType = _ref.iconType,
74
- _ref$iconSide = _ref.iconSide,
75
- iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
76
- _ref$iconSize = _ref.iconSize,
77
- iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
78
- _ref$color = _ref.color,
79
- color = _ref$color === void 0 ? 'primary' : _ref$color,
80
- _ref$size = _ref.size,
81
- size = _ref$size === void 0 ? 'm' : _ref$size,
82
- flush = _ref.flush,
83
- _isDisabled = _ref.isDisabled,
84
- _disabled = _ref.disabled,
85
- isLoading = _ref.isLoading,
86
- href = _ref.href,
87
- target = _ref.target,
88
- rel = _ref.rel,
89
- _ref$type = _ref.type,
90
- type = _ref$type === void 0 ? 'button' : _ref$type,
91
- buttonRef = _ref.buttonRef,
92
- contentProps = _ref.contentProps,
93
- textProps = _ref.textProps,
94
- isSelected = _ref.isSelected,
95
- rest = _objectWithoutProperties(_ref, _excluded);
96
-
97
- var isHrefValid = !href || (0, _href_validator.validateHref)(href);
98
- var disabled = _disabled || !isHrefValid;
99
- var isDisabled = _isDisabled || !isHrefValid; // If in the loading state, force disabled to true
100
-
101
- var buttonIsDisabled = isLoading || isDisabled || disabled;
102
- var classes = (0, _classnames.default)('euiButtonEmpty', colorToClassNameMap[color], size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, {
103
- 'euiButtonEmpty-isDisabled': buttonIsDisabled
104
- }, className);
62
+ var EuiButtonEmpty = function EuiButtonEmpty(props) {
63
+ var children = props.children,
64
+ className = props.className,
65
+ iconType = props.iconType,
66
+ _props$iconSide = props.iconSide,
67
+ iconSide = _props$iconSide === void 0 ? 'left' : _props$iconSide,
68
+ _props$iconSize = props.iconSize,
69
+ iconSize = _props$iconSize === void 0 ? 'm' : _props$iconSize,
70
+ _props$color = props.color,
71
+ _color = _props$color === void 0 ? 'primary' : _props$color,
72
+ _props$size = props.size,
73
+ size = _props$size === void 0 ? 'm' : _props$size,
74
+ flush = props.flush,
75
+ _isDisabled = props.isDisabled,
76
+ disabled = props.disabled,
77
+ isLoading = props.isLoading,
78
+ href = props.href,
79
+ target = props.target,
80
+ rel = props.rel,
81
+ _props$type = props.type,
82
+ type = _props$type === void 0 ? 'button' : _props$type,
83
+ buttonRef = props.buttonRef,
84
+ contentProps = props.contentProps,
85
+ textProps = props.textProps,
86
+ isSelected = props.isSelected,
87
+ rest = _objectWithoutProperties(props, _excluded);
88
+
89
+ var isDisabled = (0, _button_display.isButtonDisabled)({
90
+ isDisabled: _isDisabled || disabled,
91
+ href: href,
92
+ isLoading: isLoading
93
+ }); // eslint-disable-next-line no-nested-ternary
94
+
95
+ var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
96
+ var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
97
+ display: 'empty'
98
+ })[color];
99
+
100
+ if (_color === 'ghost') {
101
+ // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
102
+ return (0, _react2.jsx)(_services.EuiThemeProvider, {
103
+ colorMode: "dark"
104
+ }, (0, _react2.jsx)(EuiButtonEmpty, _extends({}, props, {
105
+ color: "text"
106
+ })));
107
+ }
108
+
109
+ var classes = (0, _classnames.default)('euiButtonEmpty', size ? sizeToClassNameMap[size] : null, flush ? flushTypeToClassNameMap[flush] : null, className);
105
110
  var contentClassNames = (0, _classnames.default)('euiButtonEmpty__content', contentProps && contentProps.className);
106
111
  var textClassNames = (0, _classnames.default)('euiButtonEmpty__text', textProps && textProps.className);
112
+ var cssStyles = [buttonColorStyles];
107
113
  var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, _extends({
108
114
  isLoading: isLoading,
109
115
  iconType: iconType,
@@ -118,7 +124,7 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
118
124
  }), children); // <a> elements don't respect the `disabled` attribute. So if we're disabled, we'll just pretend
119
125
  // this is a button and piggyback off its disabled styles.
120
126
 
121
- if (href && !buttonIsDisabled) {
127
+ if (href && !isDisabled) {
122
128
  var secureRel = (0, _services.getSecureRelForTarget)({
123
129
  href: href,
124
130
  target: target,
@@ -126,6 +132,7 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
126
132
  });
127
133
  return (0, _react2.jsx)("a", _extends({
128
134
  className: classes,
135
+ css: cssStyles,
129
136
  href: href,
130
137
  target: target,
131
138
  rel: secureRel,
@@ -134,8 +141,9 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
134
141
  }
135
142
 
136
143
  return (0, _react2.jsx)("button", _extends({
137
- disabled: buttonIsDisabled,
144
+ disabled: isDisabled,
138
145
  className: classes,
146
+ css: cssStyles,
139
147
  type: type,
140
148
  ref: buttonRef,
141
149
  "aria-pressed": isSelected
@@ -148,13 +156,15 @@ EuiButtonEmpty.propTypes = {
148
156
  onClick: _propTypes.default.func,
149
157
 
150
158
  /**
151
- * Any of our named colors
159
+ * Any of the named color palette options.
160
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
152
161
  */
153
162
 
154
163
  /**
155
- * Any of our named colors
164
+ * Any of the named color palette options.
165
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
156
166
  */
157
- color: _propTypes.default.oneOf(["primary", "danger", "text", "ghost", "success", "warning"]),
167
+ color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["ghost"])]),
158
168
  size: _propTypes.default.oneOf(["xs", "s", "m"]),
159
169
 
160
170
  /**
@@ -3,12 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "COLORS", {
7
- enumerable: true,
8
- get: function get() {
9
- return _button_empty.COLORS;
10
- }
11
- });
12
6
  Object.defineProperty(exports, "EuiButtonEmpty", {
13
7
  enumerable: true,
14
8
  get: function get() {
@@ -62,15 +62,7 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
62
62
  type = _ref$type === void 0 ? 'single' : _ref$type,
63
63
  rest = _objectWithoutProperties(_ref, _excluded);
64
64
 
65
- // Compressed style can't support `ghost` color because it's more like a form field than a button
66
- var badColorCombo = buttonSize === 'compressed' && color === 'ghost';
67
- var resolvedColor = badColorCombo ? 'text' : color;
68
-
69
- if (badColorCombo) {
70
- console.warn('EuiButtonGroup of compressed size does not support the ghost color. It will render as text instead.');
71
- }
72
-
73
- var classes = (0, _classnames.default)('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(_button.colorToClassNameMap[resolvedColor]), {
65
+ var classes = (0, _classnames.default)('euiButtonGroup', "euiButtonGroup".concat(groupSizeToClassNameMap[buttonSize]), "euiButtonGroup".concat(_button.colorToClassNameMap[color]), {
74
66
  'euiButtonGroup--fullWidth': isFullWidth,
75
67
  'euiButtonGroup--isDisabled': isDisabled
76
68
  }, className);
@@ -92,7 +84,7 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
92
84
  }, option, {
93
85
  element: typeIsSingle ? 'label' : 'button',
94
86
  isSelected: typeIsSingle ? option.id === idSelected : idToSelectedMap[option.id],
95
- color: resolvedColor,
87
+ color: color,
96
88
  size: buttonSize,
97
89
  isIconOnly: isIconOnly,
98
90
  onChange: onChange
@@ -131,9 +123,9 @@ EuiButtonGroup.propTypes = {
131
123
  legend: _propTypes.default.string.isRequired,
132
124
 
133
125
  /**
134
- * Compressed styles don't support `ghost` color (Color will be changed to "text")
126
+ * Any of the named color palette options.
135
127
  */
136
- color: _propTypes.default.oneOf(["primary", "accent", "success", "warning", "danger", "ghost", "text"]),
128
+ color: _propTypes.default.any,
137
129
 
138
130
  /**
139
131
  * Default for `type` is single so it can also be excluded
@@ -17,9 +17,11 @@ var _inner_text = require("../../inner_text");
17
17
 
18
18
  var _services = require("../../../services");
19
19
 
20
+ var _button2 = require("../../../themes/amsterdam/global_styling/mixins/button");
21
+
20
22
  var _react2 = require("@emotion/react");
21
23
 
22
- var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "element", "type"];
24
+ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "name", "onChange", "size", "value", "color", "element", "type"];
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
@@ -59,6 +61,8 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
59
61
  _onChange = _ref.onChange,
60
62
  size = _ref.size,
61
63
  value = _ref.value,
64
+ _ref$color = _ref.color,
65
+ _color = _ref$color === void 0 ? 'primary' : _ref$color,
62
66
  _ref$element = _ref.element,
63
67
  element = _ref$element === void 0 ? 'button' : _ref$element,
64
68
  _ref$type = _ref.type,
@@ -98,8 +102,15 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
98
102
  return _onChange(id);
99
103
  }
100
104
  });
101
- }
105
+ } // eslint-disable-next-line no-nested-ternary
106
+
107
+
108
+ var color = isDisabled ? 'disabled' : _color; // eslint-disable-next-line no-nested-ternary
102
109
 
110
+ var display = isSelected ? 'fill' : size === 'compressed' ? 'empty' : 'base';
111
+ var buttonColorStyles = (0, _button2.useEuiButtonColorCSS)({
112
+ display: display
113
+ })[color];
103
114
  var buttonClasses = (0, _classnames.default)({
104
115
  'euiButtonGroupButton-isSelected': isSelected,
105
116
  'euiButtonGroupButton-isIconOnly': isIconOnly
@@ -116,10 +127,10 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
116
127
  innerText = _useInnerText2[1];
117
128
 
118
129
  return (0, _react2.jsx)(_button.EuiButtonDisplayDeprecated, _extends({
130
+ css: [buttonColorStyles, ";label:EuiButtonGroupButton;"],
119
131
  baseClassName: "euiButtonGroupButton",
120
132
  className: buttonClasses,
121
133
  element: el,
122
- fill: size !== 'compressed' && isSelected,
123
134
  isDisabled: isDisabled,
124
135
  size: size === 'compressed' ? 's' : size,
125
136
  textProps: {
@@ -205,7 +216,7 @@ EuiButtonGroupButton.propTypes = {
205
216
  /**
206
217
  * Inherit from EuiButtonGroup
207
218
  */
208
- color: _propTypes.default.oneOf(["primary", "accent", "success", "warning", "danger", "ghost", "text"]).isRequired,
219
+ color: _propTypes.default.any.isRequired,
209
220
 
210
221
  /**
211
222
  * Inherit from EuiButtonGroup