@elastic/eui 99.4.0 → 100.0.0

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 (779) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +177 -65
  3. package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +178 -66
  4. package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +177 -65
  5. package/dist/eui_theme_amsterdam_light.json.d.ts +425 -0
  6. package/dist/eui_theme_borealis_dark.json +422 -0
  7. package/dist/{eui_theme_dark.json.d.ts → eui_theme_borealis_dark.json.d.ts} +178 -66
  8. package/dist/eui_theme_borealis_light.json +422 -0
  9. package/dist/eui_theme_borealis_light.json.d.ts +425 -0
  10. package/es/components/avatar/avatar.js +4 -4
  11. package/es/components/badge/badge.styles.js +1 -2
  12. package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
  13. package/es/components/badge/color_utils.js +9 -8
  14. package/es/components/beacon/beacon.styles.js +2 -2
  15. package/es/components/bottom_bar/bottom_bar.styles.js +2 -3
  16. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  17. package/es/components/button/button.js +1 -1
  18. package/es/components/button/button_display/_button_display.styles.js +1 -1
  19. package/es/components/button/button_empty/button_empty.js +1 -1
  20. package/es/components/button/button_group/button_group_button.js +1 -1
  21. package/es/components/button/button_group/button_group_button.styles.js +6 -6
  22. package/es/components/button/button_icon/button_icon.js +1 -1
  23. package/es/components/button/button_icon/button_icon.styles.js +1 -1
  24. package/es/components/call_out/call_out.styles.js +4 -4
  25. package/es/components/card/card.js +1 -1
  26. package/es/components/card/card.styles.js +6 -3
  27. package/es/components/code/code_block_annotations.js +1 -1
  28. package/es/components/code/code_block_line.styles.js +1 -2
  29. package/es/components/code/code_syntax.styles.js +24 -28
  30. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  31. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  32. package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  33. package/es/components/color_picker/color_picker.js +4 -3
  34. package/es/components/color_picker/color_picker.styles.js +1 -2
  35. package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  36. package/es/components/combo_box/combo_box.js +11 -1
  37. package/es/components/comment_list/comment.js +1 -1
  38. package/es/components/comment_list/comment_event.js +5 -4
  39. package/es/components/comment_list/comment_list.js +1 -1
  40. package/es/components/common.js +0 -28
  41. package/es/components/datagrid/data_grid.styles.js +6 -7
  42. package/es/components/date_picker/date_picker.styles.js +1 -1
  43. package/es/components/date_picker/date_picker_range.styles.js +1 -1
  44. package/es/components/date_picker/react_date_picker.styles.js +2 -1
  45. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -5
  46. package/es/components/drag_and_drop/droppable.styles.js +2 -4
  47. package/es/components/empty_prompt/empty_prompt.js +1 -1
  48. package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
  49. package/es/components/expression/expression.styles.js +13 -13
  50. package/es/components/filter_group/filter_select_item.styles.js +1 -2
  51. package/es/components/flyout/_flyout_close_button.styles.js +2 -3
  52. package/es/components/flyout/flyout.js +1 -1
  53. package/es/components/flyout/flyout.styles.js +8 -3
  54. package/es/components/flyout/flyout_footer.styles.js +1 -1
  55. package/es/components/form/form.styles.js +24 -32
  56. package/es/components/form/range/range_tooltip.styles.js +11 -13
  57. package/es/components/form/switch/switch.js +3 -7
  58. package/es/components/form/switch/switch.styles.js +16 -19
  59. package/es/components/header/header.styles.js +7 -8
  60. package/es/components/icon/icon.styles.js +9 -8
  61. package/es/components/icon/named_colors.js +1 -1
  62. package/es/components/image/image.styles.js +1 -1
  63. package/es/components/image/image_button.styles.js +1 -1
  64. package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  65. package/es/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
  66. package/es/components/link/link.styles.js +6 -6
  67. package/es/components/list_group/list_group_item.styles.js +9 -11
  68. package/es/components/loading/loading_chart.styles.js +18 -5
  69. package/es/components/loading/loading_spinner.styles.js +2 -2
  70. package/es/components/mark/mark.styles.js +2 -9
  71. package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  72. package/es/components/markdown_editor/markdown_format.styles.js +2 -2
  73. package/es/components/modal/modal.styles.js +2 -2
  74. package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  75. package/es/components/page_template/inner/page_inner.styles.js +3 -3
  76. package/es/components/pagination/pagination.styles.js +2 -2
  77. package/es/components/panel/panel.js +1 -1
  78. package/es/components/panel/panel.styles.js +3 -2
  79. package/es/components/panel/split_panel/split_panel.js +1 -1
  80. package/es/components/popover/popover.js +1 -1
  81. package/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
  82. package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
  83. package/es/components/popover/popover_footer.styles.js +1 -1
  84. package/es/components/popover/popover_panel/_popover_panel.styles.js +7 -6
  85. package/es/components/progress/progress.js +1 -1
  86. package/es/components/progress/progress.styles.js +30 -28
  87. package/es/components/provider/provider.js +2 -2
  88. package/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
  89. package/es/components/resizable_container/resizable_panel.js +1 -1
  90. package/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
  91. package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
  92. package/es/components/side_nav/side_nav_item.styles.js +6 -7
  93. package/es/components/skeleton/utils.js +5 -7
  94. package/es/components/stat/stat.styles.js +5 -5
  95. package/es/components/steps/step_number.styles.js +1 -1
  96. package/es/components/table/table_cells_shared.styles.js +3 -8
  97. package/es/components/table/table_row.styles.js +9 -11
  98. package/es/components/tabs/tab.styles.js +2 -2
  99. package/es/components/text/text.styles.js +2 -2
  100. package/es/components/text/text_color.js +1 -1
  101. package/es/components/text/text_color.styles.js +6 -5
  102. package/es/components/text_diff/text_diff.styles.js +1 -1
  103. package/es/components/toast/toast.styles.js +2 -2
  104. package/es/components/token/token.js +10 -4
  105. package/es/components/token/token.styles.js +14 -5
  106. package/es/components/token/token_map.js +243 -1
  107. package/es/components/tool_tip/tool_tip.styles.js +13 -25
  108. package/es/components/tour/_tour_footer.styles.js +2 -4
  109. package/es/components/tour/tour.styles.js +8 -12
  110. package/es/components/tree_view/tree_view_item.styles.js +1 -2
  111. package/es/global_styling/functions/math.js +1 -49
  112. package/es/global_styling/functions/size.js +1 -17
  113. package/es/global_styling/mixins/_button.js +159 -0
  114. package/es/global_styling/mixins/_color.js +39 -31
  115. package/es/global_styling/mixins/_shadow.js +31 -0
  116. package/es/global_styling/mixins/index.js +3 -1
  117. package/es/global_styling/reset/global_styles.js +3 -3
  118. package/es/global_styling/variables/animations.js +1 -22
  119. package/es/global_styling/variables/breakpoint.js +1 -7
  120. package/es/global_styling/variables/levels.js +1 -17
  121. package/es/global_styling/variables/shadow.js +1 -11
  122. package/es/global_styling/variables/size.js +1 -1
  123. package/es/global_styling/variables/typography.js +1 -32
  124. package/es/services/color/eui_palettes.js +148 -54
  125. package/es/services/color/eui_palettes_hooks.js +74 -0
  126. package/es/services/color/index.js +2 -0
  127. package/es/services/color/vis_color_store.js +13 -0
  128. package/es/services/index.js +2 -1
  129. package/es/services/popover/index.js +4 -1
  130. package/es/services/popover/popover_arrow.styles.js +31 -0
  131. package/es/services/popover/popover_positioning.js +6 -17
  132. package/es/services/theme/context.js +3 -3
  133. package/es/services/theme/provider.js +15 -2
  134. package/es/services/theme/types.js +1 -6
  135. package/es/services/theme/utils.js +1 -303
  136. package/es/themes/amsterdam/global_styling/functions/shadows.js +1 -10
  137. package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
  138. package/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
  139. package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  140. package/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
  141. package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
  142. package/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
  143. package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
  144. package/es/themes/amsterdam/global_styling/variables/_components.js +619 -0
  145. package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
  146. package/es/themes/amsterdam/theme.js +7 -1
  147. package/es/themes/index.js +1 -2
  148. package/es/themes/themes.js +1 -21
  149. package/eui.d.ts +2726 -3183
  150. package/lib/components/avatar/avatar.js +2 -2
  151. package/lib/components/badge/badge.styles.js +1 -2
  152. package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
  153. package/lib/components/badge/color_utils.js +14 -13
  154. package/lib/components/beacon/beacon.styles.js +2 -2
  155. package/lib/components/bottom_bar/bottom_bar.styles.js +2 -3
  156. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  157. package/lib/components/button/button.js +1 -1
  158. package/lib/components/button/button_display/_button_display.styles.js +1 -1
  159. package/lib/components/button/button_empty/button_empty.js +1 -1
  160. package/lib/components/button/button_group/button_group_button.js +1 -1
  161. package/lib/components/button/button_group/button_group_button.styles.js +5 -5
  162. package/lib/components/button/button_icon/button_icon.js +1 -1
  163. package/lib/components/button/button_icon/button_icon.styles.js +1 -1
  164. package/lib/components/call_out/call_out.styles.js +4 -4
  165. package/lib/components/card/card.js +1 -1
  166. package/lib/components/card/card.styles.js +5 -2
  167. package/lib/components/code/code_block_annotations.js +1 -1
  168. package/lib/components/code/code_block_line.styles.js +1 -2
  169. package/lib/components/code/code_syntax.styles.js +24 -28
  170. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  171. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  172. package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  173. package/lib/components/color_picker/color_picker.js +3 -2
  174. package/lib/components/color_picker/color_picker.styles.js +1 -2
  175. package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  176. package/lib/components/combo_box/combo_box.js +11 -1
  177. package/lib/components/comment_list/comment.js +1 -1
  178. package/lib/components/comment_list/comment_event.js +5 -4
  179. package/lib/components/comment_list/comment_list.js +1 -1
  180. package/lib/components/common.js +0 -28
  181. package/lib/components/datagrid/data_grid.styles.js +6 -7
  182. package/lib/components/date_picker/date_picker.styles.js +2 -2
  183. package/lib/components/date_picker/date_picker_range.styles.js +2 -2
  184. package/lib/components/date_picker/react_date_picker.styles.js +3 -2
  185. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  186. package/lib/components/drag_and_drop/droppable.styles.js +2 -4
  187. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  188. package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
  189. package/lib/components/expression/expression.styles.js +13 -13
  190. package/lib/components/filter_group/filter_select_item.styles.js +1 -2
  191. package/lib/components/flyout/_flyout_close_button.styles.js +3 -4
  192. package/lib/components/flyout/flyout.js +1 -1
  193. package/lib/components/flyout/flyout.styles.js +8 -3
  194. package/lib/components/flyout/flyout_footer.styles.js +1 -1
  195. package/lib/components/form/form.styles.js +23 -31
  196. package/lib/components/form/range/range_tooltip.styles.js +11 -13
  197. package/lib/components/form/switch/switch.js +3 -7
  198. package/lib/components/form/switch/switch.styles.js +16 -19
  199. package/lib/components/header/header.styles.js +7 -8
  200. package/lib/components/icon/icon.styles.js +9 -8
  201. package/lib/components/icon/named_colors.js +1 -1
  202. package/lib/components/icon/svgs/aggregate.svg +0 -0
  203. package/lib/components/icon/svgs/color.svg +0 -0
  204. package/lib/components/icon/svgs/continuityAbove.svg +0 -0
  205. package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
  206. package/lib/components/icon/svgs/continuityBelow.svg +0 -0
  207. package/lib/components/icon/svgs/continuityWithin.svg +0 -0
  208. package/lib/components/icon/svgs/documentation.svg +0 -0
  209. package/lib/components/icon/svgs/eraser.svg +0 -0
  210. package/lib/components/icon/svgs/folder_check.svg +0 -0
  211. package/lib/components/icon/svgs/folder_closed.svg +0 -0
  212. package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
  213. package/lib/components/icon/svgs/folder_open.svg +0 -0
  214. package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
  215. package/lib/components/icon/svgs/function.svg +0 -0
  216. package/lib/components/icon/svgs/layers.svg +0 -0
  217. package/lib/components/icon/svgs/menu.svg +0 -0
  218. package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
  219. package/lib/components/icon/svgs/pageSelect.svg +0 -0
  220. package/lib/components/icon/svgs/pagesSelect.svg +0 -0
  221. package/lib/components/icon/svgs/percent.svg +0 -0
  222. package/lib/components/icon/svgs/push.svg +0 -0
  223. package/lib/components/icon/svgs/quote.svg +0 -0
  224. package/lib/components/icon/svgs/reporter.svg +0 -0
  225. package/lib/components/icon/svgs/securitySignal.svg +0 -0
  226. package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
  227. package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
  228. package/lib/components/icon/svgs/timeline.svg +0 -0
  229. package/lib/components/icon/svgs/users.svg +0 -0
  230. package/lib/components/icon/svgs/wordWrap.svg +0 -0
  231. package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
  232. package/lib/components/image/image.styles.js +2 -2
  233. package/lib/components/image/image_button.styles.js +3 -3
  234. package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  235. package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
  236. package/lib/components/link/link.styles.js +6 -6
  237. package/lib/components/list_group/list_group_item.styles.js +8 -10
  238. package/lib/components/loading/loading_chart.styles.js +18 -5
  239. package/lib/components/loading/loading_spinner.styles.js +2 -2
  240. package/lib/components/mark/mark.styles.js +2 -9
  241. package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  242. package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  243. package/lib/components/modal/modal.styles.js +3 -3
  244. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  245. package/lib/components/page_template/inner/page_inner.styles.js +2 -2
  246. package/lib/components/pagination/pagination.styles.js +2 -2
  247. package/lib/components/panel/panel.js +1 -1
  248. package/lib/components/panel/panel.styles.js +4 -3
  249. package/lib/components/panel/split_panel/split_panel.js +1 -1
  250. package/lib/components/popover/popover.js +1 -1
  251. package/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
  252. package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
  253. package/lib/components/popover/popover_footer.styles.js +1 -1
  254. package/lib/components/popover/popover_panel/_popover_panel.styles.js +10 -9
  255. package/lib/components/progress/progress.js +1 -1
  256. package/lib/components/progress/progress.styles.js +29 -27
  257. package/lib/components/provider/provider.js +2 -2
  258. package/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
  259. package/lib/components/resizable_container/resizable_panel.js +1 -1
  260. package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
  261. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
  262. package/lib/components/side_nav/side_nav_item.styles.js +6 -7
  263. package/lib/components/skeleton/utils.js +4 -6
  264. package/lib/components/stat/stat.styles.js +5 -5
  265. package/lib/components/steps/step_number.styles.js +1 -1
  266. package/lib/components/table/table_cells_shared.styles.js +3 -8
  267. package/lib/components/table/table_row.styles.js +8 -10
  268. package/lib/components/tabs/tab.styles.js +2 -2
  269. package/lib/components/text/text.styles.js +1 -1
  270. package/lib/components/text/text_color.js +1 -1
  271. package/lib/components/text/text_color.styles.js +6 -5
  272. package/lib/components/text_diff/text_diff.styles.js +1 -1
  273. package/lib/components/toast/toast.styles.js +2 -2
  274. package/lib/components/token/token.js +12 -4
  275. package/lib/components/token/token.styles.js +14 -5
  276. package/lib/components/token/token_map.js +244 -2
  277. package/lib/components/tool_tip/tool_tip.styles.js +12 -24
  278. package/lib/components/tour/_tour_footer.styles.js +2 -4
  279. package/lib/components/tour/tour.styles.js +8 -12
  280. package/lib/components/tree_view/tree_view_item.styles.js +1 -2
  281. package/lib/global_styling/functions/math.js +7 -58
  282. package/lib/global_styling/functions/size.js +7 -26
  283. package/lib/global_styling/mixins/_button.js +164 -0
  284. package/lib/global_styling/mixins/_color.js +38 -30
  285. package/lib/global_styling/mixins/_shadow.js +84 -0
  286. package/lib/global_styling/mixins/index.js +22 -0
  287. package/lib/global_styling/reset/global_styles.js +2 -2
  288. package/lib/global_styling/variables/animations.js +25 -31
  289. package/lib/global_styling/variables/breakpoint.js +7 -16
  290. package/lib/global_styling/variables/levels.js +7 -26
  291. package/lib/global_styling/variables/shadow.js +13 -20
  292. package/lib/global_styling/variables/size.js +7 -10
  293. package/lib/global_styling/variables/typography.js +19 -41
  294. package/lib/services/color/eui_palettes.js +148 -54
  295. package/lib/services/color/eui_palettes_hooks.js +78 -0
  296. package/lib/services/color/index.js +20 -0
  297. package/lib/services/color/vis_color_store.js +18 -0
  298. package/lib/services/index.js +19 -0
  299. package/lib/services/popover/index.js +8 -1
  300. package/lib/services/popover/popover_arrow.styles.js +37 -0
  301. package/lib/services/popover/popover_positioning.js +6 -17
  302. package/lib/services/theme/context.js +3 -3
  303. package/lib/services/theme/provider.js +15 -2
  304. package/lib/services/theme/types.js +13 -14
  305. package/lib/services/theme/utils.js +54 -303
  306. package/lib/themes/amsterdam/global_styling/functions/shadows.js +7 -19
  307. package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
  308. package/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
  309. package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  310. package/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
  311. package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
  312. package/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
  313. package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
  314. package/lib/themes/amsterdam/global_styling/variables/_components.js +623 -0
  315. package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
  316. package/lib/themes/amsterdam/theme.js +7 -1
  317. package/lib/themes/index.js +4 -11
  318. package/lib/themes/themes.js +1 -23
  319. package/optimize/es/components/avatar/avatar.js +4 -4
  320. package/optimize/es/components/badge/badge.styles.js +1 -2
  321. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
  322. package/optimize/es/components/badge/color_utils.js +9 -8
  323. package/optimize/es/components/beacon/beacon.styles.js +2 -2
  324. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +2 -3
  325. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  326. package/optimize/es/components/button/button.js +1 -1
  327. package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
  328. package/optimize/es/components/button/button_empty/button_empty.js +1 -1
  329. package/optimize/es/components/button/button_group/button_group_button.js +1 -1
  330. package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
  331. package/optimize/es/components/button/button_icon/button_icon.js +1 -1
  332. package/optimize/es/components/button/button_icon/button_icon.styles.js +1 -1
  333. package/optimize/es/components/call_out/call_out.styles.js +4 -4
  334. package/optimize/es/components/card/card.styles.js +6 -3
  335. package/optimize/es/components/code/code_block_annotations.js +1 -1
  336. package/optimize/es/components/code/code_block_line.styles.js +1 -2
  337. package/optimize/es/components/code/code_syntax.styles.js +24 -28
  338. package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  339. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  340. package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  341. package/optimize/es/components/color_picker/color_picker.js +4 -3
  342. package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
  343. package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  344. package/optimize/es/components/combo_box/combo_box.js +6 -1
  345. package/optimize/es/components/comment_list/comment_event.js +4 -3
  346. package/optimize/es/components/common.js +0 -28
  347. package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
  348. package/optimize/es/components/date_picker/date_picker.styles.js +1 -1
  349. package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
  350. package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
  351. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -5
  352. package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
  353. package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
  354. package/optimize/es/components/expression/expression.styles.js +13 -13
  355. package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
  356. package/optimize/es/components/flyout/_flyout_close_button.styles.js +2 -3
  357. package/optimize/es/components/flyout/flyout.js +1 -1
  358. package/optimize/es/components/flyout/flyout.styles.js +8 -3
  359. package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
  360. package/optimize/es/components/form/form.styles.js +24 -32
  361. package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
  362. package/optimize/es/components/form/switch/switch.js +3 -2
  363. package/optimize/es/components/form/switch/switch.styles.js +16 -19
  364. package/optimize/es/components/header/header.styles.js +7 -8
  365. package/optimize/es/components/icon/icon.styles.js +9 -8
  366. package/optimize/es/components/icon/named_colors.js +1 -1
  367. package/optimize/es/components/image/image.styles.js +1 -1
  368. package/optimize/es/components/image/image_button.styles.js +1 -1
  369. package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  370. package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
  371. package/optimize/es/components/link/link.styles.js +6 -6
  372. package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
  373. package/optimize/es/components/loading/loading_chart.styles.js +13 -5
  374. package/optimize/es/components/loading/loading_spinner.styles.js +2 -2
  375. package/optimize/es/components/mark/mark.styles.js +2 -9
  376. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  377. package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
  378. package/optimize/es/components/modal/modal.styles.js +2 -2
  379. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  380. package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -3
  381. package/optimize/es/components/pagination/pagination.styles.js +2 -2
  382. package/optimize/es/components/panel/panel.styles.js +3 -2
  383. package/optimize/es/components/popover/popover.js +1 -1
  384. package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
  385. package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
  386. package/optimize/es/components/popover/popover_footer.styles.js +1 -1
  387. package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +7 -6
  388. package/optimize/es/components/progress/progress.js +1 -1
  389. package/optimize/es/components/progress/progress.styles.js +30 -28
  390. package/optimize/es/components/provider/provider.js +2 -2
  391. package/optimize/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
  392. package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
  393. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
  394. package/optimize/es/components/side_nav/side_nav_item.styles.js +6 -7
  395. package/optimize/es/components/skeleton/utils.js +5 -7
  396. package/optimize/es/components/stat/stat.styles.js +5 -5
  397. package/optimize/es/components/steps/step_number.styles.js +1 -1
  398. package/optimize/es/components/table/table_cells_shared.styles.js +3 -8
  399. package/optimize/es/components/table/table_row.styles.js +9 -11
  400. package/optimize/es/components/tabs/tab.styles.js +2 -2
  401. package/optimize/es/components/text/text.styles.js +2 -2
  402. package/optimize/es/components/text/text_color.js +1 -1
  403. package/optimize/es/components/text/text_color.styles.js +6 -5
  404. package/optimize/es/components/text_diff/text_diff.styles.js +1 -1
  405. package/optimize/es/components/toast/toast.styles.js +2 -2
  406. package/optimize/es/components/token/token.js +10 -4
  407. package/optimize/es/components/token/token.styles.js +14 -5
  408. package/optimize/es/components/token/token_map.js +243 -1
  409. package/optimize/es/components/tool_tip/tool_tip.styles.js +13 -25
  410. package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
  411. package/optimize/es/components/tour/tour.styles.js +8 -12
  412. package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
  413. package/optimize/es/global_styling/functions/math.js +1 -49
  414. package/optimize/es/global_styling/functions/size.js +1 -17
  415. package/optimize/es/global_styling/mixins/_button.js +159 -0
  416. package/optimize/es/global_styling/mixins/_color.js +39 -31
  417. package/optimize/es/global_styling/mixins/_shadow.js +31 -0
  418. package/optimize/es/global_styling/mixins/index.js +3 -1
  419. package/optimize/es/global_styling/reset/global_styles.js +3 -3
  420. package/optimize/es/global_styling/variables/animations.js +1 -22
  421. package/optimize/es/global_styling/variables/breakpoint.js +1 -7
  422. package/optimize/es/global_styling/variables/levels.js +1 -17
  423. package/optimize/es/global_styling/variables/shadow.js +1 -11
  424. package/optimize/es/global_styling/variables/size.js +1 -1
  425. package/optimize/es/global_styling/variables/typography.js +1 -32
  426. package/optimize/es/services/color/eui_palettes.js +148 -54
  427. package/optimize/es/services/color/eui_palettes_hooks.js +71 -0
  428. package/optimize/es/services/color/index.js +2 -0
  429. package/optimize/es/services/color/vis_color_store.js +13 -0
  430. package/optimize/es/services/index.js +2 -1
  431. package/optimize/es/services/popover/index.js +4 -1
  432. package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
  433. package/optimize/es/services/popover/popover_positioning.js +6 -17
  434. package/optimize/es/services/theme/context.js +3 -3
  435. package/optimize/es/services/theme/provider.js +15 -2
  436. package/optimize/es/services/theme/types.js +1 -6
  437. package/optimize/es/services/theme/utils.js +1 -295
  438. package/optimize/es/themes/amsterdam/global_styling/functions/shadows.js +1 -10
  439. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
  440. package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
  441. package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  442. package/optimize/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
  443. package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
  444. package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
  445. package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
  446. package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +611 -0
  447. package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
  448. package/optimize/es/themes/amsterdam/theme.js +7 -1
  449. package/optimize/es/themes/index.js +1 -2
  450. package/optimize/es/themes/themes.js +1 -21
  451. package/optimize/lib/components/avatar/avatar.js +2 -2
  452. package/optimize/lib/components/badge/badge.styles.js +1 -2
  453. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
  454. package/optimize/lib/components/badge/color_utils.js +14 -13
  455. package/optimize/lib/components/beacon/beacon.styles.js +2 -2
  456. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +2 -3
  457. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  458. package/optimize/lib/components/button/button.js +1 -1
  459. package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
  460. package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
  461. package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
  462. package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
  463. package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
  464. package/optimize/lib/components/button/button_icon/button_icon.styles.js +1 -1
  465. package/optimize/lib/components/call_out/call_out.styles.js +4 -4
  466. package/optimize/lib/components/card/card.styles.js +5 -2
  467. package/optimize/lib/components/code/code_block_annotations.js +1 -1
  468. package/optimize/lib/components/code/code_block_line.styles.js +1 -2
  469. package/optimize/lib/components/code/code_syntax.styles.js +24 -28
  470. package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  471. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  472. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  473. package/optimize/lib/components/color_picker/color_picker.js +3 -2
  474. package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
  475. package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  476. package/optimize/lib/components/combo_box/combo_box.js +6 -1
  477. package/optimize/lib/components/comment_list/comment_event.js +4 -3
  478. package/optimize/lib/components/common.js +0 -28
  479. package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
  480. package/optimize/lib/components/date_picker/date_picker.styles.js +2 -2
  481. package/optimize/lib/components/date_picker/date_picker_range.styles.js +2 -2
  482. package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
  483. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  484. package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
  485. package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
  486. package/optimize/lib/components/expression/expression.styles.js +13 -13
  487. package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
  488. package/optimize/lib/components/flyout/_flyout_close_button.styles.js +3 -4
  489. package/optimize/lib/components/flyout/flyout.js +1 -1
  490. package/optimize/lib/components/flyout/flyout.styles.js +8 -3
  491. package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
  492. package/optimize/lib/components/form/form.styles.js +23 -31
  493. package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
  494. package/optimize/lib/components/form/switch/switch.js +3 -2
  495. package/optimize/lib/components/form/switch/switch.styles.js +16 -19
  496. package/optimize/lib/components/header/header.styles.js +7 -8
  497. package/optimize/lib/components/icon/icon.styles.js +9 -8
  498. package/optimize/lib/components/icon/named_colors.js +1 -1
  499. package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
  500. package/optimize/lib/components/icon/svgs/color.svg +0 -0
  501. package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
  502. package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
  503. package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
  504. package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
  505. package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
  506. package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
  507. package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
  508. package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
  509. package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
  510. package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
  511. package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
  512. package/optimize/lib/components/icon/svgs/function.svg +0 -0
  513. package/optimize/lib/components/icon/svgs/layers.svg +0 -0
  514. package/optimize/lib/components/icon/svgs/menu.svg +0 -0
  515. package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
  516. package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
  517. package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
  518. package/optimize/lib/components/icon/svgs/percent.svg +0 -0
  519. package/optimize/lib/components/icon/svgs/push.svg +0 -0
  520. package/optimize/lib/components/icon/svgs/quote.svg +0 -0
  521. package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
  522. package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
  523. package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
  524. package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
  525. package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
  526. package/optimize/lib/components/icon/svgs/users.svg +0 -0
  527. package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
  528. package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
  529. package/optimize/lib/components/image/image.styles.js +2 -2
  530. package/optimize/lib/components/image/image_button.styles.js +3 -3
  531. package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  532. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
  533. package/optimize/lib/components/link/link.styles.js +6 -6
  534. package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
  535. package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
  536. package/optimize/lib/components/loading/loading_spinner.styles.js +2 -2
  537. package/optimize/lib/components/mark/mark.styles.js +2 -9
  538. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  539. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  540. package/optimize/lib/components/modal/modal.styles.js +3 -3
  541. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  542. package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
  543. package/optimize/lib/components/pagination/pagination.styles.js +2 -2
  544. package/optimize/lib/components/panel/panel.styles.js +4 -3
  545. package/optimize/lib/components/popover/popover.js +1 -1
  546. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
  547. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
  548. package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
  549. package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +10 -9
  550. package/optimize/lib/components/progress/progress.js +1 -1
  551. package/optimize/lib/components/progress/progress.styles.js +29 -27
  552. package/optimize/lib/components/provider/provider.js +2 -2
  553. package/optimize/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
  554. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
  555. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
  556. package/optimize/lib/components/side_nav/side_nav_item.styles.js +6 -7
  557. package/optimize/lib/components/skeleton/utils.js +4 -6
  558. package/optimize/lib/components/stat/stat.styles.js +5 -5
  559. package/optimize/lib/components/steps/step_number.styles.js +1 -1
  560. package/optimize/lib/components/table/table_cells_shared.styles.js +3 -8
  561. package/optimize/lib/components/table/table_row.styles.js +8 -10
  562. package/optimize/lib/components/tabs/tab.styles.js +2 -2
  563. package/optimize/lib/components/text/text.styles.js +1 -1
  564. package/optimize/lib/components/text/text_color.js +1 -1
  565. package/optimize/lib/components/text/text_color.styles.js +6 -5
  566. package/optimize/lib/components/text_diff/text_diff.styles.js +1 -1
  567. package/optimize/lib/components/toast/toast.styles.js +2 -2
  568. package/optimize/lib/components/token/token.js +13 -4
  569. package/optimize/lib/components/token/token.styles.js +14 -5
  570. package/optimize/lib/components/token/token_map.js +244 -2
  571. package/optimize/lib/components/tool_tip/tool_tip.styles.js +12 -24
  572. package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
  573. package/optimize/lib/components/tour/tour.styles.js +8 -12
  574. package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
  575. package/optimize/lib/global_styling/functions/math.js +7 -59
  576. package/optimize/lib/global_styling/functions/size.js +7 -27
  577. package/optimize/lib/global_styling/mixins/_button.js +165 -0
  578. package/optimize/lib/global_styling/mixins/_color.js +38 -30
  579. package/optimize/lib/global_styling/mixins/_shadow.js +84 -0
  580. package/optimize/lib/global_styling/mixins/index.js +22 -0
  581. package/optimize/lib/global_styling/reset/global_styles.js +2 -2
  582. package/optimize/lib/global_styling/variables/animations.js +25 -31
  583. package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
  584. package/optimize/lib/global_styling/variables/levels.js +7 -26
  585. package/optimize/lib/global_styling/variables/shadow.js +13 -20
  586. package/optimize/lib/global_styling/variables/size.js +7 -10
  587. package/optimize/lib/global_styling/variables/typography.js +19 -41
  588. package/optimize/lib/services/color/eui_palettes.js +148 -54
  589. package/optimize/lib/services/color/eui_palettes_hooks.js +76 -0
  590. package/optimize/lib/services/color/index.js +20 -0
  591. package/optimize/lib/services/color/vis_color_store.js +18 -0
  592. package/optimize/lib/services/index.js +19 -0
  593. package/optimize/lib/services/popover/index.js +8 -1
  594. package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
  595. package/optimize/lib/services/popover/popover_positioning.js +6 -17
  596. package/optimize/lib/services/theme/context.js +3 -3
  597. package/optimize/lib/services/theme/provider.js +15 -2
  598. package/optimize/lib/services/theme/types.js +13 -14
  599. package/optimize/lib/services/theme/utils.js +54 -296
  600. package/optimize/lib/themes/amsterdam/global_styling/functions/shadows.js +7 -19
  601. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
  602. package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
  603. package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  604. package/optimize/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
  605. package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  606. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
  607. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
  608. package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +616 -0
  609. package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
  610. package/optimize/lib/themes/amsterdam/theme.js +7 -1
  611. package/optimize/lib/themes/index.js +4 -11
  612. package/optimize/lib/themes/themes.js +1 -23
  613. package/package.json +8 -4
  614. package/src/global_styling/functions/_colors.scss +3 -3
  615. package/src/global_styling/functions/_index.scss +1 -5
  616. package/src/global_styling/index.scss +1 -10
  617. package/src/global_styling/mixins/_shadow.scss +1 -1
  618. package/src/global_styling/mixins/_typography.scss +2 -2
  619. package/src/global_styling/variables/_animations.scss +1 -8
  620. package/src/global_styling/variables/_borders.scss +1 -9
  621. package/src/global_styling/variables/_buttons.scss +1 -18
  622. package/src/global_styling/variables/_font_weight.scss +1 -7
  623. package/src/global_styling/variables/_form.scss +2 -21
  624. package/src/global_styling/variables/_index.scss +0 -1
  625. package/src/global_styling/variables/_responsive.scss +1 -9
  626. package/src/global_styling/variables/_shadows.scss +1 -1
  627. package/src/global_styling/variables/_size.scss +1 -13
  628. package/src/global_styling/variables/_states.scss +1 -14
  629. package/src/global_styling/variables/_typography.scss +1 -75
  630. package/src/global_styling/variables/_z_index.scss +1 -33
  631. package/src/themes/amsterdam/_colors_dark.scss +80 -8
  632. package/src/themes/amsterdam/_colors_light.scss +80 -8
  633. package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
  634. package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
  635. package/test-env/components/avatar/avatar.js +2 -2
  636. package/test-env/components/badge/badge.styles.js +1 -2
  637. package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
  638. package/test-env/components/badge/color_utils.js +14 -13
  639. package/test-env/components/beacon/beacon.styles.js +2 -2
  640. package/test-env/components/bottom_bar/bottom_bar.styles.js +2 -3
  641. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
  642. package/test-env/components/button/button.js +1 -1
  643. package/test-env/components/button/button_display/_button_display.styles.js +1 -1
  644. package/test-env/components/button/button_empty/button_empty.js +1 -1
  645. package/test-env/components/button/button_group/button_group_button.js +1 -1
  646. package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
  647. package/test-env/components/button/button_icon/button_icon.js +1 -1
  648. package/test-env/components/button/button_icon/button_icon.styles.js +1 -1
  649. package/test-env/components/call_out/call_out.styles.js +4 -4
  650. package/test-env/components/card/card.js +1 -1
  651. package/test-env/components/card/card.styles.js +5 -2
  652. package/test-env/components/code/code_block_annotations.js +1 -1
  653. package/test-env/components/code/code_block_line.styles.js +1 -2
  654. package/test-env/components/code/code_syntax.styles.js +24 -28
  655. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  656. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  657. package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  658. package/test-env/components/color_picker/color_picker.js +3 -2
  659. package/test-env/components/color_picker/color_picker.styles.js +1 -2
  660. package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
  661. package/test-env/components/combo_box/combo_box.js +6 -1
  662. package/test-env/components/comment_list/comment.js +1 -1
  663. package/test-env/components/comment_list/comment_event.js +5 -4
  664. package/test-env/components/comment_list/comment_list.js +1 -1
  665. package/test-env/components/common.js +0 -28
  666. package/test-env/components/datagrid/data_grid.styles.js +6 -7
  667. package/test-env/components/date_picker/date_picker.styles.js +2 -2
  668. package/test-env/components/date_picker/date_picker_range.styles.js +2 -2
  669. package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
  670. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  671. package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
  672. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  673. package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
  674. package/test-env/components/expression/expression.styles.js +13 -13
  675. package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
  676. package/test-env/components/flyout/_flyout_close_button.styles.js +3 -4
  677. package/test-env/components/flyout/flyout.styles.js +8 -3
  678. package/test-env/components/flyout/flyout_footer.styles.js +1 -1
  679. package/test-env/components/form/form.styles.js +23 -31
  680. package/test-env/components/form/range/range_tooltip.styles.js +11 -13
  681. package/test-env/components/form/switch/switch.js +3 -2
  682. package/test-env/components/form/switch/switch.styles.js +16 -19
  683. package/test-env/components/header/header.styles.js +7 -8
  684. package/test-env/components/icon/icon.styles.js +9 -8
  685. package/test-env/components/icon/named_colors.js +1 -1
  686. package/test-env/components/image/image.styles.js +2 -2
  687. package/test-env/components/image/image_button.styles.js +3 -3
  688. package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
  689. package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
  690. package/test-env/components/link/link.styles.js +6 -6
  691. package/test-env/components/list_group/list_group_item.styles.js +8 -10
  692. package/test-env/components/loading/loading_chart.styles.js +13 -5
  693. package/test-env/components/loading/loading_spinner.styles.js +2 -2
  694. package/test-env/components/mark/mark.styles.js +2 -9
  695. package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  696. package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
  697. package/test-env/components/modal/modal.styles.js +3 -3
  698. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
  699. package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
  700. package/test-env/components/pagination/pagination.styles.js +2 -2
  701. package/test-env/components/panel/panel.js +1 -1
  702. package/test-env/components/panel/panel.styles.js +4 -3
  703. package/test-env/components/panel/split_panel/split_panel.js +1 -1
  704. package/test-env/components/popover/popover.js +1 -1
  705. package/test-env/components/popover/popover_arrow/_popover_arrow.js +8 -3
  706. package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
  707. package/test-env/components/popover/popover_footer.styles.js +1 -1
  708. package/test-env/components/popover/popover_panel/_popover_panel.styles.js +10 -9
  709. package/test-env/components/progress/progress.js +1 -1
  710. package/test-env/components/progress/progress.styles.js +29 -27
  711. package/test-env/components/provider/provider.js +2 -2
  712. package/test-env/components/resizable_container/resizable_collapse_button.styles.js +2 -2
  713. package/test-env/components/resizable_container/resizable_panel.js +1 -1
  714. package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
  715. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
  716. package/test-env/components/side_nav/side_nav_item.styles.js +6 -7
  717. package/test-env/components/skeleton/utils.js +4 -6
  718. package/test-env/components/stat/stat.styles.js +5 -5
  719. package/test-env/components/steps/step_number.styles.js +1 -1
  720. package/test-env/components/table/table_cells_shared.styles.js +3 -8
  721. package/test-env/components/table/table_row.styles.js +8 -10
  722. package/test-env/components/tabs/tab.styles.js +2 -2
  723. package/test-env/components/text/text.styles.js +1 -1
  724. package/test-env/components/text/text_color.js +1 -1
  725. package/test-env/components/text/text_color.styles.js +6 -5
  726. package/test-env/components/text_diff/text_diff.styles.js +1 -1
  727. package/test-env/components/toast/toast.styles.js +2 -2
  728. package/test-env/components/token/token.js +13 -4
  729. package/test-env/components/token/token.styles.js +14 -5
  730. package/test-env/components/token/token_map.js +244 -2
  731. package/test-env/components/tool_tip/tool_tip.styles.js +12 -24
  732. package/test-env/components/tour/_tour_footer.styles.js +2 -4
  733. package/test-env/components/tour/tour.styles.js +8 -12
  734. package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
  735. package/test-env/global_styling/functions/math.js +7 -59
  736. package/test-env/global_styling/functions/size.js +7 -27
  737. package/test-env/global_styling/mixins/_button.js +165 -0
  738. package/test-env/global_styling/mixins/_color.js +38 -30
  739. package/test-env/global_styling/mixins/_shadow.js +84 -0
  740. package/test-env/global_styling/mixins/index.js +22 -0
  741. package/test-env/global_styling/reset/global_styles.js +2 -2
  742. package/test-env/global_styling/variables/animations.js +25 -31
  743. package/test-env/global_styling/variables/breakpoint.js +7 -16
  744. package/test-env/global_styling/variables/levels.js +7 -26
  745. package/test-env/global_styling/variables/shadow.js +13 -20
  746. package/test-env/global_styling/variables/size.js +7 -10
  747. package/test-env/global_styling/variables/typography.js +19 -41
  748. package/test-env/services/breakpoint/current_breakpoint_hook.js +3 -3
  749. package/test-env/services/color/eui_palettes.js +148 -54
  750. package/test-env/services/color/eui_palettes_hooks.js +76 -0
  751. package/test-env/services/color/index.js +20 -0
  752. package/test-env/services/color/vis_color_store.js +18 -0
  753. package/test-env/services/index.js +19 -0
  754. package/test-env/services/popover/index.js +8 -1
  755. package/test-env/services/popover/popover_arrow.styles.js +37 -0
  756. package/test-env/services/popover/popover_positioning.js +6 -17
  757. package/test-env/services/theme/context.js +3 -3
  758. package/test-env/services/theme/provider.js +15 -2
  759. package/test-env/services/theme/types.js +13 -14
  760. package/test-env/services/theme/utils.js +54 -296
  761. package/test-env/themes/amsterdam/global_styling/functions/shadows.js +7 -19
  762. package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
  763. package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
  764. package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
  765. package/test-env/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
  766. package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  767. package/test-env/themes/amsterdam/global_styling/variables/_colors.js +616 -24
  768. package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
  769. package/test-env/themes/amsterdam/global_styling/variables/_components.js +616 -0
  770. package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
  771. package/test-env/themes/amsterdam/theme.js +7 -1
  772. package/test-env/themes/index.js +4 -11
  773. package/test-env/themes/themes.js +1 -23
  774. package/es/global_styling/variables/_colors_vis.js +0 -61
  775. package/lib/global_styling/variables/_colors_vis.js +0 -67
  776. package/optimize/es/global_styling/variables/_colors_vis.js +0 -61
  777. package/optimize/lib/global_styling/variables/_colors_vis.js +0 -67
  778. package/test-env/global_styling/variables/_colors_vis.js +0 -67
  779. /package/src/{global_styling → themes/amsterdam/global_styling}/variables/_colors_vis.scss +0 -0
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiToolTipStyles = exports.euiToolTipBorderColor = exports.euiToolTipBackgroundColor = exports.euiToolTipAnchorStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
8
9
  var _global_styling = require("../../global_styling");
