@elastic/eui 98.2.1-borealis.0 → 98.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{eui_theme_amsterdam_dark.json.d.ts → eui_theme_dark.json.d.ts} +1 -1
- package/dist/{eui_theme_amsterdam_light.json.d.ts → eui_theme_light.json.d.ts} +1 -1
- package/es/components/avatar/avatar.js +4 -10
- package/es/components/badge/badge.styles.js +2 -1
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/es/components/badge/color_utils.js +8 -9
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +3 -6
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +2 -1
- package/es/components/code/code_syntax.styles.js +27 -23
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/es/components/color_picker/color_picker.js +3 -9
- package/es/components/color_picker/color_picker.styles.js +2 -1
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/comment_list/comment.js +1 -1
- package/es/components/comment_list/comment_event.js +4 -5
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +28 -0
- package/es/components/datagrid/data_grid.styles.js +7 -6
- package/es/components/date_picker/react_date_picker.styles.js +1 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -3
- package/es/components/drag_and_drop/droppable.styles.js +4 -2
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +2 -6
- package/es/components/filter_group/filter_select_item.styles.js +2 -1
- package/es/components/flyout/_flyout_close_button.styles.js +2 -1
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +2 -7
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +32 -28
- package/es/components/form/range/range_tooltip.styles.js +13 -11
- package/es/components/form/switch/switch.js +7 -3
- package/es/components/form/switch/switch.styles.js +19 -16
- package/es/components/header/header.styles.js +7 -6
- package/es/components/icon/icon.styles.js +8 -9
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/es/components/list_group/list_group_item.styles.js +11 -9
- package/es/components/loading/loading_chart.styles.js +5 -18
- package/es/components/mark/mark.styles.js +9 -2
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.styles.js +1 -1
- package/es/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +13 -18
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +28 -30
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/es/components/side_nav/side_nav_item.styles.js +2 -1
- package/es/components/skeleton/utils.js +7 -5
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +7 -2
- package/es/components/table/table_row.styles.js +10 -8
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text/text_color.js +1 -1
- package/es/components/text/text_color.styles.js +5 -6
- package/es/components/toast/toast.styles.js +1 -1
- package/es/components/token/token.js +4 -10
- package/es/components/token/token.styles.js +3 -12
- package/es/components/token/token_map.js +1 -243
- package/es/components/tool_tip/tool_tip.styles.js +24 -12
- package/es/components/tour/_tour_footer.styles.js +4 -2
- package/es/components/tour/tour.styles.js +12 -8
- package/es/components/tree_view/tree_view_item.styles.js +2 -1
- package/es/global_styling/functions/math.js +49 -1
- package/es/global_styling/functions/size.js +17 -1
- package/es/global_styling/mixins/_color.js +31 -39
- package/es/global_styling/mixins/index.js +1 -2
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +53 -1
- package/es/global_styling/variables/animations.js +22 -1
- package/es/global_styling/variables/breakpoint.js +7 -1
- package/es/global_styling/variables/levels.js +17 -1
- package/es/global_styling/variables/shadow.js +11 -1
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +32 -1
- package/es/services/color/eui_palettes.js +47 -116
- package/es/services/color/index.js +0 -1
- package/es/services/index.js +1 -1
- package/es/services/popover/index.js +1 -4
- package/es/services/popover/popover_positioning.js +17 -6
- package/es/services/theme/provider.js +2 -26
- package/es/services/theme/types.js +6 -1
- package/es/services/theme/utils.js +303 -1
- package/es/themes/amsterdam/global_styling/mixins/button.js +203 -1
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_colors.js +19 -612
- package/es/themes/amsterdam/theme.js +1 -7
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +6 -9
- package/eui.d.ts +2831 -2383
- package/lib/components/avatar/avatar.js +2 -8
- package/lib/components/badge/badge.styles.js +2 -1
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/lib/components/badge/color_utils.js +13 -14
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +2 -5
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +2 -1
- package/lib/components/code/code_syntax.styles.js +27 -23
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/lib/components/color_picker/color_picker.js +2 -8
- package/lib/components/color_picker/color_picker.styles.js +2 -1
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/comment_list/comment.js +1 -1
- package/lib/components/comment_list/comment_event.js +4 -5
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +28 -0
- package/lib/components/datagrid/data_grid.styles.js +7 -6
- package/lib/components/date_picker/react_date_picker.styles.js +2 -3
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/lib/components/drag_and_drop/droppable.styles.js +4 -2
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/lib/components/filter_group/filter_select_item.styles.js +2 -1
- package/lib/components/flyout/_flyout_close_button.styles.js +2 -1
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +2 -7
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +31 -27
- package/lib/components/form/range/range_tooltip.styles.js +13 -11
- package/lib/components/form/switch/switch.js +7 -3
- package/lib/components/form/switch/switch.styles.js +19 -16
- package/lib/components/header/header.styles.js +6 -5
- package/lib/components/icon/icon.styles.js +8 -9
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/lib/components/list_group/list_group_item.styles.js +10 -8
- package/lib/components/loading/loading_chart.styles.js +5 -18
- package/lib/components/mark/mark.styles.js +9 -2
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/lib/components/modal/modal.styles.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +15 -18
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +27 -29
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/lib/components/side_nav/side_nav_item.styles.js +2 -1
- package/lib/components/skeleton/utils.js +6 -4
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +7 -2
- package/lib/components/table/table_row.styles.js +9 -7
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/text/text_color.js +1 -1
- package/lib/components/text/text_color.styles.js +5 -6
- package/lib/components/toast/toast.styles.js +1 -1
- package/lib/components/token/token.js +4 -12
- package/lib/components/token/token.styles.js +3 -12
- package/lib/components/token/token_map.js +2 -244
- package/lib/components/tool_tip/tool_tip.styles.js +23 -11
- package/lib/components/tour/_tour_footer.styles.js +4 -2
- package/lib/components/tour/tour.styles.js +12 -8
- package/lib/components/tree_view/tree_view_item.styles.js +2 -1
- package/lib/global_styling/functions/math.js +58 -7
- package/lib/global_styling/functions/size.js +26 -7
- package/lib/global_styling/mixins/_color.js +30 -38
- package/lib/global_styling/mixins/index.js +0 -11
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +61 -6
- package/lib/global_styling/variables/animations.js +31 -25
- package/lib/global_styling/variables/breakpoint.js +16 -7
- package/lib/global_styling/variables/levels.js +26 -7
- package/lib/global_styling/variables/shadow.js +20 -13
- package/lib/global_styling/variables/size.js +10 -7
- package/lib/global_styling/variables/typography.js +41 -19
- package/lib/services/color/eui_palettes.js +47 -116
- package/lib/services/color/index.js +0 -8
- package/lib/services/index.js +0 -7
- package/lib/services/popover/index.js +1 -8
- package/lib/services/popover/popover_positioning.js +17 -6
- package/lib/services/theme/provider.js +2 -26
- package/lib/services/theme/types.js +14 -13
- package/lib/services/theme/utils.js +303 -54
- package/lib/themes/amsterdam/global_styling/mixins/button.js +206 -45
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/lib/themes/amsterdam/theme.js +1 -7
- package/lib/themes/index.js +0 -7
- package/lib/themes/themes.js +7 -10
- package/optimize/es/components/avatar/avatar.js +4 -10
- package/optimize/es/components/badge/badge.styles.js +2 -1
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/es/components/badge/color_utils.js +8 -9
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/optimize/es/components/button/button.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +3 -6
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +2 -1
- package/optimize/es/components/code/code_syntax.styles.js +27 -23
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/optimize/es/components/color_picker/color_picker.js +3 -9
- package/optimize/es/components/color_picker/color_picker.styles.js +2 -1
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/comment_list/comment_event.js +3 -4
- package/optimize/es/components/common.js +28 -0
- package/optimize/es/components/datagrid/data_grid.styles.js +7 -6
- package/optimize/es/components/date_picker/react_date_picker.styles.js +1 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -3
- package/optimize/es/components/drag_and_drop/droppable.styles.js +4 -2
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +2 -6
- package/optimize/es/components/filter_group/filter_select_item.styles.js +2 -1
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +2 -1
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +2 -7
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +32 -28
- package/optimize/es/components/form/range/range_tooltip.styles.js +13 -11
- package/optimize/es/components/form/switch/switch.js +2 -3
- package/optimize/es/components/form/switch/switch.styles.js +19 -16
- package/optimize/es/components/header/header.styles.js +7 -6
- package/optimize/es/components/icon/icon.styles.js +8 -9
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/optimize/es/components/list_group/list_group_item.styles.js +11 -9
- package/optimize/es/components/loading/loading_chart.styles.js +5 -13
- package/optimize/es/components/mark/mark.styles.js +9 -2
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.styles.js +1 -1
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +13 -15
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +28 -30
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/optimize/es/components/side_nav/side_nav_item.styles.js +2 -1
- package/optimize/es/components/skeleton/utils.js +7 -5
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/es/components/table/table_row.styles.js +10 -8
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text/text_color.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +5 -6
- package/optimize/es/components/toast/toast.styles.js +1 -1
- package/optimize/es/components/token/token.js +4 -10
- package/optimize/es/components/token/token.styles.js +3 -12
- package/optimize/es/components/token/token_map.js +1 -243
- package/optimize/es/components/tool_tip/tool_tip.styles.js +24 -12
- package/optimize/es/components/tour/_tour_footer.styles.js +4 -2
- package/optimize/es/components/tour/tour.styles.js +12 -8
- package/optimize/es/components/tree_view/tree_view_item.styles.js +2 -1
- package/optimize/es/global_styling/functions/math.js +49 -1
- package/optimize/es/global_styling/functions/size.js +17 -1
- package/optimize/es/global_styling/mixins/_color.js +31 -39
- package/optimize/es/global_styling/mixins/index.js +1 -2
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +53 -1
- package/optimize/es/global_styling/variables/animations.js +22 -1
- package/optimize/es/global_styling/variables/breakpoint.js +7 -1
- package/optimize/es/global_styling/variables/levels.js +17 -1
- package/optimize/es/global_styling/variables/shadow.js +11 -1
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +32 -1
- package/optimize/es/services/color/eui_palettes.js +47 -116
- package/optimize/es/services/color/index.js +0 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/popover/index.js +1 -4
- package/optimize/es/services/popover/popover_positioning.js +17 -6
- package/optimize/es/services/theme/provider.js +2 -26
- package/optimize/es/services/theme/types.js +6 -1
- package/optimize/es/services/theme/utils.js +295 -1
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +198 -1
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +19 -612
- package/optimize/es/themes/amsterdam/theme.js +1 -7
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +6 -9
- package/optimize/lib/components/avatar/avatar.js +2 -8
- package/optimize/lib/components/badge/badge.styles.js +2 -1
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/optimize/lib/components/badge/color_utils.js +13 -14
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/optimize/lib/components/button/button.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +2 -5
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +2 -1
- package/optimize/lib/components/code/code_syntax.styles.js +27 -23
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/optimize/lib/components/color_picker/color_picker.js +2 -8
- package/optimize/lib/components/color_picker/color_picker.styles.js +2 -1
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/comment_list/comment_event.js +3 -4
- package/optimize/lib/components/common.js +28 -0
- package/optimize/lib/components/datagrid/data_grid.styles.js +7 -6
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +2 -3
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +4 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +2 -1
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +2 -1
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +2 -7
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +31 -27
- package/optimize/lib/components/form/range/range_tooltip.styles.js +13 -11
- package/optimize/lib/components/form/switch/switch.js +2 -3
- package/optimize/lib/components/form/switch/switch.styles.js +19 -16
- package/optimize/lib/components/header/header.styles.js +6 -5
- package/optimize/lib/components/icon/icon.styles.js +8 -9
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/optimize/lib/components/list_group/list_group_item.styles.js +10 -8
- package/optimize/lib/components/loading/loading_chart.styles.js +5 -13
- package/optimize/lib/components/mark/mark.styles.js +9 -2
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/lib/components/modal/modal.styles.js +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +15 -16
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +27 -29
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +2 -1
- package/optimize/lib/components/skeleton/utils.js +6 -4
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +7 -2
- package/optimize/lib/components/table/table_row.styles.js +9 -7
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/text/text_color.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +5 -6
- package/optimize/lib/components/toast/toast.styles.js +1 -1
- package/optimize/lib/components/token/token.js +4 -13
- package/optimize/lib/components/token/token.styles.js +3 -12
- package/optimize/lib/components/token/token_map.js +2 -244
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +23 -11
- package/optimize/lib/components/tour/_tour_footer.styles.js +4 -2
- package/optimize/lib/components/tour/tour.styles.js +12 -8
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +2 -1
- package/optimize/lib/global_styling/functions/math.js +59 -7
- package/optimize/lib/global_styling/functions/size.js +27 -7
- package/optimize/lib/global_styling/mixins/_color.js +30 -38
- package/optimize/lib/global_styling/mixins/index.js +0 -11
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +61 -6
- package/optimize/lib/global_styling/variables/animations.js +31 -25
- package/optimize/lib/global_styling/variables/breakpoint.js +16 -7
- package/optimize/lib/global_styling/variables/levels.js +26 -7
- package/optimize/lib/global_styling/variables/shadow.js +20 -13
- package/optimize/lib/global_styling/variables/size.js +10 -7
- package/optimize/lib/global_styling/variables/typography.js +41 -19
- package/optimize/lib/services/color/eui_palettes.js +47 -116
- package/optimize/lib/services/color/index.js +0 -8
- package/optimize/lib/services/index.js +0 -7
- package/optimize/lib/services/popover/index.js +1 -8
- package/optimize/lib/services/popover/popover_positioning.js +17 -6
- package/optimize/lib/services/theme/provider.js +2 -26
- package/optimize/lib/services/theme/types.js +14 -13
- package/optimize/lib/services/theme/utils.js +296 -54
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +203 -45
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/optimize/lib/themes/amsterdam/theme.js +1 -7
- package/optimize/lib/themes/index.js +0 -7
- package/optimize/lib/themes/themes.js +7 -10
- package/package.json +3 -7
- package/src/global_styling/functions/_index.scss +5 -1
- package/src/global_styling/index.scss +10 -1
- package/src/global_styling/variables/_animations.scss +8 -1
- package/src/global_styling/variables/_borders.scss +9 -1
- package/src/global_styling/variables/_buttons.scss +18 -1
- package/src/global_styling/variables/_colors_vis.scss +70 -1
- package/src/global_styling/variables/_font_weight.scss +7 -1
- package/src/global_styling/variables/_form.scss +21 -2
- package/src/global_styling/variables/_responsive.scss +9 -1
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +13 -1
- package/src/global_styling/variables/_states.scss +14 -1
- package/src/global_styling/variables/_typography.scss +75 -1
- package/src/global_styling/variables/_z_index.scss +33 -1
- package/src/themes/amsterdam/_colors_dark.scss +8 -80
- package/src/themes/amsterdam/_colors_light.scss +8 -80
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -2
- package/test-env/components/avatar/avatar.js +2 -8
- package/test-env/components/badge/badge.styles.js +2 -1
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -3
- package/test-env/components/badge/color_utils.js +13 -14
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +2 -1
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +7 -5
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +2 -5
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +2 -1
- package/test-env/components/code/code_syntax.styles.js +27 -23
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +5 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +2 -1
- package/test-env/components/color_picker/color_picker.js +2 -8
- package/test-env/components/color_picker/color_picker.styles.js +2 -1
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/comment_list/comment.js +1 -1
- package/test-env/components/comment_list/comment_event.js +4 -5
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +28 -0
- package/test-env/components/datagrid/data_grid.styles.js +7 -6
- package/test-env/components/date_picker/react_date_picker.styles.js +2 -3
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -2
- package/test-env/components/drag_and_drop/droppable.styles.js +4 -2
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +1 -5
- package/test-env/components/filter_group/filter_select_item.styles.js +2 -1
- package/test-env/components/flyout/_flyout_close_button.styles.js +2 -1
- package/test-env/components/flyout/flyout.styles.js +2 -7
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +31 -27
- package/test-env/components/form/range/range_tooltip.styles.js +13 -11
- package/test-env/components/form/switch/switch.js +2 -3
- package/test-env/components/form/switch/switch.styles.js +19 -16
- package/test-env/components/header/header.styles.js +6 -5
- package/test-env/components/icon/icon.styles.js +8 -9
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.styles.js +2 -1
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +2 -1
- package/test-env/components/list_group/list_group_item.styles.js +10 -8
- package/test-env/components/loading/loading_chart.styles.js +5 -13
- package/test-env/components/mark/mark.styles.js +9 -2
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +3 -2
- package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
- package/test-env/components/modal/modal.styles.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.styles.js +2 -1
- package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +3 -8
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +15 -16
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +27 -29
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +2 -1
- package/test-env/components/side_nav/side_nav_item.styles.js +2 -1
- package/test-env/components/skeleton/utils.js +6 -4
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +7 -2
- package/test-env/components/table/table_row.styles.js +9 -7
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/text/text_color.js +1 -1
- package/test-env/components/text/text_color.styles.js +5 -6
- package/test-env/components/toast/toast.styles.js +1 -1
- package/test-env/components/token/token.js +4 -13
- package/test-env/components/token/token.styles.js +3 -12
- package/test-env/components/token/token_map.js +2 -244
- package/test-env/components/tool_tip/tool_tip.styles.js +23 -11
- package/test-env/components/tour/_tour_footer.styles.js +4 -2
- package/test-env/components/tour/tour.styles.js +12 -8
- package/test-env/components/tree_view/tree_view_item.styles.js +2 -1
- package/test-env/global_styling/functions/math.js +59 -7
- package/test-env/global_styling/functions/size.js +27 -7
- package/test-env/global_styling/mixins/_color.js +30 -38
- package/test-env/global_styling/mixins/index.js +0 -11
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +61 -6
- package/test-env/global_styling/variables/animations.js +31 -25
- package/test-env/global_styling/variables/breakpoint.js +16 -7
- package/test-env/global_styling/variables/levels.js +26 -7
- package/test-env/global_styling/variables/shadow.js +20 -13
- package/test-env/global_styling/variables/size.js +10 -7
- package/test-env/global_styling/variables/typography.js +41 -19
- package/test-env/services/color/eui_palettes.js +47 -116
- package/test-env/services/color/index.js +0 -8
- package/test-env/services/index.js +0 -7
- package/test-env/services/popover/index.js +1 -8
- package/test-env/services/popover/popover_positioning.js +17 -6
- package/test-env/services/theme/provider.js +2 -26
- package/test-env/services/theme/types.js +14 -13
- package/test-env/services/theme/utils.js +296 -54
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +203 -45
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +19 -611
- package/test-env/themes/amsterdam/theme.js +1 -7
- package/test-env/themes/index.js +0 -7
- package/test-env/themes/themes.js +7 -10
- package/dist/eui_theme_borealis_dark.json +0 -314
- package/dist/eui_theme_borealis_dark.json.d.ts +0 -317
- package/dist/eui_theme_borealis_light.json +0 -314
- package/dist/eui_theme_borealis_light.json.d.ts +0 -317
- package/es/global_styling/mixins/_button.js +0 -159
- package/es/services/color/vis_color_store.js +0 -13
- package/es/services/popover/popover_arrow.styles.js +0 -31
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -281
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -94
- package/es/themes/amsterdam/global_styling/variables/_components.js +0 -604
- package/es/themes/amsterdam/global_styling/variables/_forms.js +0 -161
- package/lib/global_styling/mixins/_button.js +0 -164
- package/lib/services/color/vis_color_store.js +0 -18
- package/lib/services/popover/popover_arrow.styles.js +0 -37
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -285
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/lib/themes/amsterdam/global_styling/variables/_components.js +0 -608
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -165
- package/optimize/es/global_styling/mixins/_button.js +0 -159
- package/optimize/es/services/color/vis_color_store.js +0 -13
- package/optimize/es/services/popover/popover_arrow.styles.js +0 -31
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +0 -270
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -94
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +0 -596
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +0 -153
- package/optimize/lib/global_styling/mixins/_button.js +0 -165
- package/optimize/lib/services/color/vis_color_store.js +0 -18
- package/optimize/lib/services/popover/popover_arrow.styles.js +0 -37
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +0 -275
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +0 -601
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +0 -158
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +0 -72
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +0 -12
- package/test-env/global_styling/mixins/_button.js +0 -165
- package/test-env/services/color/vis_color_store.js +0 -18
- package/test-env/services/popover/popover_arrow.styles.js +0 -37
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +0 -275
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +0 -100
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +0 -601
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +0 -158
- /package/dist/{eui_theme_amsterdam_dark.json → eui_theme_dark.json} +0 -0
- /package/dist/{eui_theme_amsterdam_light.json → eui_theme_light.json} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.TOKEN_MAP = void 0;
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,7 +18,7 @@ exports.TOKEN_MAP_BOREALIS = exports.TOKEN_MAP_AMSTERDAM = exports.TOKEN_COLOR_T
|
|
|
18
18
|
* circle shape for more uncommon token types so they grab attention.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var TOKEN_MAP = exports.TOKEN_MAP = {
|
|
22
22
|
tokenAlias: {
|
|
23
23
|
shape: 'circle',
|
|
24
24
|
color: 'euiColorVis3'
|
|
@@ -247,246 +247,4 @@ var TOKEN_MAP_AMSTERDAM = exports.TOKEN_MAP_AMSTERDAM = {
|
|
|
247
247
|
shape: 'square',
|
|
248
248
|
color: 'euiColorVis1'
|
|
249
249
|
}
|
|
250
|
-
};
|
|
251
|
-
var TOKEN_MAP_BOREALIS = exports.TOKEN_MAP_BOREALIS = {
|
|
252
|
-
tokenAlias: {
|
|
253
|
-
shape: 'circle',
|
|
254
|
-
color: 'euiColorVis1'
|
|
255
|
-
},
|
|
256
|
-
tokenAnnotation: {
|
|
257
|
-
shape: 'square',
|
|
258
|
-
color: 'euiColorVis8'
|
|
259
|
-
},
|
|
260
|
-
tokenArray: {
|
|
261
|
-
shape: 'square',
|
|
262
|
-
color: 'euiColorVis3'
|
|
263
|
-
},
|
|
264
|
-
tokenBinary: {
|
|
265
|
-
shape: 'square',
|
|
266
|
-
color: 'euiColorVis5'
|
|
267
|
-
},
|
|
268
|
-
tokenBoolean: {
|
|
269
|
-
shape: 'square',
|
|
270
|
-
color: 'euiColorVis3'
|
|
271
|
-
},
|
|
272
|
-
tokenClass: {
|
|
273
|
-
shape: 'circle',
|
|
274
|
-
color: 'euiColorVis2'
|
|
275
|
-
},
|
|
276
|
-
tokenCompletionSuggester: {
|
|
277
|
-
shape: 'square',
|
|
278
|
-
color: 'euiColorVis2'
|
|
279
|
-
},
|
|
280
|
-
tokenConstant: {
|
|
281
|
-
shape: 'circle',
|
|
282
|
-
color: 'euiColorVis0'
|
|
283
|
-
},
|
|
284
|
-
tokenDate: {
|
|
285
|
-
shape: 'square',
|
|
286
|
-
color: 'euiColorVis9'
|
|
287
|
-
},
|
|
288
|
-
tokenDimension: {
|
|
289
|
-
shape: 'square',
|
|
290
|
-
color: 'euiColorVis2'
|
|
291
|
-
},
|
|
292
|
-
tokenElement: {
|
|
293
|
-
shape: 'square',
|
|
294
|
-
color: 'euiColorVis1'
|
|
295
|
-
},
|
|
296
|
-
tokenEnum: {
|
|
297
|
-
shape: 'circle',
|
|
298
|
-
color: 'euiColorVis1'
|
|
299
|
-
},
|
|
300
|
-
tokenEnumMember: {
|
|
301
|
-
shape: 'square',
|
|
302
|
-
color: 'euiColorVis3'
|
|
303
|
-
},
|
|
304
|
-
tokenEvent: {
|
|
305
|
-
shape: 'circle',
|
|
306
|
-
color: 'euiColorVis5'
|
|
307
|
-
},
|
|
308
|
-
tokenException: {
|
|
309
|
-
shape: 'circle',
|
|
310
|
-
color: 'euiColorVis0'
|
|
311
|
-
},
|
|
312
|
-
tokenField: {
|
|
313
|
-
shape: 'circle',
|
|
314
|
-
color: 'euiColorVis0'
|
|
315
|
-
},
|
|
316
|
-
tokenFile: {
|
|
317
|
-
shape: 'square',
|
|
318
|
-
color: 'euiColorVis4'
|
|
319
|
-
},
|
|
320
|
-
tokenFlattened: {
|
|
321
|
-
shape: 'square',
|
|
322
|
-
color: 'euiColorVis3'
|
|
323
|
-
},
|
|
324
|
-
tokenFunction: {
|
|
325
|
-
shape: 'circle',
|
|
326
|
-
color: 'euiColorVis4'
|
|
327
|
-
},
|
|
328
|
-
tokenGeo: {
|
|
329
|
-
shape: 'square',
|
|
330
|
-
color: 'euiColorVis8'
|
|
331
|
-
},
|
|
332
|
-
tokenHistogram: {
|
|
333
|
-
shape: 'square',
|
|
334
|
-
color: 'euiColorVis9'
|
|
335
|
-
},
|
|
336
|
-
tokenInterface: {
|
|
337
|
-
shape: 'circle',
|
|
338
|
-
color: 'euiColorVis6'
|
|
339
|
-
},
|
|
340
|
-
tokenIP: {
|
|
341
|
-
shape: 'square',
|
|
342
|
-
color: 'euiColorVis6'
|
|
343
|
-
},
|
|
344
|
-
tokenJoin: {
|
|
345
|
-
shape: 'square',
|
|
346
|
-
color: 'euiColorVis8'
|
|
347
|
-
},
|
|
348
|
-
tokenKey: {
|
|
349
|
-
shape: 'circle',
|
|
350
|
-
color: 'euiColorVis8'
|
|
351
|
-
},
|
|
352
|
-
tokenKeyword: {
|
|
353
|
-
shape: 'square',
|
|
354
|
-
color: 'euiColorVis2'
|
|
355
|
-
},
|
|
356
|
-
tokenMethod: {
|
|
357
|
-
shape: 'square',
|
|
358
|
-
color: 'euiColorVis4'
|
|
359
|
-
},
|
|
360
|
-
tokenMetricCounter: {
|
|
361
|
-
shape: 'square',
|
|
362
|
-
color: 'euiColorVis0'
|
|
363
|
-
},
|
|
364
|
-
tokenMetricGauge: {
|
|
365
|
-
shape: 'square',
|
|
366
|
-
color: 'euiColorVis0'
|
|
367
|
-
},
|
|
368
|
-
tokenModule: {
|
|
369
|
-
shape: 'square',
|
|
370
|
-
color: 'euiColorVis5'
|
|
371
|
-
},
|
|
372
|
-
tokenNamespace: {
|
|
373
|
-
shape: 'square',
|
|
374
|
-
color: 'euiColorVis2'
|
|
375
|
-
},
|
|
376
|
-
tokenNested: {
|
|
377
|
-
shape: 'circle',
|
|
378
|
-
color: 'euiColorVis4'
|
|
379
|
-
},
|
|
380
|
-
tokenNull: {
|
|
381
|
-
shape: 'square',
|
|
382
|
-
color: 'euiColorVis4'
|
|
383
|
-
},
|
|
384
|
-
tokenNumber: {
|
|
385
|
-
shape: 'square',
|
|
386
|
-
color: 'euiColorVis0'
|
|
387
|
-
},
|
|
388
|
-
tokenObject: {
|
|
389
|
-
shape: 'circle',
|
|
390
|
-
color: 'euiColorVis1'
|
|
391
|
-
},
|
|
392
|
-
tokenOperator: {
|
|
393
|
-
shape: 'circle',
|
|
394
|
-
color: 'euiColorVis5'
|
|
395
|
-
},
|
|
396
|
-
tokenPackage: {
|
|
397
|
-
shape: 'square',
|
|
398
|
-
color: 'euiColorVis0'
|
|
399
|
-
},
|
|
400
|
-
tokenParameter: {
|
|
401
|
-
shape: 'square',
|
|
402
|
-
color: 'euiColorVis5'
|
|
403
|
-
},
|
|
404
|
-
tokenPercolator: {
|
|
405
|
-
shape: 'square',
|
|
406
|
-
color: 'euiColorVis9'
|
|
407
|
-
},
|
|
408
|
-
tokenProperty: {
|
|
409
|
-
shape: 'circle',
|
|
410
|
-
color: 'euiColorVis4'
|
|
411
|
-
},
|
|
412
|
-
tokenRange: {
|
|
413
|
-
shape: 'circle',
|
|
414
|
-
color: 'euiColorVis5'
|
|
415
|
-
},
|
|
416
|
-
tokenRankFeature: {
|
|
417
|
-
shape: 'square',
|
|
418
|
-
color: 'euiColorVis7'
|
|
419
|
-
},
|
|
420
|
-
tokenRankFeatures: {
|
|
421
|
-
shape: 'square',
|
|
422
|
-
color: 'euiColorVis1'
|
|
423
|
-
},
|
|
424
|
-
tokenRepo: {
|
|
425
|
-
shape: 'square',
|
|
426
|
-
color: 'euiColorVis2'
|
|
427
|
-
},
|
|
428
|
-
tokenSearchType: {
|
|
429
|
-
shape: 'square',
|
|
430
|
-
color: 'euiColorVis8'
|
|
431
|
-
},
|
|
432
|
-
tokenSemanticText: {
|
|
433
|
-
shape: 'square',
|
|
434
|
-
color: 'euiColorVis0'
|
|
435
|
-
},
|
|
436
|
-
tokenShape: {
|
|
437
|
-
shape: 'circle',
|
|
438
|
-
color: 'euiColorVis7'
|
|
439
|
-
},
|
|
440
|
-
tokenString: {
|
|
441
|
-
shape: 'square',
|
|
442
|
-
color: 'euiColorVis2'
|
|
443
|
-
},
|
|
444
|
-
tokenStruct: {
|
|
445
|
-
shape: 'square',
|
|
446
|
-
color: 'euiColorVis0'
|
|
447
|
-
},
|
|
448
|
-
tokenSymbol: {
|
|
449
|
-
shape: 'square',
|
|
450
|
-
color: 'euiColorVis0'
|
|
451
|
-
},
|
|
452
|
-
tokenTag: {
|
|
453
|
-
shape: 'square',
|
|
454
|
-
color: 'euiColorVis6'
|
|
455
|
-
},
|
|
456
|
-
tokenText: {
|
|
457
|
-
shape: 'square',
|
|
458
|
-
color: 'euiColorVis1'
|
|
459
|
-
},
|
|
460
|
-
tokenTokenCount: {
|
|
461
|
-
shape: 'square',
|
|
462
|
-
color: 'euiColorVis5'
|
|
463
|
-
},
|
|
464
|
-
tokenVariable: {
|
|
465
|
-
shape: 'circle',
|
|
466
|
-
color: 'euiColorVis3'
|
|
467
|
-
},
|
|
468
|
-
tokenVectorDense: {
|
|
469
|
-
shape: 'square',
|
|
470
|
-
color: 'euiColorVis8'
|
|
471
|
-
},
|
|
472
|
-
tokenDenseVector: {
|
|
473
|
-
shape: 'square',
|
|
474
|
-
color: 'euiColorVis8'
|
|
475
|
-
},
|
|
476
|
-
tokenVectorSparse: {
|
|
477
|
-
shape: 'square',
|
|
478
|
-
color: 'euiColorVis2'
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
var TOKEN_COLOR_TO_ICON_COLOR_MAP = exports.TOKEN_COLOR_TO_ICON_COLOR_MAP = {
|
|
482
|
-
euiColorVis0: 'euiColorVis0',
|
|
483
|
-
euiColorVis1: 'euiColorVis0',
|
|
484
|
-
euiColorVis2: 'euiColorVis2',
|
|
485
|
-
euiColorVis3: 'euiColorVis2',
|
|
486
|
-
euiColorVis4: 'euiColorVis4',
|
|
487
|
-
euiColorVis5: 'euiColorVis4',
|
|
488
|
-
euiColorVis6: 'euiColorVis6',
|
|
489
|
-
euiColorVis7: 'euiColorVis6',
|
|
490
|
-
euiColorVis8: 'euiColorVis8',
|
|
491
|
-
euiColorVis9: 'euiColorVis8'
|
|
492
250
|
};
|
|
@@ -8,7 +8,7 @@ exports.euiToolTipStyles = exports.euiToolTipBorderColor = exports.euiToolTipBac
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _global_styling = require("../../global_styling");
|
|
11
|
-
var
|
|
11
|
+
var _services = require("../../services");
|
|
12
12
|
var _amsterdam = require("../../themes/amsterdam");
|
|
13
13
|
var _templateObject, _templateObject2;
|
|
14
14
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
@@ -18,11 +18,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
18
18
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
|
-
var euiToolTipBackgroundColor = exports.euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme) {
|
|
22
|
-
return euiTheme.
|
|
21
|
+
var euiToolTipBackgroundColor = exports.euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
22
|
+
return colorMode === _services.COLOR_MODES_STANDARD.dark ? (0, _services.shade)(euiTheme.colors.emptyShade, 1) : (0, _services.tint)(euiTheme.colors.fullShade, 0.25);
|
|
23
23
|
};
|
|
24
|
-
var euiToolTipBorderColor = exports.euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme) {
|
|
25
|
-
return euiTheme.
|
|
24
|
+
var euiToolTipBorderColor = exports.euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme, colorMode) {
|
|
25
|
+
return colorMode === _services.COLOR_MODES_STANDARD.dark ? (0, _services.shade)(euiTheme.colors.fullShade, 0.8) : (0, _services.tint)(euiTheme.colors.fullShade, 0.35);
|
|
26
26
|
};
|
|
27
27
|
var euiToolTipAnimationVertical = function euiToolTipAnimationVertical(size) {
|
|
28
28
|
return (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
|
|
@@ -33,13 +33,18 @@ var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size)
|
|
|
33
33
|
var euiToolTipStyles = exports.euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
34
34
|
var euiTheme = euiThemeContext.euiTheme,
|
|
35
35
|
colorMode = euiThemeContext.colorMode;
|
|
36
|
-
var hasVisibleBorder = colorMode === 'DARK';
|
|
37
36
|
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards");
|
|
37
|
+
// Shift arrow 1px more than half its size to account for border radius
|
|
38
38
|
var arrowSize = euiTheme.size.m;
|
|
39
|
-
var
|
|
39
|
+
var arrowPlusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
40
|
+
return (x / 2 + 1) * -1;
|
|
41
|
+
});
|
|
42
|
+
var arrowMinusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
43
|
+
return (x / 2 - 1) * -1;
|
|
44
|
+
});
|
|
40
45
|
return {
|
|
41
46
|
// Base
|
|
42
|
-
euiToolTip: /*#__PURE__*/(0, _react.css)((0, _amsterdam.euiShadow)(euiThemeContext), " border
|
|
47
|
+
euiToolTip: /*#__PURE__*/(0, _react.css)((0, _amsterdam.euiShadow)(euiThemeContext), " border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme, colorMode), ";};label:euiToolTip;"),
|
|
43
48
|
// Sizes
|
|
44
49
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:s;"),
|
|
45
50
|
// Positions
|
|
@@ -48,10 +53,17 @@ var euiToolTipStyles = exports.euiToolTipStyles = function euiToolTipStyles(euiT
|
|
|
48
53
|
left: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:left;"),
|
|
49
54
|
right: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";};label:right;"),
|
|
50
55
|
// Arrow
|
|
51
|
-
euiToolTip__arrow: /*#__PURE__*/(0, _react.css)(
|
|
52
|
-
|
|
56
|
+
euiToolTip__arrow: /*#__PURE__*/(0, _react.css)("content:'';position:absolute;transform-origin:center;border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
57
|
+
return x / 2;
|
|
58
|
+
}), ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", (0, _global_styling.logicalSizeCSS)(arrowSize, arrowSize), ";;label:euiToolTip__arrow;"),
|
|
59
|
+
arrowPositions: {
|
|
60
|
+
top: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:top;"),
|
|
61
|
+
bottom: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowMinusSize, ") rotateZ(45deg);;label:bottom;"),
|
|
62
|
+
left: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowPlusSize, ") rotateZ(45deg);;label:left;"),
|
|
63
|
+
right: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowMinusSize, ") rotateZ(45deg);;label:right;")
|
|
64
|
+
},
|
|
53
65
|
// Title
|
|
54
|
-
euiToolTip__title: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme))), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
|
|
66
|
+
euiToolTip__title: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme, colorMode))), " ", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
|
|
55
67
|
};
|
|
56
68
|
};
|
|
57
69
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiTourFooterStyles = exports._tourFooterBgColor = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
8
9
|
var _global_styling = require("../../global_styling");
|
|
9
10
|
/*
|
|
10
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -15,8 +16,9 @@ var _global_styling = require("../../global_styling");
|
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
var _tourFooterBgColor = exports._tourFooterBgColor = function _tourFooterBgColor(_ref) {
|
|
18
|
-
var
|
|
19
|
-
|
|
19
|
+
var colorMode = _ref.colorMode,
|
|
20
|
+
euiTheme = _ref.euiTheme;
|
|
21
|
+
return colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.45) : (0, _services.tint)(euiTheme.colors.lightestShade, 0.5);
|
|
20
22
|
};
|
|
21
23
|
var euiTourFooterStyles = exports.euiTourFooterStyles = function euiTourFooterStyles(euiThemeContext) {
|
|
22
24
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -7,6 +7,7 @@ exports.euiTourStyles = exports.euiTourBeaconStyles = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
9
|
var _popover_panel = require("../popover/popover_panel/_popover_panel.styles");
|
|
10
|
+
var _popover_arrow = require("../popover/popover_arrow/_popover_arrow.styles");
|
|
10
11
|
var _tour_footer = require("./_tour_footer.styles");
|
|
11
12
|
/*
|
|
12
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -19,23 +20,26 @@ var _tour_footer = require("./_tour_footer.styles");
|
|
|
19
20
|
var euiTourStyles = exports.euiTourStyles = function euiTourStyles(euiThemeContext) {
|
|
20
21
|
return {
|
|
21
22
|
// Targets EuiPopoverPanel
|
|
22
|
-
euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']{
|
|
23
|
+
euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']::before{", (0, _global_styling.logicalCSS)('border-top-color', (0, _tour_footer._tourFooterBgColor)(euiThemeContext)), ";};label:euiTour;")
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
var euiTourBeaconStyles = exports.euiTourBeaconStyles = function euiTourBeaconStyles(_ref) {
|
|
26
27
|
var euiTheme = _ref.euiTheme;
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
return x /
|
|
28
|
+
var arrowSize = euiTheme.size[_popover_arrow.popoverArrowSize];
|
|
29
|
+
var arrowHalfSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
30
|
+
return x / 2;
|
|
31
|
+
});
|
|
32
|
+
var arrowOffset = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
33
|
+
return x * -2;
|
|
30
34
|
});
|
|
31
35
|
return {
|
|
32
36
|
// Base
|
|
33
37
|
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;", _global_styling.euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
34
38
|
isOpen: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
35
39
|
// Positions
|
|
36
|
-
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top',
|
|
37
|
-
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top',
|
|
38
|
-
top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('
|
|
39
|
-
bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('
|
|
40
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), " ", (0, _global_styling.logicalCSS)('left', arrowOffset), ";;label:right;"),
|
|
41
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), " ", (0, _global_styling.logicalCSS)('left', arrowSize), ";;label:left;"),
|
|
42
|
+
top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowSize), " ", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:top;"),
|
|
43
|
+
bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowOffset), " ", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:bottom;")
|
|
40
44
|
};
|
|
41
45
|
};
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiTreeViewItemStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
8
9
|
var _global_styling = require("../../global_styling");
|
|
9
10
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
10
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -33,7 +34,7 @@ var euiTreeViewItemStyles = exports.euiTreeViewItemStyles = function euiTreeView
|
|
|
33
34
|
expanded: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100vh'), ";;label:expanded;")
|
|
34
35
|
},
|
|
35
36
|
button: {
|
|
36
|
-
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", euiTheme.
|
|
37
|
+
euiTreeView__nodeInner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xxs), " display:flex;align-items:center;&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:hover,&:active,&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.text, euiTheme.focus.transparency), ";};label:euiTreeView__nodeInner;"),
|
|
37
38
|
default: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', defaultSize), " gap:", euiTheme.size.s, ";border-radius:", euiTheme.border.radius.medium, ";;label:default;"),
|
|
38
39
|
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedSize), " gap:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";;label:compressed;")
|
|
39
40
|
},
|
|
@@ -1,12 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
exports.mathWithUnits = void 0;
|
|
9
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
10
|
+
var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
|
|
11
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), (0, _setPrototypeOf2.default)(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return (0, _inherits2.default)(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Utility for performing math callbacks on a string with CSS units
|
|
22
|
+
* and returning a string with its unit preserved.
|
|
23
|
+
*
|
|
24
|
+
* Example usage:
|
|
25
|
+
* mathWithUnits('4px', (x) => x / 2) = '2px';
|
|
26
|
+
* mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
|
|
27
|
+
* mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
|
|
28
|
+
*/
|
|
29
|
+
// Unfortunately, this is the CSSProperties[] type used for several euiTheme vars
|
|
30
|
+
|
|
31
|
+
var mathWithUnits = exports.mathWithUnits = function mathWithUnits(values, callback) {
|
|
32
|
+
var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
33
|
+
if (!Array.isArray(values)) values = [values];
|
|
34
|
+
var foundNumericValues = [];
|
|
35
|
+
var foundUnit = '';
|
|
36
|
+
values.forEach(function (value) {
|
|
37
|
+
if (typeof value === 'string') {
|
|
38
|
+
var _matches$groups, _matches$groups2;
|
|
39
|
+
var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\d.]+)(%|[a-zA-Z]*)/, {
|
|
40
|
+
value: 1,
|
|
41
|
+
unit: 2
|
|
42
|
+
});
|
|
43
|
+
var matches = regex.exec(value);
|
|
44
|
+
var numericValue = Number(matches === null || matches === void 0 || (_matches$groups = matches.groups) === null || _matches$groups === void 0 ? void 0 : _matches$groups.value);
|
|
45
|
+
if (!isNaN(numericValue)) {
|
|
46
|
+
foundNumericValues.push(numericValue);
|
|
47
|
+
} else {
|
|
48
|
+
throw new Error('No valid numeric value found');
|
|
49
|
+
}
|
|
50
|
+
if (!unit && matches !== null && matches !== void 0 && (_matches$groups2 = matches.groups) !== null && _matches$groups2 !== void 0 && _matches$groups2.unit) {
|
|
51
|
+
if (!foundUnit) {
|
|
52
|
+
foundUnit = matches.groups.unit;
|
|
53
|
+
} else if (foundUnit !== matches.groups.unit) {
|
|
54
|
+
throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
} else if (typeof value === 'number') {
|
|
58
|
+
foundNumericValues.push(value);
|
|
59
|
+
} else {
|
|
60
|
+
throw new Error('Invalid value type - pass a string or number');
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return "".concat(callback.apply(void 0, foundNumericValues)).concat(unit || foundUnit);
|
|
64
|
+
};
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
exports.sizeToPixel = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
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
|
+
* Calculates the `px` value based on a scale multiplier
|
|
19
|
+
* @param scale - The font scale multiplier
|
|
20
|
+
* *
|
|
21
|
+
* @param themeOrBase - Theme base value
|
|
22
|
+
* *
|
|
23
|
+
* @returns string - Rem unit aligned to baseline
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
var sizeToPixel = exports.sizeToPixel = function sizeToPixel() {
|
|
27
|
+
var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
28
|
+
return function (themeOrBase) {
|
|
29
|
+
var base = (0, _typeof2.default)(themeOrBase) === 'object' ? themeOrBase.base : themeOrBase;
|
|
30
|
+
return "".concat(base * scale, "px");
|
|
31
|
+
};
|
|
32
|
+
};
|