@elastic/eui 98.2.0 → 98.2.1-borealis.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (599) hide show
  1. package/dist/{eui_theme_dark.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +1 -1
  2. package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_light.json.d.ts} +1 -1
  3. package/dist/eui_theme_borealis_dark.json +314 -0
  4. package/dist/eui_theme_borealis_dark.json.d.ts +317 -0
  5. package/dist/eui_theme_borealis_light.json +314 -0
  6. package/dist/eui_theme_borealis_light.json.d.ts +317 -0
  7. package/es/components/avatar/avatar.js +10 -4
  8. package/es/components/badge/badge.styles.js +1 -2
  9. package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
  10. package/es/components/badge/color_utils.js +9 -8
  11. package/es/components/beacon/beacon.styles.js +2 -2
  12. package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
  13. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  14. package/es/components/button/button.js +1 -1
  15. package/es/components/button/button_display/_button_display.styles.js +1 -1
  16. package/es/components/button/button_empty/button_empty.js +1 -1
  17. package/es/components/button/button_group/button_group_button.js +1 -1
  18. package/es/components/button/button_group/button_group_button.styles.js +6 -6
  19. package/es/components/button/button_icon/button_icon.js +1 -1
  20. package/es/components/card/card.js +1 -1
  21. package/es/components/card/card.styles.js +6 -3
  22. package/es/components/code/code_block_annotations.js +1 -1
  23. package/es/components/code/code_block_line.styles.js +1 -2
  24. package/es/components/code/code_syntax.styles.js +23 -27
  25. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  26. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  27. package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  28. package/es/components/color_picker/color_picker.js +9 -3
  29. package/es/components/color_picker/color_picker.styles.js +1 -2
  30. package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  31. package/es/components/comment_list/comment.js +1 -1
  32. package/es/components/comment_list/comment_event.js +5 -4
  33. package/es/components/comment_list/comment_list.js +1 -1
  34. package/es/components/common.js +0 -28
  35. package/es/components/datagrid/data_grid.styles.js +6 -7
  36. package/es/components/date_picker/react_date_picker.styles.js +2 -1
  37. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  38. package/es/components/drag_and_drop/droppable.styles.js +2 -4
  39. package/es/components/empty_prompt/empty_prompt.js +1 -1
  40. package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
  41. package/es/components/filter_group/filter_select_item.styles.js +1 -2
  42. package/es/components/flyout/_flyout_close_button.styles.js +1 -2
  43. package/es/components/flyout/flyout.js +1 -1
  44. package/es/components/flyout/flyout.styles.js +7 -2
  45. package/es/components/flyout/flyout_footer.styles.js +1 -1
  46. package/es/components/form/form.styles.js +28 -32
  47. package/es/components/form/range/range_tooltip.styles.js +11 -13
  48. package/es/components/form/switch/switch.js +3 -7
  49. package/es/components/form/switch/switch.styles.js +16 -19
  50. package/es/components/header/header.styles.js +6 -7
  51. package/es/components/icon/icon.styles.js +9 -8
  52. package/es/components/icon/named_colors.js +1 -1
  53. package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  54. package/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  55. package/es/components/list_group/list_group_item.styles.js +9 -11
  56. package/es/components/loading/loading_chart.styles.js +18 -5
  57. package/es/components/mark/mark.styles.js +2 -9
  58. package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  59. package/es/components/markdown_editor/markdown_format.styles.js +2 -2
  60. package/es/components/modal/modal.styles.js +1 -1
  61. package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  62. package/es/components/page_template/inner/page_inner.styles.js +2 -2
  63. package/es/components/panel/panel.js +1 -1
  64. package/es/components/panel/panel.styles.js +1 -1
  65. package/es/components/panel/split_panel/split_panel.js +1 -1
  66. package/es/components/popover/popover.js +1 -1
  67. package/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
  68. package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
  69. package/es/components/popover/popover_footer.styles.js +1 -1
  70. package/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
  71. package/es/components/progress/progress.js +1 -1
  72. package/es/components/progress/progress.styles.js +30 -28
  73. package/es/components/resizable_container/resizable_panel.js +1 -1
  74. package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  75. package/es/components/side_nav/side_nav_item.styles.js +1 -2
  76. package/es/components/skeleton/utils.js +5 -7
  77. package/es/components/steps/step_number.styles.js +1 -1
  78. package/es/components/table/table_cells_shared.styles.js +2 -7
  79. package/es/components/table/table_row.styles.js +8 -10
  80. package/es/components/text/text.styles.js +2 -2
  81. package/es/components/text/text_color.js +1 -1
  82. package/es/components/text/text_color.styles.js +6 -5
  83. package/es/components/toast/toast.styles.js +1 -1
  84. package/es/components/token/token.js +10 -4
  85. package/es/components/token/token.styles.js +12 -3
  86. package/es/components/token/token_map.js +243 -1
  87. package/es/components/tool_tip/tool_tip.styles.js +12 -24
  88. package/es/components/tour/_tour_footer.styles.js +2 -4
  89. package/es/components/tour/tour.styles.js +8 -12
  90. package/es/components/tree_view/tree_view_item.styles.js +1 -2
  91. package/es/global_styling/functions/math.js +1 -49
  92. package/es/global_styling/functions/size.js +1 -17
  93. package/es/global_styling/mixins/_button.js +159 -0
  94. package/es/global_styling/mixins/_color.js +39 -31
  95. package/es/global_styling/mixins/index.js +2 -1
  96. package/es/global_styling/reset/global_styles.js +2 -2
  97. package/es/global_styling/variables/_colors_vis.js +1 -53
  98. package/es/global_styling/variables/animations.js +1 -22
  99. package/es/global_styling/variables/breakpoint.js +1 -7
  100. package/es/global_styling/variables/levels.js +1 -17
  101. package/es/global_styling/variables/shadow.js +1 -11
  102. package/es/global_styling/variables/size.js +1 -1
  103. package/es/global_styling/variables/typography.js +1 -32
  104. package/es/services/color/eui_palettes.js +116 -47
  105. package/es/services/color/index.js +1 -0
  106. package/es/services/color/vis_color_store.js +13 -0
  107. package/es/services/index.js +1 -1
  108. package/es/services/popover/index.js +4 -1
  109. package/es/services/popover/popover_arrow.styles.js +31 -0
  110. package/es/services/popover/popover_positioning.js +6 -17
  111. package/es/services/theme/provider.js +26 -2
  112. package/es/services/theme/types.js +1 -6
  113. package/es/services/theme/utils.js +1 -303
  114. package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
  115. package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  116. package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
  117. package/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
  118. package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
  119. package/es/themes/amsterdam/global_styling/variables/_components.js +604 -0
  120. package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
  121. package/es/themes/amsterdam/theme.js +7 -1
  122. package/es/themes/index.js +1 -1
  123. package/es/themes/themes.js +9 -6
  124. package/eui.d.ts +2382 -2830
  125. package/lib/components/avatar/avatar.js +8 -2
  126. package/lib/components/badge/badge.styles.js +1 -2
  127. package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
  128. package/lib/components/badge/color_utils.js +14 -13
  129. package/lib/components/beacon/beacon.styles.js +2 -2
  130. package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
  131. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  132. package/lib/components/button/button.js +1 -1
  133. package/lib/components/button/button_display/_button_display.styles.js +1 -1
  134. package/lib/components/button/button_empty/button_empty.js +1 -1
  135. package/lib/components/button/button_group/button_group_button.js +1 -1
  136. package/lib/components/button/button_group/button_group_button.styles.js +5 -5
  137. package/lib/components/button/button_icon/button_icon.js +1 -1
  138. package/lib/components/card/card.js +1 -1
  139. package/lib/components/card/card.styles.js +5 -2
  140. package/lib/components/code/code_block_annotations.js +1 -1
  141. package/lib/components/code/code_block_line.styles.js +1 -2
  142. package/lib/components/code/code_syntax.styles.js +23 -27
  143. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  144. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  145. package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  146. package/lib/components/color_picker/color_picker.js +8 -2
  147. package/lib/components/color_picker/color_picker.styles.js +1 -2
  148. package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  149. package/lib/components/comment_list/comment.js +1 -1
  150. package/lib/components/comment_list/comment_event.js +5 -4
  151. package/lib/components/comment_list/comment_list.js +1 -1
  152. package/lib/components/common.js +0 -28
  153. package/lib/components/datagrid/data_grid.styles.js +6 -7
  154. package/lib/components/date_picker/react_date_picker.styles.js +3 -2
  155. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  156. package/lib/components/drag_and_drop/droppable.styles.js +2 -4
  157. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  158. package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
  159. package/lib/components/filter_group/filter_select_item.styles.js +1 -2
  160. package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
  161. package/lib/components/flyout/flyout.js +1 -1
  162. package/lib/components/flyout/flyout.styles.js +7 -2
  163. package/lib/components/flyout/flyout_footer.styles.js +1 -1
  164. package/lib/components/form/form.styles.js +27 -31
  165. package/lib/components/form/range/range_tooltip.styles.js +11 -13
  166. package/lib/components/form/switch/switch.js +3 -7
  167. package/lib/components/form/switch/switch.styles.js +16 -19
  168. package/lib/components/header/header.styles.js +5 -6
  169. package/lib/components/icon/icon.styles.js +9 -8
  170. package/lib/components/icon/named_colors.js +1 -1
  171. package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  172. package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  173. package/lib/components/list_group/list_group_item.styles.js +8 -10
  174. package/lib/components/loading/loading_chart.styles.js +18 -5
  175. package/lib/components/mark/mark.styles.js +2 -9
  176. package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  177. package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  178. package/lib/components/modal/modal.styles.js +1 -1
  179. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  180. package/lib/components/page_template/inner/page_inner.styles.js +1 -1
  181. package/lib/components/panel/panel.js +1 -1
  182. package/lib/components/panel/panel.styles.js +1 -1
  183. package/lib/components/panel/split_panel/split_panel.js +1 -1
  184. package/lib/components/popover/popover.js +1 -1
  185. package/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
  186. package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
  187. package/lib/components/popover/popover_footer.styles.js +1 -1
  188. package/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
  189. package/lib/components/progress/progress.js +1 -1
  190. package/lib/components/progress/progress.styles.js +29 -27
  191. package/lib/components/resizable_container/resizable_panel.js +1 -1
  192. package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  193. package/lib/components/side_nav/side_nav_item.styles.js +1 -2
  194. package/lib/components/skeleton/utils.js +4 -6
  195. package/lib/components/steps/step_number.styles.js +1 -1
  196. package/lib/components/table/table_cells_shared.styles.js +2 -7
  197. package/lib/components/table/table_row.styles.js +7 -9
  198. package/lib/components/text/text.styles.js +1 -1
  199. package/lib/components/text/text_color.js +1 -1
  200. package/lib/components/text/text_color.styles.js +6 -5
  201. package/lib/components/toast/toast.styles.js +1 -1
  202. package/lib/components/token/token.js +12 -4
  203. package/lib/components/token/token.styles.js +12 -3
  204. package/lib/components/token/token_map.js +244 -2
  205. package/lib/components/tool_tip/tool_tip.styles.js +11 -23
  206. package/lib/components/tour/_tour_footer.styles.js +2 -4
  207. package/lib/components/tour/tour.styles.js +8 -12
  208. package/lib/components/tree_view/tree_view_item.styles.js +1 -2
  209. package/lib/global_styling/functions/math.js +7 -58
  210. package/lib/global_styling/functions/size.js +7 -26
  211. package/lib/global_styling/mixins/_button.js +164 -0
  212. package/lib/global_styling/mixins/_color.js +38 -30
  213. package/lib/global_styling/mixins/index.js +11 -0
  214. package/lib/global_styling/reset/global_styles.js +1 -1
  215. package/lib/global_styling/variables/_colors_vis.js +6 -61
  216. package/lib/global_styling/variables/animations.js +25 -31
  217. package/lib/global_styling/variables/breakpoint.js +7 -16
  218. package/lib/global_styling/variables/levels.js +7 -26
  219. package/lib/global_styling/variables/shadow.js +13 -20
  220. package/lib/global_styling/variables/size.js +7 -10
  221. package/lib/global_styling/variables/typography.js +19 -41
  222. package/lib/services/color/eui_palettes.js +116 -47
  223. package/lib/services/color/index.js +8 -0
  224. package/lib/services/color/vis_color_store.js +18 -0
  225. package/lib/services/index.js +7 -0
  226. package/lib/services/popover/index.js +8 -1
  227. package/lib/services/popover/popover_arrow.styles.js +37 -0
  228. package/lib/services/popover/popover_positioning.js +6 -17
  229. package/lib/services/theme/provider.js +26 -2
  230. package/lib/services/theme/types.js +13 -14
  231. package/lib/services/theme/utils.js +54 -303
  232. package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
  233. package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  234. package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
  235. package/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
  236. package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
  237. package/lib/themes/amsterdam/global_styling/variables/_components.js +608 -0
  238. package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
  239. package/lib/themes/amsterdam/theme.js +7 -1
  240. package/lib/themes/index.js +7 -0
  241. package/lib/themes/themes.js +10 -7
  242. package/optimize/es/components/avatar/avatar.js +10 -4
  243. package/optimize/es/components/badge/badge.styles.js +1 -2
  244. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
  245. package/optimize/es/components/badge/color_utils.js +9 -8
  246. package/optimize/es/components/beacon/beacon.styles.js +2 -2
  247. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
  248. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  249. package/optimize/es/components/button/button.js +1 -1
  250. package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
  251. package/optimize/es/components/button/button_empty/button_empty.js +1 -1
  252. package/optimize/es/components/button/button_group/button_group_button.js +1 -1
  253. package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
  254. package/optimize/es/components/button/button_icon/button_icon.js +1 -1
  255. package/optimize/es/components/card/card.styles.js +6 -3
  256. package/optimize/es/components/code/code_block_annotations.js +1 -1
  257. package/optimize/es/components/code/code_block_line.styles.js +1 -2
  258. package/optimize/es/components/code/code_syntax.styles.js +23 -27
  259. package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  260. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  261. package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  262. package/optimize/es/components/color_picker/color_picker.js +9 -3
  263. package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
  264. package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  265. package/optimize/es/components/comment_list/comment_event.js +4 -3
  266. package/optimize/es/components/common.js +0 -28
  267. package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
  268. package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
  269. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  270. package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
  271. package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
  272. package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
  273. package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
  274. package/optimize/es/components/flyout/flyout.js +1 -1
  275. package/optimize/es/components/flyout/flyout.styles.js +7 -2
  276. package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
  277. package/optimize/es/components/form/form.styles.js +28 -32
  278. package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
  279. package/optimize/es/components/form/switch/switch.js +3 -2
  280. package/optimize/es/components/form/switch/switch.styles.js +16 -19
  281. package/optimize/es/components/header/header.styles.js +6 -7
  282. package/optimize/es/components/icon/icon.styles.js +9 -8
  283. package/optimize/es/components/icon/named_colors.js +1 -1
  284. package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  285. package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  286. package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
  287. package/optimize/es/components/loading/loading_chart.styles.js +13 -5
  288. package/optimize/es/components/mark/mark.styles.js +2 -9
  289. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  290. package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
  291. package/optimize/es/components/modal/modal.styles.js +1 -1
  292. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  293. package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
  294. package/optimize/es/components/panel/panel.styles.js +1 -1
  295. package/optimize/es/components/popover/popover.js +1 -1
  296. package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
  297. package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
  298. package/optimize/es/components/popover/popover_footer.styles.js +1 -1
  299. package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
  300. package/optimize/es/components/progress/progress.js +1 -1
  301. package/optimize/es/components/progress/progress.styles.js +30 -28
  302. package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  303. package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
  304. package/optimize/es/components/skeleton/utils.js +5 -7
  305. package/optimize/es/components/steps/step_number.styles.js +1 -1
  306. package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
  307. package/optimize/es/components/table/table_row.styles.js +8 -10
  308. package/optimize/es/components/text/text.styles.js +2 -2
  309. package/optimize/es/components/text/text_color.js +1 -1
  310. package/optimize/es/components/text/text_color.styles.js +6 -5
  311. package/optimize/es/components/toast/toast.styles.js +1 -1
  312. package/optimize/es/components/token/token.js +10 -4
  313. package/optimize/es/components/token/token.styles.js +12 -3
  314. package/optimize/es/components/token/token_map.js +243 -1
  315. package/optimize/es/components/tool_tip/tool_tip.styles.js +12 -24
  316. package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
  317. package/optimize/es/components/tour/tour.styles.js +8 -12
  318. package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
  319. package/optimize/es/global_styling/functions/math.js +1 -49
  320. package/optimize/es/global_styling/functions/size.js +1 -17
  321. package/optimize/es/global_styling/mixins/_button.js +159 -0
  322. package/optimize/es/global_styling/mixins/_color.js +39 -31
  323. package/optimize/es/global_styling/mixins/index.js +2 -1
  324. package/optimize/es/global_styling/reset/global_styles.js +2 -2
  325. package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
  326. package/optimize/es/global_styling/variables/animations.js +1 -22
  327. package/optimize/es/global_styling/variables/breakpoint.js +1 -7
  328. package/optimize/es/global_styling/variables/levels.js +1 -17
  329. package/optimize/es/global_styling/variables/shadow.js +1 -11
  330. package/optimize/es/global_styling/variables/size.js +1 -1
  331. package/optimize/es/global_styling/variables/typography.js +1 -32
  332. package/optimize/es/services/color/eui_palettes.js +116 -47
  333. package/optimize/es/services/color/index.js +1 -0
  334. package/optimize/es/services/color/vis_color_store.js +13 -0
  335. package/optimize/es/services/index.js +1 -1
  336. package/optimize/es/services/popover/index.js +4 -1
  337. package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
  338. package/optimize/es/services/popover/popover_positioning.js +6 -17
  339. package/optimize/es/services/theme/provider.js +26 -2
  340. package/optimize/es/services/theme/types.js +1 -6
  341. package/optimize/es/services/theme/utils.js +1 -295
  342. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
  343. package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  344. package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
  345. package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
  346. package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
  347. package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +596 -0
  348. package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
  349. package/optimize/es/themes/amsterdam/theme.js +7 -1
  350. package/optimize/es/themes/index.js +1 -1
  351. package/optimize/es/themes/themes.js +9 -6
  352. package/optimize/lib/components/avatar/avatar.js +8 -2
  353. package/optimize/lib/components/badge/badge.styles.js +1 -2
  354. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
  355. package/optimize/lib/components/badge/color_utils.js +14 -13
  356. package/optimize/lib/components/beacon/beacon.styles.js +2 -2
  357. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
  358. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  359. package/optimize/lib/components/button/button.js +1 -1
  360. package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
  361. package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
  362. package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
  363. package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
  364. package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
  365. package/optimize/lib/components/card/card.styles.js +5 -2
  366. package/optimize/lib/components/code/code_block_annotations.js +1 -1
  367. package/optimize/lib/components/code/code_block_line.styles.js +1 -2
  368. package/optimize/lib/components/code/code_syntax.styles.js +23 -27
  369. package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  370. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  371. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  372. package/optimize/lib/components/color_picker/color_picker.js +8 -2
  373. package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
  374. package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  375. package/optimize/lib/components/comment_list/comment_event.js +4 -3
  376. package/optimize/lib/components/common.js +0 -28
  377. package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
  378. package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
  379. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  380. package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
  381. package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
  382. package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
  383. package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
  384. package/optimize/lib/components/flyout/flyout.js +1 -1
  385. package/optimize/lib/components/flyout/flyout.styles.js +7 -2
  386. package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
  387. package/optimize/lib/components/form/form.styles.js +27 -31
  388. package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
  389. package/optimize/lib/components/form/switch/switch.js +3 -2
  390. package/optimize/lib/components/form/switch/switch.styles.js +16 -19
  391. package/optimize/lib/components/header/header.styles.js +5 -6
  392. package/optimize/lib/components/icon/icon.styles.js +9 -8
  393. package/optimize/lib/components/icon/named_colors.js +1 -1
  394. package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  395. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  396. package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
  397. package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
  398. package/optimize/lib/components/mark/mark.styles.js +2 -9
  399. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  400. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  401. package/optimize/lib/components/modal/modal.styles.js +1 -1
  402. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  403. package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
  404. package/optimize/lib/components/panel/panel.styles.js +1 -1
  405. package/optimize/lib/components/popover/popover.js +1 -1
  406. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
  407. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
  408. package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
  409. package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
  410. package/optimize/lib/components/progress/progress.js +1 -1
  411. package/optimize/lib/components/progress/progress.styles.js +29 -27
  412. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  413. package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
  414. package/optimize/lib/components/skeleton/utils.js +4 -6
  415. package/optimize/lib/components/steps/step_number.styles.js +1 -1
  416. package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
  417. package/optimize/lib/components/table/table_row.styles.js +7 -9
  418. package/optimize/lib/components/text/text.styles.js +1 -1
  419. package/optimize/lib/components/text/text_color.js +1 -1
  420. package/optimize/lib/components/text/text_color.styles.js +6 -5
  421. package/optimize/lib/components/toast/toast.styles.js +1 -1
  422. package/optimize/lib/components/token/token.js +13 -4
  423. package/optimize/lib/components/token/token.styles.js +12 -3
  424. package/optimize/lib/components/token/token_map.js +244 -2
  425. package/optimize/lib/components/tool_tip/tool_tip.styles.js +11 -23
  426. package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
  427. package/optimize/lib/components/tour/tour.styles.js +8 -12
  428. package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
  429. package/optimize/lib/global_styling/functions/math.js +7 -59
  430. package/optimize/lib/global_styling/functions/size.js +7 -27
  431. package/optimize/lib/global_styling/mixins/_button.js +165 -0
  432. package/optimize/lib/global_styling/mixins/_color.js +38 -30
  433. package/optimize/lib/global_styling/mixins/index.js +11 -0
  434. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  435. package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
  436. package/optimize/lib/global_styling/variables/animations.js +25 -31
  437. package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
  438. package/optimize/lib/global_styling/variables/levels.js +7 -26
  439. package/optimize/lib/global_styling/variables/shadow.js +13 -20
  440. package/optimize/lib/global_styling/variables/size.js +7 -10
  441. package/optimize/lib/global_styling/variables/typography.js +19 -41
  442. package/optimize/lib/services/color/eui_palettes.js +116 -47
  443. package/optimize/lib/services/color/index.js +8 -0
  444. package/optimize/lib/services/color/vis_color_store.js +18 -0
  445. package/optimize/lib/services/index.js +7 -0
  446. package/optimize/lib/services/popover/index.js +8 -1
  447. package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
  448. package/optimize/lib/services/popover/popover_positioning.js +6 -17
  449. package/optimize/lib/services/theme/provider.js +26 -2
  450. package/optimize/lib/services/theme/types.js +13 -14
  451. package/optimize/lib/services/theme/utils.js +54 -296
  452. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
  453. package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  454. package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  455. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
  456. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
  457. package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +601 -0
  458. package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
  459. package/optimize/lib/themes/amsterdam/theme.js +7 -1
  460. package/optimize/lib/themes/index.js +7 -0
  461. package/optimize/lib/themes/themes.js +10 -7
  462. package/package.json +7 -3
  463. package/src/global_styling/functions/_index.scss +1 -5
  464. package/src/global_styling/index.scss +1 -10
  465. package/src/global_styling/variables/_animations.scss +1 -8
  466. package/src/global_styling/variables/_borders.scss +1 -9
  467. package/src/global_styling/variables/_buttons.scss +1 -18
  468. package/src/global_styling/variables/_colors_vis.scss +1 -70
  469. package/src/global_styling/variables/_font_weight.scss +1 -7
  470. package/src/global_styling/variables/_form.scss +2 -21
  471. package/src/global_styling/variables/_responsive.scss +1 -9
  472. package/src/global_styling/variables/_shadows.scss +1 -1
  473. package/src/global_styling/variables/_size.scss +1 -13
  474. package/src/global_styling/variables/_states.scss +1 -14
  475. package/src/global_styling/variables/_typography.scss +1 -75
  476. package/src/global_styling/variables/_z_index.scss +1 -33
  477. package/src/themes/amsterdam/_colors_dark.scss +80 -8
  478. package/src/themes/amsterdam/_colors_light.scss +80 -8
  479. package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +72 -0
  480. package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
  481. package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
  482. package/test-env/components/avatar/avatar.js +8 -2
  483. package/test-env/components/badge/badge.styles.js +1 -2
  484. package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
  485. package/test-env/components/badge/color_utils.js +14 -13
  486. package/test-env/components/beacon/beacon.styles.js +2 -2
  487. package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
  488. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  489. package/test-env/components/button/button.js +1 -1
  490. package/test-env/components/button/button_display/_button_display.styles.js +1 -1
  491. package/test-env/components/button/button_empty/button_empty.js +1 -1
  492. package/test-env/components/button/button_group/button_group_button.js +1 -1
  493. package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
  494. package/test-env/components/button/button_icon/button_icon.js +1 -1
  495. package/test-env/components/card/card.js +1 -1
  496. package/test-env/components/card/card.styles.js +5 -2
  497. package/test-env/components/code/code_block_annotations.js +1 -1
  498. package/test-env/components/code/code_block_line.styles.js +1 -2
  499. package/test-env/components/code/code_syntax.styles.js +23 -27
  500. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  501. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  502. package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  503. package/test-env/components/color_picker/color_picker.js +8 -2
  504. package/test-env/components/color_picker/color_picker.styles.js +1 -2
  505. package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
  506. package/test-env/components/comment_list/comment.js +1 -1
  507. package/test-env/components/comment_list/comment_event.js +5 -4
  508. package/test-env/components/comment_list/comment_list.js +1 -1
  509. package/test-env/components/common.js +0 -28
  510. package/test-env/components/datagrid/data_grid.styles.js +6 -7
  511. package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
  512. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  513. package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
  514. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  515. package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
  516. package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
  517. package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
  518. package/test-env/components/flyout/flyout.styles.js +7 -2
  519. package/test-env/components/flyout/flyout_footer.styles.js +1 -1
  520. package/test-env/components/form/form.styles.js +27 -31
  521. package/test-env/components/form/range/range_tooltip.styles.js +11 -13
  522. package/test-env/components/form/switch/switch.js +3 -2
  523. package/test-env/components/form/switch/switch.styles.js +16 -19
  524. package/test-env/components/header/header.styles.js +5 -6
  525. package/test-env/components/icon/icon.styles.js +9 -8
  526. package/test-env/components/icon/named_colors.js +1 -1
  527. package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
  528. package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  529. package/test-env/components/list_group/list_group_item.styles.js +8 -10
  530. package/test-env/components/loading/loading_chart.styles.js +13 -5
  531. package/test-env/components/mark/mark.styles.js +2 -9
  532. package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  533. package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
  534. package/test-env/components/modal/modal.styles.js +1 -1
  535. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
  536. package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
  537. package/test-env/components/panel/panel.js +1 -1
  538. package/test-env/components/panel/panel.styles.js +1 -1
  539. package/test-env/components/panel/split_panel/split_panel.js +1 -1
  540. package/test-env/components/popover/popover.js +1 -1
  541. package/test-env/components/popover/popover_arrow/_popover_arrow.js +8 -3
  542. package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
  543. package/test-env/components/popover/popover_footer.styles.js +1 -1
  544. package/test-env/components/popover/popover_panel/_popover_panel.styles.js +4 -4
  545. package/test-env/components/progress/progress.js +1 -1
  546. package/test-env/components/progress/progress.styles.js +29 -27
  547. package/test-env/components/resizable_container/resizable_panel.js +1 -1
  548. package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  549. package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
  550. package/test-env/components/skeleton/utils.js +4 -6
  551. package/test-env/components/steps/step_number.styles.js +1 -1
  552. package/test-env/components/table/table_cells_shared.styles.js +2 -7
  553. package/test-env/components/table/table_row.styles.js +7 -9
  554. package/test-env/components/text/text.styles.js +1 -1
  555. package/test-env/components/text/text_color.js +1 -1
  556. package/test-env/components/text/text_color.styles.js +6 -5
  557. package/test-env/components/toast/toast.styles.js +1 -1
  558. package/test-env/components/token/token.js +13 -4
  559. package/test-env/components/token/token.styles.js +12 -3
  560. package/test-env/components/token/token_map.js +244 -2
  561. package/test-env/components/tool_tip/tool_tip.styles.js +11 -23
  562. package/test-env/components/tour/_tour_footer.styles.js +2 -4
  563. package/test-env/components/tour/tour.styles.js +8 -12
  564. package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
  565. package/test-env/global_styling/functions/math.js +7 -59
  566. package/test-env/global_styling/functions/size.js +7 -27
  567. package/test-env/global_styling/mixins/_button.js +165 -0
  568. package/test-env/global_styling/mixins/_color.js +38 -30
  569. package/test-env/global_styling/mixins/index.js +11 -0
  570. package/test-env/global_styling/reset/global_styles.js +1 -1
  571. package/test-env/global_styling/variables/_colors_vis.js +6 -61
  572. package/test-env/global_styling/variables/animations.js +25 -31
  573. package/test-env/global_styling/variables/breakpoint.js +7 -16
  574. package/test-env/global_styling/variables/levels.js +7 -26
  575. package/test-env/global_styling/variables/shadow.js +13 -20
  576. package/test-env/global_styling/variables/size.js +7 -10
  577. package/test-env/global_styling/variables/typography.js +19 -41
  578. package/test-env/services/color/eui_palettes.js +116 -47
  579. package/test-env/services/color/index.js +8 -0
  580. package/test-env/services/color/vis_color_store.js +18 -0
  581. package/test-env/services/index.js +7 -0
  582. package/test-env/services/popover/index.js +8 -1
  583. package/test-env/services/popover/popover_arrow.styles.js +37 -0
  584. package/test-env/services/popover/popover_positioning.js +6 -17
  585. package/test-env/services/theme/provider.js +26 -2
  586. package/test-env/services/theme/types.js +13 -14
  587. package/test-env/services/theme/utils.js +54 -296
  588. package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
  589. package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  590. package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  591. package/test-env/themes/amsterdam/global_styling/variables/_colors.js +617 -25
  592. package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
  593. package/test-env/themes/amsterdam/global_styling/variables/_components.js +601 -0
  594. package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
  595. package/test-env/themes/amsterdam/theme.js +7 -1
  596. package/test-env/themes/index.js +7 -0
  597. package/test-env/themes/themes.js +10 -7
  598. /package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +0 -0
  599. /package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +0 -0
