@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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiPaletteWarm = exports.euiPaletteRed = exports.euiPaletteGreen = exports.euiPaletteGray = exports.euiPaletteForTemperature = exports.euiPaletteForStatus = exports.euiPaletteForLightBackground = exports.euiPaletteForDarkBackground = exports.euiPaletteCool = exports.euiPaletteComplementary = exports.euiPaletteColorBlindBehindText = exports.euiPaletteColorBlind = void 0;
|
|
7
7
|
var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
|
8
8
|
var _color_palette = require("./color_palette");
|
|
9
|
+
var _vis_color_store = require("./vis_color_store");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
12
|
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."); }
|
|
@@ -34,6 +35,14 @@ var euiPalette = function euiPalette(colors, steps) {
|
|
|
34
35
|
}
|
|
35
36
|
return (0, _color_palette.colorPalette)(colors, steps, diverge, categorical);
|
|
36
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* NOTE: These functions rely on base vis colors of the theme which are provided via a global
|
|
40
|
+
* singleton instance `EUI_VIS_COLOR_STORE` that's updated by the EuiProvider on theme change.
|
|
41
|
+
* Make sure the function is recalled on theme change to retrieve theme-related colors.
|
|
42
|
+
*
|
|
43
|
+
* Outside of a react component you can use the `subscibe()` method on the `EUI_VIS_COLOR_STORE`
|
|
44
|
+
* to subscribe to updates and update your usages to ensure latest colors are loaded.
|
|
45
|
+
*/
|
|
37
46
|
var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
38
47
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
39
48
|
_ref2$rotations = _ref2.rotations,
|
|
@@ -45,28 +54,11 @@ var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteCol
|
|
|
45
54
|
_ref2$sortBy = _ref2.sortBy,
|
|
46
55
|
sortBy = _ref2$sortBy === void 0 ? 'default' : _ref2$sortBy,
|
|
47
56
|
_ref2$sortShift = _ref2.sortShift,
|
|
48
|
-
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// 1 blue
|
|
54
|
-
'#D36086',
|
|
55
|
-
// 2 dark pink
|
|
56
|
-
'#9170B8',
|
|
57
|
-
// 3 purple
|
|
58
|
-
'#CA8EAE',
|
|
59
|
-
// 4 light pink
|
|
60
|
-
'#D6BF57',
|
|
61
|
-
// 5 yellow
|
|
62
|
-
'#B9A888',
|
|
63
|
-
// 6 tan
|
|
64
|
-
'#DA8B45',
|
|
65
|
-
// 7 orange
|
|
66
|
-
'#AA6556',
|
|
67
|
-
// 8 brown
|
|
68
|
-
'#E7664C' // 9 red
|
|
69
|
-
];
|
|
57
|
+
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift,
|
|
58
|
+
colors = _ref2.colors;
|
|
59
|
+
var _colors = [];
|
|
60
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
61
|
+
var base = [visColors.euiColorVis0, visColors.euiColorVis1, visColors.euiColorVis2, visColors.euiColorVis3, visColors.euiColorVis4, visColors.euiColorVis5, visColors.euiColorVis6, visColors.euiColorVis7, visColors.euiColorVis8, visColors.euiColorVis9];
|
|
70
62
|
if (sortBy === 'natural') {
|
|
71
63
|
// Sort the colors based on the color wheel, but shifting the values based on sortShift
|
|
72
64
|
base = _toConsumableArray(base).sort(function (a, b) {
|
|
@@ -90,100 +82,202 @@ var euiPaletteColorBlind = exports.euiPaletteColorBlind = function euiPaletteCol
|
|
|
90
82
|
}
|
|
91
83
|
});
|
|
92
84
|
if (order === 'group') {
|
|
93
|
-
|
|
85
|
+
_colors = flatten(palettes);
|
|
94
86
|
} else {
|
|
95
87
|
var _loop = function _loop(i) {
|
|
96
|
-
var
|
|
88
|
+
var _colors2;
|
|
97
89
|
var rotation = palettes.map(function (palette) {
|
|
98
90
|
return palette[i];
|
|
99
91
|
});
|
|
100
|
-
(
|
|
92
|
+
(_colors2 = _colors).push.apply(_colors2, _toConsumableArray(rotation));
|
|
101
93
|
};
|
|
102
94
|
for (var i = 0; i < rotations; i++) {
|
|
103
95
|
_loop(i);
|
|
104
96
|
}
|
|
105
97
|
}
|
|
106
98
|
} else {
|
|
107
|
-
|
|
99
|
+
_colors = base;
|
|
108
100
|
}
|
|
109
|
-
return
|
|
101
|
+
return _colors;
|
|
110
102
|
};
|
|
111
103
|
|
|
112
104
|
/**
|
|
113
105
|
* Color blind palette with text is meant for use when text is applied on top of the color.
|
|
114
106
|
* It increases the brightness of the color to give the text more contrast.
|
|
107
|
+
*
|
|
108
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
109
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
115
110
|
*/
|
|
116
111
|
var euiPaletteColorBlindBehindText = exports.euiPaletteColorBlindBehindText = function euiPaletteColorBlindBehindText() {
|
|
117
112
|
var paletteProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
|
+
var hasVisColorAdjustment = paletteProps.hasVisColorAdjustment;
|
|
114
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
118
115
|
var originalPalette = euiPaletteColorBlind(paletteProps);
|
|
116
|
+
|
|
117
|
+
// new theme palette has required contrast, we don't need to adjust them
|
|
118
|
+
if (!_hasVisColorAdjustment) return originalPalette;
|
|
119
119
|
var newPalette = originalPalette.map(function (color) {
|
|
120
120
|
return (0, _chromaJs.default)(color).brighten(0.5).hex();
|
|
121
121
|
});
|
|
122
122
|
return newPalette;
|
|
123
123
|
};
|
|
124
|
+
var _getVisColorsAsText = function _getVisColorsAsText(visColors, keys) {
|
|
125
|
+
return keys.reduce(function (colors, curr) {
|
|
126
|
+
return [].concat(_toConsumableArray(colors), [visColors[curr]]);
|
|
127
|
+
}, []);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
132
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
133
|
+
*/
|
|
124
134
|
var euiPaletteForLightBackground = exports.euiPaletteForLightBackground = function euiPaletteForLightBackground() {
|
|
125
|
-
|
|
135
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
136
|
+
colors = _ref3.colors;
|
|
137
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
138
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
139
|
+
return color.includes('AsTextLight');
|
|
140
|
+
});
|
|
141
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
126
142
|
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
146
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
147
|
+
*/
|
|
127
148
|
var euiPaletteForDarkBackground = exports.euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
128
|
-
|
|
149
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
150
|
+
colors = _ref4.colors;
|
|
151
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
152
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
153
|
+
return color.includes('AsTextDark');
|
|
154
|
+
});
|
|
155
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
129
156
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
160
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
161
|
+
*/
|
|
135
162
|
var euiPaletteForStatus = exports.euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
163
|
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
164
|
+
colors = _ref5.colors;
|
|
165
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
136
166
|
if (steps === 1) {
|
|
137
|
-
return [
|
|
167
|
+
return [visColors.euiColorVisSuccess0];
|
|
138
168
|
}
|
|
139
169
|
if (steps <= 3) {
|
|
140
|
-
return euiPalette([
|
|
170
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisWarning0, visColors.euiColorVisDanger0], steps, true);
|
|
141
171
|
}
|
|
142
|
-
return euiPalette([
|
|
172
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisSuccess1, visColors.euiColorVisWarning0, visColors.euiColorVisDanger1, visColors.euiColorVisDanger0], steps, true);
|
|
143
173
|
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
177
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
178
|
+
*/
|
|
144
179
|
var euiPaletteForTemperature = exports.euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
145
|
-
var
|
|
146
|
-
|
|
180
|
+
var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
181
|
+
colors = _ref6.colors,
|
|
182
|
+
hasVisColorAdjustment = _ref6.hasVisColorAdjustment;
|
|
183
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
184
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
147
185
|
if (steps === 1) {
|
|
148
|
-
return [
|
|
186
|
+
return [visColors.euiColorVisCool2];
|
|
149
187
|
} else if (steps <= 3) {
|
|
150
|
-
return euiPalette([
|
|
188
|
+
return euiPalette([visColors.euiColorVisCool2, visColors.euiColorVisWarm2], steps, true);
|
|
151
189
|
}
|
|
152
|
-
|
|
190
|
+
var cools = (0, _color_palette.colorPalette)([visColors.euiColorVisCool2, visColors.euiColorVisCool1, visColors.euiColorVisCool0], 3);
|
|
191
|
+
var warms = (0, _color_palette.colorPalette)([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], 3);
|
|
192
|
+
var paletteColors = _hasVisColorAdjustment ? [].concat(_toConsumableArray(cools), _toConsumableArray(warms)) : [].concat(_toConsumableArray(cools), [visColors.euiColorVisNeutral0], _toConsumableArray(warms));
|
|
193
|
+
return euiPalette(paletteColors, steps, true);
|
|
153
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
|
+
*/
|
|
154
200
|
var euiPaletteComplementary = exports.euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
201
|
+
var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
202
|
+
colors = _ref7.colors,
|
|
203
|
+
hasVisColorAdjustment = _ref7.hasVisColorAdjustment;
|
|
204
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
205
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
155
206
|
if (steps === 1) {
|
|
156
|
-
return [
|
|
207
|
+
return [visColors.euiColorVisComplementary0];
|
|
157
208
|
}
|
|
158
|
-
|
|
209
|
+
var paletteColors = _hasVisColorAdjustment ? [visColors.euiColorVisComplementary0, visColors.euiColorVisComplementary1] : [visColors.euiColorVisComplementary0, visColors.euiColorVisNeutral0, visColors.euiColorVisComplementary1];
|
|
210
|
+
return euiPalette(paletteColors, steps, true);
|
|
159
211
|
};
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
215
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
216
|
+
*/
|
|
160
217
|
var euiPaletteRed = exports.euiPaletteRed = function euiPaletteRed(steps) {
|
|
218
|
+
var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
219
|
+
colors = _ref8.colors;
|
|
220
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
161
221
|
if (steps === 1) {
|
|
162
|
-
return [
|
|
222
|
+
return [visColors.euiColorVisDanger1];
|
|
163
223
|
}
|
|
164
|
-
return euiPalette([
|
|
224
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisDanger0], steps);
|
|
165
225
|
};
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
229
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
230
|
+
*/
|
|
166
231
|
var euiPaletteGreen = exports.euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
232
|
+
var _ref9 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
233
|
+
colors = _ref9.colors;
|
|
234
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
167
235
|
if (steps === 1) {
|
|
168
|
-
return [
|
|
236
|
+
return [visColors.euiColorVisSuccess1];
|
|
169
237
|
}
|
|
170
|
-
return euiPalette([
|
|
238
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisSuccess0], steps);
|
|
171
239
|
};
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
243
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
244
|
+
*/
|
|
172
245
|
var euiPaletteCool = exports.euiPaletteCool = function euiPaletteCool(steps) {
|
|
246
|
+
var _ref10 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
247
|
+
colors = _ref10.colors,
|
|
248
|
+
hasVisColorAdjustment = _ref10.hasVisColorAdjustment;
|
|
249
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
250
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : _vis_color_store.EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
173
251
|
if (steps === 1) {
|
|
174
|
-
return [
|
|
252
|
+
return [visColors.euiColorVisCool1];
|
|
175
253
|
}
|
|
176
|
-
return euiPalette([
|
|
254
|
+
return euiPalette([_hasVisColorAdjustment ? visColors.euiColorVisNeutral0 : visColors.euiColorVisCool0, visColors.euiColorVisCool1, visColors.euiColorVisCool2], steps);
|
|
177
255
|
};
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
259
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
260
|
+
*/
|
|
178
261
|
var euiPaletteWarm = exports.euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
262
|
+
var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
263
|
+
colors = _ref11.colors;
|
|
264
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
179
265
|
if (steps === 1) {
|
|
180
|
-
return [
|
|
266
|
+
return [visColors.euiColorVisWarm2];
|
|
181
267
|
}
|
|
182
|
-
return euiPalette([
|
|
268
|
+
return euiPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], steps);
|
|
183
269
|
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
273
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
274
|
+
*/
|
|
184
275
|
var euiPaletteGray = exports.euiPaletteGray = function euiPaletteGray(steps) {
|
|
276
|
+
var _ref12 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
277
|
+
colors = _ref12.colors;
|
|
278
|
+
var visColors = colors !== null && colors !== void 0 ? colors : _vis_color_store.EUI_VIS_COLOR_STORE.visColors;
|
|
185
279
|
if (steps === 1) {
|
|
186
|
-
return [
|
|
280
|
+
return [visColors.euiColorVisGrey1];
|
|
187
281
|
}
|
|
188
|
-
return euiPalette([
|
|
282
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisGrey0, visColors.euiColorVisGrey1, visColors.euiColorVisGrey2, visColors.euiColorVisGrey3], steps, false);
|
|
189
283
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useEuiPaletteWarm = exports.useEuiPaletteRed = exports.useEuiPaletteGreen = exports.useEuiPaletteGray = exports.useEuiPaletteForTemperature = exports.useEuiPaletteForStatus = exports.useEuiPaletteCool = exports.useEuiPaletteComplementary = exports.useEuiPaletteColorBlindBehindText = exports.useEuiPaletteColorBlind = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _hooks = require("../theme/hooks");
|
|
9
|
+
var _eui_palettes = require("./eui_palettes");
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /*
|
|
16
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
18
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
19
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
|
+
* Side Public License, v 1.
|
|
21
|
+
*/
|
|
22
|
+
var useEuiPaletteColorBlind = exports.useEuiPaletteColorBlind = function useEuiPaletteColorBlind(args) {
|
|
23
|
+
return _useEuiPaletteFn(_eui_palettes.euiPaletteColorBlind, args);
|
|
24
|
+
};
|
|
25
|
+
var useEuiPaletteColorBlindBehindText = exports.useEuiPaletteColorBlindBehindText = function useEuiPaletteColorBlindBehindText(args) {
|
|
26
|
+
return _useEuiPaletteFn(_eui_palettes.euiPaletteColorBlindBehindText, args);
|
|
27
|
+
};
|
|
28
|
+
var useEuiPaletteForStatus = exports.useEuiPaletteForStatus = function useEuiPaletteForStatus(steps) {
|
|
29
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteForStatus, steps);
|
|
30
|
+
};
|
|
31
|
+
var useEuiPaletteForTemperature = exports.useEuiPaletteForTemperature = function useEuiPaletteForTemperature(steps) {
|
|
32
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteForTemperature, steps);
|
|
33
|
+
};
|
|
34
|
+
var useEuiPaletteComplementary = exports.useEuiPaletteComplementary = function useEuiPaletteComplementary(steps) {
|
|
35
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteComplementary, steps);
|
|
36
|
+
};
|
|
37
|
+
var useEuiPaletteRed = exports.useEuiPaletteRed = function useEuiPaletteRed(steps) {
|
|
38
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteRed, steps);
|
|
39
|
+
};
|
|
40
|
+
var useEuiPaletteGreen = exports.useEuiPaletteGreen = function useEuiPaletteGreen(steps) {
|
|
41
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteGreen, steps);
|
|
42
|
+
};
|
|
43
|
+
var useEuiPaletteCool = exports.useEuiPaletteCool = function useEuiPaletteCool(steps) {
|
|
44
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteCool, steps);
|
|
45
|
+
};
|
|
46
|
+
var useEuiPaletteWarm = exports.useEuiPaletteWarm = function useEuiPaletteWarm(steps) {
|
|
47
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteWarm, steps);
|
|
48
|
+
};
|
|
49
|
+
var useEuiPaletteGray = exports.useEuiPaletteGray = function useEuiPaletteGray(steps) {
|
|
50
|
+
return _useEuiPaletteWithStepsFn(_eui_palettes.euiPaletteGray, steps);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/* Internal helper utils */
|
|
54
|
+
|
|
55
|
+
var _useEuiPaletteFn = function _useEuiPaletteFn(palleteFn, args) {
|
|
56
|
+
var _useEuiTheme = (0, _hooks.useEuiTheme)(),
|
|
57
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
58
|
+
var colors = euiTheme.colors,
|
|
59
|
+
flags = euiTheme.flags;
|
|
60
|
+
return (0, _react.useMemo)(function () {
|
|
61
|
+
return palleteFn(_objectSpread(_objectSpread({}, args), {}, {
|
|
62
|
+
colors: colors.vis,
|
|
63
|
+
hasVisColorAdjustment: flags.hasVisColorAdjustment
|
|
64
|
+
}));
|
|
65
|
+
}, [colors, flags, args, palleteFn]);
|
|
66
|
+
};
|
|
67
|
+
var _useEuiPaletteWithStepsFn = function _useEuiPaletteWithStepsFn(palleteFn, steps) {
|
|
68
|
+
var _useEuiTheme2 = (0, _hooks.useEuiTheme)(),
|
|
69
|
+
euiTheme = _useEuiTheme2.euiTheme;
|
|
70
|
+
var colors = euiTheme.colors,
|
|
71
|
+
flags = euiTheme.flags;
|
|
72
|
+
return (0, _react.useMemo)(function () {
|
|
73
|
+
return palleteFn(steps, {
|
|
74
|
+
colors: colors.vis,
|
|
75
|
+
hasVisColorAdjustment: flags.hasVisColorAdjustment
|
|
76
|
+
});
|
|
77
|
+
}, [colors, flags, steps, palleteFn]);
|
|
78
|
+
};
|
|
@@ -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,8 +204,21 @@ 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");
|
|
210
|
+
var _eui_palettes_hooks = require("./eui_palettes_hooks");
|
|
211
|
+
Object.keys(_eui_palettes_hooks).forEach(function (key) {
|
|
212
|
+
if (key === "default" || key === "__esModule") return;
|
|
213
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
214
|
+
if (key in exports && exports[key] === _eui_palettes_hooks[key]) return;
|
|
215
|
+
Object.defineProperty(exports, key, {
|
|
216
|
+
enumerable: true,
|
|
217
|
+
get: function get() {
|
|
218
|
+
return _eui_palettes_hooks[key];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
});
|
|
202
222
|
var _stepped_gradient = require("./stepped_gradient");
|
|
203
223
|
var _manipulation = require("./manipulation");
|
|
204
224
|
Object.keys(_manipulation).forEach(function (key) {
|
|
@@ -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 _euiThemeBorealis = require("@elastic/eui-theme-borealis");
|
|
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(_euiThemeBorealis.colorVis, true);
|
package/lib/services/index.js
CHANGED
|
@@ -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() {
|
|
@@ -568,6 +575,18 @@ var _alignment = require("./alignment");
|
|
|
568
575
|
var _breakpoint = require("./breakpoint");
|
|
569
576
|
var _canvas = require("./canvas");
|
|
570
577
|
var _color = require("./color");
|
|
578
|
+
var _eui_palettes_hooks = require("./color/eui_palettes_hooks");
|
|
579
|
+
Object.keys(_eui_palettes_hooks).forEach(function (key) {
|
|
580
|
+
if (key === "default" || key === "__esModule") return;
|
|
581
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
582
|
+
if (key in exports && exports[key] === _eui_palettes_hooks[key]) return;
|
|
583
|
+
Object.defineProperty(exports, key, {
|
|
584
|
+
enumerable: true,
|
|
585
|
+
get: function get() {
|
|
586
|
+
return _eui_palettes_hooks[key];
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
});
|
|
571
590
|
var _color_picker = require("./color_picker");
|
|
572
591
|
var _console = require("./console");
|
|
573
592
|
Object.keys(_console).forEach(function (key) {
|
|
@@ -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
|
+
};
|
|
@@ -306,11 +306,9 @@ function getPopoverScreenCoordinates(_ref2) {
|
|
|
306
306
|
position: position,
|
|
307
307
|
offset: offset,
|
|
308
308
|
popoverBoundingBox: popoverBoundingBox,
|
|
309
|
-
anchorBoundingBox: anchorBoundingBox
|
|
310
|
-
arrowConfig: arrowConfig
|
|
309
|
+
anchorBoundingBox: anchorBoundingBox
|
|
311
310
|
}),
|
|
312
|
-
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition
|
|
313
|
-
primaryAxisArrowPosition = _getPrimaryAxisPositi.primaryAxisArrowPosition;
|
|
311
|
+
primaryAxisPosition = _getPrimaryAxisPositi.primaryAxisPosition;
|
|
314
312
|
var popoverPlacement = _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisPosition), primaryAxisPositionName, primaryAxisPosition);
|
|
315
313
|
|
|
316
314
|
// calculate the fit of the popover in this location
|
|
@@ -331,15 +329,12 @@ function getPopoverScreenCoordinates(_ref2) {
|
|
|
331
329
|
width: popoverBoundingBox.width,
|
|
332
330
|
height: popoverBoundingBox.height
|
|
333
331
|
}, combinedBoundingBox);
|
|
334
|
-
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide]),
|
|
332
|
+
var arrow = arrowConfig ? _defineProperty(_defineProperty({}, crossAxisFirstSide, crossAxisArrowPosition - popoverPlacement[crossAxisFirstSide] - 1), position, '100%') : undefined;
|
|
335
333
|
return {
|
|
336
334
|
fit: fit,
|
|
337
335
|
top: popoverPlacement.top,
|
|
338
336
|
left: popoverPlacement.left,
|
|
339
|
-
arrow: arrow
|
|
340
|
-
left: arrow.left,
|
|
341
|
-
top: arrow.top
|
|
342
|
-
} : undefined
|
|
337
|
+
arrow: arrow
|
|
343
338
|
};
|
|
344
339
|
}
|
|
345
340
|
function getCrossAxisPosition(_ref4) {
|
|
@@ -431,8 +426,7 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
431
426
|
var position = _ref5.position,
|
|
432
427
|
offset = _ref5.offset,
|
|
433
428
|
popoverBoundingBox = _ref5.popoverBoundingBox,
|
|
434
|
-
anchorBoundingBox = _ref5.anchorBoundingBox
|
|
435
|
-
arrowConfig = _ref5.arrowConfig;
|
|
429
|
+
anchorBoundingBox = _ref5.anchorBoundingBox;
|
|
436
430
|
// if positioning to the top or left, the target position decreases
|
|
437
431
|
// from the anchor's top or left, otherwise the position adds to the anchor's
|
|
438
432
|
var isOffsetDecreasing = position === 'top' || position === 'left';
|
|
@@ -448,13 +442,8 @@ function getPrimaryAxisPosition(_ref5) {
|
|
|
448
442
|
var primaryAxisOffset = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : anchorSizeOnPrimaryAxis;
|
|
449
443
|
var contentOffset = (offset + primaryAxisOffset) * (isOffsetDecreasing ? -1 : 1);
|
|
450
444
|
var primaryAxisPosition = anchorEdgeOrigin + contentOffset;
|
|
451
|
-
var primaryAxisArrowPosition;
|
|
452
|
-
if (arrowConfig) {
|
|
453
|
-
primaryAxisArrowPosition = isOffsetDecreasing ? popoverSizeOnPrimaryAxis : 0;
|
|
454
|
-
}
|
|
455
445
|
return {
|
|
456
|
-
primaryAxisPosition: primaryAxisPosition
|
|
457
|
-
primaryAxisArrowPosition: primaryAxisArrowPosition
|
|
446
|
+
primaryAxisPosition: primaryAxisPosition
|
|
458
447
|
};
|
|
459
448
|
}
|
|
460
449
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultComputedTheme = exports.EuiThemeContext = exports.EuiSystemContext = exports.EuiNestedThemeContext = exports.EuiModificationsContext = exports.EuiColorModeContext = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _euiThemeBorealis = require("@elastic/eui-theme-borealis");
|
|
9
9
|
var _utils = require("./utils");
|
|
10
10
|
/*
|
|
11
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -15,10 +15,10 @@ var _utils = require("./utils");
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
var EuiSystemContext = exports.EuiSystemContext = /*#__PURE__*/(0, _react.createContext)(
|
|
18
|
+
var EuiSystemContext = exports.EuiSystemContext = /*#__PURE__*/(0, _react.createContext)(_euiThemeBorealis.EuiThemeBorealis);
|
|
19
19
|
var EuiModificationsContext = exports.EuiModificationsContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
20
20
|
var EuiColorModeContext = exports.EuiColorModeContext = /*#__PURE__*/(0, _react.createContext)(_utils.DEFAULT_COLOR_MODE);
|
|
21
|
-
var defaultComputedTheme = exports.defaultComputedTheme = (0, _utils.getComputed)(
|
|
21
|
+
var defaultComputedTheme = exports.defaultComputedTheme = (0, _utils.getComputed)(_euiThemeBorealis.EuiThemeBorealis, {}, _utils.DEFAULT_COLOR_MODE);
|
|
22
22
|
var EuiThemeContext = exports.EuiThemeContext = /*#__PURE__*/(0, _react.createContext)(defaultComputedTheme);
|
|
23
23
|
var EuiNestedThemeContext = exports.EuiNestedThemeContext = /*#__PURE__*/(0, _react.createContext)({
|
|
24
24
|
isGlobalTheme: true,
|
|
@@ -15,6 +15,7 @@ var _context = require("./context");
|
|
|
15
15
|
var _emotion2 = require("./emotion");
|
|
16
16
|
var _style_memoization = require("./style_memoization");
|
|
17
17
|
var _utils = require("./utils");
|
|
18
|
+
var _color = require("../color");
|
|
18
19
|
var _excluded = ["cloneElement", "className"];
|
|
19
20
|
var _templateObject;
|
|
20
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -79,8 +80,19 @@ var EuiThemeProvider = exports.EuiThemeProvider = function EuiThemeProvider(_ref
|
|
|
79
80
|
setColorMode = _useState6[1];
|
|
80
81
|
var prevColorMode = (0, _react2.useRef)(colorMode);
|
|
81
82
|
var isParentTheme = (0, _react2.useRef)(prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && (0, _isEqual.default)(parentModifications, modifications));
|
|
83
|
+
var updateVisColorStore = (0, _react2.useCallback)(function (theme) {
|
|
84
|
+
var _theme$flags$hasVisCo, _theme$flags;
|
|
85
|
+
_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);
|
|
86
|
+
}, []);
|
|
87
|
+
var getInitialTheme = function getInitialTheme() {
|
|
88
|
+
var theme = (0, _utils.getComputed)(system, (0, _utils.buildTheme)(modifications, "_".concat(system.key)), colorMode);
|
|
89
|
+
setTimeout(function () {
|
|
90
|
+
updateVisColorStore(theme);
|
|
91
|
+
});
|
|
92
|
+
return theme;
|
|
93
|
+
};
|
|
82
94
|
var _useState7 = (0, _react2.useState)(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
|
|
83
|
-
: (
|
|
95
|
+
: getInitialTheme()),
|
|
84
96
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
85
97
|
theme = _useState8[0],
|
|
86
98
|
setTheme = _useState8[1];
|
|
@@ -90,8 +102,9 @@ var EuiThemeProvider = exports.EuiThemeProvider = function EuiThemeProvider(_ref
|
|
|
90
102
|
setSystem(newSystem);
|
|
91
103
|
prevSystemKey.current = newSystem.key;
|
|
92
104
|
isParentTheme.current = false;
|
|
105
|
+
updateVisColorStore(theme);
|
|
93
106
|
}
|
|
94
|
-
}, [_system, parentSystem]);
|
|
107
|
+
}, [_system, parentSystem, theme, updateVisColorStore]);
|
|
95
108
|
(0, _react2.useEffect)(function () {
|
|
96
109
|
var newModifications = (0, _utils.mergeDeep)(parentModifications, _modifications);
|
|
97
110
|
if (!(0, _isEqual.default)(prevModifications.current, newModifications)) {
|