9
- var _services = require("../../services");
10
- var _amsterdam = require("../../themes/amsterdam");
10
+ var _popover = require("../../services/popover");
11
11
  var _templateObject, _templateObject2;
12
12
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
13
13
  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)."; } /*
@@ -17,11 +17,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
17
17
  * in compliance with, at your election, the Elastic License 2.0 or the Server
18
18
  * Side Public License, v 1.
19
19
  */
20
- var euiToolTipBackgroundColor = exports.euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
21
- return colorMode === _services.COLOR_MODES_STANDARD.dark ? (0, _services.shade)(euiTheme.colors.emptyShade, 1) : (0, _services.tint)(euiTheme.colors.fullShade, 0.25);
20
+ var euiToolTipBackgroundColor = exports.euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme) {
21
+ return euiTheme.components.tooltipBackground;
22
22
  };
23
- var euiToolTipBorderColor = exports.euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme, colorMode) {
24
- return colorMode === _services.COLOR_MODES_STANDARD.dark ? (0, _services.shade)(euiTheme.colors.fullShade, 0.8) : (0, _services.tint)(euiTheme.colors.fullShade, 0.35);
23
+ var euiToolTipBorderColor = exports.euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme) {
24
+ return euiTheme.components.tooltipBorder;
25
25
  };