@@ -1,4 +1,3 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  /*
3
2
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
3
  * or more contributor license agreements. Licensed under the Elastic License
@@ -7,19 +6,4 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
7
6
  * Side Public License, v 1.
8
7
  */
9
8
 
10
- /**
11
- * Calculates the `px` value based on a scale multiplier
12
- * @param scale - The font scale multiplier
13
- * *
14
- * @param themeOrBase - Theme base value
15
- * *
16
- * @returns string - Rem unit aligned to baseline
17
- */
18
-
19
- export var sizeToPixel = function sizeToPixel() {
20
- var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
21
- return function (themeOrBase) {
22
- var base = _typeof(themeOrBase) === 'object' ? themeOrBase.base : themeOrBase;
23
- return "".concat(base * scale, "px");
24
- };
25
- };
9
+ export { sizeToPixel } from '@elastic/eui-theme-common';
@@ -0,0 +1,159 @@
1
+ var _templateObject;
2
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+
11
+ import { css, keyframes } from '@emotion/react';
12
+ import { getTokenName, euiCanAnimate } from '@elastic/eui-theme-common';
13
+ import { makeHighContrastColor, useEuiMemoizedStyles } from '../../services';
14
+ export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
15
+ export var BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
16
+ /**
17
+ * Creates the `base` version of button styles with proper text contrast.
18
+ * @param euiThemeContext
19
+ * @param color One of the named button colors or 'disabled'
20
+ * @returns Style object `{ backgroundColor, color }`
21
+ */
22
+ export var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
23
+ var euiTheme = euiThemeContext.euiTheme;
24
+ var backgroundTokenName = getTokenName('background', color);
25
+ var textTokenName = getTokenName('textColor', color);
26
+ var foreground = euiTheme.components.buttons[textTokenName];
27
+ var background = euiTheme.components.buttons[backgroundTokenName];
28
+ return {
29
+ color: background === 'transparent' || color === 'disabled' ? foreground : makeHighContrastColor(foreground)(background),
30
+ backgroundColor: background
31
+ };
32
+ };
33
+
34
+ /**
35
+ * Creates the `fill` version of buttons styles with proper text contrast.
36
+ * @param euiThemeContext
37
+ * @param color One of the named button colors or 'disabled'
38
+ * @returns Style object `{ backgroundColor, color }`
39
+ */
40
+ export var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
41
+ var euiTheme = euiThemeContext.euiTheme;
42
+ var backgroundTokenName = getTokenName('backgroundFilled', color);
43
+ var textColorTokenName = getTokenName('textColorFilled', color);
44
+ var foreground = euiTheme.components.buttons[textColorTokenName];
45
+ var background = euiTheme.components.buttons[backgroundTokenName];
46
+ return {
47
+ color: foreground,
48
+ backgroundColor: background
49
+ };
50
+ };
51
+
52
+ /**
53
+ * Creates the `empty` version of button styles using the text-variant and adding interactive styles.
54
+ * @param euiThemeContext
55
+ * @param color One of the named button colors or 'disabled'
56
+ * @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
57
+ */
58
+ export var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
59
+ var foreground;
60
+ var background;
61
+ switch (color) {
62
+ case 'disabled':
63
+ foreground = euiButtonColor(euiThemeContext, color).color;
64
+ background = 'transparent';
65
+ break;
66
+ default:
67
+ {
68
+ var backgroundToken = getTokenName('backgroundEmpty', color, 'hover');
69
+ foreground = euiButtonColor(euiThemeContext, color).color;
70
+ background = euiThemeContext.euiTheme.components.buttons[backgroundToken];
71
+ break;
72
+ }
73
+ }
74
+ return {
75
+ color: foreground,
76
+ backgroundColor: background
77
+ };
78
+ };
79
+
80
+ /**
81
+ * Given the button display type, returns the Emotion based color keys.
82
+ * @param options Button display type
83
+ * @returns An object of `_EuiButtonColor` keys including `disabled`
84
+ */
85
+ export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
86
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
87
+ var _options$display = options.display,
88
+ display = _options$display === void 0 ? 'base' : _options$display;
89
+ var colorsDisplaysMap = useEuiMemoizedStyles(euiButtonDisplaysColors);
90
+ return colorsDisplaysMap[display];
91
+ };
92
+ var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
93
+ var COLORS = [].concat(BUTTON_COLORS, ['disabled']);
94
+ var displaysColorsMap = {};
95
+ BUTTON_DISPLAYS.forEach(function (display) {
96
+ displaysColorsMap[display] = {};
97
+ COLORS.forEach(function (color) {
98
+ switch (display) {
99
+ case 'base':
100
+ displaysColorsMap[display][color] = /*#__PURE__*/css(euiButtonColor(euiThemeContext, color), ";;label:displaysColorsMap-display-color;");
101
+ break;
102
+ case 'fill':
103
+ displaysColorsMap[display][color] = /*#__PURE__*/css(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:displaysColorsMap-display-color;");
104
+ break;
105
+ case 'empty':
106
+ displaysColorsMap[display][color] = /*#__PURE__*/css("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:displaysColorsMap-display-color;");
107
+ break;
108
+ }
109
+
110
+ // Tweak auto-generated Emotion label/className output
111
+ var emotionOutput = displaysColorsMap[display][color];
112
+ emotionOutput.styles = emotionOutput.styles.replace('label:displaysColorsMap-display-color;', "label:".concat(display, "-").concat(color, ";"));
113
+ });
114
+ });
115
+ return displaysColorsMap;
116
+ };
117
+
118
+ /**
119
+ * Creates the translate animation when button is in focus.
120
+ * @returns string
121
+ */
122
+ export var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
123
+ return useEuiMemoizedStyles(euiButtonFocusCSS);
124
+ };
125
+ var euiButtonFocusAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n transform: translateY(1px);\n }\n"])));
126
+ var euiButtonFocusCSS = function euiButtonFocusCSS(_ref) {
127
+ var euiTheme = _ref.euiTheme;
128
+ var focusCSS = /*#__PURE__*/css(euiCanAnimate, "{transition:transform ", euiTheme.animation.normal, " ease-in-out,background-color ", euiTheme.animation.normal, " ease-in-out;&:hover:not(:disabled){transform:translateY(-1px);}&:focus{animation:", euiButtonFocusAnimation, " ", euiTheme.animation.normal, " ", euiTheme.animation.bounce, ";}&:active:not(:disabled){transform:translateY(1px);}};label:focusCSS;");
129
+ // Remove the auto-generated label.
130
+ // We could typically avoid a label by using a plain string `` instead of css``,
131
+ // but we need css`` for keyframes`` to work for the focus animation
132
+ focusCSS.styles = focusCSS.styles.replace('label:focusCSS;', '');
133
+ return focusCSS;
134
+ };
135
+
136
+ /**
137
+ * Map of `size` props to various sizings/scales
138
+ * that should remain consistent across all buttons
139
+ */
140
+ export var euiButtonSizeMap = function euiButtonSizeMap(_ref2) {
141
+ var euiTheme = _ref2.euiTheme;
142
+ return {
143
+ xs: {
144
+ height: euiTheme.size.l,
145
+ radius: euiTheme.border.radius.small,
146
+ fontScale: 'xs'
147
+ },
148
+ s: {
149
+ height: euiTheme.size.xl,
150
+ radius: euiTheme.border.radius.small,
151
+ fontScale: 's'
152
+ },
153
+ m: {
154
+ height: euiTheme.size.xxl,
155
+ radius: euiTheme.border.radius.medium,
156
+ fontScale: 's'
157
+ }
158
+ };
159
+ };
@@ -13,41 +13,29 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
13
13
  */
