@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
package/es/components/common.js
CHANGED
|
@@ -28,6 +28,12 @@ export function keysOf(obj) {
|
|
|
28
28
|
return Object.keys(obj);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Like `keyof typeof`, but for getting values instead of keys
|
|
33
|
+
* ValueOf<typeof {key1: 'value1', key2: 'value2'}>
|
|
34
|
+
* Results in `'value1' | 'value2'`
|
|
35
|
+
*/
|
|
36
|
+
|
|
31
37
|
// Returns the props of a given HTML element
|
|
32
38
|
|
|
33
39
|
// Utility methods for ApplyClassComponentDefaults
|
|
@@ -120,4 +126,26 @@ React.FunctionComponent<ExclusiveUnion<Spanlike, Buttonlike>>
|
|
|
120
126
|
* type ButtonLike = PropsForButton<BaseProps>
|
|
121
127
|
* type ComponentProps = ExclusiveUnion<AnchorLike, ButtonLike>
|
|
122
128
|
* const Component: FunctionComponent<ComponentProps> ...
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Replaces all properties on any type as optional, includes nested types
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```ts
|
|
136
|
+
* interface Person {
|
|
137
|
+
* name: string;
|
|
138
|
+
* age?: number;
|
|
139
|
+
* spouse: Person;
|
|
140
|
+
* children: Person[];
|
|
141
|
+
* }
|
|
142
|
+
* type PartialPerson = RecursivePartial<Person>;
|
|
143
|
+
* // results in
|
|
144
|
+
* interface PartialPerson {
|
|
145
|
+
* name?: string;
|
|
146
|
+
* age?: number;
|
|
147
|
+
* spouse?: RecursivePartial<Person>;
|
|
148
|
+
* children?: RecursivePartial<Person>[]
|
|
149
|
+
* }
|
|
150
|
+
* ```
|
|
123
151
|
*/
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
+
import { tintOrShade } from '../../services';
|
|
10
11
|
import { euiFontSize, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling';
|
|
11
12
|
export var euiDataGridVariables = function euiDataGridVariables(euiThemeContext) {
|
|
12
13
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -36,14 +37,14 @@ export var euiDataGridVariables = function euiDataGridVariables(euiThemeContext)
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
export var euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
|
|
39
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
40
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
41
|
+
colorMode = euiThemeContext.colorMode;
|
|
40
42
|
var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
|
|
41
43
|
_cellPadding = _euiDataGridVariables.cellPadding,
|
|
42
44
|
lineHeight = _euiDataGridVariables.lineHeight,
|
|
43
45
|
_fontSize = _euiDataGridVariables.fontSize;
|
|
44
|
-
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.dataGridBorderColor);
|
|
45
46
|
return {
|
|
46
|
-
euiDataGrid: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;", logicalCSS('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.
|
|
47
|
+
euiDataGrid: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;", logicalCSS('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.colors.lightestShade, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.colors.highlight, ";};label:euiDataGrid;"),
|
|
47
48
|
cellPadding: {
|
|
48
49
|
cellPadding: function cellPadding(size) {
|
|
49
50
|
return /*#__PURE__*/css(".euiDataGridHeaderCell,.euiDataGridRowCell__content{padding:", _cellPadding[size], ";}/* Workaround to trim line-clamp and padding - @see https://github.com/elastic/eui/issues/7780 */.euiDataGridRowCell__content--lineCountHeight,.euiDataGridRowCell__content--autoBelowLineCountHeight{", logicalCSS('padding-bottom', 0), " ", logicalCSS('border-bottom', "".concat(_cellPadding[size], " solid transparent")), ";}.euiDataGridHeaderCell__button{margin-block:-", _cellPadding[size], ";};label:cellPadding;");
|
|
@@ -75,9 +76,9 @@ export var euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
|
|
|
75
76
|
},
|
|
76
77
|
borders: {
|
|
77
78
|
none: null,
|
|
78
|
-
horizontal: /*#__PURE__*/css("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', border), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', border), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", logicalCSS('border-top', border), ";};label:horizontal;"),
|
|
79
|
-
all: /*#__PURE__*/css("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", logicalCSS('border-bottom', border), " ", logicalCSS('border-right', // Visually lighten vertical borders
|
|
80
|
-
"".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.
|
|
79
|
+
horizontal: /*#__PURE__*/css("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";};label:horizontal;"),
|
|
80
|
+
all: /*#__PURE__*/css("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", logicalCSS('border-bottom', euiTheme.border.thin), " ", logicalCSS('border-right', // Visually lighten vertical borders
|
|
81
|
+
"".concat(euiTheme.border.width.thin, " solid ").concat(tintOrShade(euiTheme.border.color, 0.3, colorMode))), ";}&--firstColumn{", logicalCSS('border-left', euiTheme.border.thin), ";}&--lastColumn{", logicalCSS('border-right-color', euiTheme.border.color), ";}}.euiDataGridFooterCell,.euiDataGridHeaderCell{", logicalCSS('border-right', euiTheme.border.thin), " &:first-of-type{", logicalCSS('border-left', euiTheme.border.thin), ";}}.euiDataGridFooter{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:is(.euiDataGrid--noControls) .euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";}.euiDataGrid__controls{border:", euiTheme.border.thin, ";background-color:", euiTheme.colors.body, ";};label:all;")
|
|
81
82
|
},
|
|
82
83
|
// Sits below the controls above it and pagination below it
|
|
83
84
|
euiDataGrid__content: /*#__PURE__*/css("z-index:1;position:relative;flex-grow:1;", logicalSizeCSS('100%'), " ", logicalCSS('max-width', '100%'), " overflow:hidden;font-feature-settings:'tnum' 1;;label:euiDataGrid__content;"),
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
// Needs to use vanilla `css` to pass a className directly to react-datepicker
|
|
10
10
|
import { css } from '@emotion/css';
|
|
11
11
|
import { euiCanAnimate, euiMaxBreakpoint, euiFontSize, euiYScroll, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
12
|
-
import { euiButtonColor, euiButtonEmptyColor, euiButtonFillColor } from '../../global_styling/mixins';
|
|
13
|
-
import { euiShadowSmall } from '../../themes/amsterdam/global_styling/mixins';
|
|
12
|
+
import { euiButtonColor, euiButtonEmptyColor, euiButtonFillColor, euiShadowSmall } from '../../themes/amsterdam/global_styling/mixins';
|
|
14
13
|
import { euiFormControlStyles, euiFormControlText, euiFormControlDefaultShadow } from '../form/form.styles';
|
|
15
14
|
export var euiDatePickerVariables = function euiDatePickerVariables(_ref) {
|
|
16
15
|
var euiTheme = _ref.euiTheme;
|
|
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { makeHighContrastColor } from '../../../services';
|
|
11
|
+
import { tint, shade, makeHighContrastColor } from '../../../services';
|
|
12
12
|
import { euiFontSize, euiMaxBreakpoint, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
13
13
|
import { euiFormVariables, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlDisabledStyles } from '../../form/form.styles';
|
|
14
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -20,7 +20,8 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
20
20
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
21
|
};
|
|
22
22
|
export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiThemeContext) {
|
|
23
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
24
|
+
colorMode = euiThemeContext.colorMode;
|
|
24
25
|
var forms = euiFormVariables(euiThemeContext);
|
|
25
26
|
var inputWidth = euiTheme.base * 30;
|
|
26
27
|
var buttonWidth = euiTheme.base * 7; // @see _button_display.styles.ts
|
|
@@ -38,7 +39,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
// Needs updating colors
|
|
41
|
-
var needsUpdatingBackgroundColor = euiTheme.
|
|
42
|
+
var needsUpdatingBackgroundColor = colorMode === 'DARK' ? shade(euiTheme.colors.success, 0.7) : tint(euiTheme.colors.success, 0.9);
|
|
42
43
|
var needsUpdatingTextColor = makeHighContrastColor(euiTheme.colors.success)(needsUpdatingBackgroundColor);
|
|
43
44
|
return {
|
|
44
45
|
euiSuperDatePicker: /*#__PURE__*/css("display:flex;gap:", gap, ";", logicalCSS('max-width', '100%'), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{", logicalCSS('width', '100%'), ";};label:euiSuperDatePicker;"),
|
|
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
+
import { transparentize } from '../../services';
|
|
11
12
|
import { euiCanAnimate } from '../../global_styling';
|
|
12
13
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
14
|
name: "jkp921-noGrow",
|
|
@@ -27,10 +28,11 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27
28
|
};
|
|
28
29
|
export var euiDroppableStyles = function euiDroppableStyles(euiThemeContext) {
|
|
29
30
|
var euiTheme = euiThemeContext.euiTheme;
|
|
31
|
+
var droppableColor = euiTheme.colors.success;
|
|
30
32
|
return {
|
|
31
33
|
euiDroppable: /*#__PURE__*/css(euiCanAnimate, "{transition:background-color ", euiTheme.animation.slow, " ease;};label:euiDroppable;"),
|
|
32
|
-
isDragging: /*#__PURE__*/css("background-color:",
|
|
33
|
-
isDraggingOver: /*#__PURE__*/css("background-color:",
|
|
34
|
+
isDragging: /*#__PURE__*/css("background-color:", transparentize(droppableColor, 0.1), ";;label:isDragging;"),
|
|
35
|
+
isDraggingOver: /*#__PURE__*/css("background-color:", transparentize(droppableColor, 0.25), ";;label:isDraggingOver;"),
|
|
34
36
|
grow: _ref2,
|
|
35
37
|
noGrow: _ref,
|
|
36
38
|
spacing: sharedSpacingPadding(euiThemeContext)
|
|
@@ -135,7 +135,7 @@ EuiEmptyPrompt.propTypes = {
|
|
|
135
135
|
* Background color of the panel;
|
|
136
136
|
* Usually a lightened form of the brand colors
|
|
137
137
|
*/
|
|
138
|
-
color: PropTypes.
|
|
138
|
+
color: PropTypes.any,
|
|
139
139
|
/*
|
|
140
140
|
* Accepts any [EuiIcon.type](#/display/icons)
|
|
141
141
|
*/
|
|
@@ -14,8 +14,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { css } from '@emotion/react';
|
|
17
|
-
import { euiMinBreakpoint, euiPaddingSize, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
18
|
-
import { getTokenName } from '@elastic/eui-theme-common';
|
|
17
|
+
import { euiMinBreakpoint, euiPaddingSize, euiBorderColor, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
19
18
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
20
19
|
name: "x4698b-roundedBorders",
|
|
21
20
|
styles: "border-radius:inherit;label:roundedBorders;"
|
|
@@ -71,8 +70,7 @@ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext)
|
|
|
71
70
|
};
|
|
72
71
|
};
|
|
73
72
|
var generateFooterBorder = function generateFooterBorder(color) {
|
|
74
|
-
|
|
75
|
-
return "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors[borderToken]);
|
|
73
|
+
return "".concat(euiTheme.border.width.thin, " solid ").concat(euiBorderColor(euiThemeContext, color));
|
|
76
74
|
};
|
|
77
75
|
return {
|
|
78
76
|
euiEmptyPrompt: /*#__PURE__*/css("text-align:center;margin:auto;", euiMinBreakpoint(euiThemeContext, 'l'), "{", logicalCSS('max-width', 'max-content'), ";};label:euiEmptyPrompt;"),
|
|
@@ -107,10 +105,8 @@ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext)
|
|
|
107
105
|
transparent: /*#__PURE__*/css("background-color:", euiTheme.colors.body, ";;label:transparent;"),
|
|
108
106
|
plain: /*#__PURE__*/css("background-color:", euiTheme.colors.body, ";;label:plain;"),
|
|
109
107
|
subdued: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
110
|
-
highlighted: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('plain')), ";;label:highlighted;"),
|
|
111
108
|
primary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
112
109
|
accent: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
113
|
-
accentSecondary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
114
110
|
danger: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
115
111
|
warning: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
116
112
|
success: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
+
import { transparentize } from '../../services';
|
|
10
11
|
import { logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
|
|
11
12
|
export var euiFilterSelectItemStyles = function euiFilterSelectItemStyles(euiThemeContext) {
|
|
12
13
|
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
-
var focusStyles = "\n color: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.focus.backgroundColor, ";\n outline-offset: -").concat(euiTheme.focus.width, ";\n text-decoration: underline;\n\n &:disabled {\n background-color: ").concat(euiTheme.
|
|
14
|
+
var focusStyles = "\n color: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.focus.backgroundColor, ";\n outline-offset: -").concat(euiTheme.focus.width, ";\n text-decoration: underline;\n\n &:disabled {\n background-color: ").concat(transparentize(euiTheme.colors.disabled, 0.1), ";\n }\n ");
|
|
14
15
|
return {
|
|
15
16
|
euiFilterSelectItem: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " ", logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.m)), " ", euiFontSize(euiThemeContext, 's'), " ", logicalTextAlignCSS('left'), " color:", euiTheme.colors.text, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.lightestShade)), " &:hover{cursor:pointer;text-decoration:underline;}&:focus{", focusStyles, ";}&:disabled{cursor:not-allowed;text-decoration:none;color:", euiTheme.colors.disabledText, ";};label:euiFilterSelectItem;"),
|
|
16
17
|
isFocused: /*#__PURE__*/css(focusStyles, ";;label:isFocused;")
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { euiMaxBreakpoint, euiMinBreakpoint, logicalCSS } from '../../global_styling';
|
|
11
11
|
import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
|
|
12
|
+
import { transparentize } from '../../services';
|
|
12
13
|
import { FLYOUT_BREAKPOINT } from './flyout.styles';
|
|
13
14
|
export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
14
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
16
|
return {
|
|
16
17
|
euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
17
|
-
inside: /*#__PURE__*/css("background-color:", euiTheme.
|
|
18
|
+
inside: /*#__PURE__*/css("background-color:", transparentize(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
|
|
18
19
|
outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), "animation:none!important;;label:outside;"),
|
|
19
20
|
outsideSide: {
|
|
20
21
|
// `transforms` pull in close buttons a little
|
|
@@ -145,7 +145,7 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
145
145
|
return _objectSpread(_objectSpread(_objectSpread({}, style), widthStyle), maxWidthStyle);
|
|
146
146
|
}, [style, maxWidth, size]);
|
|
147
147
|
var styles = useEuiMemoizedStyles(euiFlyoutStyles);
|
|
148
|
-
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay
|
|
148
|
+
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay, isPushed && styles.push[side], isPushed && !pushAnimation && styles.push.noAnimation, styles[side]];
|
|
149
149
|
var classes = classnames('euiFlyout', className);
|
|
150
150
|
|
|
151
151
|
/*
|
|
@@ -25,8 +25,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
25
25
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
26
|
};
|
|
27
27
|
export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
28
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
29
|
-
colorMode = euiThemeContext.colorMode;
|
|
28
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
30
29
|
return {
|
|
31
30
|
euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('bottom', 0), " ", logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)'), " ", logicalCSS('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", euiMaxBreakpoint(euiThemeContext, FLYOUT_BREAKPOINT), "{", logicalCSS('max-width', '90vw !important'), ";};label:euiFlyout;"),
|
|
32
31
|
// Flyout sizes
|
|
@@ -39,11 +38,7 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
|
39
38
|
// Left-side flyouts should only be used for navigation
|
|
40
39
|
left: /*#__PURE__*/css(logicalCSS('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
|
|
41
40
|
// Type
|
|
42
|
-
overlay:
|
|
43
|
-
overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), " &:has(.euiResizableButton){border-inline:none;};label:overlay;"),
|
|
44
|
-
left: /*#__PURE__*/css("border-inline-end:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:left;"),
|
|
45
|
-
right: /*#__PURE__*/css("border-inline-start:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:right;")
|
|
46
|
-
},
|
|
41
|
+
overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";;label:overlay;"),
|
|
47
42
|
push: {
|
|
48
43
|
push: /*#__PURE__*/css("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
|
|
49
44
|
right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
|
|
@@ -10,6 +10,6 @@ import { css } from '@emotion/react';
|
|
|
10
10
|
export var euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
|
|
11
11
|
var euiTheme = euiThemeContext.euiTheme;
|
|
12
12
|
return {
|
|
13
|
-
euiFlyoutFooter: /*#__PURE__*/css("background-color:", euiTheme.
|
|
13
|
+
euiFlyoutFooter: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";flex-grow:0;;label:euiFlyoutFooter;")
|
|
14
14
|
};
|
|
15
15
|
};
|
|
@@ -12,19 +12,24 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { makeHighContrastColor } from '../../services';
|
|
15
|
+
import { shade, tint, darken, transparentize, makeHighContrastColor } from '../../services';
|
|
16
16
|
import { logicalCSS, mathWithUnits, euiCanAnimate, euiFontSize } from '../../global_styling';
|
|
17
|
+
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
17
18
|
|
|
18
19
|
// There are multiple components that only need the form max-width size &
|
|
19
20
|
// don't need the extra overhead/color computing expense of every form var.
|
|
20
21
|
// For microperf, we're making this its own util
|
|
21
22
|
export var euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
22
23
|
var euiTheme = _ref.euiTheme;
|
|
23
|
-
return euiTheme.
|
|
24
|
+
return mathWithUnits(euiTheme.size.base, function (x) {
|
|
25
|
+
return x * 25;
|
|
26
|
+
});
|
|
24
27
|
};
|
|
25
28
|
export var euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
26
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
27
|
-
|
|
29
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
30
|
+
colorMode = euiThemeContext.colorMode;
|
|
31
|
+
var isColorDark = colorMode === 'DARK';
|
|
32
|
+
var backgroundColor = isColorDark ? shade(euiTheme.colors.lightestShade, 0.4) : tint(euiTheme.colors.lightestShade, 0.6);
|
|
28
33
|
var controlHeight = euiTheme.size.xxl;
|
|
29
34
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
30
35
|
var sizes = {
|
|
@@ -43,16 +48,15 @@ export var euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
|
43
48
|
})
|
|
44
49
|
};
|
|
45
50
|
var colors = {
|
|
46
|
-
textColor: euiTheme.colors.
|
|
47
|
-
textColorDisabled: euiTheme.components.forms.colorDisabled,
|
|
51
|
+
textColor: euiTheme.colors.text,
|
|
48
52
|
backgroundColor: backgroundColor,
|
|
49
|
-
backgroundDisabledColor: euiTheme.
|
|
50
|
-
backgroundReadOnlyColor: euiTheme.
|
|
51
|
-
borderColor: euiTheme.
|
|
52
|
-
controlDisabledColor: euiTheme.
|
|
53
|
+
backgroundDisabledColor: darken(euiTheme.colors.lightestShade, 0.05),
|
|
54
|
+
backgroundReadOnlyColor: euiTheme.colors.emptyShade,
|
|
55
|
+
borderColor: transparentize(colorMode === 'DARK' ? euiTheme.colors.ghost : darken(euiTheme.border.color, 4), 0.1),
|
|
56
|
+
controlDisabledColor: euiTheme.colors.mediumShade,
|
|
53
57
|
controlBoxShadow: '0 0 transparent',
|
|
54
58
|
controlPlaceholderText: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
55
|
-
appendPrependBackground: euiTheme.
|
|
59
|
+
appendPrependBackground: isColorDark ? shade(euiTheme.colors.lightShade, 0.15) : tint(euiTheme.colors.lightShade, 0.5)
|
|
56
60
|
};
|
|
57
61
|
var controlLayout = {
|
|
58
62
|
controlLayoutGroupInputHeight: mathWithUnits(controlHeight, function (x) {
|
|
@@ -124,38 +128,38 @@ export var euiFormControlDefaultShadow = function euiFormControlDefaultShadow(eu
|
|
|
124
128
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
125
129
|
};
|
|
126
130
|
export var euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref3) {
|
|
127
|
-
var euiTheme = _ref3.euiTheme
|
|
128
|
-
|
|
131
|
+
var euiTheme = _ref3.euiTheme,
|
|
132
|
+
colorMode = _ref3.colorMode;
|
|
133
|
+
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(colorMode === 'DARK' ? shade(euiTheme.colors.emptyShade, 0.4) : euiTheme.colors.emptyShade, ";\n background-size: 100% 100%;\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n");
|
|
129
134
|
};
|
|
130
135
|
export var euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref4) {
|
|
131
136
|
var euiTheme = _ref4.euiTheme;
|
|
132
137
|
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.danger, ";\n background-size: 100% 100%;\n");
|
|
133
138
|
};
|
|
134
139
|
export var euiFormControlDisabledStyles = function euiFormControlDisabledStyles(euiThemeContext) {
|
|
135
|
-
var _euiTheme$flags;
|
|
136
140
|
var form = euiFormVariables(euiThemeContext);
|
|
137
|
-
|
|
138
|
-
var hasGlobalFocusColor = (_euiTheme$flags = euiTheme.flags) === null || _euiTheme$flags === void 0 ? void 0 : _euiTheme$flags.hasGlobalFocusColor;
|
|
139
|
-
var border = hasGlobalFocusColor && "\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(euiTheme.colors.borderBaseDisabled, ";\n ").trim();
|
|
140
|
-
return "\n color: ".concat(form.textColorDisabled, ";\n /* Required for Safari */\n -webkit-text-fill-color: ").concat(form.textColorDisabled, ";\n background-color: ").concat(form.backgroundDisabledColor, ";\n ").concat(border, "\n cursor: not-allowed;\n --euiFormControlStateColor: transparent;\n\n ").concat(euiPlaceholderPerBrowser("\n color: ".concat(form.textColorDisabled, ";\n opacity: 1;\n ")), "\n ");
|
|
141
|
+
return "\n color: ".concat(form.controlDisabledColor, ";\n /* Required for Safari */\n -webkit-text-fill-color: ").concat(form.controlDisabledColor, ";\n background-color: ").concat(form.backgroundDisabledColor, ";\n cursor: not-allowed;\n --euiFormControlStateColor: transparent;\n\n ").concat(euiPlaceholderPerBrowser("\n color: ".concat(form.controlDisabledColor, ";\n opacity: 1;\n ")), "\n ");
|
|
141
142
|
};
|
|
142
143
|
export var euiFormControlReadOnlyStyles = function euiFormControlReadOnlyStyles(euiThemeContext) {
|
|
143
144
|
var form = euiFormVariables(euiThemeContext);
|
|
144
145
|
return "\n cursor: default;\n color: ".concat(form.textColor, ";\n -webkit-text-fill-color: ").concat(form.textColor, "; /* Required for Safari */\n\n background-color: ").concat(form.backgroundReadOnlyColor, ";\n --euiFormControlStateColor: transparent;\n ");
|
|
145
146
|
};
|
|
146
147
|
export var euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
147
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
148
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
149
|
+
colorMode = euiThemeContext.colorMode;
|
|
148
150
|
|
|
149
151
|
// Make the text color slightly less prominent than the default colors.text
|
|
150
152
|
var textColor = euiTheme.colors.darkestShade;
|
|
151
|
-
var
|
|
153
|
+
var _euiButtonColor = euiButtonColor(euiThemeContext, 'primary'),
|
|
154
|
+
backgroundColor = _euiButtonColor.backgroundColor;
|
|
155
|
+
var tintedBackgroundColor = colorMode === 'DARK' ? shade(backgroundColor, 0.5) : tint(backgroundColor, 0.7);
|
|
152
156
|
// Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
|
|
153
157
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
|
|
154
158
|
var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
|
|
155
159
|
|
|
156
160
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
157
161
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
158
|
-
var borderColor = euiTheme.
|
|
162
|
+
var borderColor = transparentize(euiTheme.colors.primaryText, 0.2);
|
|
159
163
|
var invalidBorder = euiTheme.colors.danger;
|
|
160
164
|
var borderShadow = function borderShadow(color) {
|
|
161
165
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
@@ -173,21 +177,21 @@ var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
|
173
177
|
*/
|
|
174
178
|
|
|
175
179
|
export var euiFormCustomControlVariables = function euiFormCustomControlVariables(euiThemeContext) {
|
|
176
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
180
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
181
|
+
colorMode = euiThemeContext.colorMode;
|
|
177
182
|
var sizes = {
|
|
178
183
|
control: euiTheme.size.base,
|
|
179
184
|
lineHeight: euiTheme.size.l,
|
|
180
185
|
labelGap: euiTheme.size.s
|
|
181
186
|
};
|
|
182
187
|
var colors = {
|
|
183
|
-
unselected: euiTheme.
|
|
184
|
-
unselectedBorder: euiTheme.
|
|
188
|
+
unselected: euiTheme.colors.emptyShade,
|
|
189
|
+
unselectedBorder: colorMode === 'DARK' ? tint(euiTheme.colors.lightestShade, 0.31) // WCAG AA requirements
|
|
190
|
+
: shade(euiTheme.colors.lightestShade, 0.4),
|
|
185
191
|
selected: euiTheme.colors.primary,
|
|
186
|
-
selectedBorder: euiTheme.components.forms.controlBorderSelected,
|
|
187
192
|
selectedIcon: euiTheme.colors.emptyShade,
|
|
188
|
-
disabled: euiTheme.
|
|
189
|
-
|
|
190
|
-
disabledIcon: euiTheme.components.forms.iconDisabled,
|
|
193
|
+
disabled: euiTheme.colors.lightShade,
|
|
194
|
+
disabledIcon: euiTheme.colors.darkShade,
|
|
191
195
|
disabledLabel: euiTheme.colors.disabledText // Lighter than formVars.disabledColor because it typically doesn't have as dark a background
|
|
192
196
|
};
|
|
193
197
|
var animation = {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import {
|
|
11
|
-
import { _popoverArrowStyles } from '../../../services/popover';
|
|
10
|
+
import { COLOR_MODES_STANDARD, tint, shade } from '../../../services';
|
|
12
11
|
import { euiRangeVariables } from './range.styles';
|
|
12
|
+
import { euiFontSize, mathWithUnits } from '../../../global_styling';
|
|
13
13
|
export var euiRangeTooltipStyles = function euiRangeTooltipStyles(euiThemeContext) {
|
|
14
14
|
var range = euiRangeVariables(euiThemeContext);
|
|
15
15
|
return {
|
|
@@ -19,23 +19,25 @@ export var euiRangeTooltipStyles = function euiRangeTooltipStyles(euiThemeContex
|
|
|
19
19
|
}), ";pointer-events:none;z-index:", range.thumbZIndex, ";;label:euiRangeTooltip;")
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
23
|
+
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.emptyShade, 1) : tint(euiTheme.colors.fullShade, 0.25);
|
|
24
|
+
};
|
|
22
25
|
export var euiRangeTooltipValueStyles = function euiRangeTooltipValueStyles(euiThemeContext) {
|
|
23
26
|
var range = euiRangeVariables(euiThemeContext);
|
|
24
27
|
var euiTheme = euiThemeContext.euiTheme,
|
|
25
28
|
colorMode = euiThemeContext.colorMode;
|
|
26
|
-
var toolTipBackgroundColor = euiTheme.components.tooltipBackground;
|
|
27
|
-
var borderColor = colorMode === 'DARK' ? toolTipBackgroundColor : 'transparent';
|
|
28
29
|
var arrowSize = euiTheme.size.m;
|
|
29
|
-
var
|
|
30
|
-
var
|
|
30
|
+
var arrowSizeInt = parseInt(arrowSize, 10);
|
|
31
|
+
var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px"); // Shift arrow 1px more than half its size to account for border radius
|
|
32
|
+
|
|
31
33
|
return {
|
|
32
34
|
euiRangeTooltip__value: /*#__PURE__*/css("position:absolute;inset-block-start:50%;max-inline-size:", mathWithUnits(euiTheme.size.base, function (x) {
|
|
33
35
|
return x * 16;
|
|
34
|
-
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateY(-50%);", euiFontSize(euiThemeContext, 's'), " line-height:", euiFontSize(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:",
|
|
35
|
-
return x /
|
|
36
|
-
}), ";
|
|
37
|
-
left: /*#__PURE__*/css("margin-inline-end:",
|
|
38
|
-
right: /*#__PURE__*/css("margin-inline-start:",
|
|
36
|
+
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateX(0) translateY(-50%);", euiFontSize(euiThemeContext, 's'), " line-height:", euiFontSize(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";border:", euiTheme.border.width.thin, " solid ", euiToolTipBackgroundColor(euiTheme, colorMode), ";border-radius:", euiTheme.border.radius.small, ";&::before{content:'';position:absolute;inset-block-end:50%;inline-size:", arrowSize, ";block-size:", arrowSize, ";transform-origin:center;transform:translateY(50%) rotateZ(45deg);background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
37
|
+
return x / 2;
|
|
38
|
+
}), ";};label:euiRangeTooltip__value;"),
|
|
39
|
+
left: /*#__PURE__*/css("margin-inline-end:", euiTheme.size.l, ";&::before{inset-inline-end:", arrowMinusSize, ";};label:left;"),
|
|
40
|
+
right: /*#__PURE__*/css("margin-inline-start:", euiTheme.size.l, ";&::before{inset-inline-start:", arrowMinusSize, ";};label:right;"),
|
|
39
41
|
hasTicks: /*#__PURE__*/css("inset-block-start:", mathWithUnits(range.thumbWidth, function (x) {
|
|
40
42
|
return x / 2;
|
|
41
43
|
}), ";;label:hasTicks;")
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
var _excluded = ["label", "id", "checked", "disabled", "compressed", "mini", "onChange", "className", "showLabel", "type", "labelProps"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
8
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3
9
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
10
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
5
11
|
/*
|
|
@@ -57,9 +63,7 @@ export var EuiSwitch = function EuiSwitch(_ref) {
|
|
|
57
63
|
var buttonStyles = [styles.button.euiSwitch__button, styles.button[size]];
|
|
58
64
|
var bodyStyles = [styles.body.euiSwitch__body, disabled ? styles.body.disabled[size] : checked ? styles.body.on : styles.body.off];
|
|
59
65
|
var iconsStyles = [styles.icons.euiSwitch__icons, checked ? styles.icons.on : styles.icons.off, disabled ? styles.icons.disabled : styles.icons.enabled];
|
|
60
|
-
var thumbStyles = [styles.thumb.euiSwitch__thumb,
|
|
61
|
-
// keep checked styles after enabled styles to ensure checked overrides enabled.off state
|
|
62
|
-
checked ? styles.thumb.on[size] : styles.thumb.off, disabled && [styles.thumb.disabled.disabled, styles.thumb.disabled[size]]];
|
|
66
|
+
var thumbStyles = [styles.thumb.euiSwitch__thumb, checked ? styles.thumb.on[size] : styles.thumb.off].concat(_toConsumableArray(disabled ? [styles.thumb.disabled.disabled, styles.thumb.disabled[size]] : [styles.thumb.enabled.enabled, styles.thumb.enabled[size]]));
|
|
63
67
|
var labelStyles = [styles.label.euiSwitch__label, styles.label[size], disabled && styles.label.disabled, labelProps === null || labelProps === void 0 ? void 0 : labelProps.css];
|
|
64
68
|
return ___EmotionJSX("div", {
|
|
65
69
|
css: cssStyles,
|
|
@@ -8,21 +8,19 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
+
import { tint } from '../../../services';
|
|
11
12
|
import { euiCanAnimate, euiFocusRing, euiFontSize, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../global_styling';
|
|
12
13
|
import { euiFormCustomControlVariables } from '../form.styles';
|
|
13
14
|
var euiSwitchVars = function euiSwitchVars(euiThemeContext) {
|
|
14
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
16
|
var formVars = euiFormCustomControlVariables(euiThemeContext);
|
|
16
17
|
var colors = {
|
|
17
|
-
on:
|
|
18
|
-
off:
|
|
18
|
+
on: formVars.colors.selected,
|
|
19
|
+
off: formVars.colors.unselectedBorder,
|
|
19
20
|
disabled: formVars.colors.disabled,
|
|
20
21
|
thumb: formVars.colors.selectedIcon,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
thumbBorderOn: euiTheme.components.switchThumbBorderOn,
|
|
24
|
-
thumbBorderDisabled: formVars.colors.disabledBorder,
|
|
25
|
-
iconDisabled: euiTheme.components.switchIconDisabled
|
|
22
|
+
thumbBorder: formVars.colors.unselectedBorder,
|
|
23
|
+
thumbBorderDisabled: formVars.colors.unselectedBorder
|
|
26
24
|
};
|
|
27
25
|
var sizes = {
|
|
28
26
|
uncompressed: {
|
|
@@ -134,16 +132,23 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
134
132
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
135
133
|
};
|
|
136
134
|
var bodyStyles = function bodyStyles(_ref4, _ref5) {
|
|
137
|
-
var
|
|
135
|
+
var colorMode = _ref4.colorMode;
|
|
138
136
|
var colors = _ref5.colors;
|
|
137
|
+
// This is probably very extra, but the visual weight of the default
|
|
138
|
+
// disabled custom control feels different in light mode depending
|
|
139
|
+
// on the size of the switch, so I'm tinting it based on that.
|
|
140
|
+
// Gotta justify my stupidly expensive art degree!
|
|
141
|
+
var _calculateDisabledColor = function _calculateDisabledColor(tintAmount) {
|
|
142
|
+
return /*#__PURE__*/css("label:disabled;background-color:", colorMode === 'DARK' ? colors.disabled : tint(colors.disabled, tintAmount), ";");
|
|
143
|
+
};
|
|
139
144
|
return {
|
|
140
145
|
euiSwitch__body: _ref,
|
|
141
146
|
on: /*#__PURE__*/css("background-color:", colors.on, ";;label:on;"),
|
|
142
147
|
off: /*#__PURE__*/css("background-color:", colors.off, ";;label:off;"),
|
|
143
148
|
disabled: {
|
|
144
|
-
uncompressed:
|
|
145
|
-
compressed:
|
|
146
|
-
mini:
|
|
149
|
+
uncompressed: _calculateDisabledColor(0.5),
|
|
150
|
+
compressed: _calculateDisabledColor(0.25),
|
|
151
|
+
mini: _calculateDisabledColor(0)
|
|
147
152
|
}
|
|
148
153
|
};
|
|
149
154
|
};
|
|
@@ -156,7 +161,7 @@ var iconStyles = function iconStyles(_ref6, _ref7) {
|
|
|
156
161
|
on: /*#__PURE__*/css(logicalCSS('left', '-25%'), ";;label:on;"),
|
|
157
162
|
off: /*#__PURE__*/css(logicalCSS('left', '-75%'), ";;label:off;"),
|
|
158
163
|
enabled: /*#__PURE__*/css("color:", colors.thumb, ";;label:enabled;"),
|
|
159
|
-
disabled: /*#__PURE__*/css("color:", colors.
|
|
164
|
+
disabled: /*#__PURE__*/css("color:", colors.thumbBorderDisabled, ";;label:disabled;")
|
|
160
165
|
};
|
|
161
166
|
};
|
|
162
167
|
var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
@@ -176,15 +181,13 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
176
181
|
euiSwitch__thumb: /*#__PURE__*/css("position:absolute;", logicalCSS('vertical', 0), " aspect-ratio:1;", logicalCSS('width', 'fit-content'), " ", logicalCSS('height', '100%'), " border-radius:50%;pointer-events:none;", euiCanAnimate, "{transition-property:inset-inline-start,transform,background-color,border-color;transition-duration:", animation.speed, ";transition-timing-function:", animation.easing, ";};label:euiSwitch__thumb;"),
|
|
177
182
|
off: /*#__PURE__*/css(logicalCSS('left', 0), ";;label:off;"),
|
|
178
183
|
get on() {
|
|
179
|
-
var baseStyles = "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(colors.thumbBorderOn, ";\n ");
|
|
180
|
-
|
|
181
184
|
// right: 0 works but doesn't transition/animate, so we need to
|
|
182
185
|
// manually calculate the left position per switch size
|
|
183
186
|
var _calculateLeft = function _calculateLeft(bodyWidth, thumbWidth) {
|
|
184
187
|
var leftPosition = mathWithUnits([bodyWidth, thumbWidth], function (x, y) {
|
|
185
188
|
return x - y;
|
|
186
189
|
});
|
|
187
|
-
return /*#__PURE__*/css("label:on;", logicalCSS('left', leftPosition), "
|
|
190
|
+
return /*#__PURE__*/css("label:on;", logicalCSS('left', leftPosition), ";");
|
|
188
191
|
};
|
|
189
192
|
return {
|
|
190
193
|
uncompressed: _calculateLeft(uncompressed.width, uncompressed.height),
|
|
@@ -199,7 +202,7 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
199
202
|
mini: _calculateScale('mini', false)
|
|
200
203
|
},
|
|
201
204
|
disabled: {
|
|
202
|
-
disabled: /*#__PURE__*/css("background-color:
|
|
205
|
+
disabled: /*#__PURE__*/css("background-color:transparent;border:", euiTheme.border.width.thin, " solid ", colors.thumbBorderDisabled, ";;label:disabled;"),
|
|
203
206
|
uncompressed: _calculateScale('uncompressed', false),
|
|
204
207
|
compressed: _calculateScale('compressed', false),
|
|
205
208
|
mini: _calculateScale('mini', false)
|