26
26
  var euiToolTipAnimationVertical = function euiToolTipAnimationVertical(size) {
27
27
  return (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
@@ -32,18 +32,13 @@ var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size)
32
32
  var euiToolTipStyles = exports.euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
33
33
  var euiTheme = euiThemeContext.euiTheme,
34
34
  colorMode = euiThemeContext.colorMode;
35
+ var hasVisibleBorder = colorMode === 'DARK';
35
36
  var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards");
36
- // Shift arrow 1px more than half its size to account for border radius
37
37
  var arrowSize = euiTheme.size.m;
38
- var arrowPlusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
39
- return (x / 2 + 1) * -1;
40
- });
41
- var arrowMinusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
42
- return (x / 2 - 1) * -1;
43
- });
38
+ var arrowStyles = (0, _popover._popoverArrowStyles)(euiThemeContext, arrowSize);
44
39
  return {
45
40
  // Base
46
- euiToolTip: /*#__PURE__*/(0, _react.css)((0, _amsterdam.euiShadow)(euiThemeContext), " border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme, colorMode), ";};label:euiToolTip;"),
41
+ euiToolTip: /*#__PURE__*/(0, _react.css)((0, _euiThemeCommon.euiShadow)(euiThemeContext), " border:", euiTheme.border.width.thin, " solid ", hasVisibleBorder ? euiTheme.border.color : 'transparent', ";border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme), ";};label:euiToolTip;"),
47
42
  // Sizes
48
43
  s: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:s;"),
49
44
  // Positions
@@ -52,17 +47,10 @@ var euiToolTipStyles = exports.euiToolTipStyles = function euiToolTipStyles(euiT
52
47
  left: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:left;"),
53
48
  right: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";};label:right;"),
54
49
  // Arrow
55
- euiToolTip__arrow: /*#__PURE__*/(0, _react.css)("content:'';position:absolute;transform-origin:center;border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
56
- return x / 2;
57
- }), ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", (0, _global_styling.logicalSizeCSS)(arrowSize, arrowSize), ";;label:euiToolTip__arrow;"),
58
- arrowPositions: {
59
- top: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:top;"),
60
- bottom: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowMinusSize, ") rotateZ(45deg);;label:bottom;"),
61
- left: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowPlusSize, ") rotateZ(45deg);;label:left;"),
62
- right: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowMinusSize, ") rotateZ(45deg);;label:right;")
63
- },
50
+ euiToolTip__arrow: /*#__PURE__*/(0, _react.css)(arrowStyles._arrowStyles, " background-color:inherit;border:inherit;;label:euiToolTip__arrow;"),
51
+ arrowPositions: arrowStyles.positions,
64
52
  // Title