14
14
 
15
15
  import { css } from '@emotion/react';
16
- import { shade, tint, tintOrShade, transparentize, useEuiMemoizedStyles } from '../../services';
17
- export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'accent', 'primary', 'success', 'warning', 'danger'];
16
+ import { useEuiMemoizedStyles } from '../../services';
17
+ import { getTokenName } from '@elastic/eui-theme-common';
18
+ export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
18
19
  /**
20
+ * @deprecated - use background tokens directly
19
21
  * @returns A single background color with optional alpha transparency
20
22
  */
21
23
  export var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
22
- var euiTheme = _ref.euiTheme,
23
- colorMode = _ref.colorMode;
24
+ var euiTheme = _ref.euiTheme;
24
25
  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
25
26
  method = _ref2.method;
26
27
  if (color === 'transparent') return 'transparent';
27
28
  if (method === 'transparent') {
28
- if (color === 'plain') {
29
- return transparentize(euiTheme.colors.ghost, 0.2);
30
- } else if (color === 'subdued') {
31
- return colorMode === 'DARK' ? transparentize(euiTheme.colors.lightShade, 0.4) : transparentize(euiTheme.colors.lightShade, 0.2);
32
- } else {
33
- return transparentize(euiTheme.colors[color], 0.1);
34
- }
29
+ var tokenName = getTokenName('backgroundTransparent', color);
30
+ return euiTheme.colors[tokenName];
35
31
  } else {
36
- var _tintOrShade = function _tintOrShade(color) {
37
- return colorMode === 'DARK' ? shade(color, 0.8) : tint(color, 0.9);
38
- };
39
- switch (color) {
40
- case 'plain':
41
- return euiTheme.colors.emptyShade;
42
- case 'subdued':
43
- return euiTheme.colors.body;
44
- default:
45
- return _tintOrShade(euiTheme.colors[color]);
46
- }
32
+ var _tokenName = getTokenName('backgroundBase', color);
33
+ return euiTheme.colors[_tokenName];
47
34
  }
