@elastic/eui 99.4.0 → 100.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +177 -65
- package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +178 -66
- package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +177 -65
- package/dist/eui_theme_amsterdam_light.json.d.ts +425 -0
- package/dist/eui_theme_borealis_dark.json +422 -0
- package/dist/{eui_theme_dark.json.d.ts → eui_theme_borealis_dark.json.d.ts} +178 -66
- package/dist/eui_theme_borealis_light.json +422 -0
- package/dist/eui_theme_borealis_light.json.d.ts +425 -0
- package/es/components/avatar/avatar.js +4 -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 +2 -3
- 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/button/button_icon/button_icon.styles.js +1 -1
- package/es/components/call_out/call_out.styles.js +4 -4
- 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 +24 -28
- 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 +4 -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/combo_box/combo_box.js +11 -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/date_picker.styles.js +1 -1
- package/es/components/date_picker/date_picker_range.styles.js +1 -1
- 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 +4 -5
- 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/expression/expression.styles.js +13 -13
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +2 -3
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +8 -3
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +24 -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 +7 -8
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/image/image.styles.js +1 -1
- package/es/components/image/image_button.styles.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 +9 -7
- package/es/components/link/link.styles.js +6 -6
- 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/loading/loading_spinner.styles.js +2 -2
- 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 +2 -2
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +3 -3
- package/es/components/pagination/pagination.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +3 -2
- 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 +7 -6
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +30 -28
- package/es/components/provider/provider.js +2 -2
- package/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/es/components/side_nav/side_nav_item.styles.js +6 -7
- package/es/components/skeleton/utils.js +5 -7
- package/es/components/stat/stat.styles.js +5 -5
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +3 -8
- package/es/components/table/table_row.styles.js +9 -11
- package/es/components/tabs/tab.styles.js +2 -2
- 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/text_diff/text_diff.styles.js +1 -1
- package/es/components/toast/toast.styles.js +2 -2
- package/es/components/token/token.js +10 -4
- package/es/components/token/token.styles.js +14 -5
- package/es/components/token/token_map.js +243 -1
- package/es/components/tool_tip/tool_tip.styles.js +13 -25
- 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/_shadow.js +31 -0
- package/es/global_styling/mixins/index.js +3 -1
- package/es/global_styling/reset/global_styles.js +3 -3
- 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 +148 -54
- package/es/services/color/eui_palettes_hooks.js +74 -0
- package/es/services/color/index.js +2 -0
- package/es/services/color/vis_color_store.js +13 -0
- package/es/services/index.js +2 -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/context.js +3 -3
- package/es/services/theme/provider.js +15 -2
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/functions/shadows.js +1 -10
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/es/themes/amsterdam/global_styling/variables/_components.js +619 -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 -2
- package/es/themes/themes.js +1 -21
- package/eui.d.ts +2726 -3183
- package/lib/components/avatar/avatar.js +2 -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 +2 -3
- 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/button/button_icon/button_icon.styles.js +1 -1
- package/lib/components/call_out/call_out.styles.js +4 -4
- 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 +24 -28
- 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 +3 -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/combo_box/combo_box.js +11 -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/date_picker.styles.js +2 -2
- package/lib/components/date_picker/date_picker_range.styles.js +2 -2
- 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 +3 -4
- 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/expression/expression.styles.js +13 -13
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +3 -4
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +8 -3
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +23 -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 +7 -8
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/icon/svgs/aggregate.svg +0 -0
- package/lib/components/icon/svgs/color.svg +0 -0
- package/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/lib/components/icon/svgs/documentation.svg +0 -0
- package/lib/components/icon/svgs/eraser.svg +0 -0
- package/lib/components/icon/svgs/folder_check.svg +0 -0
- package/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/lib/components/icon/svgs/folder_open.svg +0 -0
- package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/lib/components/icon/svgs/function.svg +0 -0
- package/lib/components/icon/svgs/layers.svg +0 -0
- package/lib/components/icon/svgs/menu.svg +0 -0
- package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/lib/components/icon/svgs/percent.svg +0 -0
- package/lib/components/icon/svgs/push.svg +0 -0
- package/lib/components/icon/svgs/quote.svg +0 -0
- package/lib/components/icon/svgs/reporter.svg +0 -0
- package/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/lib/components/icon/svgs/timeline.svg +0 -0
- package/lib/components/icon/svgs/users.svg +0 -0
- package/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/lib/components/image/image.styles.js +2 -2
- package/lib/components/image/image_button.styles.js +3 -3
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/lib/components/link/link.styles.js +6 -6
- 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/loading/loading_spinner.styles.js +2 -2
- 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 +3 -3
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/lib/components/pagination/pagination.styles.js +2 -2
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +4 -3
- 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 +10 -9
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +29 -27
- package/lib/components/provider/provider.js +2 -2
- package/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/lib/components/side_nav/side_nav_item.styles.js +6 -7
- package/lib/components/skeleton/utils.js +4 -6
- package/lib/components/stat/stat.styles.js +5 -5
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +3 -8
- package/lib/components/table/table_row.styles.js +8 -10
- package/lib/components/tabs/tab.styles.js +2 -2
- 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/text_diff/text_diff.styles.js +1 -1
- package/lib/components/toast/toast.styles.js +2 -2
- package/lib/components/token/token.js +12 -4
- package/lib/components/token/token.styles.js +14 -5
- package/lib/components/token/token_map.js +244 -2
- package/lib/components/tool_tip/tool_tip.styles.js +12 -24
- 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/_shadow.js +84 -0
- package/lib/global_styling/mixins/index.js +22 -0
- package/lib/global_styling/reset/global_styles.js +2 -2
- 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 +148 -54
- package/lib/services/color/eui_palettes_hooks.js +78 -0
- package/lib/services/color/index.js +20 -0
- package/lib/services/color/vis_color_store.js +18 -0
- package/lib/services/index.js +19 -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/context.js +3 -3
- package/lib/services/theme/provider.js +15 -2
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/functions/shadows.js +7 -19
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/lib/themes/amsterdam/global_styling/variables/_components.js +623 -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 +4 -11
- package/lib/themes/themes.js +1 -23
- package/optimize/es/components/avatar/avatar.js +4 -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 +2 -3
- 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/button/button_icon/button_icon.styles.js +1 -1
- package/optimize/es/components/call_out/call_out.styles.js +4 -4
- 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 +24 -28
- 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 +4 -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/combo_box/combo_box.js +6 -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/date_picker.styles.js +1 -1
- package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
- 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 +4 -5
- 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/expression/expression.styles.js +13 -13
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +2 -3
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +8 -3
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +24 -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 +7 -8
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/image/image.styles.js +1 -1
- package/optimize/es/components/image/image_button.styles.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 +9 -7
- package/optimize/es/components/link/link.styles.js +6 -6
- 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/loading/loading_spinner.styles.js +2 -2
- 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 +2 -2
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -3
- package/optimize/es/components/pagination/pagination.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +3 -2
- 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 +7 -6
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +30 -28
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/optimize/es/components/side_nav/side_nav_item.styles.js +6 -7
- package/optimize/es/components/skeleton/utils.js +5 -7
- package/optimize/es/components/stat/stat.styles.js +5 -5
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +3 -8
- package/optimize/es/components/table/table_row.styles.js +9 -11
- package/optimize/es/components/tabs/tab.styles.js +2 -2
- 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/text_diff/text_diff.styles.js +1 -1
- package/optimize/es/components/toast/toast.styles.js +2 -2
- package/optimize/es/components/token/token.js +10 -4
- package/optimize/es/components/token/token.styles.js +14 -5
- package/optimize/es/components/token/token_map.js +243 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +13 -25
- 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/_shadow.js +31 -0
- package/optimize/es/global_styling/mixins/index.js +3 -1
- package/optimize/es/global_styling/reset/global_styles.js +3 -3
- 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 +148 -54
- package/optimize/es/services/color/eui_palettes_hooks.js +71 -0
- package/optimize/es/services/color/index.js +2 -0
- package/optimize/es/services/color/vis_color_store.js +13 -0
- package/optimize/es/services/index.js +2 -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/context.js +3 -3
- package/optimize/es/services/theme/provider.js +15 -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/functions/shadows.js +1 -10
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +611 -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 -2
- package/optimize/es/themes/themes.js +1 -21
- package/optimize/lib/components/avatar/avatar.js +2 -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 +2 -3
- 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/button/button_icon/button_icon.styles.js +1 -1
- package/optimize/lib/components/call_out/call_out.styles.js +4 -4
- 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 +24 -28
- 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 +3 -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/combo_box/combo_box.js +6 -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/date_picker.styles.js +2 -2
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +2 -2
- 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 +3 -4
- 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/expression/expression.styles.js +13 -13
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +3 -4
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +8 -3
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +23 -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 +7 -8
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
- package/optimize/lib/components/icon/svgs/color.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
- package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
- package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/optimize/lib/components/icon/svgs/function.svg +0 -0
- package/optimize/lib/components/icon/svgs/layers.svg +0 -0
- package/optimize/lib/components/icon/svgs/menu.svg +0 -0
- package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/percent.svg +0 -0
- package/optimize/lib/components/icon/svgs/push.svg +0 -0
- package/optimize/lib/components/icon/svgs/quote.svg +0 -0
- package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
- package/optimize/lib/components/icon/svgs/users.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/optimize/lib/components/image/image.styles.js +2 -2
- package/optimize/lib/components/image/image_button.styles.js +3 -3
- 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 +9 -7
- package/optimize/lib/components/link/link.styles.js +6 -6
- 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/loading/loading_spinner.styles.js +2 -2
- 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 +3 -3
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/lib/components/pagination/pagination.styles.js +2 -2
- package/optimize/lib/components/panel/panel.styles.js +4 -3
- 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 +10 -9
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +29 -27
- package/optimize/lib/components/provider/provider.js +2 -2
- package/optimize/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +6 -7
- package/optimize/lib/components/skeleton/utils.js +4 -6
- package/optimize/lib/components/stat/stat.styles.js +5 -5
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +3 -8
- package/optimize/lib/components/table/table_row.styles.js +8 -10
- package/optimize/lib/components/tabs/tab.styles.js +2 -2
- 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/text_diff/text_diff.styles.js +1 -1
- package/optimize/lib/components/toast/toast.styles.js +2 -2
- package/optimize/lib/components/token/token.js +13 -4
- package/optimize/lib/components/token/token.styles.js +14 -5
- package/optimize/lib/components/token/token_map.js +244 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +12 -24
- 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/_shadow.js +84 -0
- package/optimize/lib/global_styling/mixins/index.js +22 -0
- package/optimize/lib/global_styling/reset/global_styles.js +2 -2
- 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 +148 -54
- package/optimize/lib/services/color/eui_palettes_hooks.js +76 -0
- package/optimize/lib/services/color/index.js +20 -0
- package/optimize/lib/services/color/vis_color_store.js +18 -0
- package/optimize/lib/services/index.js +19 -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/context.js +3 -3
- package/optimize/lib/services/theme/provider.js +15 -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/functions/shadows.js +7 -19
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +616 -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 +4 -11
- package/optimize/lib/themes/themes.js +1 -23
- package/package.json +8 -4
- package/src/global_styling/functions/_colors.scss +3 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -10
- package/src/global_styling/mixins/_shadow.scss +1 -1
- package/src/global_styling/mixins/_typography.scss +2 -2
- 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/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- package/src/global_styling/variables/_index.scss +0 -1
- 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/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
- package/test-env/components/avatar/avatar.js +2 -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 +2 -3
- 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/button/button_icon/button_icon.styles.js +1 -1
- package/test-env/components/call_out/call_out.styles.js +4 -4
- 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 +24 -28
- 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 +3 -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/combo_box/combo_box.js +6 -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/date_picker.styles.js +2 -2
- package/test-env/components/date_picker/date_picker_range.styles.js +2 -2
- 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 +3 -4
- 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/expression/expression.styles.js +13 -13
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +3 -4
- package/test-env/components/flyout/flyout.styles.js +8 -3
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +23 -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 +7 -8
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/image/image.styles.js +2 -2
- package/test-env/components/image/image_button.styles.js +3 -3
- 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 +9 -7
- package/test-env/components/link/link.styles.js +6 -6
- 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/loading/loading_spinner.styles.js +2 -2
- 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 +3 -3
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
- package/test-env/components/pagination/pagination.styles.js +2 -2
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +4 -3
- 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 +10 -9
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +29 -27
- package/test-env/components/provider/provider.js +2 -2
- package/test-env/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/test-env/components/side_nav/side_nav_item.styles.js +6 -7
- package/test-env/components/skeleton/utils.js +4 -6
- package/test-env/components/stat/stat.styles.js +5 -5
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +3 -8
- package/test-env/components/table/table_row.styles.js +8 -10
- package/test-env/components/tabs/tab.styles.js +2 -2
- 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/text_diff/text_diff.styles.js +1 -1
- package/test-env/components/toast/toast.styles.js +2 -2
- package/test-env/components/token/token.js +13 -4
- package/test-env/components/token/token.styles.js +14 -5
- package/test-env/components/token/token_map.js +244 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +12 -24
- 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/_shadow.js +84 -0
- package/test-env/global_styling/mixins/index.js +22 -0
- package/test-env/global_styling/reset/global_styles.js +2 -2
- 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/breakpoint/current_breakpoint_hook.js +3 -3
- package/test-env/services/color/eui_palettes.js +148 -54
- package/test-env/services/color/eui_palettes_hooks.js +76 -0
- package/test-env/services/color/index.js +20 -0
- package/test-env/services/color/vis_color_store.js +18 -0
- package/test-env/services/index.js +19 -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/context.js +3 -3
- package/test-env/services/theme/provider.js +15 -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/functions/shadows.js +7 -19
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +616 -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 +4 -11
- package/test-env/themes/themes.js +1 -23
- package/es/global_styling/variables/_colors_vis.js +0 -61
- package/lib/global_styling/variables/_colors_vis.js +0 -67
- package/optimize/es/global_styling/variables/_colors_vis.js +0 -61
- package/optimize/lib/global_styling/variables/_colors_vis.js +0 -67
- package/test-env/global_styling/variables/_colors_vis.js +0 -67
- /package/src/{global_styling → themes/amsterdam/global_styling}/variables/_colors_vis.scss +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useMemo } from 'react';
|
|
16
|
+
import { useEuiTheme } from '../theme/hooks';
|
|
17
|
+
import { euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteGreen, euiPaletteRed, euiPaletteWarm } from './eui_palettes';
|
|
18
|
+
export var useEuiPaletteColorBlind = function useEuiPaletteColorBlind(args) {
|
|
19
|
+
return _useEuiPaletteFn(euiPaletteColorBlind, args);
|
|
20
|
+
};
|
|
21
|
+
export var useEuiPaletteColorBlindBehindText = function useEuiPaletteColorBlindBehindText(args) {
|
|
22
|
+
return _useEuiPaletteFn(euiPaletteColorBlindBehindText, args);
|
|
23
|
+
};
|
|
24
|
+
export var useEuiPaletteForStatus = function useEuiPaletteForStatus(steps) {
|
|
25
|
+
return _useEuiPaletteWithStepsFn(euiPaletteForStatus, steps);
|
|
26
|
+
};
|
|
27
|
+
export var useEuiPaletteForTemperature = function useEuiPaletteForTemperature(steps) {
|
|
28
|
+
return _useEuiPaletteWithStepsFn(euiPaletteForTemperature, steps);
|
|
29
|
+
};
|
|
30
|
+
export var useEuiPaletteComplementary = function useEuiPaletteComplementary(steps) {
|
|
31
|
+
return _useEuiPaletteWithStepsFn(euiPaletteComplementary, steps);
|
|
32
|
+
};
|
|
33
|
+
export var useEuiPaletteRed = function useEuiPaletteRed(steps) {
|
|
34
|
+
return _useEuiPaletteWithStepsFn(euiPaletteRed, steps);
|
|
35
|
+
};
|
|
36
|
+
export var useEuiPaletteGreen = function useEuiPaletteGreen(steps) {
|
|
37
|
+
return _useEuiPaletteWithStepsFn(euiPaletteGreen, steps);
|
|
38
|
+
};
|
|
39
|
+
export var useEuiPaletteCool = function useEuiPaletteCool(steps) {
|
|
40
|
+
return _useEuiPaletteWithStepsFn(euiPaletteCool, steps);
|
|
41
|
+
};
|
|
42
|
+
export var useEuiPaletteWarm = function useEuiPaletteWarm(steps) {
|
|
43
|
+
return _useEuiPaletteWithStepsFn(euiPaletteWarm, steps);
|
|
44
|
+
};
|
|
45
|
+
export var useEuiPaletteGray = function useEuiPaletteGray(steps) {
|
|
46
|
+
return _useEuiPaletteWithStepsFn(euiPaletteGray, steps);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/* Internal helper utils */
|
|
50
|
+
|
|
51
|
+
var _useEuiPaletteFn = function _useEuiPaletteFn(palleteFn, args) {
|
|
52
|
+
var _useEuiTheme = useEuiTheme(),
|
|
53
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
54
|
+
var colors = euiTheme.colors,
|
|
55
|
+
flags = euiTheme.flags;
|
|
56
|
+
return useMemo(function () {
|
|
57
|
+
return palleteFn(_objectSpread(_objectSpread({}, args), {}, {
|
|
58
|
+
colors: colors.vis,
|
|
59
|
+
hasVisColorAdjustment: flags.hasVisColorAdjustment
|
|
60
|
+
}));
|
|
61
|
+
}, [colors, flags, args, palleteFn]);
|
|
62
|
+
};
|
|
63
|
+
var _useEuiPaletteWithStepsFn = function _useEuiPaletteWithStepsFn(palleteFn, steps) {
|
|
64
|
+
var _useEuiTheme2 = useEuiTheme(),
|
|
65
|
+
euiTheme = _useEuiTheme2.euiTheme;
|
|
66
|
+
var colors = euiTheme.colors,
|
|
67
|
+
flags = euiTheme.flags;
|
|
68
|
+
return useMemo(function () {
|
|
69
|
+
return palleteFn(steps, {
|
|
70
|
+
colors: colors.vis,
|
|
71
|
+
hasVisColorAdjustment: flags.hasVisColorAdjustment
|
|
72
|
+
});
|
|
73
|
+
}, [colors, flags, steps, palleteFn]);
|
|
74
|
+
};
|
|
@@ -16,8 +16,10 @@ 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';
|
|
19
20
|
export { colorPalette } from './color_palette';
|
|
20
21
|
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplementary, euiPaletteRed, euiPaletteGreen, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
22
|
+
export * from './eui_palettes_hooks';
|
|
21
23
|
export { getSteppedGradient } from './stepped_gradient';
|
|
22
24
|
export * from './manipulation';
|
|
23
25
|
export * from './contrast';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { EuiVisColorStore } from '@elastic/eui-theme-common';
|
|
10
|
+
import { colorVis } from '@elastic/eui-theme-borealis';
|
|
11
|
+
|
|
12
|
+
// initialsetup of Vis color storage with default colors
|
|
13
|
+
export var EUI_VIS_COLOR_STORE = EuiVisColorStore.getInstance(colorVis, true);
|
package/es/services/index.js
CHANGED
|
@@ -12,7 +12,8 @@ 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, wcagContrastMin } from './color';
|
|
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, EUI_VIS_COLOR_STORE, wcagContrastMin } from './color';
|
|
16
|
+
export * from './color/eui_palettes_hooks';
|
|
16
17
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
17
18
|
export * from './console';
|
|
18
19
|
export * from './copy';
|
|
@@ -7,4 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
export { calculatePopoverPosition } from './calculate_popover_position';
|
|
10
|
-
export { findPopoverPosition, getElementZIndex } from './popover_positioning';
|
|
10
|
+
export { findPopoverPosition, getElementZIndex } from './popover_positioning';
|
|
11
|
+
|
|
12
|
+
// Not exported as public APIs
|
|
13
|
+
export { _popoverArrowStyles } from './popover_arrow.styles';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling/functions';
|
|
11
|
+
/**
|
|
12
|
+
* Arrow clipping/transform/positioning CSS shared between EuiPopover and EuiToolTip
|
|
13
|
+
*/
|
|
14
|
+
export var _popoverArrowStyles = function _popoverArrowStyles(_ref, arrowSize) {
|
|
15
|
+
var euiTheme = _ref.euiTheme;
|
|
16
|
+
var arrowOffset = mathWithUnits(arrowSize, function (x) {
|
|
17
|
+
return x / -2;
|
|
18
|
+
});
|
|
19
|
+
var arrowBorderRadius = mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
20
|
+
return x / 2;
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
_arrowStyles: "\n position: absolute;\n ".concat(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 "),
|
|
24
|
+
positions: {
|
|
25
|
+
top: /*#__PURE__*/css(logicalCSS('margin-top', arrowOffset), " transform:rotate(-45deg);;label:top;"),
|
|
26
|
+
bottom: /*#__PURE__*/css(logicalCSS('bottom', 0), " ", logicalCSS('margin-bottom', arrowOffset), " transform:rotate(135deg);;label:bottom;"),
|
|
27
|
+
left: /*#__PURE__*/css(logicalCSS('margin-left', arrowOffset), " transform:rotate(-135deg);;label:left;"),
|
|
28
|
+
right: /*#__PURE__*/css(logicalCSS('right', 0), " ", logicalCSS('margin-right', arrowOffset), " transform:rotate(45deg);;label:right;")
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -293,11 +293,9 @@ export function getPopoverScreenCoordinates(_ref2) {
|
|
|
293
293
|
position: position,
|
|
294
294
|
offset: offset,
|
|
295
295
|
popoverBoundingBox: popoverBoundingBox,
|
|
296
|
-
anchorBoundingBox: anchorBoundingBox
|
|
297
|
-
arrowConfig: arrowConfig
|
|
296
|
+
anchorBoundingBox: anchorBoundingBox
|
|
298
297
|
}),
|
|
299
|
-
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition
|
|
300
|
-
primaryAxisArrowPosition = _getPrimaryAxisPositi.primaryAxisArrowPosition;
|
|
298
|
+
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition;
|
|
301
299
|
var popoverPlacement = _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisPosition), primaryAxisPositionName, primaryAxisPosition);
|
|
302
300
|
|
|
303
301
|
// calculate the fit of the popover in this location
|
|
@@ -318,15 +316,12 @@ export function getPopoverScreenCoordinates(_ref2) {
|
|
|
318
316
|
width: popoverBoundingBox.width,
|
|
319
317
|
height: popoverBoundingBox.height
|
|
320
318
|
}, combinedBoundingBox);
|
|
321
|
-
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide]),
|
|
319
|
+
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide] - 1), position, '100%') : undefined;
|
|
322
320
|
return {
|
|
323
321
|
fit: fit,
|
|
324
322
|
top: popoverPlacement.top,
|
|
325
323
|
left: popoverPlacement.left,
|
|
326
|
-
arrow: arrow
|
|
327
|
-
left: arrow.left,
|
|
328
|
-
top: arrow.top
|
|
329
|
-
} : undefined
|
|
324
|
+
arrow: arrow
|
|
330
325
|
};
|
|
331
326
|
}
|
|
332
327
|
function getCrossAxisPosition(_ref4) {
|
|
@@ -418,8 +413,7 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
418
413
|
var position = _ref5.position,
|
|
419
414
|
offset = _ref5.offset,
|
|
420
415
|
popoverBoundingBox = _ref5.popoverBoundingBox,
|
|
421
|
-
anchorBoundingBox = _ref5.anchorBoundingBox
|
|
422
|
-
arrowConfig = _ref5.arrowConfig;
|
|
416
|
+
anchorBoundingBox = _ref5.anchorBoundingBox;
|
|
423
417
|
// if positioning to the top or left, the target position decreases
|
|
424
418
|
// from the anchor's top or left, otherwise the position adds to the anchor's
|
|
425
419
|
var isOffsetDecreasing = position === 'top' || position === 'left';
|
|
@@ -435,13 +429,8 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
435
429
|
var primaryAxisOffset = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : anchorSizeOnPrimaryAxis;
|
|
436
430
|
var contentOffset = (offset + primaryAxisOffset) * (isOffsetDecreasing ? -1 : 1);
|
|
437
431
|
var primaryAxisPosition = anchorEdgeOrigin + contentOffset;
|
|
438
|
-
var primaryAxisArrowPosition;
|
|
439
|
-
if (arrowConfig) {
|
|
440
|
-
primaryAxisArrowPosition = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : 0;
|
|
441
|
-
}
|
|
442
432
|
return {
|
|
443
|
-
primaryAxisPosition: primaryAxisPosition
|
|
444
|
-
primaryAxisArrowPosition: primaryAxisArrowPosition
|
|
433
|
+
primaryAxisPosition: primaryAxisPosition
|
|
445
434
|
};
|
|
446
435
|
}
|
|
447
436
|
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { EuiThemeBorealis } from '@elastic/eui-theme-borealis';
|
|
11
11
|
import { DEFAULT_COLOR_MODE, getComputed } from './utils';
|
|
12
|
-
export var EuiSystemContext = /*#__PURE__*/createContext(
|
|
12
|
+
export var EuiSystemContext = /*#__PURE__*/createContext(EuiThemeBorealis);
|
|
13
13
|
export var EuiModificationsContext = /*#__PURE__*/createContext({});
|
|
14
14
|
export var EuiColorModeContext = /*#__PURE__*/createContext(DEFAULT_COLOR_MODE);
|
|
15
|
-
export var defaultComputedTheme = getComputed(
|
|
15
|
+
export var defaultComputedTheme = getComputed(EuiThemeBorealis, {}, DEFAULT_COLOR_MODE);
|
|
16
16
|
export var EuiThemeContext = /*#__PURE__*/createContext(defaultComputedTheme);
|
|
17
17
|
export var EuiNestedThemeContext = /*#__PURE__*/createContext({
|
|
18
18
|
isGlobalTheme: true,
|
|
@@ -35,6 +35,7 @@ import { EuiSystemContext, EuiThemeContext, EuiNestedThemeContext, EuiModificati
|
|
|
35
35
|
import { EuiEmotionThemeProvider } from './emotion';
|
|
36
36
|
import { EuiThemeMemoizedStylesProvider } from './style_memoization';
|
|
37
37
|
import { buildTheme, getColorMode, getComputed, mergeDeep } from './utils';
|
|
38
|
+
import { EUI_VIS_COLOR_STORE } from '../color';
|
|
38
39
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
39
40
|
export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
40
41
|
var _system = _ref.theme,
|
|
@@ -74,8 +75,19 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
74
75
|
setColorMode = _useState6[1];
|
|
75
76
|
var prevColorMode = useRef(colorMode);
|
|
76
77
|
var isParentTheme = useRef(prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && isEqual(parentModifications, modifications));
|
|
78
|
+
var updateVisColorStore = useCallback(function (theme) {
|
|
79
|
+
var _theme$flags$hasVisCo, _theme$flags;
|
|
80
|
+
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);
|
|
81
|
+
}, []);
|
|
82
|
+
var getInitialTheme = function getInitialTheme() {
|
|
83
|
+
var theme = getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode);
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
updateVisColorStore(theme);
|
|
86
|
+
});
|
|
87
|
+
return theme;
|
|
88
|
+
};
|
|
77
89
|
var _useState7 = useState(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
|
|
78
|
-
:
|
|
90
|
+
: getInitialTheme()),
|
|
79
91
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
80
92
|
theme = _useState8[0],
|
|
81
93
|
setTheme = _useState8[1];
|
|
@@ -85,8 +97,9 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
85
97
|
setSystem(newSystem);
|
|
86
98
|
prevSystemKey.current = newSystem.key;
|
|
87
99
|
isParentTheme.current = false;
|
|
100
|
+
updateVisColorStore(theme);
|
|
88
101
|
}
|
|
89
|
-
}, [_system, parentSystem]);
|
|
102
|
+
}, [_system, parentSystem, theme, updateVisColorStore]);
|
|
90
103
|
useEffect(function () {
|
|
91
104
|
var newModifications = mergeDeep(parentModifications, _modifications);
|
|
92
105
|
if (!isEqual(prevModifications.current, newModifications)) {
|
|
@@ -5,9 +5,4 @@
|
|
|
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
|
-
|
|
9
|
-
export var COLOR_MODES_STANDARD = {
|
|
10
|
-
light: 'LIGHT',
|
|
11
|
-
dark: 'DARK'
|
|
12
|
-
};
|
|
13
|
-
export var COLOR_MODES_INVERSE = 'INVERSE';
|
|
8
|
+
export { COLOR_MODES_STANDARD, COLOR_MODES_INVERSE } from '@elastic/eui-theme-common';
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
1
|
/*
|
|
17
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -21,291 +6,4 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
21
6
|
* Side Public License, v 1.
|
|
22
7
|
*/
|
|
23
8
|
|
|
24
|
-
|
|
25
|
-
export var DEFAULT_COLOR_MODE = COLOR_MODES_STANDARD.light;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Returns whether the parameter is an object
|
|
29
|
-
* @param {any} obj - Anything
|
|
30
|
-
*/
|
|
31
|
-
var isObject = function isObject(obj) {
|
|
32
|
-
return obj && _typeof(obj) === 'object';
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Returns whether the provided color mode is `inverse`
|
|
37
|
-
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
38
|
-
*/
|
|
39
|
-
export var isInverseColorMode = function isInverseColorMode(colorMode) {
|
|
40
|
-
return colorMode === COLOR_MODES_INVERSE;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Returns the color mode configured in the current EuiThemeProvider.
|
|
45
|
-
* Returns the parent color mode if none is explicity set.
|
|
46
|
-
* @param {string} colorMode - `light`, `dark`, or `inverse`
|
|
47
|
-
* @param {string} parentColorMode - `LIGHT` or `DARK`; used as the fallback
|
|
48
|
-
*/
|
|
49
|
-
export var getColorMode = function getColorMode(colorMode, parentColorMode) {
|
|
50
|
-
if (colorMode == null) {
|
|
51
|
-
return parentColorMode || DEFAULT_COLOR_MODE;
|
|
52
|
-
}
|
|
53
|
-
var mode = colorMode.toUpperCase();
|
|
54
|
-
if (isInverseColorMode(mode)) {
|
|
55
|
-
return parentColorMode === COLOR_MODES_STANDARD.dark || parentColorMode === undefined ? COLOR_MODES_STANDARD.light : COLOR_MODES_STANDARD.dark;
|
|
56
|
-
} else {
|
|
57
|
-
return mode;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Returns a value at a given path on an object.
|
|
63
|
-
* If `colorMode` is provided, will scope the value to the appropriate color mode key (LIGHT\DARK)
|
|
64
|
-
* @param {object} model - Object
|
|
65
|
-
* @param {string} _path - Dot-notated string to a path on the object
|
|
66
|
-
* @param {string} colorMode - `light` or `dark`
|
|
67
|
-
*/
|
|
68
|
-
export var getOn = function getOn(model, _path, colorMode) {
|
|
69
|
-
var path = _path.split('.');
|
|
70
|
-
var node = model;
|
|
71
|
-
while (path.length) {
|
|
72
|
-
var segment = path.shift();
|
|
73
|
-
if (node.hasOwnProperty(segment) === false) {
|
|
74
|
-
if (colorMode && node.hasOwnProperty(colorMode) === true && node[colorMode].hasOwnProperty(segment) === true) {
|
|
75
|
-
if (node[colorMode][segment] instanceof Computed) {
|
|
76
|
-
node = node[colorMode][segment].getValue(null, null, node, colorMode);
|
|
77
|
-
} else {
|
|
78
|
-
node = node[colorMode][segment];
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
return undefined;
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
if (node[segment] instanceof Computed) {
|
|
85
|
-
node = node[segment].getValue(null, null, node, colorMode);
|
|
86
|
-
} else {
|
|
87
|
-
node = node[segment];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return node;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Sets a value at a given path on an object.
|
|
96
|
-
* @param {object} model - Object
|
|
97
|
-
* @param {string} _path - Dot-notated string to a path on the object
|
|
98
|
-
* @param {any} string - The value to set
|
|
99
|
-
*/
|
|
100
|
-
export var setOn = function setOn(model, _path, value) {
|
|
101
|
-
var path = _path.split('.');
|
|
102
|
-
var propertyName = path.pop();
|
|
103
|
-
var node = model;
|
|
104
|
-
while (path.length) {
|
|
105
|
-
var segment = path.shift();
|
|
106
|
-
if (node.hasOwnProperty(segment) === false) {
|
|
107
|
-
node[segment] = {};
|
|
108
|
-
}
|
|
109
|
-
node = node[segment];
|
|
110
|
-
}
|
|
111
|
-
node[propertyName] = value;
|
|
112
|
-
return true;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Creates a class to store the `computer` method and its eventual parameters.
|
|
117
|
-
* Allows for on-demand computation with up-to-date parameters via `getValue` method.
|
|
118
|
-
* @constructor
|
|
119
|
-
* @param {function} computer - Function to be computed
|
|
120
|
-
* @param {string | array} dependencies - Dependencies passed to the `computer` as parameters
|
|
121
|
-
*/
|
|
122
|
-
export var Computed = /*#__PURE__*/function () {
|
|
123
|
-
function Computed(computer) {
|
|
124
|
-
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
125
|
-
_classCallCheck(this, Computed);
|
|
126
|
-
this.computer = computer;
|
|
127
|
-
this.dependencies = dependencies;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Executes the `computer` method with the current state of the theme
|
|
132
|
-
* by taking into account previously computed values and modifications.
|
|
133
|
-
* @param {Proxy | object} base - Computed or uncomputed theme
|
|
134
|
-
* @param {Proxy | object} modifications - Theme value overrides
|
|
135
|
-
* @param {object} working - Partially computed theme
|
|
136
|
-
* @param {string} colorMode - `light` or `dark`
|
|
137
|
-
*/
|
|
138
|
-
return _createClass(Computed, [{
|
|
139
|
-
key: "getValue",
|
|
140
|
-
value: function getValue(base) {
|
|
141
|
-
var modifications = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
142
|
-
var working = arguments.length > 2 ? arguments[2] : undefined;
|
|
143
|
-
var colorMode = arguments.length > 3 ? arguments[3] : undefined;
|
|
144
|
-
if (!this.dependencies.length) {
|
|
145
|
-
return this.computer(working);
|
|
146
|
-
}
|
|
147
|
-
if (!Array.isArray(this.dependencies)) {
|
|
148
|
-
var _ref, _getOn;
|
|
149
|
-
return this.computer((_ref = (_getOn = getOn(working, this.dependencies)) !== null && _getOn !== void 0 ? _getOn : getOn(modifications, this.dependencies, colorMode)) !== null && _ref !== void 0 ? _ref : getOn(base, this.dependencies, colorMode));
|
|
150
|
-
}
|
|
151
|
-
return this.computer(this.dependencies.map(function (dependency) {
|
|
152
|
-
var _ref2, _getOn2;
|
|
153
|
-
return (_ref2 = (_getOn2 = getOn(working, dependency)) !== null && _getOn2 !== void 0 ? _getOn2 : getOn(modifications, dependency, colorMode)) !== null && _ref2 !== void 0 ? _ref2 : getOn(base, dependency, colorMode);
|
|
154
|
-
}));
|
|
155
|
-
}
|
|
156
|
-
}]);
|
|
157
|
-
}();
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Returns a Class (`Computed`) that stores the arbitrary computer method
|
|
161
|
-
* and references to its optional dependecies.
|
|
162
|
-
* @param {function} computer - Arbitrary method to be called at compute time.
|
|
163
|
-
* @param {string | array} dependencies - Values that will be provided to `computer` at compute time.
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
export function computed(comp, dep) {
|
|
167
|
-
return new Computed(comp, dep);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Takes an uncomputed theme, and computes and returns all values taking
|
|
172
|
-
* into consideration value overrides and configured color mode.
|
|
173
|
-
* Overrides take precedence, and only values in the current color mode
|
|
174
|
-
* are computed and returned.
|
|
175
|
-
* @param {Proxy} base - Object to transform into Proxy
|
|
176
|
-
* @param {Proxy | object} over - Unique identifier or name
|
|
177
|
-
* @param {string} colorMode - `light` or `dark`
|
|
178
|
-
*/
|
|
179
|
-
export var getComputed = function getComputed(base, over, colorMode) {
|
|
180
|
-
var output = {
|
|
181
|
-
themeName: base.key
|
|
182
|
-
};
|
|
183
|
-
function loop(base, over) {
|
|
184
|
-
var checkExisting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
185
|
-
var path = arguments.length > 3 ? arguments[3] : undefined;
|
|
186
|
-
Object.keys(base).forEach(function (key) {
|
|
187
|
-
var newPath = path ? "".concat(path, ".").concat(key) : "".concat(key);
|
|
188
|
-
// @ts-expect-error `key` is not necessarily a colorMode key
|
|
189
|
-
if ([].concat(_toConsumableArray(Object.values(COLOR_MODES_STANDARD)), [colorMode]).includes(key)) {
|
|
190
|
-
if (key !== colorMode) {
|
|
191
|
-
return;
|
|
192
|
-
} else {
|
|
193
|
-
var colorModeSegment = new RegExp("(\\.".concat(colorMode, "\\b)|(\\b").concat(colorMode, "\\.)"));
|
|
194
|
-
newPath = newPath.replace(colorModeSegment, '');
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
var existing = checkExisting && getOn(output, newPath);
|
|
198
|
-
if (!existing || isObject(existing)) {
|
|
199
|
-
var baseValue = base[key] instanceof Computed ? base[key].getValue(base.root, over.root, output, colorMode) : base[key];
|
|
200
|
-
var overValue = over[key] instanceof Computed ? over[key].getValue(base.root, over.root, output, colorMode) : over[key];
|
|
201
|
-
if (isObject(baseValue) && !Array.isArray(baseValue)) {
|
|
202
|
-
loop(baseValue, overValue !== null && overValue !== void 0 ? overValue : {}, checkExisting, newPath);
|
|
203
|
-
} else {
|
|
204
|
-
setOn(output, newPath, overValue !== null && overValue !== void 0 ? overValue : baseValue);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
// Compute standard theme values and apply overrides
|
|
210
|
-
loop(base, over);
|
|
211
|
-
// Compute and apply extension values only
|
|
212
|
-
loop(over, {}, true);
|
|
213
|
-
return output;
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Builds a Proxy with a custom `handler` designed to self-reference values
|
|
218
|
-
* and prevent arbitrary value overrides.
|
|
219
|
-
* @param {object} model - Object to transform into Proxy
|
|
220
|
-
* @param {string} key - Unique identifier or name
|
|
221
|
-
*/
|
|
222
|
-
export var buildTheme = function buildTheme(model, key) {
|
|
223
|
-
var handler = {
|
|
224
|
-
getPrototypeOf: function getPrototypeOf(target) {
|
|
225
|
-
return Reflect.getPrototypeOf(target.model);
|
|
226
|
-
},
|
|
227
|
-
setPrototypeOf: function setPrototypeOf(target, prototype) {
|
|
228
|
-
return Reflect.setPrototypeOf(target.model, prototype);
|
|
229
|
-
},
|
|
230
|
-
isExtensible: function isExtensible(target) {
|
|
231
|
-
return Reflect.isExtensible(target);
|
|
232
|
-
},
|
|
233
|
-
preventExtensions: function preventExtensions(target) {
|
|
234
|
-
return Reflect.preventExtensions(target.model);
|
|
235
|
-
},
|
|
236
|
-
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, key) {
|
|
237
|
-
return Reflect.getOwnPropertyDescriptor(target.model, key);
|
|
238
|
-
},
|
|
239
|
-
defineProperty: function defineProperty(target, property, attributes) {
|
|
240
|
-
return Reflect.defineProperty(target.model, property, attributes);
|
|
241
|
-
},
|
|
242
|
-
has: function has(target, property) {
|
|
243
|
-
return Reflect.has(target.model, property);
|
|
244
|
-
},
|
|
245
|
-
get: function get(_target, property) {
|
|
246
|
-
if (property === 'key') {
|
|
247
|
-
return _target[property];
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// prevent Safari from locking up when the proxy is used in dev tools
|
|
251
|
-
// as it doesn't support getPrototypeOf
|
|
252
|
-
if (property === '__proto__') return {};
|
|
253
|
-
var target = property === 'root' ? _target : _target.model || _target;
|
|
254
|
-
// @ts-ignore `string` index signature
|
|
255
|
-
var value = target[property];
|
|
256
|
-
if (isObject(value) && !Array.isArray(value)) {
|
|
257
|
-
return new Proxy({
|
|
258
|
-
model: value,
|
|
259
|
-
root: _target.root,
|
|
260
|
-
key: "_".concat(_target.key)
|
|
261
|
-
}, handler);
|
|
262
|
-
} else {
|
|
263
|
-
return value;
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
set: function set(target) {
|
|
267
|
-
return target;
|
|
268
|
-
},
|
|
269
|
-
deleteProperty: function deleteProperty(target) {
|
|
270
|
-
return target;
|
|
271
|
-
},
|
|
272
|
-
ownKeys: function ownKeys(target) {
|
|
273
|
-
return Reflect.ownKeys(target.model);
|
|
274
|
-
},
|
|
275
|
-
apply: function apply(target) {
|
|
276
|
-
return target;
|
|
277
|
-
},
|
|
278
|
-
construct: function construct(target) {
|
|
279
|
-
return target;
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
var themeProxy = new Proxy({
|
|
283
|
-
model: model,
|
|
284
|
-
root: model,
|
|
285
|
-
key: key
|
|
286
|
-
}, handler);
|
|
287
|
-
return themeProxy;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Deeply merges two objects, using `source` values whenever possible.
|
|
292
|
-
* @param {object} _target - Object with fallback values
|
|
293
|
-
* @param {object} source - Object with desired values
|
|
294
|
-
*/
|
|
295
|
-
export var mergeDeep = function mergeDeep(_target) {
|
|
296
|
-
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
297
|
-
var target = _objectSpread({}, _target);
|
|
298
|
-
if (!isObject(target) || !isObject(source)) {
|
|
299
|
-
return source;
|
|
300
|
-
}
|
|
301
|
-
Object.keys(source).forEach(function (key) {
|
|
302
|
-
var targetValue = target[key];
|
|
303
|
-
var sourceValue = source[key];
|
|
304
|
-
if (isObject(targetValue) && isObject(sourceValue)) {
|
|
305
|
-
target[key] = mergeDeep(_objectSpread({}, targetValue), _objectSpread({}, sourceValue));
|
|
306
|
-
} else {
|
|
307
|
-
target[key] = sourceValue;
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
return target;
|
|
311
|
-
};
|
|
9
|
+
export { DEFAULT_COLOR_MODE, isInverseColorMode, getColorMode, getOn, setOn, Computed, computed, getComputed, buildTheme, mergeDeep } from '@elastic/eui-theme-common';
|
|
@@ -6,13 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import { COLOR_MODES_STANDARD } from '../../../../services/theme/types';
|
|
11
|
-
|
|
12
|
-
// Create a CSS color value using whose opacity is determined based
|
|
13
|
-
// on either a light or dark theme. We use a multiplier
|
|
14
|
-
// of 1 for light themes and 2.5 for dark themes
|
|
15
|
-
export var getShadowColor = function getShadowColor(color, opacity, colorMode) {
|
|
16
|
-
var themeOpacity = colorMode === COLOR_MODES_STANDARD.dark ? opacity * 3.5 : opacity * 1;
|
|
17
|
-
return chroma(color).alpha(themeOpacity).css();
|
|
18
|
-
};
|
|
9
|
+
export { getShadowColor } from '@elastic/eui-theme-common';
|