65
- euiToolTip__title: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme, colorMode))), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
53
+ euiToolTip__title: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme))), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
66
54
  };
67
55
  };
68
56
  var _ref = process.env.NODE_ENV === "production" ? {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiTourFooterStyles = exports._tourFooterBgColor = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _services = require("../../services");
9
8
  var _global_styling = require("../../global_styling");
10
9
  /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -16,9 +15,8 @@ var _global_styling = require("../../global_styling");
16
15
  */
17
16
 
18
17
  var _tourFooterBgColor = exports._tourFooterBgColor = function _tourFooterBgColor(_ref) {
19
- var colorMode = _ref.colorMode,
20
- euiTheme = _ref.euiTheme;
21
- return colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.45) : (0, _services.tint)(euiTheme.colors.lightestShade, 0.5);
18
+ var euiTheme = _ref.euiTheme;
19
+ return euiTheme.components.tourFooterBackground;
22
20
  };
23
21
  var euiTourFooterStyles = exports.euiTourFooterStyles = function euiTourFooterStyles(euiThemeContext) {
24
22
  var euiTheme = euiThemeContext.euiTheme;
@@ -7,7 +7,6 @@ exports.euiTourStyles = exports.euiTourBeaconStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  var _popover_panel = require("../popover/popover_panel/_popover_panel.styles");
10
- var _popover_arrow = require("../popover/popover_arrow/_popover_arrow.styles");
11
10
  var _tour_footer = require("./_tour_footer.styles");
12
11
  /*
13
12
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -20,26 +19,23 @@ var _tour_footer = require("./_tour_footer.styles");
20
19
  var euiTourStyles = exports.euiTourStyles = function euiTourStyles(euiThemeContext) {
21
20
  return {
22
21
  // Targets EuiPopoverPanel
23
- euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']::before{", (0, _global_styling.logicalCSS)('border-top-color', (0, _tour_footer._tourFooterBgColor)(euiThemeContext)), ";};label:euiTour;")
22
+ euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']{background-color:", (0, _tour_footer._tourFooterBgColor)(euiThemeContext), ";};label:euiTour;")
24
23
  };
25
24
  };
26
25
  var euiTourBeaconStyles = exports.euiTourBeaconStyles = function euiTourBeaconStyles(_ref) {
27
26
  var euiTheme = _ref.euiTheme;
28
- var arrowSize = euiTheme.size[_popover_arrow.popoverArrowSize];
29
- var arrowHalfSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
30
- return x / 2;
31
- });
32
- var arrowOffset = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
33
- return x * -2;
27
+ var beaconSize = euiTheme.size.m;
28
+ var beaconOffset = (0, _global_styling.mathWithUnits)(beaconSize, function (x) {
29
+ return x / -2;
34
30
  });
35
31
  return {
36
32
  // Base
37
33
  euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;", _global_styling.euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], ";};label:euiTourBeacon;"),
38
34
  isOpen: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{opacity:1;};label:isOpen;"),
39
35
  // Positions
40
- right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), " ", (0, _global_styling.logicalCSS)('left', arrowOffset), ";;label:right;"),
41
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), " ", (0, _global_styling.logicalCSS)('left', arrowSize), ";;label:left;"),
42
- top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowSize), " ", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:top;"),
43
- bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowOffset), " ", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:bottom;")
36
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', '50%'), " ", (0, _global_styling.logicalCSS)('left', '-50%'), " ", (0, _global_styling.logicalCSS)('margin-top', beaconOffset), ";;label:right;"),
37
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', '50%'), " ", (0, _global_styling.logicalCSS)('right', '-50%'), " ", (0, _global_styling.logicalCSS)('margin-top', beaconOffset), ";;label:left;"),
38
+ top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '50%'), " ", (0, _global_styling.logicalCSS)('bottom', '-50%'), " ", (0, _global_styling.logicalCSS)('margin-left', beaconOffset), ";;label:top;"),
39
+ bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '50%'), " ", (0, _global_styling.logicalCSS)('top', '-50%'), " ", (0, _global_styling.logicalCSS)('margin-left', beaconOffset), ";;label:bottom;")
44
40
  };
45
41
  };
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiTreeViewItemStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _services = require("../../services");
9
8
  var _global_styling = require("../../global_styling");
10
9
  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)."; } /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -34,7 +33,7 @@ var euiTreeViewItemStyles = exports.euiTreeViewItemStyles = function euiTreeView
34
33
  expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
35
34
  },
36
35
  button: {
37
- euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
36
+ euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", euiTheme.components.treeViewItemBackgroundHover, ";};label:euiTreeView__nodeInner;"),
38
37
  default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
39
38
  compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
40
39
  },
@@ -1,63 +1,12 @@
1
1
  "use strict";
2
2
 
3
- 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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.mathWithUnits = void 0;
8
- function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
9
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
10
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
11
- /*
12
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
- * or more contributor license agreements. Licensed under the Elastic License
14
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
15
- * in compliance with, at your election, the Elastic License 2.0 or the Server
16
- * Side Public License, v 1.
17
- */
18
-
19
- /**
20
- * Utility for performing math callbacks on a string with CSS units
21
- * and returning a string with its unit preserved.
22
- *
23
- * Example usage:
24
- * mathWithUnits('4px', (x) => x / 2) = '2px';
25
- * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
26
- * mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
27
- */
28
- // Unfortunately, this is the CSSProperties[] type used for several euiTheme vars
29
-
30
- var mathWithUnits = exports.mathWithUnits = function mathWithUnits(values, callback) {
31
- var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
32
- if (!Array.isArray(values)) values = [values];
33
- var foundNumericValues = [];
34
- var foundUnit = '';
35
- values.forEach(function (value) {
36
- if (typeof value === 'string') {
37
- var _matches$groups, _matches$groups2;
38
- var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\d.]+)(%|[a-zA-Z]*)/, {
39
- value: 1,
40
- unit: 2
41
- });
42
- var matches = regex.exec(value);
43
- var numericValue = Number(matches === null || matches === void 0 || (_matches$groups = matches.groups) === null || _matches$groups === void 0 ? void 0 : _matches$groups.value);
44
- if (!isNaN(numericValue)) {
45
- foundNumericValues.push(numericValue);
46
- } else {
47
- throw new Error('No valid numeric value found');
48
- }
49
- if (!unit && matches !== null && matches !== void 0 && (_matches$groups2 = matches.groups) !== null && _matches$groups2 !== void 0 && _matches$groups2.unit) {
50
- if (!foundUnit) {
51
- foundUnit = matches.groups.unit;
52
- } else if (foundUnit !== matches.groups.unit) {
53
- throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
54
- }
55
- }
56
- } else if (typeof value === 'number') {
57
- foundNumericValues.push(value);
58
- } else {
59
- throw new Error('Invalid value type - pass a string or number');
60
- }
61
- });
62
- return "".concat(callback.apply(void 0, foundNumericValues)).concat(unit || foundUnit);
63
- };
6
+ Object.defineProperty(exports, "mathWithUnits", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _euiThemeCommon.mathWithUnits;
10
+ }
11
+ });
12
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
@@ -3,29 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.sizeToPixel = void 0;
7
- 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); }
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
-
16
- /**
17
- * Calculates the `px` value based on a scale multiplier
18
- * @param scale - The font scale multiplier
19
- * *
20
- * @param themeOrBase - Theme base value
21
- * *
22
- * @returns string - Rem unit aligned to baseline
23
- */
24
-
25
- var sizeToPixel = exports.sizeToPixel = function sizeToPixel() {
26
- var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
27
- return function (themeOrBase) {
28
- var base = _typeof(themeOrBase) === 'object' ? themeOrBase.base : themeOrBase;
29
- return "".concat(base * scale, "px");
30
- };
31
- };
6
+ Object.defineProperty(exports, "sizeToPixel", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _euiThemeCommon.sizeToPixel;
10
+ }
11
+ });
12
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonSizeMap = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_DISPLAYS = exports.BUTTON_COLORS = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
9
+ var _services = require("../../services");
10
+ var _templateObject;
11
+ /*
12
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
+ * or more contributor license agreements. Licensed under the Elastic License
14
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
15
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
16
+ * Side Public License, v 1.
17
+ */
18
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
19
+ var BUTTON_COLORS = exports.BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
20
+ var BUTTON_DISPLAYS = exports.BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
21
+ /**
22
+ * Creates the `base` version of button styles with proper text contrast.
23
+ * @param euiThemeContext
24
+ * @param color One of the named button colors or 'disabled'
25
+ * @returns Style object `{ backgroundColor, color }`
26
+ */
27
+ var euiButtonColor = exports.euiButtonColor = function euiButtonColor(euiThemeContext, color) {
28
+ var euiTheme = euiThemeContext.euiTheme;
29
+ var backgroundTokenName = (0, _euiThemeCommon.getTokenName)('background', color);
30
+ var textTokenName = (0, _euiThemeCommon.getTokenName)('textColor', color);
31
+ var foreground = euiTheme.components.buttons[textTokenName];
32
+ var background = euiTheme.components.buttons[backgroundTokenName];
33
+ return {
34
+ color: background === 'transparent' || color === 'disabled' ? foreground : (0, _services.makeHighContrastColor)(foreground)(background),
35
+ backgroundColor: background
36
+ };
37
+ };
38
+
39
+ /**
40
+ * Creates the `fill` version of buttons styles with proper text contrast.
41
+ * @param euiThemeContext
42
+ * @param color One of the named button colors or 'disabled'
43
+ * @returns Style object `{ backgroundColor, color }`
44
+ */
45
+ var euiButtonFillColor = exports.euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
46
+ var euiTheme = euiThemeContext.euiTheme;
47
+ var backgroundTokenName = (0, _euiThemeCommon.getTokenName)('backgroundFilled', color);
48
+ var textColorTokenName = (0, _euiThemeCommon.getTokenName)('textColorFilled', color);
49
+ var foreground = euiTheme.components.buttons[textColorTokenName];
50
+ var background = euiTheme.components.buttons[backgroundTokenName];
51
+ return {
52
+ color: foreground,
53
+ backgroundColor: background
54
+ };
55
+ };
56
+
57
+ /**
58
+ * Creates the `empty` version of button styles using the text-variant and adding interactive styles.
59
+ * @param euiThemeContext
60
+ * @param color One of the named button colors or 'disabled'
61
+ * @returns Style object `{ backgroundColor, color }` where `background` is typically used for interactive states
62
+ */
63
+ var euiButtonEmptyColor = exports.euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, color) {
64
+ var foreground;
65
+ var background;
66
+ switch (color) {
67
+ case 'disabled':
68
+ foreground = euiButtonColor(euiThemeContext, color).color;
69
+ background = 'transparent';
70
+ break;
71
+ default:
72
+ {
73
+ var backgroundToken = (0, _euiThemeCommon.getTokenName)('backgroundEmpty', color, 'hover');
74
+ foreground = euiButtonColor(euiThemeContext, color).color;
75
+ background = euiThemeContext.euiTheme.components.buttons[backgroundToken];
76
+ break;
77
+ }
78
+ }
79
+ return {
80
+ color: foreground,
81
+ backgroundColor: background
82
+ };
83
+ };
84
+
85
+ /**
86
+ * Given the button display type, returns the Emotion based color keys.
87
+ * @param options Button display type
88
+ * @returns An object of `_EuiButtonColor` keys including `disabled`
89
+ */
90
+ var useEuiButtonColorCSS = exports.useEuiButtonColorCSS = function useEuiButtonColorCSS() {
91
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
92
+ var _options$display = options.display,
93
+ display = _options$display === void 0 ? 'base' : _options$display;
94
+ var colorsDisplaysMap = (0, _services.useEuiMemoizedStyles)(euiButtonDisplaysColors);
95
+ return colorsDisplaysMap[display];
96
+ };
97
+ var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
98
+ var COLORS = [].concat(BUTTON_COLORS, ['disabled']);
99
+ var displaysColorsMap = {};
100
+ BUTTON_DISPLAYS.forEach(function (display) {
101
+ displaysColorsMap[display] = {};
102
+ COLORS.forEach(function (color) {
103
+ switch (display) {
104
+ case 'base':
105
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), ";;label:displaysColorsMap-display-color;");
106
+ break;
107
+ case 'fill':
108
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";;label:displaysColorsMap-display-color;");
109
+ break;
110
+ case 'empty':
111
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";&:focus,&:active{background-color:", euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";};label:displaysColorsMap-display-color;");
112
+ break;
113
+ }
114
+
115
+ // Tweak auto-generated Emotion label/className output
116
+ var emotionOutput = displaysColorsMap[display][color];
117
+ emotionOutput.styles = emotionOutput.styles.replace('label:displaysColorsMap-display-color;', "label:".concat(display, "-").concat(color, ";"));
118
+ });
119
+ });
120
+ return displaysColorsMap;
121
+ };
122
+
123
+ /**
124
+ * Creates the translate animation when button is in focus.
125
+ * @returns string
126
+ */
127
+ var useEuiButtonFocusCSS = exports.useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
128
+ return (0, _services.useEuiMemoizedStyles)(euiButtonFocusCSS);
129
+ };
130
+ var euiButtonFocusAnimation = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n transform: translateY(1px);\n }\n"])));
131
+ var euiButtonFocusCSS = function euiButtonFocusCSS(_ref) {
132
+ var euiTheme = _ref.euiTheme;
133
+ var focusCSS = /*#__PURE__*/(0, _react.css)(_euiThemeCommon.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;");
134
+ // Remove the auto-generated label.
135
+ // We could typically avoid a label by using a plain string `` instead of css``,
136
+ // but we need css`` for keyframes`` to work for the focus animation
137
+ focusCSS.styles = focusCSS.styles.replace('label:focusCSS;', '');
138
+ return focusCSS;
139
+ };
140
+
141
+ /**
142
+ * Map of `size` props to various sizings/scales
143
+ * that should remain consistent across all buttons
144
+ */
145
+ var euiButtonSizeMap = exports.euiButtonSizeMap = function euiButtonSizeMap(_ref2) {
146
+ var euiTheme = _ref2.euiTheme;
147
+ return {
148
+ xs: {
149
+ height: euiTheme.size.l,
150
+ radius: euiTheme.border.radius.small,
151
+ fontScale: 'xs'
152
+ },
153
+ s: {
154
+ height: euiTheme.size.xl,
155
+ radius: euiTheme.border.radius.small,
156
+ fontScale: 's'
157
+ },
158
+ m: {
159
+ height: euiTheme.size.xxl,
160
+ radius: euiTheme.border.radius.medium,
161
+ fontScale: 's'
162
+ }
163
+ };
164
+ };
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useEuiBorderColorCSS = exports.useEuiBackgroundColorCSS = exports.useEuiBackgroundColor = exports.euiBorderColor = exports.euiBackgroundColor = exports.BACKGROUND_COLORS = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _services = require("../../services");
9
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
9
10
  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); }