48
35
  };
49
36
 
50
37
  /**
38
+ * @deprecated
51
39
  * @returns An object map of color keys to color values, categorized by
52
40
  * opaque (default) vs transparency (hover/focus states) methods.
53
41
  * e.g. {
@@ -67,6 +55,10 @@ var _euiBackgroundColorMap = function _euiBackgroundColorMap(euiThemeContext) {
67
55
  }, {})
68
56
  };
69
57
  };
58
+
59
+ /**
60
+ * @deprecated
61
+ */
70
62
  export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
71
63
  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
72
64
  method = _ref3.method;
@@ -80,29 +72,37 @@ export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
80
72
  */
81
73
  var _euiBackgroundColors = function _euiBackgroundColors(euiThemeContext) {
82
74
  return BACKGROUND_COLORS.reduce(function (acc, color) {
83
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("background-color:", euiBackgroundColor(euiThemeContext, color), ";label:", color, ";")));
75
+ var tokenName = getTokenName('backgroundBase', color);
76
+ var backgroundColor = color === 'transparent' ? 'transparent' : euiThemeContext.euiTheme.colors[tokenName];
77
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("background-color:", backgroundColor, ";label:", color, ";")));
84
78
  }, {});
85
79
  };
80
+
81
+ /**
82
+ * Hook to retrieve background style for a background color variant
83
+ * @returns An object map of color keys to CSS,
84
+ * e.g. { danger: css``, success: css``, ... }
85
+ */
86
86
  export var useEuiBackgroundColorCSS = function useEuiBackgroundColorCSS() {
87
87
  return useEuiMemoizedStyles(_euiBackgroundColors);
88
88
  };
