@elastic/eui 98.2.0 → 98.2.1-borealis.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{eui_theme_dark.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +1 -1
- package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_light.json.d.ts} +1 -1
- package/dist/eui_theme_borealis_dark.json +314 -0
- package/dist/eui_theme_borealis_dark.json.d.ts +317 -0
- package/dist/eui_theme_borealis_light.json +314 -0
- package/dist/eui_theme_borealis_light.json.d.ts +317 -0
- package/es/components/avatar/avatar.js +10 -4
- package/es/components/badge/badge.styles.js +1 -2
- package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/es/components/badge/color_utils.js +9 -8
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +6 -3
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- package/es/components/code/code_syntax.styles.js +23 -27
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/es/components/color_picker/color_picker.js +9 -3
- package/es/components/color_picker/color_picker.styles.js +1 -2
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/comment_list/comment.js +1 -1
- package/es/components/comment_list/comment_event.js +5 -4
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +0 -28
- package/es/components/datagrid/data_grid.styles.js +6 -7
- package/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +7 -2
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +28 -32
- package/es/components/form/range/range_tooltip.styles.js +11 -13
- package/es/components/form/switch/switch.js +3 -7
- package/es/components/form/switch/switch.styles.js +16 -19
- package/es/components/header/header.styles.js +6 -7
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/es/components/list_group/list_group_item.styles.js +9 -11
- package/es/components/loading/loading_chart.styles.js +18 -5
- package/es/components/mark/mark.styles.js +2 -9
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.styles.js +1 -1
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +30 -28
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/es/components/skeleton/utils.js +5 -7
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +2 -7
- package/es/components/table/table_row.styles.js +8 -10
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text/text_color.js +1 -1
- package/es/components/text/text_color.styles.js +6 -5
- package/es/components/toast/toast.styles.js +1 -1
- package/es/components/token/token.js +10 -4
- package/es/components/token/token.styles.js +12 -3
- package/es/components/token/token_map.js +243 -1
- package/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tour/tour.styles.js +8 -12
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/es/global_styling/functions/math.js +1 -49
- package/es/global_styling/functions/size.js +1 -17
- package/es/global_styling/mixins/_button.js +159 -0
- package/es/global_styling/mixins/_color.js +39 -31
- package/es/global_styling/mixins/index.js +2 -1
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +1 -53
- package/es/global_styling/variables/animations.js +1 -22
- package/es/global_styling/variables/breakpoint.js +1 -7
- package/es/global_styling/variables/levels.js +1 -17
- package/es/global_styling/variables/shadow.js +1 -11
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +1 -32
- package/es/services/color/eui_palettes.js +116 -47
- package/es/services/color/index.js +1 -0
- package/es/services/color/vis_color_store.js +13 -0
- package/es/services/index.js +1 -1
- package/es/services/popover/index.js +4 -1
- package/es/services/popover/popover_arrow.styles.js +31 -0
- package/es/services/popover/popover_positioning.js +6 -17
- package/es/services/theme/provider.js +26 -2
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
- package/es/themes/amsterdam/global_styling/variables/_components.js +604 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
- package/es/themes/amsterdam/theme.js +7 -1
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +9 -6
- package/eui.d.ts +2382 -2830
- package/lib/components/avatar/avatar.js +8 -2
- package/lib/components/badge/badge.styles.js +1 -2
- package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/lib/components/badge/color_utils.js +14 -13
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +5 -2
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- package/lib/components/code/code_syntax.styles.js +23 -27
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/lib/components/color_picker/color_picker.js +8 -2
- package/lib/components/color_picker/color_picker.styles.js +1 -2
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/comment_list/comment.js +1 -1
- package/lib/components/comment_list/comment_event.js +5 -4
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +0 -28
- package/lib/components/datagrid/data_grid.styles.js +6 -7
- package/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +7 -2
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +27 -31
- package/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/lib/components/form/switch/switch.js +3 -7
- package/lib/components/form/switch/switch.styles.js +16 -19
- package/lib/components/header/header.styles.js +5 -6
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/lib/components/list_group/list_group_item.styles.js +8 -10
- package/lib/components/loading/loading_chart.styles.js +18 -5
- package/lib/components/mark/mark.styles.js +2 -9
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/lib/components/modal/modal.styles.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +29 -27
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/lib/components/skeleton/utils.js +4 -6
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +2 -7
- package/lib/components/table/table_row.styles.js +7 -9
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/text/text_color.js +1 -1
- package/lib/components/text/text_color.styles.js +6 -5
- package/lib/components/toast/toast.styles.js +1 -1
- package/lib/components/token/token.js +12 -4
- package/lib/components/token/token.styles.js +12 -3
- package/lib/components/token/token_map.js +244 -2
- package/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tour/tour.styles.js +8 -12
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/lib/global_styling/functions/math.js +7 -58
- package/lib/global_styling/functions/size.js +7 -26
- package/lib/global_styling/mixins/_button.js +164 -0
- package/lib/global_styling/mixins/_color.js +38 -30
- package/lib/global_styling/mixins/index.js +11 -0
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +6 -61
- package/lib/global_styling/variables/animations.js +25 -31
- package/lib/global_styling/variables/breakpoint.js +7 -16
- package/lib/global_styling/variables/levels.js +7 -26
- package/lib/global_styling/variables/shadow.js +13 -20
- package/lib/global_styling/variables/size.js +7 -10
- package/lib/global_styling/variables/typography.js +19 -41
- package/lib/services/color/eui_palettes.js +116 -47
- package/lib/services/color/index.js +8 -0
- package/lib/services/color/vis_color_store.js +18 -0
- package/lib/services/index.js +7 -0
- package/lib/services/popover/index.js +8 -1
- package/lib/services/popover/popover_arrow.styles.js +37 -0
- package/lib/services/popover/popover_positioning.js +6 -17
- package/lib/services/theme/provider.js +26 -2
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/lib/themes/amsterdam/global_styling/variables/_components.js +608 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
- package/lib/themes/amsterdam/theme.js +7 -1
- package/lib/themes/index.js +7 -0
- package/lib/themes/themes.js +10 -7
- package/optimize/es/components/avatar/avatar.js +10 -4
- package/optimize/es/components/badge/badge.styles.js +1 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/es/components/badge/color_utils.js +9 -8
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/es/components/button/button.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +6 -3
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +1 -2
- package/optimize/es/components/code/code_syntax.styles.js +23 -27
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker.js +9 -3
- package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/comment_list/comment_event.js +4 -3
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +7 -2
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +28 -32
- package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/es/components/form/switch/switch.js +3 -2
- package/optimize/es/components/form/switch/switch.styles.js +16 -19
- package/optimize/es/components/header/header.styles.js +6 -7
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
- package/optimize/es/components/loading/loading_chart.styles.js +13 -5
- package/optimize/es/components/mark/mark.styles.js +2 -9
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.styles.js +1 -1
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +30 -28
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/es/components/skeleton/utils.js +5 -7
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/es/components/table/table_row.styles.js +8 -10
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text/text_color.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +6 -5
- package/optimize/es/components/toast/toast.styles.js +1 -1
- package/optimize/es/components/token/token.js +10 -4
- package/optimize/es/components/token/token.styles.js +12 -3
- package/optimize/es/components/token/token_map.js +243 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tour/tour.styles.js +8 -12
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/es/global_styling/functions/math.js +1 -49
- package/optimize/es/global_styling/functions/size.js +1 -17
- package/optimize/es/global_styling/mixins/_button.js +159 -0
- package/optimize/es/global_styling/mixins/_color.js +39 -31
- package/optimize/es/global_styling/mixins/index.js +2 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
- package/optimize/es/global_styling/variables/animations.js +1 -22
- package/optimize/es/global_styling/variables/breakpoint.js +1 -7
- package/optimize/es/global_styling/variables/levels.js +1 -17
- package/optimize/es/global_styling/variables/shadow.js +1 -11
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +1 -32
- package/optimize/es/services/color/eui_palettes.js +116 -47
- package/optimize/es/services/color/index.js +1 -0
- package/optimize/es/services/color/vis_color_store.js +13 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/popover/index.js +4 -1
- package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
- package/optimize/es/services/popover/popover_positioning.js +6 -17
- package/optimize/es/services/theme/provider.js +26 -2
- package/optimize/es/services/theme/types.js +1 -6
- package/optimize/es/services/theme/utils.js +1 -295
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +618 -25
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +109 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +596 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/optimize/es/themes/amsterdam/theme.js +7 -1
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +9 -6
- package/optimize/lib/components/avatar/avatar.js +8 -2
- package/optimize/lib/components/badge/badge.styles.js +1 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/lib/components/badge/color_utils.js +14 -13
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/lib/components/button/button.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +5 -2
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +1 -2
- package/optimize/lib/components/code/code_syntax.styles.js +23 -27
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker.js +8 -2
- package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/comment_list/comment_event.js +4 -3
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +7 -2
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +27 -31
- package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/lib/components/form/switch/switch.js +3 -2
- package/optimize/lib/components/form/switch/switch.styles.js +16 -19
- package/optimize/lib/components/header/header.styles.js +5 -6
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
- package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
- package/optimize/lib/components/mark/mark.styles.js +2 -9
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/lib/components/modal/modal.styles.js +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +29 -27
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/lib/components/skeleton/utils.js +4 -6
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/lib/components/table/table_row.styles.js +7 -9
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/text/text_color.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +6 -5
- package/optimize/lib/components/toast/toast.styles.js +1 -1
- package/optimize/lib/components/token/token.js +13 -4
- package/optimize/lib/components/token/token.styles.js +12 -3
- package/optimize/lib/components/token/token_map.js +244 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tour/tour.styles.js +8 -12
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/lib/global_styling/functions/math.js +7 -59
- package/optimize/lib/global_styling/functions/size.js +7 -27
- package/optimize/lib/global_styling/mixins/_button.js +165 -0
- package/optimize/lib/global_styling/mixins/_color.js +38 -30
- package/optimize/lib/global_styling/mixins/index.js +11 -0
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
- package/optimize/lib/global_styling/variables/animations.js +25 -31
- package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
- package/optimize/lib/global_styling/variables/levels.js +7 -26
- package/optimize/lib/global_styling/variables/shadow.js +13 -20
- package/optimize/lib/global_styling/variables/size.js +7 -10
- package/optimize/lib/global_styling/variables/typography.js +19 -41
- package/optimize/lib/services/color/eui_palettes.js +116 -47
- package/optimize/lib/services/color/index.js +8 -0
- package/optimize/lib/services/color/vis_color_store.js +18 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/popover/index.js +8 -1
- package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
- package/optimize/lib/services/popover/popover_positioning.js +6 -17
- package/optimize/lib/services/theme/provider.js +26 -2
- package/optimize/lib/services/theme/types.js +13 -14
- package/optimize/lib/services/theme/utils.js +54 -296
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/optimize/lib/themes/amsterdam/theme.js +7 -1
- package/optimize/lib/themes/index.js +7 -0
- package/optimize/lib/themes/themes.js +10 -7
- package/package.json +7 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -10
- package/src/global_styling/variables/_animations.scss +1 -8
- package/src/global_styling/variables/_borders.scss +1 -9
- package/src/global_styling/variables/_buttons.scss +1 -18
- package/src/global_styling/variables/_colors_vis.scss +1 -70
- package/src/global_styling/variables/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- package/src/global_styling/variables/_responsive.scss +1 -9
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +1 -13
- package/src/global_styling/variables/_states.scss +1 -14
- package/src/global_styling/variables/_typography.scss +1 -75
- package/src/global_styling/variables/_z_index.scss +1 -33
- package/src/themes/amsterdam/_colors_dark.scss +80 -8
- package/src/themes/amsterdam/_colors_light.scss +80 -8
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +72 -0
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
- package/test-env/components/avatar/avatar.js +8 -2
- package/test-env/components/badge/badge.styles.js +1 -2
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/test-env/components/badge/color_utils.js +14 -13
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +5 -2
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +1 -2
- package/test-env/components/code/code_syntax.styles.js +23 -27
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/test-env/components/color_picker/color_picker.js +8 -2
- package/test-env/components/color_picker/color_picker.styles.js +1 -2
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/comment_list/comment.js +1 -1
- package/test-env/components/comment_list/comment_event.js +5 -4
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +0 -28
- package/test-env/components/datagrid/data_grid.styles.js +6 -7
- package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
- package/test-env/components/flyout/flyout.styles.js +7 -2
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +27 -31
- package/test-env/components/form/range/range_tooltip.styles.js +11 -13
- package/test-env/components/form/switch/switch.js +3 -2
- package/test-env/components/form/switch/switch.styles.js +16 -19
- package/test-env/components/header/header.styles.js +5 -6
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/test-env/components/list_group/list_group_item.styles.js +8 -10
- package/test-env/components/loading/loading_chart.styles.js +13 -5
- package/test-env/components/mark/mark.styles.js +2 -9
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
- package/test-env/components/modal/modal.styles.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +29 -27
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
- package/test-env/components/skeleton/utils.js +4 -6
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +2 -7
- package/test-env/components/table/table_row.styles.js +7 -9
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/text/text_color.js +1 -1
- package/test-env/components/text/text_color.styles.js +6 -5
- package/test-env/components/toast/toast.styles.js +1 -1
- package/test-env/components/token/token.js +13 -4
- package/test-env/components/token/token.styles.js +12 -3
- package/test-env/components/token/token_map.js +244 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +11 -23
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tour/tour.styles.js +8 -12
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- package/test-env/global_styling/functions/math.js +7 -59
- package/test-env/global_styling/functions/size.js +7 -27
- package/test-env/global_styling/mixins/_button.js +165 -0
- package/test-env/global_styling/mixins/_color.js +38 -30
- package/test-env/global_styling/mixins/index.js +11 -0
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +6 -61
- package/test-env/global_styling/variables/animations.js +25 -31
- package/test-env/global_styling/variables/breakpoint.js +7 -16
- package/test-env/global_styling/variables/levels.js +7 -26
- package/test-env/global_styling/variables/shadow.js +13 -20
- package/test-env/global_styling/variables/size.js +7 -10
- package/test-env/global_styling/variables/typography.js +19 -41
- package/test-env/services/color/eui_palettes.js +116 -47
- package/test-env/services/color/index.js +8 -0
- package/test-env/services/color/vis_color_store.js +18 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/popover/index.js +8 -1
- package/test-env/services/popover/popover_arrow.styles.js +37 -0
- package/test-env/services/popover/popover_positioning.js +6 -17
- package/test-env/services/theme/provider.js +26 -2
- package/test-env/services/theme/types.js +13 -14
- package/test-env/services/theme/utils.js +54 -296
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +617 -25
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +115 -0
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/test-env/themes/amsterdam/theme.js +7 -1
- package/test-env/themes/index.js +7 -0
- package/test-env/themes/themes.js +10 -7
- /package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +0 -0
- /package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +0 -0
|
@@ -10,41 +10,29 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { css } from '@emotion/react';
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
14
|
+
import { getTokenName } from '@elastic/eui-theme-common';
|
|
15
|
+
export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
15
16
|
/**
|
|
17
|
+
* @deprecated - use background tokens directly
|
|
16
18
|
* @returns A single background color with optional alpha transparency
|
|
17
19
|
*/
|
|
18
20
|
export var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
|
|
19
|
-
var euiTheme = _ref.euiTheme
|
|
20
|
-
colorMode = _ref.colorMode;
|
|
21
|
+
var euiTheme = _ref.euiTheme;
|
|
21
22
|
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
22
23
|
method = _ref2.method;
|
|
23
24
|
if (color === 'transparent') return 'transparent';
|
|
24
25
|
if (method === 'transparent') {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} else if (color === 'subdued') {
|
|
28
|
-
return colorMode === 'DARK' ? transparentize(euiTheme.colors.lightShade, 0.4) : transparentize(euiTheme.colors.lightShade, 0.2);
|
|
29
|
-
} else {
|
|
30
|
-
return transparentize(euiTheme.colors[color], 0.1);
|
|
31
|
-
}
|
|
26
|
+
var tokenName = getTokenName('backgroundTransparent', color);
|
|
27
|
+
return euiTheme.colors[tokenName];
|
|
32
28
|
} else {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
switch (color) {
|
|
37
|
-
case 'plain':
|
|
38
|
-
return euiTheme.colors.emptyShade;
|
|
39
|
-
case 'subdued':
|
|
40
|
-
return euiTheme.colors.body;
|
|
41
|
-
default:
|
|
42
|
-
return _tintOrShade(euiTheme.colors[color]);
|
|
43
|
-
}
|
|
29
|
+
var _tokenName = getTokenName('backgroundBase', color);
|
|
30
|
+
return euiTheme.colors[_tokenName];
|
|
44
31
|
}
|
|
45
32
|
};
|
|
46
33
|
|
|
47
34
|
/**
|
|
35
|
+
* @deprecated
|
|
48
36
|
* @returns An object map of color keys to color values, categorized by
|
|
49
37
|
* opaque (default) vs transparency (hover/focus states) methods.
|
|
50
38
|
* e.g. {
|
|
@@ -64,6 +52,10 @@ var _euiBackgroundColorMap = function _euiBackgroundColorMap(euiThemeContext) {
|
|
|
64
52
|
}, {})
|
|
65
53
|
};
|
|
66
54
|
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
67
59
|
export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
|
|
68
60
|
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
69
61
|
method = _ref3.method;
|
|
@@ -77,29 +69,37 @@ export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
|
|
|
77
69
|
*/
|
|
78
70
|
var _euiBackgroundColors = function _euiBackgroundColors(euiThemeContext) {
|
|
79
71
|
return BACKGROUND_COLORS.reduce(function (acc, color) {
|
|
80
|
-
|
|
72
|
+
var tokenName = getTokenName('backgroundBase', color);
|
|
73
|
+
var backgroundColor = color === 'transparent' ? 'transparent' : euiThemeContext.euiTheme.colors[tokenName];
|
|
74
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("background-color:", backgroundColor, ";label:", color, ";")));
|
|
81
75
|
}, {});
|
|
82
76
|
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Hook to retrieve background style for a background color variant
|
|
80
|
+
* @returns An object map of color keys to CSS,
|
|
81
|
+
* e.g. { danger: css``, success: css``, ... }
|
|
82
|
+
*/
|
|
83
83
|
export var useEuiBackgroundColorCSS = function useEuiBackgroundColorCSS() {
|
|
84
84
|
return useEuiMemoizedStyles(_euiBackgroundColors);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Border colors
|
|
89
|
+
* @deprecated - use border tokens directly or use
|
|
90
|
+
* `useEuiBorderColorCSS()` for composed styles
|
|
89
91
|
*/
|
|
90
92
|
|
|
91
93
|
export var euiBorderColor = function euiBorderColor(_ref4, color) {
|
|
92
|
-
var euiTheme = _ref4.euiTheme
|
|
93
|
-
colorMode = _ref4.colorMode;
|
|
94
|
+
var euiTheme = _ref4.euiTheme;
|
|
94
95
|
switch (color) {
|
|
95
96
|
case 'transparent':
|
|
96
|
-
case 'plain':
|
|
97
|
-
case 'subdued':
|
|
98
97
|
return euiTheme.border.color;
|
|
99
|
-
case 'warning':
|
|
100
|
-
return tintOrShade(euiTheme.colors.warning, 0.4, colorMode);
|
|
101
98
|
default:
|
|
102
|
-
|
|
99
|
+
{
|
|
100
|
+
var tokenName = getTokenName('borderBase', color);
|
|
101
|
+
return euiTheme.colors[tokenName];
|
|
102
|
+
}
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
|
|
@@ -109,9 +109,17 @@ export var euiBorderColor = function euiBorderColor(_ref4, color) {
|
|
|
109
109
|
*/
|
|
110
110
|
var _euiBorderColors = function _euiBorderColors(euiThemeContext) {
|
|
111
111
|
return BACKGROUND_COLORS.reduce(function (acc, color) {
|
|
112
|
-
|
|
112
|
+
var borderToken = getTokenName('borderBase', color);
|
|
113
|
+
var borderColor = color === 'transparent' ? euiThemeContext.euiTheme.border.color : euiThemeContext.euiTheme.colors[borderToken];
|
|
114
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("border-color:", borderColor, ";label:", color, ";")));
|
|
113
115
|
}, {});
|
|
114
116
|
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Hook to retrieve border style for a border variant
|
|
120
|
+
* @returns An object map of color keys to CSS,
|
|
121
|
+
* e.g. { danger: css``, success: css``, ... }
|
|
122
|
+
*/
|
|
115
123
|
export var useEuiBorderColorCSS = function useEuiBorderColorCSS() {
|
|
116
124
|
return useEuiMemoizedStyles(_euiBorderColors);
|
|
117
125
|
};
|
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
|
14
14
|
import { Global, css } from '@emotion/react';
|
|
15
15
|
import { euiFocusRing, euiScrollBarStyles } from '../mixins';
|
|
16
16
|
import { logicalCSS } from '../functions';
|
|
17
|
-
import {
|
|
17
|
+
import { transparentize } from '../../services/color';
|
|
18
18
|
import { useEuiTheme } from '../../services/theme';
|
|
19
19
|
import { resetStyles as reset } from './reset';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -32,7 +32,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
32
32
|
* so that it knows to use custom styles. Therefore, we just reuse the same scrollbar mixin with thick size.
|
|
33
33
|
*/
|
|
34
34
|
var scrollbarStyles = euiScrollBarStyles(euiThemeContext, {
|
|
35
|
-
trackColor:
|
|
35
|
+
trackColor: euiTheme.components.scrollbarTrackColor,
|
|
36
36
|
width: 'auto'
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -6,56 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* NOTE: These were quick conversions of their Sass counterparts.
|
|
11
|
-
* They have yet to be used/tested.
|
|
12
|
-
* TODO: Make the graphic version available from `euiPaletteColorBlind()`
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// Maps allow for easier JSON usage
|
|
16
|
-
// Use map_merge(euiColorVisColors, $yourMap) to change individual colors after importing ths file
|
|
17
|
-
// The `behindText` variant is a direct copy of the hex output by the JS euiPaletteColorBlindBehindText() function
|
|
18
|
-
var euiPaletteColorBlind = {
|
|
19
|
-
euiColorVis0: {
|
|
20
|
-
graphic: '#54B399'
|
|
21
|
-
},
|
|
22
|
-
euiColorVis1: {
|
|
23
|
-
graphic: '#6092C0'
|
|
24
|
-
},
|
|
25
|
-
euiColorVis2: {
|
|
26
|
-
graphic: '#D36086'
|
|
27
|
-
},
|
|
28
|
-
euiColorVis3: {
|
|
29
|
-
graphic: '#9170B8'
|
|
30
|
-
},
|
|
31
|
-
euiColorVis4: {
|
|
32
|
-
graphic: '#CA8EAE'
|
|
33
|
-
},
|
|
34
|
-
euiColorVis5: {
|
|
35
|
-
graphic: '#D6BF57'
|
|
36
|
-
},
|
|
37
|
-
euiColorVis6: {
|
|
38
|
-
graphic: '#B9A888'
|
|
39
|
-
},
|
|
40
|
-
euiColorVis7: {
|
|
41
|
-
graphic: '#DA8B45'
|
|
42
|
-
},
|
|
43
|
-
euiColorVis8: {
|
|
44
|
-
graphic: '#AA6556'
|
|
45
|
-
},
|
|
46
|
-
euiColorVis9: {
|
|
47
|
-
graphic: '#E7664C'
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
export var colorVis = {
|
|
51
|
-
euiColorVis0: euiPaletteColorBlind.euiColorVis0.graphic,
|
|
52
|
-
euiColorVis1: euiPaletteColorBlind.euiColorVis1.graphic,
|
|
53
|
-
euiColorVis2: euiPaletteColorBlind.euiColorVis2.graphic,
|
|
54
|
-
euiColorVis3: euiPaletteColorBlind.euiColorVis3.graphic,
|
|
55
|
-
euiColorVis4: euiPaletteColorBlind.euiColorVis4.graphic,
|
|
56
|
-
euiColorVis5: euiPaletteColorBlind.euiColorVis5.graphic,
|
|
57
|
-
euiColorVis6: euiPaletteColorBlind.euiColorVis6.graphic,
|
|
58
|
-
euiColorVis7: euiPaletteColorBlind.euiColorVis7.graphic,
|
|
59
|
-
euiColorVis8: euiPaletteColorBlind.euiColorVis8.graphic,
|
|
60
|
-
euiColorVis9: euiPaletteColorBlind.euiColorVis9.graphic
|
|
61
|
-
};
|
|
9
|
+
export { colorVis } from '../../themes/amsterdam/global_styling/variables/_colors_vis';
|
|
@@ -6,25 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* A constant storing the `prefers-reduced-motion` media query
|
|
11
|
-
* so that when it is turned off, animations are not run.
|
|
12
|
-
*/
|
|
13
|
-
export var euiCanAnimate = '@media screen and (prefers-reduced-motion: no-preference)';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A constant storing the `prefers-reduced-motion` media query that will
|
|
17
|
-
* only apply the content if the setting is off (reduce).
|
|
18
|
-
*/
|
|
19
|
-
export var euiCantAnimate = '@media screen and (prefers-reduced-motion: reduce)';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Speeds / Durations / Delays
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export var EuiThemeAnimationSpeeds = ['extraFast', 'fast', 'normal', 'slow', 'extraSlow'];
|
|
26
|
-
/**
|
|
27
|
-
* Easings / Timing functions
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
export var EuiThemeAnimationEasings = ['bounce', 'resistance'];
|
|
9
|
+
export { euiCanAnimate, euiCantAnimate, EuiThemeAnimationSpeeds, EuiThemeAnimationEasings } from '@elastic/eui-theme-common';
|
|
@@ -6,10 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
// This type cannot be a string enum / must be a generic string
|
|
12
|
-
// in case consumers add custom breakpoint sizes, such as xxl or xxs
|
|
13
|
-
|
|
14
|
-
// Explicitly list out each key so we can document default values
|
|
15
|
-
// via JSDoc (which is available to devs in IDE via intellisense)
|
|
9
|
+
export { EuiThemeBreakpoints } from '@elastic/eui-theme-common';
|
|
@@ -6,20 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Z-Index
|
|
11
|
-
*
|
|
12
|
-
* Remember that z-index is relative to parent and based on the stacking context.
|
|
13
|
-
* z-indexes only compete against other z-indexes when they exist as children of
|
|
14
|
-
* that shared parent.
|
|
15
|
-
*
|
|
16
|
-
* That means a popover with a settings of 2, will still show above a modal
|
|
17
|
-
* with a setting of 100, if it is within that modal and not besides it.
|
|
18
|
-
*
|
|
19
|
-
* Generally that means it's a good idea to consider things added to this file
|
|
20
|
-
* as competitive only as siblings.
|
|
21
|
-
*
|
|
22
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export var EuiThemeLevels = ['toast', 'modal', 'mask', 'navigation', 'menu', 'header', 'flyout', 'maskBelowHeader', 'content'];
|
|
9
|
+
export { EuiThemeLevels } from '@elastic/eui-theme-common';
|
|
@@ -6,14 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
/**
|
|
11
|
-
* Shadow t-shirt sizes descriptions
|
|
12
|
-
*/
|
|
13
|
-
export var _EuiShadowSizesDescriptions = {
|
|
14
|
-
xs: 'Very subtle shadow used on small components.',
|
|
15
|
-
s: 'Adds subtle depth, usually used in conjunction with a border.',
|
|
16
|
-
m: 'Used on small sized portalled content like popovers.',
|
|
17
|
-
l: 'Primary shadow used in most cases to add visible depth.',
|
|
18
|
-
xl: 'Very large shadows used for large portalled style containers like modals and flyouts.'
|
|
19
|
-
};
|
|
9
|
+
export { EuiThemeShadowSizes, _EuiShadowSizesDescriptions } from '@elastic/eui-theme-common';
|
|
@@ -6,35 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Font units of measure
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export var EuiThemeFontUnits = ['rem', 'px', 'em'];
|
|
14
|
-
/*
|
|
15
|
-
* Font scale
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export var EuiThemeFontScales = ['xxxs', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
* Font base settings
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* Font weights
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
export var EuiThemeFontWeights = ['light', 'regular', 'medium', 'semiBold', 'bold'];
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Body / Base styles
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Title styles
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/*
|
|
39
|
-
* Font
|
|
40
|
-
*/
|
|
9
|
+
export { EuiThemeFontUnits, EuiThemeFontScales, EuiThemeFontWeights } from '@elastic/eui-theme-common';
|
|
@@ -9,6 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
9
9
|
|
|
10
10
|
import chroma from 'chroma-js';
|
|
11
11
|
import { colorPalette } from './color_palette';
|
|
12
|
+
import { EUI_VIS_COLOR_STORE } from './vis_color_store';
|
|
12
13
|
var flatten = function flatten(arr) {
|
|
13
14
|
var _ref;
|
|
14
15
|
return (_ref = []).concat.apply(_ref, _toConsumableArray(arr));
|
|
@@ -24,6 +25,14 @@ var euiPalette = function euiPalette(colors, steps) {
|
|
|
24
25
|
}
|
|
25
26
|
return colorPalette(colors, steps, diverge, categorical);
|
|
26
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* NOTE: These functions rely on base vis colors of the theme which are provided via a global
|
|
30
|
+
* singleton instance `EUI_VIS_COLOR_STORE` that's updated by the EuiProvider on theme change.
|
|
31
|
+
* Make sure the function is recalled on theme change to retrieve theme-related colors.
|
|
32
|
+
*
|
|
33
|
+
* Outside of a react component you can use the `subscibe()` method on the `EUI_VIS_COLOR_STORE`
|
|
34
|
+
* to subscribe to updates and update your usages to ensure latest colors are loaded.
|
|
35
|
+
*/
|
|
27
36
|
export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
28
37
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
29
38
|
_ref2$rotations = _ref2.rotations,
|
|
@@ -37,26 +46,8 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
37
46
|
_ref2$sortShift = _ref2.sortShift,
|
|
38
47
|
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift;
|
|
39
48
|
var colors = [];
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
'#6092C0',
|
|
43
|
-
// 1 blue
|
|
44
|
-
'#D36086',
|
|
45
|
-
// 2 dark pink
|
|
46
|
-
'#9170B8',
|
|
47
|
-
// 3 purple
|
|
48
|
-
'#CA8EAE',
|
|
49
|
-
// 4 light pink
|
|
50
|
-
'#D6BF57',
|
|
51
|
-
// 5 yellow
|
|
52
|
-
'#B9A888',
|
|
53
|
-
// 6 tan
|
|
54
|
-
'#DA8B45',
|
|
55
|
-
// 7 orange
|
|
56
|
-
'#AA6556',
|
|
57
|
-
// 8 brown
|
|
58
|
-
'#E7664C' // 9 red
|
|
59
|
-
];
|
|
49
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
50
|
+
var base = [visColors.euiColorVis0, visColors.euiColorVis1, visColors.euiColorVis2, visColors.euiColorVis3, visColors.euiColorVis4, visColors.euiColorVis5, visColors.euiColorVis6, visColors.euiColorVis7, visColors.euiColorVis8, visColors.euiColorVis9];
|
|
60
51
|
if (sortBy === 'natural') {
|
|
61
52
|
// Sort the colors based on the color wheel, but shifting the values based on sortShift
|
|
62
53
|
base = _toConsumableArray(base).sort(function (a, b) {
|
|
@@ -102,78 +93,156 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
102
93
|
/**
|
|
103
94
|
* Color blind palette with text is meant for use when text is applied on top of the color.
|
|
104
95
|
* It increases the brightness of the color to give the text more contrast.
|
|
96
|
+
*
|
|
97
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
98
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
105
99
|
*/
|
|
106
100
|
export var euiPaletteColorBlindBehindText = function euiPaletteColorBlindBehindText() {
|
|
107
101
|
var paletteProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
102
|
+
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
108
103
|
var originalPalette = euiPaletteColorBlind(paletteProps);
|
|
104
|
+
|
|
105
|
+
// new theme palette has required contrast, we don't need to adjust them
|
|
106
|
+
if (!hasVisColorAdjustment) return originalPalette;
|
|
109
107
|
var newPalette = originalPalette.map(function (color) {
|
|
110
108
|
return chroma(color).brighten(0.5).hex();
|
|
111
109
|
});
|
|
112
110
|
return newPalette;
|
|
113
111
|
};
|
|
112
|
+
var _getVisColorsAsText = function _getVisColorsAsText(visColors, keys) {
|
|
113
|
+
return keys.reduce(function (colors, curr) {
|
|
114
|
+
return [].concat(_toConsumableArray(colors), [visColors[curr]]);
|
|
115
|
+
}, []);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
120
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
121
|
+
*/
|
|
114
122
|
export var euiPaletteForLightBackground = function euiPaletteForLightBackground() {
|
|
115
|
-
|
|
123
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
124
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
125
|
+
return color.includes('AsTextLight');
|
|
126
|
+
});
|
|
127
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
116
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
|
+
*/
|
|
117
134
|
export var euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
118
|
-
|
|
135
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
136
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
137
|
+
return color.includes('AsTextDark');
|
|
138
|
+
});
|
|
139
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
119
140
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
144
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
145
|
+
*/
|
|
125
146
|
export var euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
147
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
126
148
|
if (steps === 1) {
|
|
127
|
-
return [
|
|
149
|
+
return [visColors.euiColorVisSuccess0];
|
|
128
150
|
}
|
|
129
151
|
if (steps <= 3) {
|
|
130
|
-
return euiPalette([
|
|
152
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisWarning0, visColors.euiColorVisDanger0], steps, true);
|
|
131
153
|
}
|
|
132
|
-
return euiPalette([
|
|
154
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisSuccess1, visColors.euiColorVisWarning0, visColors.euiColorVisDanger1, visColors.euiColorVisDanger0], steps, true);
|
|
133
155
|
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
159
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
160
|
+
*/
|
|
134
161
|
export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
135
|
-
var
|
|
136
|
-
|
|
162
|
+
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
163
|
+
visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
137
164
|
if (steps === 1) {
|
|
138
|
-
return [
|
|
165
|
+
return [visColors.euiColorVisCool2];
|
|
139
166
|
} else if (steps <= 3) {
|
|
140
|
-
return euiPalette([
|
|
167
|
+
return euiPalette([visColors.euiColorVisCool2, visColors.euiColorVisWarm2], steps, true);
|
|
141
168
|
}
|
|
142
|
-
|
|
169
|
+
var cools = colorPalette([visColors.euiColorVisCool2, visColors.euiColorVisCool1, visColors.euiColorVisCool0], 3);
|
|
170
|
+
var warms = colorPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], 3);
|
|
171
|
+
var paletteColors = hasVisColorAdjustment ? [].concat(_toConsumableArray(cools), _toConsumableArray(warms)) : [].concat(_toConsumableArray(cools), [visColors.euiColorVisNeutral0], _toConsumableArray(warms));
|
|
172
|
+
return euiPalette(paletteColors, 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
|
export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
180
|
+
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
181
|
+
visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
145
182
|
if (steps === 1) {
|
|
146
|
-
return [
|
|
183
|
+
return [visColors.euiColorVisComplementary0];
|
|
147
184
|
}
|
|
148
|
-
|
|
185
|
+
var paletteColors = hasVisColorAdjustment ? [visColors.euiColorVisComplementary0, visColors.euiColorVisComplementary1] : [visColors.euiColorVisComplementary0, visColors.euiColorVisNeutral0, visColors.euiColorVisComplementary1];
|
|
186
|
+
return euiPalette(paletteColors, steps, true);
|
|
149
187
|
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
191
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
192
|
+
*/
|
|
150
193
|
export var euiPaletteRed = function euiPaletteRed(steps) {
|
|
194
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
151
195
|
if (steps === 1) {
|
|
152
|
-
return [
|
|
196
|
+
return [visColors.euiColorVisDanger1];
|
|
153
197
|
}
|
|
154
|
-
return euiPalette([
|
|
198
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisDanger0], steps);
|
|
155
199
|
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
203
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
204
|
+
*/
|
|
156
205
|
export var euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
206
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
157
207
|
if (steps === 1) {
|
|
158
|
-
return [
|
|
208
|
+
return [visColors.euiColorVisSuccess1];
|
|
159
209
|
}
|
|
160
|
-
return euiPalette([
|
|
210
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisSuccess0], steps);
|
|
161
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
|
+
*/
|
|
162
217
|
export var euiPaletteCool = function euiPaletteCool(steps) {
|
|
218
|
+
var hasVisColorAdjustment = EUI_VIS_COLOR_STORE.hasVisColorAdjustment,
|
|
219
|
+
visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
163
220
|
if (steps === 1) {
|
|
164
|
-
return [
|
|
221
|
+
return [visColors.euiColorVisCool1];
|
|
165
222
|
}
|
|
166
|
-
return euiPalette([
|
|
223
|
+
return euiPalette([hasVisColorAdjustment ? visColors.euiColorVisNeutral0 : visColors.euiColorVisCool0, visColors.euiColorVisCool1, visColors.euiColorVisCool2], steps);
|
|
167
224
|
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
228
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
229
|
+
*/
|
|
168
230
|
export var euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
231
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
169
232
|
if (steps === 1) {
|
|
170
|
-
return [
|
|
233
|
+
return [visColors.euiColorVisWarm2];
|
|
171
234
|
}
|
|
172
|
-
return euiPalette([
|
|
235
|
+
return euiPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], steps);
|
|
173
236
|
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
240
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
241
|
+
*/
|
|
174
242
|
export var euiPaletteGray = function euiPaletteGray(steps) {
|
|
243
|
+
var visColors = EUI_VIS_COLOR_STORE.visColors;
|
|
175
244
|
if (steps === 1) {
|
|
176
|
-
return [
|
|
245
|
+
return [visColors.euiColorVisGrey1];
|
|
177
246
|
}
|
|
178
|
-
return euiPalette([
|
|
247
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisGrey0, visColors.euiColorVisGrey1, visColors.euiColorVisGrey2, visColors.euiColorVisGrey3], steps, false);
|
|
179
248
|
};
|
|
@@ -16,6 +16,7 @@ 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';
|
|
21
22
|
export { getSteppedGradient } from './stepped_gradient';
|
|
@@ -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 '../../global_styling/variables/_colors_vis';
|
|
11
|
+
|
|
12
|
+
// initialsetup of Vis color storage with default colors
|
|
13
|
+
export var EUI_VIS_COLOR_STORE = EuiVisColorStore.getInstance(colorVis, true);
|
|
@@ -12,7 +12,7 @@ export { htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
|
12
12
|
export { CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from './alignment';
|
|
13
13
|
export { CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint, useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint } from './breakpoint';
|
|
14
14
|
export { CanvasTextUtils } from './canvas';
|
|
15
|
-
export { brighten, calculateContrast, calculateLuminance, colorPalette, darken, DEFAULT_VISUALIZATION_COLOR, desaturate, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteComplementary, euiPaletteCool, euiPaletteForDarkBackground, euiPaletteForLightBackground, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteGray, euiPaletteRed, euiPaletteGreen, euiPaletteWarm, getSteppedGradient, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, isColorDark, isValidHex, lightness, makeDisabledContrastColor, makeHighContrastColor, rgbToHex, rgbToHsv, saturate, shade, shadeOrTint, tint, tintOrShade, transparentize, VISUALIZATION_COLORS, 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
16
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
17
17
|
export * from './console';
|
|
18
18
|
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
|
+
};
|