10
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -18,40 +19,27 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
19
  * in compliance with, at your election, the Elastic License 2.0 or the Server
19
20
  * Side Public License, v 1.
20
21
  */
21
- var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'accent', 'primary', 'success', 'warning', 'danger'];
22
+ var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
22
23
  /**
24
+ * @deprecated - use background tokens directly
23
25
  * @returns A single background color with optional alpha transparency
24
26
  */
25
27
  var euiBackgroundColor = exports.euiBackgroundColor = function euiBackgroundColor(_ref, color) {
26
- var euiTheme = _ref.euiTheme,
27
- colorMode = _ref.colorMode;
28
+ var euiTheme = _ref.euiTheme;
28
29
  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
29
30
  method = _ref2.method;
30
31
  if (color === 'transparent') return 'transparent';
31
32
  if (method === 'transparent') {
32
- if (color === 'plain') {
33
- return (0, _services.transparentize)(euiTheme.colors.ghost, 0.2);
34
- } else if (color === 'subdued') {
35
- return colorMode === 'DARK' ? (0, _services.transparentize)(euiTheme.colors.lightShade, 0.4) : (0, _services.transparentize)(euiTheme.colors.lightShade, 0.2);
36
- } else {
37
- return (0, _services.transparentize)(euiTheme.colors[color], 0.1);
38
- }
33
+ var tokenName = (0, _euiThemeCommon.getTokenName)('backgroundTransparent', color);
34
+ return euiTheme.colors[tokenName];
39
35
  } else {
40
- var _tintOrShade = function _tintOrShade(color) {
41
- return colorMode === 'DARK' ? (0, _services.shade)(color, 0.8) : (0, _services.tint)(color, 0.9);
42
- };
43
- switch (color) {
44
- case 'plain':
45
- return euiTheme.colors.emptyShade;
46
- case 'subdued':
47
- return euiTheme.colors.body;
48
- default:
49
- return _tintOrShade(euiTheme.colors[color]);
50
- }
36
+ var _tokenName = (0, _euiThemeCommon.getTokenName)('backgroundBase', color);
37
+ return euiTheme.colors[_tokenName];
51
38
  }
52
39
  };