89
89
 
90
90
  /**
91
91
  * Border colors
92
+ * @deprecated - use border tokens directly or use
93
+ * `useEuiBorderColorCSS()` for composed styles
92
94
  */
93
95
 
94
96
  export var euiBorderColor = function euiBorderColor(_ref4, color) {
95
- var euiTheme = _ref4.euiTheme,
96
- colorMode = _ref4.colorMode;
97
+ var euiTheme = _ref4.euiTheme;
97
98
  switch (color) {
98
99
  case 'transparent':
99
- case 'plain':
100
- case 'subdued':
101
100
  return euiTheme.border.color;
102
- case 'warning':
103
- return tintOrShade(euiTheme.colors.warning, 0.4, colorMode);
104
101
  default:
105
- return tintOrShade(euiTheme.colors[color], 0.6, colorMode);
102
+ {
103
+ var tokenName = getTokenName('borderBase', color);
104
+ return euiTheme.colors[tokenName];
105
+ }
106
106
  }
107
107
  };
108
108
 
@@ -112,9 +112,17 @@ export var euiBorderColor = function euiBorderColor(_ref4, color) {
112
112
  */
113
113
  var _euiBorderColors = function _euiBorderColors(euiThemeContext) {
114
114
  return BACKGROUND_COLORS.reduce(function (acc, color) {
115
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("border-color:", euiBorderColor(euiThemeContext, color), ";label:", color, ";")));
115
+ var borderToken = getTokenName('borderBase', color);
116
+ var borderColor = color === 'transparent' ? euiThemeContext.euiTheme.border.color : euiThemeContext.euiTheme.colors[borderToken];
117
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("border-color:", borderColor, ";label:", color, ";")));
116
118
  }, {});
