@elastic/eui 98.2.1-borealis.0 → 98.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{eui_theme_amsterdam_dark.json.d.ts → eui_theme_dark.json.d.ts} +1 -1
- package/dist/{eui_theme_amsterdam_light.json.d.ts → eui_theme_light.json.d.ts} +1 -1
- package/es/components/avatar/avatar.js +4 -10
- package/es/components/badge/badge.styles.js +2 -1
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/es/components/badge/color_utils.js +8 -9
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +3 -6
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +2 -1
- package/es/components/code/code_syntax.styles.js +27 -23
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/es/components/color_picker/color_picker.js +3 -9
- package/es/components/color_picker/color_picker.styles.js +2 -1
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/comment_list/comment.js +1 -1
- package/es/components/comment_list/comment_event.js +4 -5
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +28 -0
- package/es/components/datagrid/data_grid.styles.js +7 -6
- package/es/components/date_picker/react_date_picker.styles.js +1 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -3
- package/es/components/drag_and_drop/droppable.styles.js +4 -2
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +2 -6
- package/es/components/filter_group/filter_select_item.styles.js +2 -1
- package/es/components/flyout/_flyout_close_button.styles.js +2 -1
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +2 -7
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +32 -28
- package/es/components/form/range/range_tooltip.styles.js +13 -11
- package/es/components/form/switch/switch.js +7 -3
- package/es/components/form/switch/switch.styles.js +19 -16
- package/es/components/header/header.styles.js +7 -6
- package/es/components/icon/icon.styles.js +8 -9
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/es/components/list_group/list_group_item.styles.js +11 -9
- package/es/components/loading/loading_chart.styles.js +5 -18
- package/es/components/mark/mark.styles.js +9 -2
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.styles.js +1 -1
- package/es/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +13 -18
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +28 -30
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/es/components/side_nav/side_nav_item.styles.js +2 -1
- package/es/components/skeleton/utils.js +7 -5
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +7 -2
- package/es/components/table/table_row.styles.js +10 -8
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text/text_color.js +1 -1
- package/es/components/text/text_color.styles.js +5 -6
- package/es/components/toast/toast.styles.js +1 -1
- package/es/components/token/token.js +4 -10
- package/es/components/token/token.styles.js +3 -12
- package/es/components/token/token_map.js +1 -243
- package/es/components/tool_tip/tool_tip.styles.js +24 -12
- package/es/components/tour/_tour_footer.styles.js +4 -2
- package/es/components/tour/tour.styles.js +12 -8
- package/es/components/tree_view/tree_view_item.styles.js +2 -1
- package/es/global_styling/functions/math.js +49 -1
- package/es/global_styling/functions/size.js +17 -1
- package/es/global_styling/mixins/_color.js +31 -39
- package/es/global_styling/mixins/index.js +1 -2
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +53 -1
- package/es/global_styling/variables/animations.js +22 -1
- package/es/global_styling/variables/breakpoint.js +7 -1
- package/es/global_styling/variables/levels.js +17 -1
- package/es/global_styling/variables/shadow.js +11 -1
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +32 -1
- package/es/services/color/eui_palettes.js +47 -116
- package/es/services/color/index.js +0 -1
- package/es/services/index.js +1 -1
- package/es/services/popover/index.js +1 -4
- package/es/services/popover/popover_positioning.js +17 -6
- package/es/services/theme/provider.js +2 -26
- package/es/services/theme/types.js +6 -1
- package/es/services/theme/utils.js +303 -1
- package/es/themes/amsterdam/global_styling/mixins/button.js +203 -1
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_colors.js +19 -612
- package/es/themes/amsterdam/theme.js +1 -7
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +6 -9
- package/eui.d.ts +2831 -2383
- package/lib/components/avatar/avatar.js +2 -8
- package/lib/components/badge/badge.styles.js +2 -1
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/lib/components/badge/color_utils.js +13 -14
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +2 -5
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +2 -1
- package/lib/components/code/code_syntax.styles.js +27 -23
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/lib/components/color_picker/color_picker.js +2 -8
- package/lib/components/color_picker/color_picker.styles.js +2 -1
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/comment_list/comment.js +1 -1
- package/lib/components/comment_list/comment_event.js +4 -5
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +28 -0
- package/lib/components/datagrid/data_grid.styles.js +7 -6
- package/lib/components/date_picker/react_date_picker.styles.js +2 -3
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/lib/components/drag_and_drop/droppable.styles.js +4 -2
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/lib/components/filter_group/filter_select_item.styles.js +2 -1
- package/lib/components/flyout/_flyout_close_button.styles.js +2 -1
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +2 -7
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +31 -27
- package/lib/components/form/range/range_tooltip.styles.js +13 -11
- package/lib/components/form/switch/switch.js +7 -3
- package/lib/components/form/switch/switch.styles.js +19 -16
- package/lib/components/header/header.styles.js +6 -5
- package/lib/components/icon/icon.styles.js +8 -9
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/lib/components/list_group/list_group_item.styles.js +10 -8
- package/lib/components/loading/loading_chart.styles.js +5 -18
- package/lib/components/mark/mark.styles.js +9 -2
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/lib/components/modal/modal.styles.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +15 -18
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +27 -29
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/lib/components/side_nav/side_nav_item.styles.js +2 -1
- package/lib/components/skeleton/utils.js +6 -4
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +7 -2
- package/lib/components/table/table_row.styles.js +9 -7
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/text/text_color.js +1 -1
- package/lib/components/text/text_color.styles.js +5 -6
- package/lib/components/toast/toast.styles.js +1 -1
- package/lib/components/token/token.js +4 -12
- package/lib/components/token/token.styles.js +3 -12
- package/lib/components/token/token_map.js +2 -244
- package/lib/components/tool_tip/tool_tip.styles.js +23 -11
- package/lib/components/tour/_tour_footer.styles.js +4 -2
- package/lib/components/tour/tour.styles.js +12 -8
- package/lib/components/tree_view/tree_view_item.styles.js +2 -1
- package/lib/global_styling/functions/math.js +58 -7
- package/lib/global_styling/functions/size.js +26 -7
- package/lib/global_styling/mixins/_color.js +30 -38
- package/lib/global_styling/mixins/index.js +0 -11
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +61 -6
- package/lib/global_styling/variables/animations.js +31 -25
- package/lib/global_styling/variables/breakpoint.js +16 -7
- package/lib/global_styling/variables/levels.js +26 -7
- package/lib/global_styling/variables/shadow.js +20 -13
- package/lib/global_styling/variables/size.js +10 -7
- package/lib/global_styling/variables/typography.js +41 -19
- package/lib/services/color/eui_palettes.js +47 -116
- package/lib/services/color/index.js +0 -8
- package/lib/services/index.js +0 -7
- package/lib/services/popover/index.js +1 -8
- package/lib/services/popover/popover_positioning.js +17 -6
- package/lib/services/theme/provider.js +2 -26
- package/lib/services/theme/types.js +14 -13
- package/lib/services/theme/utils.js +303 -54
- package/lib/themes/amsterdam/global_styling/mixins/button.js +206 -45
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/lib/themes/amsterdam/theme.js +1 -7
- package/lib/themes/index.js +0 -7
- package/lib/themes/themes.js +7 -10
- package/optimize/es/components/avatar/avatar.js +4 -10
- package/optimize/es/components/badge/badge.styles.js +2 -1
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/es/components/badge/color_utils.js +8 -9
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/optimize/es/components/button/button.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +3 -6
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +2 -1
- package/optimize/es/components/code/code_syntax.styles.js +27 -23
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/optimize/es/components/color_picker/color_picker.js +3 -9
- package/optimize/es/components/color_picker/color_picker.styles.js +2 -1
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/comment_list/comment_event.js +3 -4
- package/optimize/es/components/common.js +28 -0
- package/optimize/es/components/datagrid/data_grid.styles.js +7 -6
- package/optimize/es/components/date_picker/react_date_picker.styles.js +1 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -3
- package/optimize/es/components/drag_and_drop/droppable.styles.js +4 -2
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +2 -6
- package/optimize/es/components/filter_group/filter_select_item.styles.js +2 -1
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +2 -1
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +2 -7
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +32 -28
- package/optimize/es/components/form/range/range_tooltip.styles.js +13 -11
- package/optimize/es/components/form/switch/switch.js +2 -3
- package/optimize/es/components/form/switch/switch.styles.js +19 -16
- package/optimize/es/components/header/header.styles.js +7 -6
- package/optimize/es/components/icon/icon.styles.js +8 -9
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/optimize/es/components/list_group/list_group_item.styles.js +11 -9
- package/optimize/es/components/loading/loading_chart.styles.js +5 -13
- package/optimize/es/components/mark/mark.styles.js +9 -2
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.styles.js +1 -1
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +13 -15
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +28 -30
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/optimize/es/components/side_nav/side_nav_item.styles.js +2 -1
- package/optimize/es/components/skeleton/utils.js +7 -5
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/es/components/table/table_row.styles.js +10 -8
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text/text_color.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +5 -6
- package/optimize/es/components/toast/toast.styles.js +1 -1
- package/optimize/es/components/token/token.js +4 -10
- package/optimize/es/components/token/token.styles.js +3 -12
- package/optimize/es/components/token/token_map.js +1 -243
- package/optimize/es/components/tool_tip/tool_tip.styles.js +24 -12
- package/optimize/es/components/tour/_tour_footer.styles.js +4 -2
- package/optimize/es/components/tour/tour.styles.js +12 -8
- package/optimize/es/components/tree_view/tree_view_item.styles.js +2 -1
- package/optimize/es/global_styling/functions/math.js +49 -1
- package/optimize/es/global_styling/functions/size.js +17 -1
- package/optimize/es/global_styling/mixins/_color.js +31 -39
- package/optimize/es/global_styling/mixins/index.js +1 -2
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +53 -1
- package/optimize/es/global_styling/variables/animations.js +22 -1
- package/optimize/es/global_styling/variables/breakpoint.js +7 -1
- package/optimize/es/global_styling/variables/levels.js +17 -1
- package/optimize/es/global_styling/variables/shadow.js +11 -1
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +32 -1
- package/optimize/es/services/color/eui_palettes.js +47 -116
- package/optimize/es/services/color/index.js +0 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/popover/index.js +1 -4
- package/optimize/es/services/popover/popover_positioning.js +17 -6
- package/optimize/es/services/theme/provider.js +2 -26
- package/optimize/es/services/theme/types.js +6 -1
- package/optimize/es/services/theme/utils.js +295 -1
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +198 -1
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +19 -612
- package/optimize/es/themes/amsterdam/theme.js +1 -7
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +6 -9
- package/optimize/lib/components/avatar/avatar.js +2 -8
- package/optimize/lib/components/badge/badge.styles.js +2 -1
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/lib/components/badge/color_utils.js +13 -14
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/optimize/lib/components/button/button.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +2 -5
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +2 -1
- package/optimize/lib/components/code/code_syntax.styles.js +27 -23
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/optimize/lib/components/color_picker/color_picker.js +2 -8
- package/optimize/lib/components/color_picker/color_picker.styles.js +2 -1
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/comment_list/comment_event.js +3 -4
- package/optimize/lib/components/common.js +28 -0
- package/optimize/lib/components/datagrid/data_grid.styles.js +7 -6
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +2 -3
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +4 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +2 -1
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +2 -1
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +2 -7
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +31 -27
- package/optimize/lib/components/form/range/range_tooltip.styles.js +13 -11
- package/optimize/lib/components/form/switch/switch.js +2 -3
- package/optimize/lib/components/form/switch/switch.styles.js +19 -16
- package/optimize/lib/components/header/header.styles.js +6 -5
- package/optimize/lib/components/icon/icon.styles.js +8 -9
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/optimize/lib/components/list_group/list_group_item.styles.js +10 -8
- package/optimize/lib/components/loading/loading_chart.styles.js +5 -13
- package/optimize/lib/components/mark/mark.styles.js +9 -2
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/lib/components/modal/modal.styles.js +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +15 -16
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +27 -29
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +2 -1
- package/optimize/lib/components/skeleton/utils.js +6 -4
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/lib/components/table/table_row.styles.js +9 -7
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/text/text_color.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +5 -6
- package/optimize/lib/components/toast/toast.styles.js +1 -1
- package/optimize/lib/components/token/token.js +4 -13
- package/optimize/lib/components/token/token.styles.js +3 -12
- package/optimize/lib/components/token/token_map.js +2 -244
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +23 -11
- package/optimize/lib/components/tour/_tour_footer.styles.js +4 -2
- package/optimize/lib/components/tour/tour.styles.js +12 -8
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +2 -1
- package/optimize/lib/global_styling/functions/math.js +59 -7
- package/optimize/lib/global_styling/functions/size.js +27 -7
- package/optimize/lib/global_styling/mixins/_color.js +30 -38
- package/optimize/lib/global_styling/mixins/index.js +0 -11
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +61 -6
- package/optimize/lib/global_styling/variables/animations.js +31 -25
- package/optimize/lib/global_styling/variables/breakpoint.js +16 -7
- package/optimize/lib/global_styling/variables/levels.js +26 -7
- package/optimize/lib/global_styling/variables/shadow.js +20 -13
- package/optimize/lib/global_styling/variables/size.js +10 -7
- package/optimize/lib/global_styling/variables/typography.js +41 -19
- package/optimize/lib/services/color/eui_palettes.js +47 -116
- package/optimize/lib/services/color/index.js +0 -8
- package/optimize/lib/services/index.js +0 -7
- package/optimize/lib/services/popover/index.js +1 -8
- package/optimize/lib/services/popover/popover_positioning.js +17 -6
- package/optimize/lib/services/theme/provider.js +2 -26
- package/optimize/lib/services/theme/types.js +14 -13
- package/optimize/lib/services/theme/utils.js +296 -54
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +203 -45
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/optimize/lib/themes/amsterdam/theme.js +1 -7
- package/optimize/lib/themes/index.js +0 -7
- package/optimize/lib/themes/themes.js +7 -10
- package/package.json +3 -7
- package/src/global_styling/functions/_index.scss +5 -1
- package/src/global_styling/index.scss +10 -1
- package/src/global_styling/variables/_animations.scss +8 -1
- package/src/global_styling/variables/_borders.scss +9 -1
- package/src/global_styling/variables/_buttons.scss +18 -1
- package/src/global_styling/variables/_colors_vis.scss +70 -1
- package/src/global_styling/variables/_font_weight.scss +7 -1
- package/src/global_styling/variables/_form.scss +21 -2
- package/src/global_styling/variables/_responsive.scss +9 -1
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +13 -1
- package/src/global_styling/variables/_states.scss +14 -1
- package/src/global_styling/variables/_typography.scss +75 -1
- package/src/global_styling/variables/_z_index.scss +33 -1
- package/src/themes/amsterdam/_colors_dark.scss +8 -80
- package/src/themes/amsterdam/_colors_light.scss +8 -80
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -2
- package/test-env/components/avatar/avatar.js +2 -8
- package/test-env/components/badge/badge.styles.js +2 -1
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/test-env/components/badge/color_utils.js +13 -14
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +2 -5
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +2 -1
- package/test-env/components/code/code_syntax.styles.js +27 -23
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/test-env/components/color_picker/color_picker.js +2 -8
- package/test-env/components/color_picker/color_picker.styles.js +2 -1
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/comment_list/comment.js +1 -1
- package/test-env/components/comment_list/comment_event.js +4 -5
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +28 -0
- package/test-env/components/datagrid/data_grid.styles.js +7 -6
- package/test-env/components/date_picker/react_date_picker.styles.js +2 -3
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/test-env/components/drag_and_drop/droppable.styles.js +4 -2
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/test-env/components/filter_group/filter_select_item.styles.js +2 -1
- package/test-env/components/flyout/_flyout_close_button.styles.js +2 -1
- package/test-env/components/flyout/flyout.styles.js +2 -7
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +31 -27
- package/test-env/components/form/range/range_tooltip.styles.js +13 -11
- package/test-env/components/form/switch/switch.js +2 -3
- package/test-env/components/form/switch/switch.styles.js +19 -16
- package/test-env/components/header/header.styles.js +6 -5
- package/test-env/components/icon/icon.styles.js +8 -9
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/test-env/components/list_group/list_group_item.styles.js +10 -8
- package/test-env/components/loading/loading_chart.styles.js +5 -13
- package/test-env/components/mark/mark.styles.js +9 -2
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
- package/test-env/components/modal/modal.styles.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +15 -16
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +27 -29
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/test-env/components/side_nav/side_nav_item.styles.js +2 -1
- package/test-env/components/skeleton/utils.js +6 -4
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +7 -2
- package/test-env/components/table/table_row.styles.js +9 -7
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/text/text_color.js +1 -1
- package/test-env/components/text/text_color.styles.js +5 -6
- package/test-env/components/toast/toast.styles.js +1 -1
- package/test-env/components/token/token.js +4 -13
- package/test-env/components/token/token.styles.js +3 -12
- package/test-env/components/token/token_map.js +2 -244
- package/test-env/components/tool_tip/tool_tip.styles.js +23 -11
- package/test-env/components/tour/_tour_footer.styles.js +4 -2
- package/test-env/components/tour/tour.styles.js +12 -8
- package/test-env/components/tree_view/tree_view_item.styles.js +2 -1
- package/test-env/global_styling/functions/math.js +59 -7
- package/test-env/global_styling/functions/size.js +27 -7
- package/test-env/global_styling/mixins/_color.js +30 -38
- package/test-env/global_styling/mixins/index.js +0 -11
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +61 -6
- package/test-env/global_styling/variables/animations.js +31 -25
- package/test-env/global_styling/variables/breakpoint.js +16 -7
- package/test-env/global_styling/variables/levels.js +26 -7
- package/test-env/global_styling/variables/shadow.js +20 -13
- package/test-env/global_styling/variables/size.js +10 -7
- package/test-env/global_styling/variables/typography.js +41 -19
- package/test-env/services/color/eui_palettes.js +47 -116
- package/test-env/services/color/index.js +0 -8
- package/test-env/services/index.js +0 -7
- package/test-env/services/popover/index.js +1 -8
- package/test-env/services/popover/popover_positioning.js +17 -6
- package/test-env/services/theme/provider.js +2 -26
- package/test-env/services/theme/types.js +14 -13
- package/test-env/services/theme/utils.js +296 -54
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +203 -45
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/test-env/themes/amsterdam/theme.js +1 -7
- package/test-env/themes/index.js +0 -7
- package/test-env/themes/themes.js +7 -10
- package/dist/eui_theme_borealis_dark.json +0 -314
- package/dist/eui_theme_borealis_dark.json.d.ts +0 -317
- package/dist/eui_theme_borealis_light.json +0 -314
- package/dist/eui_theme_borealis_light.json.d.ts +0 -317
- package/es/global_styling/mixins/_button.js +0 -159
- package/es/services/color/vis_color_store.js +0 -13
- package/es/services/popover/popover_arrow.styles.js +0 -31
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -281
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -94
- package/es/themes/amsterdam/global_styling/variables/_components.js +0 -604
- package/es/themes/amsterdam/global_styling/variables/_forms.js +0 -161
- package/lib/global_styling/mixins/_button.js +0 -164
- package/lib/services/color/vis_color_store.js +0 -18
- package/lib/services/popover/popover_arrow.styles.js +0 -37
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -285
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/lib/themes/amsterdam/global_styling/variables/_components.js +0 -608
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -165
- package/optimize/es/global_styling/mixins/_button.js +0 -159
- package/optimize/es/services/color/vis_color_store.js +0 -13
- package/optimize/es/services/popover/popover_arrow.styles.js +0 -31
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -270
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -94
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +0 -596
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +0 -153
- package/optimize/lib/global_styling/mixins/_button.js +0 -165
- package/optimize/lib/services/color/vis_color_store.js +0 -18
- package/optimize/lib/services/popover/popover_arrow.styles.js +0 -37
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -275
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +0 -601
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -158
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +0 -72
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +0 -12
- package/test-env/global_styling/mixins/_button.js +0 -165
- package/test-env/services/color/vis_color_store.js +0 -18
- package/test-env/services/popover/popover_arrow.styles.js +0 -37
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +0 -275
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +0 -601
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +0 -158
- /package/dist/{eui_theme_amsterdam_dark.json → eui_theme_dark.json} +0 -0
- /package/dist/{eui_theme_amsterdam_light.json → eui_theme_light.json} +0 -0
|
@@ -14,7 +14,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
14
14
|
|
|
15
15
|
import chroma from 'chroma-js';
|
|
16
16
|
import { colorPalette } from './color_palette';
|
|
17
|
-
import { EUI_VIS_COLOR_STORE } from './vis_color_store';
|
|
18
17
|
var flatten = function flatten(arr) {
|
|
19
18
|
var _ref;
|
|
20
19
|
return (_ref = []).concat.apply(_ref, _toConsumableArray(arr));
|
|
@@ -30,14 +29,6 @@ var euiPalette = function euiPalette(colors, steps) {
|
|
|
30
29
|
}
|
|
31
30
|
return colorPalette(colors, steps, diverge, categorical);
|
|
32
31
|
};
|
|
33
|
-
/**
|
|
34
|
-
* NOTE: These functions rely on base vis colors of the theme which are provided via a global
|
|
35
|
-
* singleton instance `EUI_VIS_COLOR_STORE` that's updated by the EuiProvider on theme change.
|
|
36
|
-
* Make sure the function is recalled on theme change to retrieve theme-related colors.
|
|
37
|
-
*
|
|
38
|
-
* Outside of a react component you can use the `subscibe()` method on the `EUI_VIS_COLOR_STORE`
|
|
39
|
-
* to subscribe to updates and update your usages to ensure latest colors are loaded.
|
|
40
|
-
*/
|
|
41
32
|
export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
42
33
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
43
34
|
_ref2$rotations = _ref2.rotations,
|
|
@@ -51,8 +42,26 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
51
42
|
_ref2$sortShift = _ref2.sortShift,
|
|
52
43
|
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift;
|
|
53
44
|
var colors = [];
|
|
54
|
-
var
|
|
55
|
-
|
|
45
|
+
var base = ['#54B399',
|
|
46
|
+
// 0 green
|
|
47
|
+
'#6092C0',
|
|
48
|
+
// 1 blue
|
|
49
|
+
'#D36086',
|
|
50
|
+
// 2 dark pink
|
|
51
|
+
'#9170B8',
|
|
52
|
+
// 3 purple
|
|
53
|
+
'#CA8EAE',
|
|
54
|
+
// 4 light pink
|
|
55
|
+
'#D6BF57',
|
|
56
|
+
// 5 yellow
|
|
57
|
+
'#B9A888',
|
|
58
|
+
// 6 tan
|
|
59
|
+
'#DA8B45',
|
|
60
|
+
// 7 orange
|
|
61
|
+
'#AA6556',
|
|
62
|
+
// 8 brown
|
|
63
|
+
'#E7664C' // 9 red
|
|
64
|
+
];
|
|
56
65
|
if (sortBy === 'natural') {
|
|
57
66
|
// Sort the colors based on the color wheel, but shifting the values based on sortShift
|
|
58
67
|
base = _toConsumableArray(base).sort(function (a, b) {
|
|
@@ -98,156 +107,78 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
98
107
|
/**
|
|
99
108
|
* Color blind palette with text is meant for use when text is applied on top of the color.
|
|
100
109
|
* It increases the brightness of the color to give the text more contrast.
|
|
101
|
-
*
|
|
102
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
103
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
104
110
|
*/
|
|
105
111
|
export var euiPaletteColorBlindBehindText = function euiPaletteColorBlindBehindText() {
|
|
106
112
|
var paletteProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
107
|
-
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
108
113
|
var originalPalette = euiPaletteColorBlind(paletteProps);
|
|
109
|
-
|
|
110
|
-
// new theme palette has required contrast, we don't need to adjust them
|
|
111
|
-
if (!hasVisColorAdjustment) return originalPalette;
|
|
112
114
|
var newPalette = originalPalette.map(function (color) {
|
|
113
115
|
return chroma(color).brighten(0.5).hex();
|
|
114
116
|
});
|
|
115
117
|
return newPalette;
|
|
116
118
|
};
|
|
117
|
-
var _getVisColorsAsText = function _getVisColorsAsText(visColors, keys) {
|
|
118
|
-
return keys.reduce(function (colors, curr) {
|
|
119
|
-
return [].concat(_toConsumableArray(colors), [visColors[curr]]);
|
|
120
|
-
}, []);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
125
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
126
|
-
*/
|
|
127
119
|
export var euiPaletteForLightBackground = function euiPaletteForLightBackground() {
|
|
128
|
-
|
|
129
|
-
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
130
|
-
return color.includes('AsTextLight');
|
|
131
|
-
});
|
|
132
|
-
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
120
|
+
return ['#006BB4', '#017D73', '#F5A700', '#BD271E', '#DD0A73'];
|
|
133
121
|
};
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
137
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
138
|
-
*/
|
|
139
122
|
export var euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
140
|
-
|
|
141
|
-
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
142
|
-
return color.includes('AsTextDark');
|
|
143
|
-
});
|
|
144
|
-
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
123
|
+
return ['#1BA9F5', '#7DE2D1', '#F990C0', '#F66', '#FFCE7A'];
|
|
145
124
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
125
|
+
var greenColor = '#209280';
|
|
126
|
+
var redColor = '#CC5642';
|
|
127
|
+
var lightRedColor = euiPaletteColorBlind()[9];
|
|
128
|
+
var coolArray = [euiPaletteColorBlind()[1], '#6092C0'];
|
|
129
|
+
var warmArray = [euiPaletteColorBlind()[7], euiPaletteColorBlind()[9]];
|
|
151
130
|
export var euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
152
|
-
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
153
131
|
if (steps === 1) {
|
|
154
|
-
return [
|
|
132
|
+
return [greenColor];
|
|
155
133
|
}
|
|
156
134
|
if (steps <= 3) {
|
|
157
|
-
return euiPalette([
|
|
135
|
+
return euiPalette([greenColor, euiPaletteColorBlind()[5], redColor], steps, true);
|
|
158
136
|
}
|
|
159
|
-
return euiPalette([
|
|
137
|
+
return euiPalette([greenColor, euiPaletteColorBlind()[0], euiPaletteColorBlind()[5], lightRedColor, redColor], steps, true);
|
|
160
138
|
};
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
164
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
165
|
-
*/
|
|
166
139
|
export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
167
|
-
var
|
|
168
|
-
|
|
140
|
+
var cools = colorPalette([].concat(_toConsumableArray(coolArray.slice().reverse()), ['#EBEFF5']), 3);
|
|
141
|
+
var warms = colorPalette(['#F4F3DB'].concat(warmArray), 3);
|
|
169
142
|
if (steps === 1) {
|
|
170
|
-
return [
|
|
143
|
+
return [cools[0]];
|
|
171
144
|
} else if (steps <= 3) {
|
|
172
|
-
return euiPalette([
|
|
145
|
+
return euiPalette([cools[0], lightRedColor], steps, true);
|
|
173
146
|
}
|
|
174
|
-
|
|
175
|
-
var warms = colorPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], 3);
|
|
176
|
-
var paletteColors = hasVisColorAdjustment ? [].concat(_toConsumableArray(cools), _toConsumableArray(warms)) : [].concat(_toConsumableArray(cools), [visColors.euiColorVisNeutral0], _toConsumableArray(warms));
|
|
177
|
-
return euiPalette(paletteColors, steps, true);
|
|
147
|
+
return euiPalette([].concat(_toConsumableArray(cools), _toConsumableArray(warms)), steps, true);
|
|
178
148
|
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
182
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
183
|
-
*/
|
|
184
149
|
export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
185
|
-
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
186
|
-
visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
187
150
|
if (steps === 1) {
|
|
188
|
-
return [
|
|
151
|
+
return [euiPaletteColorBlind()[1]];
|
|
189
152
|
}
|
|
190
|
-
|
|
191
|
-
return euiPalette(paletteColors, steps, true);
|
|
153
|
+
return euiPalette([euiPaletteColorBlind()[1], euiPaletteColorBlind()[7]], steps, true);
|
|
192
154
|
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
196
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
197
|
-
*/
|
|
198
155
|
export var euiPaletteRed = function euiPaletteRed(steps) {
|
|
199
|
-
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
200
156
|
if (steps === 1) {
|
|
201
|
-
return [
|
|
157
|
+
return [lightRedColor];
|
|
202
158
|
}
|
|
203
|
-
return euiPalette([
|
|
159
|
+
return euiPalette(['white', redColor], steps);
|
|
204
160
|
};
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
208
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
209
|
-
*/
|
|
210
161
|
export var euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
211
|
-
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
212
162
|
if (steps === 1) {
|
|
213
|
-
return [
|
|
163
|
+
return [euiPaletteColorBlind()[0]];
|
|
214
164
|
}
|
|
215
|
-
return euiPalette([
|
|
165
|
+
return euiPalette(['white', greenColor], steps);
|
|
216
166
|
};
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
220
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
221
|
-
*/
|
|
222
167
|
export var euiPaletteCool = function euiPaletteCool(steps) {
|
|
223
|
-
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
224
|
-
visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
225
168
|
if (steps === 1) {
|
|
226
|
-
return [
|
|
169
|
+
return [coolArray[1]];
|
|
227
170
|
}
|
|
228
|
-
return euiPalette([
|
|
171
|
+
return euiPalette(['white'].concat(coolArray), steps);
|
|
229
172
|
};
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
233
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
234
|
-
*/
|
|
235
173
|
export var euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
236
|
-
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
237
174
|
if (steps === 1) {
|
|
238
|
-
return [
|
|
175
|
+
return [lightRedColor];
|
|
239
176
|
}
|
|
240
|
-
return euiPalette([
|
|
177
|
+
return euiPalette(['#FBFBDC'].concat(warmArray), steps);
|
|
241
178
|
};
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
245
|
-
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
246
|
-
*/
|
|
247
179
|
export var euiPaletteGray = function euiPaletteGray(steps) {
|
|
248
|
-
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
249
180
|
if (steps === 1) {
|
|
250
|
-
return [
|
|
181
|
+
return ['#98a2b3'];
|
|
251
182
|
}
|
|
252
|
-
return euiPalette([
|
|
183
|
+
return euiPalette(['white', '#d3dae6', '#98a2b3', '#69707d', '#343741'], steps, false);
|
|
253
184
|
};
|
|
@@ -16,7 +16,6 @@ export { rgbToHex } from './rgb_to_hex';
|
|
|
16
16
|
export { rgbToHsv } from './rgb_to_hsv';
|
|
17
17
|
export { calculateContrast, calculateLuminance } from './luminance_and_contrast';
|
|
18
18
|
export { VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR } from './visualization_colors';
|
|
19
|
-
export { EUI_VIS_COLOR_STORE } from './vis_color_store';
|
|
20
19
|
export { colorPalette } from './color_palette';
|
|
21
20
|
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplementary, euiPaletteRed, euiPaletteGreen, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
22
21
|
export { getSteppedGradient } from './stepped_gradient';
|
package/es/services/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
|
12
12
|
export { CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from './alignment';
|
|
13
13
|
export { CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint, useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint } from './breakpoint';
|
|
14
14
|
export { CanvasTextUtils } from './canvas';
|
|
15
|
-
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteRed, euiPaletteGreen, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS,
|
|
15
|
+
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteRed, euiPaletteGreen, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, wcagContrastMin } from './color';
|
|
16
16
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
17
17
|
export * from './console';
|
|
18
18
|
export * from './copy';
|
|
@@ -7,7 +7,4 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export { calculatePopoverPosition } from './calculate_popover_position';
|
|
10
|
-
export { findPopoverPosition, getElementZIndex } from './popover_positioning';
|
|
11
|
-
|
|
12
|
-
// Not exported as public APIs
|
|
13
|
-
export { _popoverArrowStyles } from './popover_arrow.styles';
|
|
10
|
+
export { findPopoverPosition, getElementZIndex } from './popover_positioning';
|
|
@@ -293,9 +293,11 @@ export function getPopoverScreenCoordinates(_ref2) {
|
|
|
293
293
|
position: position,
|
|
294
294
|
offset: offset,
|
|
295
295
|
popoverBoundingBox: popoverBoundingBox,
|
|
296
|
-
anchorBoundingBox: anchorBoundingBox
|
|
296
|
+
anchorBoundingBox: anchorBoundingBox,
|
|
297
|
+
arrowConfig: arrowConfig
|
|
297
298
|
}),
|
|
298
|
-
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition
|
|
299
|
+
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition,
|
|
300
|
+
primaryAxisArrowPosition = _getPrimaryAxisPositi.primaryAxisArrowPosition;
|
|
299
301
|
var popoverPlacement = _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisPosition), primaryAxisPositionName, primaryAxisPosition);
|
|
300
302
|
|
|
301
303
|
// calculate the fit of the popover in this location
|
|
@@ -316,12 +318,15 @@ export function getPopoverScreenCoordinates(_ref2) {
|
|
|
316
318
|
width: popoverBoundingBox.width,
|
|
317
319
|
height: popoverBoundingBox.height
|
|
318
320
|
}, combinedBoundingBox);
|
|
319
|
-
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide]
|
|
321
|
+
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide]), primaryAxisPositionName, primaryAxisArrowPosition) : undefined;
|
|
320
322
|
return {
|
|
321
323
|
fit: fit,
|
|
322
324
|
top: popoverPlacement.top,
|
|
323
325
|
left: popoverPlacement.left,
|
|
324
|
-
arrow: arrow
|
|
326
|
+
arrow: arrow ? {
|
|
327
|
+
left: arrow.left,
|
|
328
|
+
top: arrow.top
|
|
329
|
+
} : undefined
|
|
325
330
|
};
|
|
326
331
|
}
|
|
327
332
|
function getCrossAxisPosition(_ref4) {
|
|
@@ -413,7 +418,8 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
413
418
|
var position = _ref5.position,
|
|
414
419
|
offset = _ref5.offset,
|
|
415
420
|
popoverBoundingBox = _ref5.popoverBoundingBox,
|
|
416
|
-
anchorBoundingBox = _ref5.anchorBoundingBox
|
|
421
|
+
anchorBoundingBox = _ref5.anchorBoundingBox,
|
|
422
|
+
arrowConfig = _ref5.arrowConfig;
|
|
417
423
|
// if positioning to the top or left, the target position decreases
|
|
418
424
|
// from the anchor's top or left, otherwise the position adds to the anchor's
|
|
419
425
|
var isOffsetDecreasing = position === 'top' || position === 'left';
|
|
@@ -429,8 +435,13 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
429
435
|
var primaryAxisOffset = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : anchorSizeOnPrimaryAxis;
|
|
430
436
|
var contentOffset = (offset + primaryAxisOffset) * (isOffsetDecreasing ? -1 : 1);
|
|
431
437
|
var primaryAxisPosition = anchorEdgeOrigin + contentOffset;
|
|
438
|
+
var primaryAxisArrowPosition;
|
|
439
|
+
if (arrowConfig) {
|
|
440
|
+
primaryAxisArrowPosition = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : 0;
|
|
441
|
+
}
|
|
432
442
|
return {
|
|
433
|
-
primaryAxisPosition: primaryAxisPosition
|
|
443
|
+
primaryAxisPosition: primaryAxisPosition,
|
|
444
|
+
primaryAxisArrowPosition: primaryAxisArrowPosition
|
|
434
445
|
};
|
|
435
446
|
}
|
|
436
447
|
|
|
@@ -28,7 +28,6 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
28
28
|
import React, { useContext, useEffect, useRef, useMemo, useState, useCallback, Fragment } from 'react';
|
|
29
29
|
import { Global } from '@emotion/react';
|
|
30
30
|
import isEqual from 'lodash/isEqual';
|
|
31
|
-
import { EUI_EXPERIMENTAL_THEME_ENABLED_KEY } from '../../themes/themes';
|
|
32
31
|
import { cloneElementWithCss } from '../emotion';
|
|
33
32
|
import { css, cx } from '../emotion/css';
|
|
34
33
|
import { CurrentEuiBreakpointProvider } from '../breakpoint/current_breakpoint';
|
|
@@ -36,7 +35,6 @@ import { EuiSystemContext, EuiThemeContext, EuiNestedThemeContext, EuiModificati
|
|
|
36
35
|
import { EuiEmotionThemeProvider } from './emotion';
|
|
37
36
|
import { EuiThemeMemoizedStylesProvider } from './style_memoization';
|
|
38
37
|
import { buildTheme, getColorMode, getComputed, mergeDeep } from './utils';
|
|
39
|
-
import { EUI_VIS_COLOR_STORE } from '../color';
|
|
40
38
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
41
39
|
export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
42
40
|
var _system = _ref.theme,
|
|
@@ -76,41 +74,19 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
76
74
|
setColorMode = _useState6[1];
|
|
77
75
|
var prevColorMode = useRef(colorMode);
|
|
78
76
|
var isParentTheme = useRef(prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && isEqual(parentModifications, modifications));
|
|
79
|
-
var updateVisColorStore = useCallback(function (theme) {
|
|
80
|
-
var _theme$flags$hasVisCo, _theme$flags;
|
|
81
|
-
EUI_VIS_COLOR_STORE.setVisColors(theme.colors.vis, (_theme$flags$hasVisCo = (_theme$flags = theme.flags) === null || _theme$flags === void 0 ? void 0 : _theme$flags.hasVisColorAdjustment) !== null && _theme$flags$hasVisCo !== void 0 ? _theme$flags$hasVisCo : true);
|
|
82
|
-
}, []);
|
|
83
|
-
var getInitialTheme = function getInitialTheme() {
|
|
84
|
-
var theme = getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode);
|
|
85
|
-
setTimeout(function () {
|
|
86
|
-
updateVisColorStore(theme);
|
|
87
|
-
});
|
|
88
|
-
return theme;
|
|
89
|
-
};
|
|
90
77
|
var _useState7 = useState(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
|
|
91
|
-
:
|
|
78
|
+
: getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode)),
|
|
92
79
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
93
80
|
theme = _useState8[0],
|
|
94
81
|
setTheme = _useState8[1];
|
|
95
|
-
|
|
96
|
-
// TODO: temp. testing code only, remove once obsolete
|
|
97
|
-
useEffect(function () {
|
|
98
|
-
if (process.env.NODE_ENV === 'development') {
|
|
99
|
-
var isEnabled = localStorage.getItem(EUI_EXPERIMENTAL_THEME_ENABLED_KEY) != null;
|
|
100
|
-
if (!isEnabled) {
|
|
101
|
-
localStorage.setItem(EUI_EXPERIMENTAL_THEME_ENABLED_KEY, 'true');
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}, []);
|
|
105
82
|
useEffect(function () {
|
|
106
83
|
var newSystem = _system || parentSystem;
|
|
107
84
|
if (prevSystemKey.current !== newSystem.key) {
|
|
108
85
|
setSystem(newSystem);
|
|
109
86
|
prevSystemKey.current = newSystem.key;
|
|
110
87
|
isParentTheme.current = false;
|
|
111
|
-
updateVisColorStore(theme);
|
|
112
88
|
}
|
|
113
|
-
}, [_system, parentSystem
|
|
89
|
+
}, [_system, parentSystem]);
|
|
114
90
|
useEffect(function () {
|
|
115
91
|
var newModifications = mergeDeep(parentModifications, _modifications);
|
|
116
92
|
if (!isEqual(prevModifications.current, newModifications)) {
|
|
@@ -5,4 +5,9 @@
|
|
|
5
5
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
export var COLOR_MODES_STANDARD = {
|
|
10
|
+
light: 'LIGHT',
|
|
11
|
+
dark: 'DARK'
|
|
12
|
+
};
|
|
13
|
+
export var COLOR_MODES_INVERSE = 'INVERSE';
|