53
40
 
54
41
  /**
42
+ * @deprecated
55
43
  * @returns An object map of color keys to color values, categorized by
56
44
  * opaque (default) vs transparency (hover/focus states) methods.
57
45
  * e.g. {
@@ -71,6 +59,10 @@ var _euiBackgroundColorMap = function _euiBackgroundColorMap(euiThemeContext) {
71
59
  }, {})
72
60
  };
73
61
  };
62
+
63
+ /**
64
+ * @deprecated
65
+ */
74
66
  var useEuiBackgroundColor = exports.useEuiBackgroundColor = function useEuiBackgroundColor(color) {
75
67
  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
76
68
  method = _ref3.method;
@@ -84,29 +76,37 @@ var useEuiBackgroundColor = exports.useEuiBackgroundColor = function useEuiBackg
84
76
  */
85
77
  var _euiBackgroundColors = function _euiBackgroundColors(euiThemeContext) {
86
78
  return BACKGROUND_COLORS.reduce(function (acc, color) {
87
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("background-color:", euiBackgroundColor(euiThemeContext, color), ";label:", color, ";")));
79
+ var tokenName = (0, _euiThemeCommon.getTokenName)('backgroundBase', color);
80
+ var backgroundColor = color === 'transparent' ? 'transparent' : euiThemeContext.euiTheme.colors[tokenName];
81
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("background-color:", backgroundColor, ";label:", color, ";")));
88
82
  }, {});