117
119
  };
120
+
121
+ /**
122
+ * Hook to retrieve border style for a border variant
123
+ * @returns An object map of color keys to CSS,
124
+ * e.g. { danger: css``, success: css``, ... }
125
+ */
118
126
  export var useEuiBorderColorCSS = function useEuiBorderColorCSS() {
119
127
  return useEuiMemoizedStyles(_euiBorderColors);
120
128
  };
@@ -11,4 +11,5 @@ export * from './_helpers';
11
11
  export * from './_padding';
12
12
  export * from './_states';
13
13
  export * from './_typography';
14
- export * from './_responsive';
14
+ export * from './_responsive';
15
+ export * from './_button';
@@ -17,7 +17,7 @@ import React from 'react';
17
17
  import { Global, css } from '@emotion/react';
18
18
  import { euiFocusRing, euiScrollBarStyles } from '../mixins';
19
19
  import { logicalCSS } from '../functions';
20
- import { shade, tint, transparentize } from '../../services/color';
20
+ import { transparentize } from '../../services/color';
21
21
  import { useEuiTheme } from '../../services/theme';
22
22
  import { resetStyles as reset } from './reset';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -35,7 +35,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
35
35
  * so that it knows to use custom styles. Therefore, we just reuse the same scrollbar mixin with thick size.
