@elastic/eui 98.2.0 → 98.2.1-borealis.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{eui_theme_dark.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +1 -1
- package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_light.json.d.ts} +1 -1
- package/dist/eui_theme_borealis_dark.json +314 -0
- package/dist/eui_theme_borealis_dark.json.d.ts +317 -0
- package/dist/eui_theme_borealis_light.json +314 -0
- package/dist/eui_theme_borealis_light.json.d.ts +317 -0
- package/es/components/avatar/avatar.js +10 -4
- package/es/components/badge/badge.styles.js +1 -2
- package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/es/components/badge/color_utils.js +9 -8
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- 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 +6 -3
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- package/es/components/code/code_syntax.styles.js +23 -27
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- 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 +1 -2
- package/es/components/color_picker/color_picker.js +9 -3
- package/es/components/color_picker/color_picker.styles.js +1 -2
- 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 +5 -4
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +0 -28
- package/es/components/datagrid/data_grid.styles.js +6 -7
- package/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +7 -2
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +28 -32
- package/es/components/form/range/range_tooltip.styles.js +11 -13
- package/es/components/form/switch/switch.js +3 -7
- package/es/components/form/switch/switch.styles.js +16 -19
- package/es/components/header/header.styles.js +6 -7
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/es/components/list_group/list_group_item.styles.js +9 -11
- package/es/components/loading/loading_chart.styles.js +18 -5
- package/es/components/mark/mark.styles.js +2 -9
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- 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 +1 -2
- 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 +8 -3
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
- 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 +30 -28
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/es/components/skeleton/utils.js +5 -7
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +2 -7
- package/es/components/table/table_row.styles.js +8 -10
- 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 +6 -5
- package/es/components/toast/toast.styles.js +1 -1
- package/es/components/token/token.js +10 -4
- package/es/components/token/token.styles.js +12 -3
- package/es/components/token/token_map.js +243 -1
- package/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tour/tour.styles.js +8 -12
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/es/global_styling/functions/math.js +1 -49
- package/es/global_styling/functions/size.js +1 -17
- package/es/global_styling/mixins/_button.js +159 -0
- package/es/global_styling/mixins/_color.js +39 -31
- package/es/global_styling/mixins/index.js +2 -1
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +1 -53
- package/es/global_styling/variables/animations.js +1 -22
- package/es/global_styling/variables/breakpoint.js +1 -7
- package/es/global_styling/variables/levels.js +1 -17
- package/es/global_styling/variables/shadow.js +1 -11
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +1 -32
- package/es/services/color/eui_palettes.js +116 -47
- package/es/services/color/index.js +1 -0
- package/es/services/color/vis_color_store.js +13 -0
- package/es/services/index.js +1 -1
- package/es/services/popover/index.js +4 -1
- package/es/services/popover/popover_arrow.styles.js +31 -0
- package/es/services/popover/popover_positioning.js +6 -17
- package/es/services/theme/provider.js +26 -2
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
- package/es/themes/amsterdam/global_styling/variables/_components.js +604 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
- package/es/themes/amsterdam/theme.js +7 -1
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +9 -6
- package/eui.d.ts +2382 -2830
- package/lib/components/avatar/avatar.js +8 -2
- package/lib/components/badge/badge.styles.js +1 -2
- package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/lib/components/badge/color_utils.js +14 -13
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- 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 +5 -2
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- package/lib/components/code/code_syntax.styles.js +23 -27
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- 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 +1 -2
- package/lib/components/color_picker/color_picker.js +8 -2
- package/lib/components/color_picker/color_picker.styles.js +1 -2
- 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 +5 -4
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +0 -28
- package/lib/components/datagrid/data_grid.styles.js +6 -7
- package/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +7 -2
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +27 -31
- package/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/lib/components/form/switch/switch.js +3 -7
- package/lib/components/form/switch/switch.styles.js +16 -19
- package/lib/components/header/header.styles.js +5 -6
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/lib/components/list_group/list_group_item.styles.js +8 -10
- package/lib/components/loading/loading_chart.styles.js +18 -5
- package/lib/components/mark/mark.styles.js +2 -9
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- 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 +1 -2
- 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 +8 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
- 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 +29 -27
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/lib/components/skeleton/utils.js +4 -6
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +2 -7
- package/lib/components/table/table_row.styles.js +7 -9
- 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 +6 -5
- package/lib/components/toast/toast.styles.js +1 -1
- package/lib/components/token/token.js +12 -4
- package/lib/components/token/token.styles.js +12 -3
- package/lib/components/token/token_map.js +244 -2
- package/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tour/tour.styles.js +8 -12
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/lib/global_styling/functions/math.js +7 -58
- package/lib/global_styling/functions/size.js +7 -26
- package/lib/global_styling/mixins/_button.js +164 -0
- package/lib/global_styling/mixins/_color.js +38 -30
- package/lib/global_styling/mixins/index.js +11 -0
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +6 -61
- package/lib/global_styling/variables/animations.js +25 -31
- package/lib/global_styling/variables/breakpoint.js +7 -16
- package/lib/global_styling/variables/levels.js +7 -26
- package/lib/global_styling/variables/shadow.js +13 -20
- package/lib/global_styling/variables/size.js +7 -10
- package/lib/global_styling/variables/typography.js +19 -41
- package/lib/services/color/eui_palettes.js +116 -47
- package/lib/services/color/index.js +8 -0
- package/lib/services/color/vis_color_store.js +18 -0
- package/lib/services/index.js +7 -0
- package/lib/services/popover/index.js +8 -1
- package/lib/services/popover/popover_arrow.styles.js +37 -0
- package/lib/services/popover/popover_positioning.js +6 -17
- package/lib/services/theme/provider.js +26 -2
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/lib/themes/amsterdam/global_styling/variables/_components.js +608 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
- package/lib/themes/amsterdam/theme.js +7 -1
- package/lib/themes/index.js +7 -0
- package/lib/themes/themes.js +10 -7
- package/optimize/es/components/avatar/avatar.js +10 -4
- package/optimize/es/components/badge/badge.styles.js +1 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/es/components/badge/color_utils.js +9 -8
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- 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 +6 -3
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +1 -2
- package/optimize/es/components/code/code_syntax.styles.js +23 -27
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- 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 +1 -2
- package/optimize/es/components/color_picker/color_picker.js +9 -3
- package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/comment_list/comment_event.js +4 -3
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +7 -2
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +28 -32
- package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/es/components/form/switch/switch.js +3 -2
- package/optimize/es/components/form/switch/switch.styles.js +16 -19
- package/optimize/es/components/header/header.styles.js +6 -7
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
- package/optimize/es/components/loading/loading_chart.styles.js +13 -5
- package/optimize/es/components/mark/mark.styles.js +2 -9
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- 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 +1 -2
- 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 +8 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
- 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 +30 -28
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/es/components/skeleton/utils.js +5 -7
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/es/components/table/table_row.styles.js +8 -10
- 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 +6 -5
- package/optimize/es/components/toast/toast.styles.js +1 -1
- package/optimize/es/components/token/token.js +10 -4
- package/optimize/es/components/token/token.styles.js +12 -3
- package/optimize/es/components/token/token_map.js +243 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tour/tour.styles.js +8 -12
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/es/global_styling/functions/math.js +1 -49
- package/optimize/es/global_styling/functions/size.js +1 -17
- package/optimize/es/global_styling/mixins/_button.js +159 -0
- package/optimize/es/global_styling/mixins/_color.js +39 -31
- package/optimize/es/global_styling/mixins/index.js +2 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
- package/optimize/es/global_styling/variables/animations.js +1 -22
- package/optimize/es/global_styling/variables/breakpoint.js +1 -7
- package/optimize/es/global_styling/variables/levels.js +1 -17
- package/optimize/es/global_styling/variables/shadow.js +1 -11
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +1 -32
- package/optimize/es/services/color/eui_palettes.js +116 -47
- package/optimize/es/services/color/index.js +1 -0
- package/optimize/es/services/color/vis_color_store.js +13 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/popover/index.js +4 -1
- package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
- package/optimize/es/services/popover/popover_positioning.js +6 -17
- package/optimize/es/services/theme/provider.js +26 -2
- package/optimize/es/services/theme/types.js +1 -6
- package/optimize/es/services/theme/utils.js +1 -295
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +596 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/optimize/es/themes/amsterdam/theme.js +7 -1
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +9 -6
- package/optimize/lib/components/avatar/avatar.js +8 -2
- package/optimize/lib/components/badge/badge.styles.js +1 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/lib/components/badge/color_utils.js +14 -13
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- 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 +5 -2
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +1 -2
- package/optimize/lib/components/code/code_syntax.styles.js +23 -27
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- 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 +1 -2
- package/optimize/lib/components/color_picker/color_picker.js +8 -2
- package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/comment_list/comment_event.js +4 -3
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +7 -2
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +27 -31
- package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/lib/components/form/switch/switch.js +3 -2
- package/optimize/lib/components/form/switch/switch.styles.js +16 -19
- package/optimize/lib/components/header/header.styles.js +5 -6
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
- package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
- package/optimize/lib/components/mark/mark.styles.js +2 -9
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- 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 +1 -2
- 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 +8 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- 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 +29 -27
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/lib/components/skeleton/utils.js +4 -6
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/lib/components/table/table_row.styles.js +7 -9
- 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 +6 -5
- package/optimize/lib/components/toast/toast.styles.js +1 -1
- package/optimize/lib/components/token/token.js +13 -4
- package/optimize/lib/components/token/token.styles.js +12 -3
- package/optimize/lib/components/token/token_map.js +244 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tour/tour.styles.js +8 -12
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/lib/global_styling/functions/math.js +7 -59
- package/optimize/lib/global_styling/functions/size.js +7 -27
- package/optimize/lib/global_styling/mixins/_button.js +165 -0
- package/optimize/lib/global_styling/mixins/_color.js +38 -30
- package/optimize/lib/global_styling/mixins/index.js +11 -0
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
- package/optimize/lib/global_styling/variables/animations.js +25 -31
- package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
- package/optimize/lib/global_styling/variables/levels.js +7 -26
- package/optimize/lib/global_styling/variables/shadow.js +13 -20
- package/optimize/lib/global_styling/variables/size.js +7 -10
- package/optimize/lib/global_styling/variables/typography.js +19 -41
- package/optimize/lib/services/color/eui_palettes.js +116 -47
- package/optimize/lib/services/color/index.js +8 -0
- package/optimize/lib/services/color/vis_color_store.js +18 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/popover/index.js +8 -1
- package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
- package/optimize/lib/services/popover/popover_positioning.js +6 -17
- package/optimize/lib/services/theme/provider.js +26 -2
- package/optimize/lib/services/theme/types.js +13 -14
- package/optimize/lib/services/theme/utils.js +54 -296
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/optimize/lib/themes/amsterdam/theme.js +7 -1
- package/optimize/lib/themes/index.js +7 -0
- package/optimize/lib/themes/themes.js +10 -7
- package/package.json +7 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -10
- package/src/global_styling/variables/_animations.scss +1 -8
- package/src/global_styling/variables/_borders.scss +1 -9
- package/src/global_styling/variables/_buttons.scss +1 -18
- package/src/global_styling/variables/_colors_vis.scss +1 -70
- package/src/global_styling/variables/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- package/src/global_styling/variables/_responsive.scss +1 -9
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +1 -13
- package/src/global_styling/variables/_states.scss +1 -14
- package/src/global_styling/variables/_typography.scss +1 -75
- package/src/global_styling/variables/_z_index.scss +1 -33
- package/src/themes/amsterdam/_colors_dark.scss +80 -8
- package/src/themes/amsterdam/_colors_light.scss +80 -8
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +72 -0
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
- package/test-env/components/avatar/avatar.js +8 -2
- package/test-env/components/badge/badge.styles.js +1 -2
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/test-env/components/badge/color_utils.js +14 -13
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- 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 +5 -2
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +1 -2
- package/test-env/components/code/code_syntax.styles.js +23 -27
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- 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 +1 -2
- package/test-env/components/color_picker/color_picker.js +8 -2
- package/test-env/components/color_picker/color_picker.styles.js +1 -2
- 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 +5 -4
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +0 -28
- package/test-env/components/datagrid/data_grid.styles.js +6 -7
- package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
- package/test-env/components/flyout/flyout.styles.js +7 -2
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +27 -31
- package/test-env/components/form/range/range_tooltip.styles.js +11 -13
- package/test-env/components/form/switch/switch.js +3 -2
- package/test-env/components/form/switch/switch.styles.js +16 -19
- package/test-env/components/header/header.styles.js +5 -6
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/test-env/components/list_group/list_group_item.styles.js +8 -10
- package/test-env/components/loading/loading_chart.styles.js +13 -5
- package/test-env/components/mark/mark.styles.js +2 -9
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- 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 +1 -2
- 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 +8 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- 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 +29 -27
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
- package/test-env/components/skeleton/utils.js +4 -6
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +2 -7
- package/test-env/components/table/table_row.styles.js +7 -9
- 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 +6 -5
- package/test-env/components/toast/toast.styles.js +1 -1
- package/test-env/components/token/token.js +13 -4
- package/test-env/components/token/token.styles.js +12 -3
- package/test-env/components/token/token_map.js +244 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +11 -23
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tour/tour.styles.js +8 -12
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- package/test-env/global_styling/functions/math.js +7 -59
- package/test-env/global_styling/functions/size.js +7 -27
- package/test-env/global_styling/mixins/_button.js +165 -0
- package/test-env/global_styling/mixins/_color.js +38 -30
- package/test-env/global_styling/mixins/index.js +11 -0
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +6 -61
- package/test-env/global_styling/variables/animations.js +25 -31
- package/test-env/global_styling/variables/breakpoint.js +7 -16
- package/test-env/global_styling/variables/levels.js +7 -26
- package/test-env/global_styling/variables/shadow.js +13 -20
- package/test-env/global_styling/variables/size.js +7 -10
- package/test-env/global_styling/variables/typography.js +19 -41
- package/test-env/services/color/eui_palettes.js +116 -47
- package/test-env/services/color/index.js +8 -0
- package/test-env/services/color/vis_color_store.js +18 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/popover/index.js +8 -1
- package/test-env/services/popover/popover_arrow.styles.js +37 -0
- package/test-env/services/popover/popover_positioning.js +6 -17
- package/test-env/services/theme/provider.js +26 -2
- package/test-env/services/theme/types.js +13 -14
- package/test-env/services/theme/utils.js +54 -296
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/test-env/themes/amsterdam/theme.js +7 -1
- package/test-env/themes/index.js +7 -0
- package/test-env/themes/themes.js +10 -7
- /package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +0 -0
- /package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +0 -0
|
@@ -8,6 +8,7 @@ exports.euiPaletteWarm = exports.euiPaletteRed = exports.euiPaletteGreen = expor
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
|
10
10
|
var _color_palette = require("./color_palette");
|
|
11
|
+
var _vis_color_store = require("./vis_color_store");
|
|
11
12
|
/*
|
|
12
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
14
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -31,6 +32,14 @@ var euiPalette = function euiPalette(colors, steps) {
|
|
|
31
32
|
}
|
|
32
33
|
return (0, _color_palette.colorPalette)(colors, steps, diverge, categorical);
|
|
33
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* NOTE: These functions rely on base vis colors of the theme which are provided via a global
|
|
37
|
+
* singleton instance `EUI_VIS_COLOR_STORE` that's updated by the EuiProvider on theme change.
|
|
38
|
+
* Make sure the function is recalled on theme change to retrieve theme-related colors.
|
|
39
|
+
*
|
|
40
|
+
* Outside of a react component you can use the `subscibe()` method on the `EUI_VIS_COLOR_STORE`
|
|
41
|
+
* to subscribe to updates and update your usages to ensure latest colors are loaded.
|
|
42
|
+
*/
|
|
34
43
|
var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
35
44
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
36
45
|
_ref2$rotations = _ref2.rotations,
|
|
@@ -44,26 +53,8 @@ var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteCol
|
|
|
44
53
|
_ref2$sortShift = _ref2.sortShift,
|
|
45
54
|
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift;
|
|
46
55
|
var colors = [];
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
'#6092C0',
|
|
50
|
-
// 1 blue
|
|
51
|
-
'#D36086',
|
|
52
|
-
// 2 dark pink
|
|
53
|
-
'#9170B8',
|
|
54
|
-
// 3 purple
|
|
55
|
-
'#CA8EAE',
|
|
56
|
-
// 4 light pink
|
|
57
|
-
'#D6BF57',
|
|
58
|
-
// 5 yellow
|
|
59
|
-
'#B9A888',
|
|
60
|
-
// 6 tan
|
|
61
|
-
'#DA8B45',
|
|
62
|
-
// 7 orange
|
|
63
|
-
'#AA6556',
|
|
64
|
-
// 8 brown
|
|
65
|
-
'#E7664C' // 9 red
|
|
66
|
-
];
|
|
56
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
57
|
+
var base = [visColors.euiColorVis0, visColors.euiColorVis1, visColors.euiColorVis2, visColors.euiColorVis3, visColors.euiColorVis4, visColors.euiColorVis5, visColors.euiColorVis6, visColors.euiColorVis7, visColors.euiColorVis8, visColors.euiColorVis9];
|
|
67
58
|
if (sortBy === 'natural') {
|
|
68
59
|
// Sort the colors based on the color wheel, but shifting the values based on sortShift
|
|
69
60
|
base = (0, _toConsumableArray2.default)(base).sort(function (a, b) {
|
|
@@ -109,78 +100,156 @@ var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteCol
|
|
|
109
100
|
/**
|
|
110
101
|
* Color blind palette with text is meant for use when text is applied on top of the color.
|
|
111
102
|
* It increases the brightness of the color to give the text more contrast.
|
|
103
|
+
*
|
|
104
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
105
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
112
106
|
*/
|
|
113
107
|
var euiPaletteColorBlindBehindText = exports.euiPaletteColorBlindBehindText = function euiPaletteColorBlindBehindText() {
|
|
114
108
|
var paletteProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
109
|
+
var hasVisColorAdjustment = _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
115
110
|
var originalPalette = euiPaletteColorBlind(paletteProps);
|
|
111
|
+
|
|
112
|
+
// new theme palette has required contrast, we don't need to adjust them
|
|
113
|
+
if (!hasVisColorAdjustment) return originalPalette;
|
|
116
114
|
var newPalette = originalPalette.map(function (color) {
|
|
117
115
|
return (0, _chromaJs.default)(color).brighten(0.5).hex();
|
|
118
116
|
});
|
|
119
117
|
return newPalette;
|
|
120
118
|
};
|
|
119
|
+
var _getVisColorsAsText = function _getVisColorsAsText(visColors, keys) {
|
|
120
|
+
return keys.reduce(function (colors, curr) {
|
|
121
|
+
return [].concat((0, _toConsumableArray2.default)(colors), [visColors[curr]]);
|
|
122
|
+
}, []);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
127
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
128
|
+
*/
|
|
121
129
|
var euiPaletteForLightBackground = exports.euiPaletteForLightBackground = function euiPaletteForLightBackground() {
|
|
122
|
-
|
|
130
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
131
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
132
|
+
return color.includes('AsTextLight');
|
|
133
|
+
});
|
|
134
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
123
135
|
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
139
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
140
|
+
*/
|
|
124
141
|
var euiPaletteForDarkBackground = exports.euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
125
|
-
|
|
142
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
143
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
144
|
+
return color.includes('AsTextDark');
|
|
145
|
+
});
|
|
146
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
126
147
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
151
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
152
|
+
*/
|
|
132
153
|
var euiPaletteForStatus = exports.euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
154
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
133
155
|
if (steps === 1) {
|
|
134
|
-
return [
|
|
156
|
+
return [visColors.euiColorVisSuccess0];
|
|
135
157
|
}
|
|
136
158
|
if (steps <= 3) {
|
|
137
|
-
return euiPalette([
|
|
159
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisWarning0, visColors.euiColorVisDanger0], steps, true);
|
|
138
160
|
}
|
|
139
|
-
return euiPalette([
|
|
161
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisSuccess1, visColors.euiColorVisWarning0, visColors.euiColorVisDanger1, visColors.euiColorVisDanger0], steps, true);
|
|
140
162
|
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
166
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
167
|
+
*/
|
|
141
168
|
var euiPaletteForTemperature = exports.euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
142
|
-
var
|
|
143
|
-
|
|
169
|
+
var hasVisColorAdjustment = _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
170
|
+
visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
144
171
|
if (steps === 1) {
|
|
145
|
-
return [
|
|
172
|
+
return [visColors.euiColorVisCool2];
|
|
146
173
|
} else if (steps <= 3) {
|
|
147
|
-
return euiPalette([
|
|
174
|
+
return euiPalette([visColors.euiColorVisCool2, visColors.euiColorVisWarm2], steps, true);
|
|
148
175
|
}
|
|
149
|
-
|
|
176
|
+
var cools = (0, _color_palette.colorPalette)([visColors.euiColorVisCool2, visColors.euiColorVisCool1, visColors.euiColorVisCool0], 3);
|
|
177
|
+
var warms = (0, _color_palette.colorPalette)([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], 3);
|
|
178
|
+
var paletteColors = hasVisColorAdjustment ? [].concat((0, _toConsumableArray2.default)(cools), (0, _toConsumableArray2.default)(warms)) : [].concat((0, _toConsumableArray2.default)(cools), [visColors.euiColorVisNeutral0], (0, _toConsumableArray2.default)(warms));
|
|
179
|
+
return euiPalette(paletteColors, steps, true);
|
|
150
180
|
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
184
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
185
|
+
*/
|
|
151
186
|
var euiPaletteComplementary = exports.euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
187
|
+
var hasVisColorAdjustment = _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
188
|
+
visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
152
189
|
if (steps === 1) {
|
|
153
|
-
return [
|
|
190
|
+
return [visColors.euiColorVisComplementary0];
|
|
154
191
|
}
|
|
155
|
-
|
|
192
|
+
var paletteColors = hasVisColorAdjustment ? [visColors.euiColorVisComplementary0, visColors.euiColorVisComplementary1] : [visColors.euiColorVisComplementary0, visColors.euiColorVisNeutral0, visColors.euiColorVisComplementary1];
|
|
193
|
+
return euiPalette(paletteColors, steps, true);
|
|
156
194
|
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
198
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
199
|
+
*/
|
|
157
200
|
var euiPaletteRed = exports.euiPaletteRed = function euiPaletteRed(steps) {
|
|
201
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
158
202
|
if (steps === 1) {
|
|
159
|
-
return [
|
|
203
|
+
return [visColors.euiColorVisDanger1];
|
|
160
204
|
}
|
|
161
|
-
return euiPalette([
|
|
205
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisDanger0], steps);
|
|
162
206
|
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
210
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
211
|
+
*/
|
|
163
212
|
var euiPaletteGreen = exports.euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
213
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
164
214
|
if (steps === 1) {
|
|
165
|
-
return [
|
|
215
|
+
return [visColors.euiColorVisSuccess1];
|
|
166
216
|
}
|
|
167
|
-
return euiPalette([
|
|
217
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisSuccess0], steps);
|
|
168
218
|
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
222
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
223
|
+
*/
|
|
169
224
|
var euiPaletteCool = exports.euiPaletteCool = function euiPaletteCool(steps) {
|
|
225
|
+
var hasVisColorAdjustment = _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
226
|
+
visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
170
227
|
if (steps === 1) {
|
|
171
|
-
return [
|
|
228
|
+
return [visColors.euiColorVisCool1];
|
|
172
229
|
}
|
|
173
|
-
return euiPalette([
|
|
230
|
+
return euiPalette([hasVisColorAdjustment ? visColors.euiColorVisNeutral0 : visColors.euiColorVisCool0, visColors.euiColorVisCool1, visColors.euiColorVisCool2], steps);
|
|
174
231
|
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
235
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
236
|
+
*/
|
|
175
237
|
var euiPaletteWarm = exports.euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
238
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
176
239
|
if (steps === 1) {
|
|
177
|
-
return [
|
|
240
|
+
return [visColors.euiColorVisWarm2];
|
|
178
241
|
}
|
|
179
|
-
return euiPalette([
|
|
242
|
+
return euiPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], steps);
|
|
180
243
|
};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
247
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
248
|
+
*/
|
|
181
249
|
var euiPaletteGray = exports.euiPaletteGray = function euiPaletteGray(steps) {
|
|
250
|
+
var visColors = _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
182
251
|
if (steps === 1) {
|
|
183
|
-
return [
|
|
252
|
+
return [visColors.euiColorVisGrey1];
|
|
184
253
|
}
|
|
185
|
-
return euiPalette([
|
|
254
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisGrey0, visColors.euiColorVisGrey1, visColors.euiColorVisGrey2, visColors.euiColorVisGrey3], steps, false);
|
|
186
255
|
};
|
|
@@ -16,6 +16,7 @@ var _exportNames = {
|
|
|
16
16
|
calculateLuminance: true,
|
|
17
17
|
VISUALIZATION_COLORS: true,
|
|
18
18
|
DEFAULT_VISUALIZATION_COLOR: true,
|
|
19
|
+
EUI_VIS_COLOR_STORE: true,
|
|
19
20
|
colorPalette: true,
|
|
20
21
|
euiPaletteForLightBackground: true,
|
|
21
22
|
euiPaletteForDarkBackground: true,
|
|
@@ -37,6 +38,12 @@ Object.defineProperty(exports, "DEFAULT_VISUALIZATION_COLOR", {
|
|
|
37
38
|
return _visualization_colors.DEFAULT_VISUALIZATION_COLOR;
|
|
38
39
|
}
|
|
39
40
|
});
|
|
41
|
+
Object.defineProperty(exports, "EUI_VIS_COLOR_STORE", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function get() {
|
|
44
|
+
return _vis_color_store.EUI_VIS_COLOR_STORE;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
40
47
|
Object.defineProperty(exports, "VISUALIZATION_COLORS", {
|
|
41
48
|
enumerable: true,
|
|
42
49
|
get: function get() {
|
|
@@ -197,6 +204,7 @@ var _rgb_to_hex = require("./rgb_to_hex");
|
|
|
197
204
|
var _rgb_to_hsv = require("./rgb_to_hsv");
|
|
198
205
|
var _luminance_and_contrast = require("./luminance_and_contrast");
|
|
199
206
|
var _visualization_colors = require("./visualization_colors");
|
|
207
|
+
var _vis_color_store = require("./vis_color_store");
|
|
200
208
|
var _color_palette = require("./color_palette");
|
|
201
209
|
var _eui_palettes = require("./eui_palettes");
|
|
202
210
|
var _stepped_gradient = require("./stepped_gradient");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EUI_VIS_COLOR_STORE = void 0;
|
|
7
|
+
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
8
|
+
var _colors_vis = require("../../global_styling/variables/_colors_vis");
|
|
9
|
+
/*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// initialsetup of Vis color storage with default colors
|
|
18
|
+
var EUI_VIS_COLOR_STORE = exports.EUI_VIS_COLOR_STORE = _euiThemeCommon.EuiVisColorStore.getInstance(_colors_vis.colorVis, true);
|
|
@@ -56,6 +56,7 @@ var _exportNames = {
|
|
|
56
56
|
tintOrShade: true,
|
|
57
57
|
transparentize: true,
|
|
58
58
|
VISUALIZATION_COLORS: true,
|
|
59
|
+
EUI_VIS_COLOR_STORE: true,
|
|
59
60
|
wcagContrastMin: true,
|
|
60
61
|
useColorPickerState: true,
|
|
61
62
|
useColorStopsState: true,
|
|
@@ -122,6 +123,12 @@ Object.defineProperty(exports, "DEFAULT_VISUALIZATION_COLOR", {
|
|
|
122
123
|
return _color.DEFAULT_VISUALIZATION_COLOR;
|
|
123
124
|
}
|
|
124
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "EUI_VIS_COLOR_STORE", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _color.EUI_VIS_COLOR_STORE;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
125
132
|
Object.defineProperty(exports, "EuiWindowEvent", {
|
|
126
133
|
enumerable: true,
|
|
127
134
|
get: function get() {
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "_popoverArrowStyles", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _popover_arrow._popoverArrowStyles;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "calculatePopoverPosition", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -22,4 +28,5 @@ Object.defineProperty(exports, "getElementZIndex", {
|
|
|
22
28
|
}
|
|
23
29
|
});
|
|
24
30
|
var _calculate_popover_position = require("./calculate_popover_position");
|
|
25
|
-
var _popover_positioning = require("./popover_positioning");
|
|
31
|
+
var _popover_positioning = require("./popover_positioning");
|
|
32
|
+
var _popover_arrow = require("./popover_arrow.styles");
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports._popoverArrowStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _functions = require("../../global_styling/functions");
|
|
9
|
+
/*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Arrow clipping/transform/positioning CSS shared between EuiPopover and EuiToolTip
|
|
19
|
+
*/
|
|
20
|
+
var _popoverArrowStyles = exports._popoverArrowStyles = function _popoverArrowStyles(_ref, arrowSize) {
|
|
21
|
+
var euiTheme = _ref.euiTheme;
|
|
22
|
+
var arrowOffset = (0, _functions.mathWithUnits)(arrowSize, function (x) {
|
|
23
|
+
return x / -2;
|
|
24
|
+
});
|
|
25
|
+
var arrowBorderRadius = (0, _functions.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
26
|
+
return x / 2;
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
_arrowStyles: "\n position: absolute;\n ".concat((0, _functions.logicalSizeCSS)(arrowSize), "\n border-radius: ").concat(arrowBorderRadius, ";\n /* Use clip-path to ensure that arrows don't overlap into popover content */\n clip-path: polygon(0 0, 100% 100%, 0 100%);\n transform-origin: center;\n "),
|
|
30
|
+
positions: {
|
|
31
|
+
top: /*#__PURE__*/(0, _react.css)((0, _functions.logicalCSS)('margin-top', arrowOffset), " transform:rotate(-45deg);;label:top;"),
|
|
32
|
+
bottom: /*#__PURE__*/(0, _react.css)((0, _functions.logicalCSS)('bottom', 0), " ", (0, _functions.logicalCSS)('margin-bottom', arrowOffset), " transform:rotate(135deg);;label:bottom;"),
|
|
33
|
+
left: /*#__PURE__*/(0, _react.css)((0, _functions.logicalCSS)('margin-left', arrowOffset), " transform:rotate(-135deg);;label:left;"),
|
|
34
|
+
right: /*#__PURE__*/(0, _react.css)((0, _functions.logicalCSS)('right', 0), " ", (0, _functions.logicalCSS)('margin-right', arrowOffset), " transform:rotate(45deg);;label:right;")
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -299,11 +299,9 @@ function getPopoverScreenCoordinates(_ref2) {
|
|
|
299
299
|
position: position,
|
|
300
300
|
offset: offset,
|
|
301
301
|
popoverBoundingBox: popoverBoundingBox,
|
|
302
|
-
anchorBoundingBox: anchorBoundingBox
|
|
303
|
-
arrowConfig: arrowConfig
|
|
302
|
+
anchorBoundingBox: anchorBoundingBox
|
|
304
303
|
}),
|
|
305
|
-
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition
|
|
306
|
-
primaryAxisArrowPosition = _getPrimaryAxisPositi.primaryAxisArrowPosition;
|
|
304
|
+
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition;
|
|
307
305
|
var popoverPlacement = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, crossAxisFirstSide, crossAxisPosition), primaryAxisPositionName, primaryAxisPosition);
|
|
308
306
|
|
|
309
307
|
// calculate the fit of the popover in this location
|
|
@@ -324,15 +322,12 @@ function getPopoverScreenCoordinates(_ref2) {
|
|
|
324
322
|
width: popoverBoundingBox.width,
|
|
325
323
|
height: popoverBoundingBox.height
|
|
326
324
|
}, combinedBoundingBox);
|
|
327
|
-
var arrow = arrowConfig ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide]),
|
|
325
|
+
var arrow = arrowConfig ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide] - 1), position, '100%') : undefined;
|
|
328
326
|
return {
|
|
329
327
|
fit: fit,
|
|
330
328
|
top: popoverPlacement.top,
|
|
331
329
|
left: popoverPlacement.left,
|
|
332
|
-
arrow: arrow
|
|
333
|
-
left: arrow.left,
|
|
334
|
-
top: arrow.top
|
|
335
|
-
} : undefined
|
|
330
|
+
arrow: arrow
|
|
336
331
|
};
|
|
337
332
|
}
|
|
338
333
|
function getCrossAxisPosition(_ref4) {
|
|
@@ -424,8 +419,7 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
424
419
|
var position = _ref5.position,
|
|
425
420
|
offset = _ref5.offset,
|
|
426
421
|
popoverBoundingBox = _ref5.popoverBoundingBox,
|
|
427
|
-
anchorBoundingBox = _ref5.anchorBoundingBox
|
|
428
|
-
arrowConfig = _ref5.arrowConfig;
|
|
422
|
+
anchorBoundingBox = _ref5.anchorBoundingBox;
|
|
429
423
|
// if positioning to the top or left, the target position decreases
|
|
430
424
|
// from the anchor's top or left, otherwise the position adds to the anchor's
|
|
431
425
|
var isOffsetDecreasing = position === 'top' || position === 'left';
|
|
@@ -441,13 +435,8 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
441
435
|
var primaryAxisOffset = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : anchorSizeOnPrimaryAxis;
|
|
442
436
|
var contentOffset = (offset + primaryAxisOffset) * (isOffsetDecreasing ? -1 : 1);
|
|
443
437
|
var primaryAxisPosition = anchorEdgeOrigin + contentOffset;
|
|
444
|
-
var primaryAxisArrowPosition;
|
|
445
|
-
if (arrowConfig) {
|
|
446
|
-
primaryAxisArrowPosition = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : 0;
|
|
447
|
-
}
|
|
448
438
|
return {
|
|
449
|
-
primaryAxisPosition: primaryAxisPosition
|
|
450
|
-
primaryAxisArrowPosition: primaryAxisArrowPosition
|
|
439
|
+
primaryAxisPosition: primaryAxisPosition
|
|
451
440
|
};
|
|
452
441
|
}
|
|
453
442
|
|
|
@@ -14,6 +14,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
14
14
|
var _react = require("@emotion/react");
|
|
15
15
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
17
|
+
var _themes = require("../../themes/themes");
|
|
17
18
|
var _emotion = require("../emotion");
|
|
18
19
|
var _css2 = require("../emotion/css");
|
|
19
20
|
var _current_breakpoint = require("../breakpoint/current_breakpoint");
|
|
@@ -21,6 +22,7 @@ var _context = require("./context");
|
|
|
21
22
|
var _emotion2 = require("./emotion");
|
|
22
23
|
var _style_memoization = require("./style_memoization");
|
|
23
24
|
var _utils = require("./utils");
|
|
25
|
+
var _color = require("../color");
|
|
24
26
|
var _excluded = ["cloneElement", "className"];
|
|
25
27
|
var _templateObject;
|
|
26
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -71,19 +73,41 @@ var EuiThemeProvider = exports.EuiThemeProvider = function EuiThemeProvider(_ref
|
|
|
71
73
|
setColorMode = _useState6[1];
|
|
72
74
|
var prevColorMode = (0, _react2.useRef)(colorMode);
|
|
73
75
|
var isParentTheme = (0, _react2.useRef)(prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && (0, _isEqual.default)(parentModifications, modifications));
|
|
76
|
+
var updateVisColorStore = (0, _react2.useCallback)(function (theme) {
|
|
77
|
+
var _theme$flags$hasVisCo, _theme$flags;
|
|
78
|
+
_color.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);
|
|
79
|
+
}, []);
|
|
80
|
+
var getInitialTheme = function getInitialTheme() {
|
|
81
|
+
var theme = (0, _utils.getComputed)(system, (0, _utils.buildTheme)(modifications, "_".concat(system.key)), colorMode);
|
|
82
|
+
setTimeout(function () {
|
|
83
|
+
updateVisColorStore(theme);
|
|
84
|
+
});
|
|
85
|
+
return theme;
|
|
86
|
+
};
|
|
74
87
|
var _useState7 = (0, _react2.useState)(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
|
|
75
|
-
: (
|
|
88
|
+
: getInitialTheme()),
|
|
76
89
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
77
90
|
theme = _useState8[0],
|
|
78
91
|
setTheme = _useState8[1];
|
|
92
|
+
|
|
93
|
+
// TODO: temp. testing code only, remove once obsolete
|
|
94
|
+
(0, _react2.useEffect)(function () {
|
|
95
|
+
if (process.env.NODE_ENV === 'development') {
|
|
96
|
+
var isEnabled = localStorage.getItem(_themes.EUI_EXPERIMENTAL_THEME_ENABLED_KEY) != null;
|
|
97
|
+
if (!isEnabled) {
|
|
98
|
+
localStorage.setItem(_themes.EUI_EXPERIMENTAL_THEME_ENABLED_KEY, 'true');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, []);
|
|
79
102
|
(0, _react2.useEffect)(function () {
|
|
80
103
|
var newSystem = _system || parentSystem;
|
|
81
104
|
if (prevSystemKey.current !== newSystem.key) {
|
|
82
105
|
setSystem(newSystem);
|
|
83
106
|
prevSystemKey.current = newSystem.key;
|
|
84
107
|
isParentTheme.current = false;
|
|
108
|
+
updateVisColorStore(theme);
|
|
85
109
|
}
|
|
86
|
-
}, [_system, parentSystem]);
|
|
110
|
+
}, [_system, parentSystem, theme, updateVisColorStore]);
|
|
87
111
|
(0, _react2.useEffect)(function () {
|
|
88
112
|
var newModifications = (0, _utils.mergeDeep)(parentModifications, _modifications);
|
|
89
113
|
if (!(0, _isEqual.default)(prevModifications.current, newModifications)) {
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var COLOR_MODES_INVERSE = exports.COLOR_MODES_INVERSE = 'INVERSE';
|
|
6
|
+
Object.defineProperty(exports, "COLOR_MODES_INVERSE", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _euiThemeCommon.COLOR_MODES_INVERSE;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "COLOR_MODES_STANDARD", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _euiThemeCommon.COLOR_MODES_STANDARD;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _euiThemeCommon = require("@elastic/eui-theme-common");
|