89
83
  };
84
+
85
+ /**
86
+ * Hook to retrieve background style for a background color variant
87
+ * @returns An object map of color keys to CSS,
88
+ * e.g. { danger: css``, success: css``, ... }
89
+ */
90
90
  var useEuiBackgroundColorCSS = exports.useEuiBackgroundColorCSS = function useEuiBackgroundColorCSS() {
91
91
  return (0, _services.useEuiMemoizedStyles)(_euiBackgroundColors);
92
92
  };
93
93
 
94
94
  /**
95
95
  * Border colors
96
+ * @deprecated - use border tokens directly or use
97
+ * `useEuiBorderColorCSS()` for composed styles
96
98
  */
97
99
 
98
100
  var euiBorderColor = exports.euiBorderColor = function euiBorderColor(_ref4, color) {
99
- var euiTheme = _ref4.euiTheme,
100
- colorMode = _ref4.colorMode;
101
+ var euiTheme = _ref4.euiTheme;
101
102
  switch (color) {
102
103
  case 'transparent':
103
- case 'plain':
104
- case 'subdued':
105
104
  return euiTheme.border.color;
106
- case 'warning':
107
- return (0, _services.tintOrShade)(euiTheme.colors.warning, 0.4, colorMode);
108
105
  default:
109
- return (0, _services.tintOrShade)(euiTheme.colors[color], 0.6, colorMode);
106
+ {
107
+ var tokenName = (0, _euiThemeCommon.getTokenName)('borderBase', color);
108
+ return euiTheme.colors[tokenName];
109
+ }
110
110
  }
111
111
  };
112
112
 
@@ -116,9 +116,17 @@ var euiBorderColor = exports.euiBorderColor = function euiBorderColor(_ref4, col
116
116
  */
117
117
  var _euiBorderColors = function _euiBorderColors(euiThemeContext) {
118
118
  return BACKGROUND_COLORS.reduce(function (acc, color) {
119
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("border-color:", euiBorderColor(euiThemeContext, color), ";label:", color, ";")));
119
+ var borderToken = (0, _euiThemeCommon.getTokenName)('borderBase', color);
120
+ var borderColor = color === 'transparent' ? euiThemeContext.euiTheme.border.color : euiThemeContext.euiTheme.colors[borderToken];
121
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("border-color:", borderColor, ";label:", color, ";")));
120
122
  }, {});
121
123
  };
124
+
125
+ /**
126
+ * Hook to retrieve border style for a border variant
127
+ * @returns An object map of color keys to CSS,
128
+ * e.g. { danger: css``, success: css``, ... }
129
+ */
122
130
  var useEuiBorderColorCSS = exports.useEuiBorderColorCSS = function useEuiBorderColorCSS() {
123
131
  return (0, _services.useEuiMemoizedStyles)(_euiBorderColors);
124
132
  };