36
36
  */
37
37
  var scrollbarStyles = euiScrollBarStyles(euiThemeContext, {
38
- trackColor: colorMode === 'LIGHT' ? shade(colors.body, 0.03) : tint(colors.body, 0.07),
38
+ trackColor: euiTheme.components.scrollbarTrackColor,
39
39
  width: 'auto'
40
40
  });
41
41
 
@@ -6,56 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /**
10
- * NOTE: These were quick conversions of their Sass counterparts.
11
- * They have yet to be used/tested.
12
- * TODO: Make the graphic version available from `euiPaletteColorBlind()`
13
- */
14
-
15
- // Maps allow for easier JSON usage
16
- // Use map_merge(euiColorVisColors, $yourMap) to change individual colors after importing ths file
17
- // The `behindText` variant is a direct copy of the hex output by the JS euiPaletteColorBlindBehindText() function
18
- var euiPaletteColorBlind = {
19
- euiColorVis0: {
20
- graphic: '#54B399'
21
- },
22
- euiColorVis1: {
23
- graphic: '#6092C0'
24
- },
25
- euiColorVis2: {
26
- graphic: '#D36086'
27
- },
28
- euiColorVis3: {
29
- graphic: '#9170B8'
30
- },
31
- euiColorVis4: {
32
- graphic: '#CA8EAE'
33
- },
34
- euiColorVis5: {
35
- graphic: '#D6BF57'
36
- },
37
- euiColorVis6: {
38
- graphic: '#B9A888'
39
- },
40
- euiColorVis7: {
41
- graphic: '#DA8B45'
42
- },
43
- euiColorVis8: {
44
- graphic: '#AA6556'
45
- },
46
- euiColorVis9: {
47
- graphic: '#E7664C'
48
- }
49
- };
50
- export var colorVis = {
51
- euiColorVis0: euiPaletteColorBlind.euiColorVis0.graphic,
52
- euiColorVis1: euiPaletteColorBlind.euiColorVis1.graphic,
53
- euiColorVis2: euiPaletteColorBlind.euiColorVis2.graphic,
54
- euiColorVis3: euiPaletteColorBlind.euiColorVis3.graphic,
55
- euiColorVis4: euiPaletteColorBlind.euiColorVis4.graphic,
56
- euiColorVis5: euiPaletteColorBlind.euiColorVis5.graphic,
57
- euiColorVis6: euiPaletteColorBlind.euiColorVis6.graphic,
58
- euiColorVis7: euiPaletteColorBlind.euiColorVis7.graphic,
59
- euiColorVis8: euiPaletteColorBlind.euiColorVis8.graphic,
60
- euiColorVis9: euiPaletteColorBlind.euiColorVis9.graphic
61
- };
9
+ export { colorVis } from '../../themes/amsterdam/global_styling/variables/_colors_vis';
@@ -6,25 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /**
10
- * A constant storing the `prefers-reduced-motion` media query
11
- * so that when it is turned off, animations are not run.
12
- */
13
- export var euiCanAnimate = '@media screen and (prefers-reduced-motion: no-preference)';
14
-
15
- /**
16
- * A constant storing the `prefers-reduced-motion` media query that will
17
- * only apply the content if the setting is off (reduce).
18
- */
19
- export var euiCantAnimate = '@media screen and (prefers-reduced-motion: reduce)';
20
-
21
- /**
22
- * Speeds / Durations / Delays
23
- */
24
-
25
- export var EuiThemeAnimationSpeeds = ['extraFast', 'fast', 'normal', 'slow', 'extraSlow'];
26
- /**
27
- * Easings / Timing functions
28
- */
29
-
30
- export var EuiThemeAnimationEasings = ['bounce', 'resistance'];
9
+ export { euiCanAnimate, euiCantAnimate, EuiThemeAnimationSpeeds, EuiThemeAnimationEasings } from '@elastic/eui-theme-common';
@@ -6,10 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- export var EuiThemeBreakpoints = ['xs', 's', 'm', 'l', 'xl'];
10
-
11
- // This type cannot be a string enum / must be a generic string
12
- // in case consumers add custom breakpoint sizes, such as xxl or xxs
13
-
14
- // Explicitly list out each key so we can document default values
15
- // via JSDoc (which is available to devs in IDE via intellisense)
9
+ export { EuiThemeBreakpoints } from '@elastic/eui-theme-common';
@@ -6,20 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /**
10
- * Z-Index
11
- *
12
- * Remember that z-index is relative to parent and based on the stacking context.
13
- * z-indexes only compete against other z-indexes when they exist as children of
14
- * that shared parent.
15
- *
16
- * That means a popover with a settings of 2, will still show above a modal
17
- * with a setting of 100, if it is within that modal and not besides it.
18
- *
19
- * Generally that means it's a good idea to consider things added to this file
20
- * as competitive only as siblings.
21
- *
22
- * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
23
- */
24
-
25
- export var EuiThemeLevels = ['toast', 'modal', 'mask', 'navigation', 'menu', 'header', 'flyout', 'maskBelowHeader', 'content'];
9
+ export { EuiThemeLevels } from '@elastic/eui-theme-common';
@@ -6,14 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- export var EuiThemeShadowSizes = ['xs', 's', 'm', 'l', 'xl'];
10
- /**
11
- * Shadow t-shirt sizes descriptions
12
- */
13
- export var _EuiShadowSizesDescriptions = {
14
- xs: 'Very subtle shadow used on small components.',
15
- s: 'Adds subtle depth, usually used in conjunction with a border.',
16
- m: 'Used on small sized portalled content like popovers.',
17
- l: 'Primary shadow used in most cases to add visible depth.',
18
- xl: 'Very large shadows used for large portalled style containers like modals and flyouts.'
19
- };
9
+ export { EuiThemeShadowSizes, _EuiShadowSizesDescriptions } from '@elastic/eui-theme-common';
@@ -6,4 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- export var EuiThemeSizes = ['xxs', 'xs', 's', 'm', 'base', 'l', 'xl', 'xxl', 'xxxl', 'xxxxl'];
9
+ export { EuiThemeSizes } from '@elastic/eui-theme-common';
@@ -6,35 +6,4 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /**
10
- * Font units of measure
11
- */
12
-
13
- export var EuiThemeFontUnits = ['rem', 'px', 'em'];
14
- /*
15
- * Font scale
16
- */
17
-
18
- export var EuiThemeFontScales = ['xxxs', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
19
-
20
- /*
21
- * Font base settings
22
- */
23
-
24
- /*
25
- * Font weights
26
- */
27
-
28
- export var EuiThemeFontWeights = ['light', 'regular', 'medium', 'semiBold', 'bold'];
29
-
30
- /**
31
- * Body / Base styles
32
- */
33
-
34
- /**
35
- * Title styles
36
- */
37
-
38
- /*
39
- * Font
40
- */
9
+ export { EuiThemeFontUnits, EuiThemeFontScales, EuiThemeFontWeights } from '@elastic/eui-theme-common';