@elastic/eui 98.2.1 → 98.2.2-borealis.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{eui_theme_dark.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +1 -1
- package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_light.json.d.ts} +1 -1
- package/dist/eui_theme_borealis_dark.json +314 -0
- package/dist/eui_theme_borealis_dark.json.d.ts +317 -0
- package/dist/eui_theme_borealis_light.json +314 -0
- package/dist/eui_theme_borealis_light.json.d.ts +317 -0
- package/es/components/avatar/avatar.js +10 -4
- package/es/components/badge/badge.styles.js +1 -2
- package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/es/components/badge/color_utils.js +9 -8
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +6 -3
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- package/es/components/code/code_syntax.styles.js +23 -27
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/es/components/color_picker/color_picker.js +9 -3
- package/es/components/color_picker/color_picker.styles.js +1 -2
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/comment_list/comment.js +1 -1
- package/es/components/comment_list/comment_event.js +5 -4
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +0 -28
- package/es/components/datagrid/data_grid.styles.js +6 -7
- package/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +7 -2
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +28 -32
- package/es/components/form/range/range_tooltip.styles.js +11 -13
- package/es/components/form/switch/switch.js +3 -7
- package/es/components/form/switch/switch.styles.js +16 -19
- package/es/components/header/header.styles.js +6 -7
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/es/components/list_group/list_group_item.styles.js +9 -11
- package/es/components/loading/loading_chart.styles.js +18 -5
- package/es/components/mark/mark.styles.js +2 -9
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.styles.js +1 -1
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +30 -28
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/es/components/skeleton/utils.js +5 -7
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +2 -7
- package/es/components/table/table_row.styles.js +8 -10
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text/text_color.js +1 -1
- package/es/components/text/text_color.styles.js +6 -5
- package/es/components/toast/toast.styles.js +1 -1
- package/es/components/token/token.js +10 -4
- package/es/components/token/token.styles.js +14 -5
- package/es/components/token/token_map.js +243 -1
- package/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tour/tour.styles.js +8 -12
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/es/global_styling/functions/math.js +1 -49
- package/es/global_styling/functions/size.js +1 -17
- package/es/global_styling/mixins/_button.js +159 -0
- package/es/global_styling/mixins/_color.js +39 -31
- package/es/global_styling/mixins/index.js +2 -1
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +1 -53
- package/es/global_styling/variables/animations.js +1 -22
- package/es/global_styling/variables/breakpoint.js +1 -7
- package/es/global_styling/variables/levels.js +1 -17
- package/es/global_styling/variables/shadow.js +1 -11
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +1 -32
- package/es/services/color/eui_palettes.js +116 -47
- package/es/services/color/index.js +1 -0
- package/es/services/color/vis_color_store.js +13 -0
- package/es/services/index.js +1 -1
- package/es/services/popover/index.js +4 -1
- package/es/services/popover/popover_arrow.styles.js +31 -0
- package/es/services/popover/popover_positioning.js +6 -17
- package/es/services/theme/provider.js +26 -2
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/es/themes/amsterdam/global_styling/variables/_components.js +604 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
- package/es/themes/amsterdam/theme.js +7 -1
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +9 -6
- package/eui.d.ts +2382 -2830
- package/lib/components/avatar/avatar.js +8 -2
- package/lib/components/badge/badge.styles.js +1 -2
- package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/lib/components/badge/color_utils.js +14 -13
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +5 -2
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- package/lib/components/code/code_syntax.styles.js +23 -27
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/lib/components/color_picker/color_picker.js +8 -2
- package/lib/components/color_picker/color_picker.styles.js +1 -2
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/comment_list/comment.js +1 -1
- package/lib/components/comment_list/comment_event.js +5 -4
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +0 -28
- package/lib/components/datagrid/data_grid.styles.js +6 -7
- package/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +7 -2
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +27 -31
- package/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/lib/components/form/switch/switch.js +3 -7
- package/lib/components/form/switch/switch.styles.js +16 -19
- package/lib/components/header/header.styles.js +5 -6
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/lib/components/list_group/list_group_item.styles.js +8 -10
- package/lib/components/loading/loading_chart.styles.js +18 -5
- package/lib/components/mark/mark.styles.js +2 -9
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/lib/components/modal/modal.styles.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +29 -27
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/lib/components/skeleton/utils.js +4 -6
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +2 -7
- package/lib/components/table/table_row.styles.js +7 -9
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/text/text_color.js +1 -1
- package/lib/components/text/text_color.styles.js +6 -5
- package/lib/components/toast/toast.styles.js +1 -1
- package/lib/components/token/token.js +12 -4
- package/lib/components/token/token.styles.js +14 -5
- package/lib/components/token/token_map.js +244 -2
- package/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tour/tour.styles.js +8 -12
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/lib/global_styling/functions/math.js +7 -58
- package/lib/global_styling/functions/size.js +7 -26
- package/lib/global_styling/mixins/_button.js +164 -0
- package/lib/global_styling/mixins/_color.js +38 -30
- package/lib/global_styling/mixins/index.js +11 -0
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +6 -61
- package/lib/global_styling/variables/animations.js +25 -31
- package/lib/global_styling/variables/breakpoint.js +7 -16
- package/lib/global_styling/variables/levels.js +7 -26
- package/lib/global_styling/variables/shadow.js +13 -20
- package/lib/global_styling/variables/size.js +7 -10
- package/lib/global_styling/variables/typography.js +19 -41
- package/lib/services/color/eui_palettes.js +116 -47
- package/lib/services/color/index.js +8 -0
- package/lib/services/color/vis_color_store.js +18 -0
- package/lib/services/index.js +7 -0
- package/lib/services/popover/index.js +8 -1
- package/lib/services/popover/popover_arrow.styles.js +37 -0
- package/lib/services/popover/popover_positioning.js +6 -17
- package/lib/services/theme/provider.js +26 -2
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +611 -19
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/lib/themes/amsterdam/global_styling/variables/_components.js +608 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
- package/lib/themes/amsterdam/theme.js +7 -1
- package/lib/themes/index.js +7 -0
- package/lib/themes/themes.js +10 -7
- package/optimize/es/components/avatar/avatar.js +10 -4
- package/optimize/es/components/badge/badge.styles.js +1 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/es/components/badge/color_utils.js +9 -8
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/es/components/button/button.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +6 -3
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +1 -2
- package/optimize/es/components/code/code_syntax.styles.js +23 -27
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker.js +9 -3
- package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/comment_list/comment_event.js +4 -3
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +7 -2
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +28 -32
- package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/es/components/form/switch/switch.js +3 -2
- package/optimize/es/components/form/switch/switch.styles.js +16 -19
- package/optimize/es/components/header/header.styles.js +6 -7
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
- package/optimize/es/components/loading/loading_chart.styles.js +13 -5
- package/optimize/es/components/mark/mark.styles.js +2 -9
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.styles.js +1 -1
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +30 -28
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/es/components/skeleton/utils.js +5 -7
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/es/components/table/table_row.styles.js +8 -10
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text/text_color.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +6 -5
- package/optimize/es/components/toast/toast.styles.js +1 -1
- package/optimize/es/components/token/token.js +10 -4
- package/optimize/es/components/token/token.styles.js +14 -5
- package/optimize/es/components/token/token_map.js +243 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +12 -24
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tour/tour.styles.js +8 -12
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/es/global_styling/functions/math.js +1 -49
- package/optimize/es/global_styling/functions/size.js +1 -17
- package/optimize/es/global_styling/mixins/_button.js +159 -0
- package/optimize/es/global_styling/mixins/_color.js +39 -31
- package/optimize/es/global_styling/mixins/index.js +2 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
- package/optimize/es/global_styling/variables/animations.js +1 -22
- package/optimize/es/global_styling/variables/breakpoint.js +1 -7
- package/optimize/es/global_styling/variables/levels.js +1 -17
- package/optimize/es/global_styling/variables/shadow.js +1 -11
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +1 -32
- package/optimize/es/services/color/eui_palettes.js +116 -47
- package/optimize/es/services/color/index.js +1 -0
- package/optimize/es/services/color/vis_color_store.js +13 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/popover/index.js +4 -1
- package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
- package/optimize/es/services/popover/popover_positioning.js +6 -17
- package/optimize/es/services/theme/provider.js +26 -2
- package/optimize/es/services/theme/types.js +1 -6
- package/optimize/es/services/theme/utils.js +1 -295
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +596 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/optimize/es/themes/amsterdam/theme.js +7 -1
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +9 -6
- package/optimize/lib/components/avatar/avatar.js +8 -2
- package/optimize/lib/components/badge/badge.styles.js +1 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/lib/components/badge/color_utils.js +14 -13
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/lib/components/button/button.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +5 -2
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +1 -2
- package/optimize/lib/components/code/code_syntax.styles.js +23 -27
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker.js +8 -2
- package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/comment_list/comment_event.js +4 -3
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +7 -2
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +27 -31
- package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/lib/components/form/switch/switch.js +3 -2
- package/optimize/lib/components/form/switch/switch.styles.js +16 -19
- package/optimize/lib/components/header/header.styles.js +5 -6
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
- package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
- package/optimize/lib/components/mark/mark.styles.js +2 -9
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/lib/components/modal/modal.styles.js +1 -1
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +29 -27
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/lib/components/skeleton/utils.js +4 -6
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/lib/components/table/table_row.styles.js +7 -9
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/text/text_color.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +6 -5
- package/optimize/lib/components/toast/toast.styles.js +1 -1
- package/optimize/lib/components/token/token.js +13 -4
- package/optimize/lib/components/token/token.styles.js +14 -5
- package/optimize/lib/components/token/token_map.js +244 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +11 -23
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tour/tour.styles.js +8 -12
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/lib/global_styling/functions/math.js +7 -59
- package/optimize/lib/global_styling/functions/size.js +7 -27
- package/optimize/lib/global_styling/mixins/_button.js +165 -0
- package/optimize/lib/global_styling/mixins/_color.js +38 -30
- package/optimize/lib/global_styling/mixins/index.js +11 -0
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
- package/optimize/lib/global_styling/variables/animations.js +25 -31
- package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
- package/optimize/lib/global_styling/variables/levels.js +7 -26
- package/optimize/lib/global_styling/variables/shadow.js +13 -20
- package/optimize/lib/global_styling/variables/size.js +7 -10
- package/optimize/lib/global_styling/variables/typography.js +19 -41
- package/optimize/lib/services/color/eui_palettes.js +116 -47
- package/optimize/lib/services/color/index.js +8 -0
- package/optimize/lib/services/color/vis_color_store.js +18 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/popover/index.js +8 -1
- package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
- package/optimize/lib/services/popover/popover_positioning.js +6 -17
- package/optimize/lib/services/theme/provider.js +26 -2
- package/optimize/lib/services/theme/types.js +13 -14
- package/optimize/lib/services/theme/utils.js +54 -296
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +611 -19
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/optimize/lib/themes/amsterdam/theme.js +7 -1
- package/optimize/lib/themes/index.js +7 -0
- package/optimize/lib/themes/themes.js +10 -7
- package/package.json +7 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -10
- package/src/global_styling/variables/_animations.scss +1 -8
- package/src/global_styling/variables/_borders.scss +1 -9
- package/src/global_styling/variables/_buttons.scss +1 -18
- package/src/global_styling/variables/_colors_vis.scss +1 -70
- package/src/global_styling/variables/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- package/src/global_styling/variables/_responsive.scss +1 -9
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +1 -13
- package/src/global_styling/variables/_states.scss +1 -14
- package/src/global_styling/variables/_typography.scss +1 -75
- package/src/global_styling/variables/_z_index.scss +1 -33
- package/src/themes/amsterdam/_colors_dark.scss +80 -8
- package/src/themes/amsterdam/_colors_light.scss +80 -8
- package/src/themes/amsterdam/global_styling/variables/_colors_vis.scss +72 -0
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
- package/test-env/components/avatar/avatar.js +8 -2
- package/test-env/components/badge/badge.styles.js +1 -2
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/test-env/components/badge/color_utils.js +14 -13
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +5 -2
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +1 -2
- package/test-env/components/code/code_syntax.styles.js +23 -27
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/test-env/components/color_picker/color_picker.js +8 -2
- package/test-env/components/color_picker/color_picker.styles.js +1 -2
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/comment_list/comment.js +1 -1
- package/test-env/components/comment_list/comment_event.js +5 -4
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +0 -28
- package/test-env/components/datagrid/data_grid.styles.js +6 -7
- package/test-env/components/datagrid/utils/grid_height_width.js +1 -1
- package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
- package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
- package/test-env/components/flyout/flyout.styles.js +7 -2
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +27 -31
- package/test-env/components/form/range/range_tooltip.styles.js +11 -13
- package/test-env/components/form/switch/switch.js +3 -2
- package/test-env/components/form/switch/switch.styles.js +16 -19
- package/test-env/components/header/header.styles.js +5 -6
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/test-env/components/list_group/list_group_item.styles.js +8 -10
- package/test-env/components/loading/loading_chart.styles.js +13 -5
- package/test-env/components/mark/mark.styles.js +2 -9
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
- package/test-env/components/modal/modal.styles.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +4 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +29 -27
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
- package/test-env/components/skeleton/utils.js +4 -6
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +2 -7
- package/test-env/components/table/table_row.styles.js +7 -9
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/text/text_color.js +1 -1
- package/test-env/components/text/text_color.styles.js +6 -5
- package/test-env/components/toast/toast.styles.js +1 -1
- package/test-env/components/token/token.js +13 -4
- package/test-env/components/token/token.styles.js +14 -5
- package/test-env/components/token/token_map.js +244 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +11 -23
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tour/tour.styles.js +8 -12
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- package/test-env/global_styling/functions/math.js +7 -59
- package/test-env/global_styling/functions/size.js +7 -27
- package/test-env/global_styling/mixins/_button.js +165 -0
- package/test-env/global_styling/mixins/_color.js +38 -30
- package/test-env/global_styling/mixins/index.js +11 -0
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +6 -61
- package/test-env/global_styling/variables/animations.js +25 -31
- package/test-env/global_styling/variables/breakpoint.js +7 -16
- package/test-env/global_styling/variables/levels.js +7 -26
- package/test-env/global_styling/variables/shadow.js +13 -20
- package/test-env/global_styling/variables/size.js +7 -10
- package/test-env/global_styling/variables/typography.js +19 -41
- package/test-env/services/color/eui_palettes.js +116 -47
- package/test-env/services/color/index.js +8 -0
- package/test-env/services/color/vis_color_store.js +18 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/popover/index.js +8 -1
- package/test-env/services/popover/popover_arrow.styles.js +37 -0
- package/test-env/services/popover/popover_positioning.js +6 -17
- package/test-env/services/theme/provider.js +26 -2
- package/test-env/services/theme/types.js +13 -14
- package/test-env/services/theme/utils.js +54 -296
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +611 -19
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +601 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/test-env/themes/amsterdam/theme.js +7 -1
- package/test-env/themes/index.js +7 -0
- package/test-env/themes/themes.js +10 -7
- /package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +0 -0
- /package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +0 -0
package/lib/components/common.js
CHANGED
|
@@ -35,12 +35,6 @@ function keysOf(obj) {
|
|
|
35
35
|
return Object.keys(obj);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Like `keyof typeof`, but for getting values instead of keys
|
|
40
|
-
* ValueOf<typeof {key1: 'value1', key2: 'value2'}>
|
|
41
|
-
* Results in `'value1' | 'value2'`
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
38
|
// Returns the props of a given HTML element
|
|
45
39
|
|
|
46
40
|
// Utility methods for ApplyClassComponentDefaults
|
|
@@ -133,26 +127,4 @@ React.FunctionComponent<ExclusiveUnion<Spanlike, Buttonlike>>
|
|
|
133
127
|
* type ButtonLike = PropsForButton<BaseProps>
|
|
134
128
|
* type ComponentProps = ExclusiveUnion<AnchorLike, ButtonLike>
|
|
135
129
|
* const Component: FunctionComponent<ComponentProps> ...
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Replaces all properties on any type as optional, includes nested types
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```ts
|
|
143
|
-
* interface Person {
|
|
144
|
-
* name: string;
|
|
145
|
-
* age?: number;
|
|
146
|
-
* spouse: Person;
|
|
147
|
-
* children: Person[];
|
|
148
|
-
* }
|
|
149
|
-
* type PartialPerson = RecursivePartial<Person>;
|
|
150
|
-
* // results in
|
|
151
|
-
* interface PartialPerson {
|
|
152
|
-
* name?: string;
|
|
153
|
-
* age?: number;
|
|
154
|
-
* spouse?: RecursivePartial<Person>;
|
|
155
|
-
* children?: RecursivePartial<Person>[]
|
|
156
|
-
* }
|
|
157
|
-
* ```
|
|
158
130
|
*/
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiDataGridVariables = exports.euiDataGridStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
8
|
var _global_styling = require("../../global_styling");
|
|
10
9
|
/*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -43,14 +42,14 @@ var euiDataGridVariables = exports.euiDataGridVariables = function euiDataGridVa
|
|
|
43
42
|
};
|
|
44
43
|
};
|
|
45
44
|
var euiDataGridStyles = exports.euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
|
|
46
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
47
|
-
colorMode = euiThemeContext.colorMode;
|
|
45
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
48
46
|
var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
|
|
49
47
|
_cellPadding = _euiDataGridVariables.cellPadding,
|
|
50
48
|
lineHeight = _euiDataGridVariables.lineHeight,
|
|
51
49
|
_fontSize = _euiDataGridVariables.fontSize;
|
|
50
|
+
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.dataGridBorderColor);
|
|
52
51
|
return {
|
|
53
|
-
euiDataGrid: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;align-items:stretch;", (0, _global_styling.logicalCSS)('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.
|
|
52
|
+
euiDataGrid: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;align-items:stretch;", (0, _global_styling.logicalCSS)('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.components.dataGridRowBackgroundStriped, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.components.dataGridRowBackgroundHover, ";};label:euiDataGrid;"),
|
|
54
53
|
cellPadding: {
|
|
55
54
|
cellPadding: function cellPadding(size) {
|
|
56
55
|
return /*#__PURE__*/(0, _react.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{", (0, _global_styling.logicalCSS)('padding-bottom', 0), " ", (0, _global_styling.logicalCSS)('border-bottom', "".concat(_cellPadding[size], " solid transparent")), ";}.euiDataGridHeaderCell__button{margin-block:-", _cellPadding[size], ";};label:cellPadding;");
|
|
@@ -82,9 +81,9 @@ var euiDataGridStyles = exports.euiDataGridStyles = function euiDataGridStyles(e
|
|
|
82
81
|
},
|
|
83
82
|
borders: {
|
|
84
83
|
none: null,
|
|
85
|
-
horizontal: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-bottom',
|
|
86
|
-
all: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", (0, _global_styling.logicalCSS)('border-bottom',
|
|
87
|
-
"".concat(euiTheme.border.width.thin, " solid ").concat(
|
|
84
|
+
horizontal: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-bottom', border), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-top', border), " ", (0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-top', border), ";};label:horizontal;"),
|
|
85
|
+
all: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", (0, _global_styling.logicalCSS)('border-bottom', border), " ", (0, _global_styling.logicalCSS)('border-right', // Visually lighten vertical borders
|
|
86
|
+
"".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.dataGridVerticalLineBorderColor)), ";}&--firstColumn{", (0, _global_styling.logicalCSS)('border-left', border), ";}&--lastColumn{", (0, _global_styling.logicalCSS)('border-right-color', euiTheme.components.dataGridBorderColor), ";}}.euiDataGridFooterCell,.euiDataGridHeaderCell{", (0, _global_styling.logicalCSS)('border-right', border), " &:first-of-type{", (0, _global_styling.logicalCSS)('border-left', border), ";}}.euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-bottom', border), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-top', border), " ", (0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), ";}&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-bottom', border), ";}&:is(.euiDataGrid--noControls) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-top', border), ";}.euiDataGrid__controls{border:", border, ";background-color:", euiTheme.colors.body, ";};label:all;")
|
|
88
87
|
},
|
|
89
88
|
// Sits below the controls above it and pagination below it
|
|
90
89
|
euiDataGrid__content: /*#__PURE__*/(0, _react.css)("z-index:1;position:relative;flex-grow:1;", (0, _global_styling.logicalSizeCSS)('100%'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), " overflow:hidden;font-feature-settings:'tnum' 1;;label:euiDataGrid__content;"),
|
|
@@ -108,7 +108,7 @@ var useUnconstrainedHeight = exports.useUnconstrainedHeight = function useUncons
|
|
|
108
108
|
|
|
109
109
|
// lookup the height configuration of this row
|
|
110
110
|
var rowHeightOption = rowHeightUtils.getRowHeightOption(correctRowIndex, rowHeightsOptions);
|
|
111
|
-
if (rowHeightOption) {
|
|
111
|
+
if (rowHeightOption && rowHeightOption !== 'auto') {
|
|
112
112
|
// this row's height is known
|
|
113
113
|
knownRowCount++;
|
|
114
114
|
knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex, rowHeightsOptions);
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiReactDatePickerStyles = exports.euiDatePickerVariables = exports._timeSelectStyles = exports._monthYearDropdowns = exports._dayCalendarStyles = void 0;
|
|
7
7
|
var _css = require("@emotion/css");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _mixins = require("../../
|
|
9
|
+
var _mixins = require("../../global_styling/mixins");
|
|
10
|
+
var _mixins2 = require("../../themes/amsterdam/global_styling/mixins");
|
|
10
11
|
var _form = require("../form/form.styles");
|
|
11
12
|
/*
|
|
12
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -54,7 +55,7 @@ var _monthYearDropdowns = exports._monthYearDropdowns = function _monthYearDropd
|
|
|
54
55
|
var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
|
|
55
56
|
return /*#__PURE__*/(0, _css.css)(".react-datepicker__year-read-view,.react-datepicker__month-read-view,.react-datepicker__month-year-read-view{display:flex;justify-content:space-between;align-items:center;", formStyles.compressed, " ", (0, _form.euiFormControlText)(euiThemeContext), " font-weight:", euiTheme.font.weight.medium, ";", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " &:hover{cursor:pointer;text-decoration:underline;}}.react-datepicker__year-dropdown-container{position:relative;flex-grow:1;}.react-datepicker__month-dropdown-container{position:relative;flex-grow:2;}.react-datepicker__year-dropdown,.react-datepicker__month-dropdown{z-index:1;position:absolute;", (0, _global_styling.euiYScroll)(euiThemeContext, {
|
|
56
57
|
height: 'auto'
|
|
57
|
-
}), " ", (0, _global_styling.logicalCSS)('max-height', '250px'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " padding:", euiTheme.size.xs, ";background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";", (0,
|
|
58
|
+
}), " ", (0, _global_styling.logicalCSS)('max-height', '250px'), " ", (0, _global_styling.logicalCSS)('width', '100%'), " padding:", euiTheme.size.xs, ";background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";", (0, _mixins2.euiShadowSmall)(euiThemeContext), ";}.react-datepicker__year-dropdown{", (0, _global_styling.logicalCSS)('min-width', '100px'), ";}.react-datepicker__month-dropdown{", (0, _global_styling.logicalCSS)('min-width', '140px'), ";}.react-datepicker__year-option,.react-datepicker__month-option,.react-datepicker__month-year-option{", (0, _global_styling.logicalCSS)('margin-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('height', euiTheme.size.l), " line-height:", euiTheme.size.l, ";font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 's').fontSize, ";border-radius:", euiTheme.border.radius.small, ";cursor:pointer;&:hover{text-decoration:underline;}&--preselected{background-color:", euiTheme.focus.backgroundColor, ";}&--selected_year,&--selected_month{", (0, _mixins.euiButtonFillColor)(euiThemeContext, 'primary'), ";}&--selected{display:none;}}");
|
|
58
59
|
};
|
|
59
60
|
var _dayCalendarStyles = exports._dayCalendarStyles = function _dayCalendarStyles(euiThemeContext) {
|
|
60
61
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -24,8 +24,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
24
24
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
25
|
};
|
|
26
26
|
var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiThemeContext) {
|
|
27
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
28
|
-
colorMode = euiThemeContext.colorMode;
|
|
27
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
29
28
|
var forms = (0, _form.euiFormVariables)(euiThemeContext);
|
|
30
29
|
var inputWidth = euiTheme.base * 30;
|
|
31
30
|
var buttonWidth = euiTheme.base * 7; // @see _button_display.styles.ts
|
|
@@ -43,7 +42,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
// Needs updating colors
|
|
46
|
-
var needsUpdatingBackgroundColor =
|
|
45
|
+
var needsUpdatingBackgroundColor = euiTheme.components.superDatePickerBackgroundSuccees;
|
|
47
46
|
var needsUpdatingTextColor = (0, _services.makeHighContrastColor)(euiTheme.colors.success)(needsUpdatingBackgroundColor);
|
|
48
47
|
return {
|
|
49
48
|
euiSuperDatePicker: /*#__PURE__*/(0, _react.css)("display:flex;gap:", gap, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " ", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiSuperDatePicker;"),
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.sharedSpacingPadding = exports.euiDroppableStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
8
|
var _global_styling = require("../../global_styling");
|
|
10
9
|
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)."; } /*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -32,11 +31,10 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
32
31
|
};
|
|
33
32
|
var euiDroppableStyles = exports.euiDroppableStyles = function euiDroppableStyles(euiThemeContext) {
|
|
34
33
|
var euiTheme = euiThemeContext.euiTheme;
|
|
35
|
-
var droppableColor = euiTheme.colors.success;
|
|
36
34
|
return {
|
|
37
35
|
euiDroppable: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{transition:background-color ", euiTheme.animation.slow, " ease;};label:euiDroppable;"),
|
|
38
|
-
isDragging: /*#__PURE__*/(0, _react.css)("background-color:",
|
|
39
|
-
isDraggingOver: /*#__PURE__*/(0, _react.css)("background-color:",
|
|
36
|
+
isDragging: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.dragDropDraggingBackground, ";;label:isDragging;"),
|
|
37
|
+
isDraggingOver: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.dragDropDraggingOverBackground, ";;label:isDraggingOver;"),
|
|
40
38
|
grow: _ref2,
|
|
41
39
|
noGrow: _ref,
|
|
42
40
|
spacing: sharedSpacingPadding(euiThemeContext)
|
|
@@ -144,7 +144,7 @@ EuiEmptyPrompt.propTypes = {
|
|
|
144
144
|
* Background color of the panel;
|
|
145
145
|
* Usually a lightened form of the brand colors
|
|
146
146
|
*/
|
|
147
|
-
color: _propTypes.default.any,
|
|
147
|
+
color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["highlighted"])]),
|
|
148
148
|
/*
|
|
149
149
|
* Accepts any [EuiIcon.type](#/display/icons)
|
|
150
150
|
*/
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.euiEmptyPromptStyles = void 0;
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
|
+
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
10
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
13
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -74,7 +75,8 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
74
75
|
};
|
|
75
76
|
};
|
|
76
77
|
var generateFooterBorder = function generateFooterBorder(color) {
|
|
77
|
-
|
|
78
|
+
var borderToken = (0, _euiThemeCommon.getTokenName)(['plain', 'subdued'].includes(color) ? 'borderBase' : 'borderStrong', color);
|
|
79
|
+
return "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors[borderToken]);
|
|
78
80
|
};
|
|
79
81
|
return {
|
|
80
82
|
euiEmptyPrompt: /*#__PURE__*/(0, _react.css)("text-align:center;margin:auto;", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'l'), "{", (0, _global_styling.logicalCSS)('max-width', 'max-content'), ";};label:euiEmptyPrompt;"),
|
|
@@ -109,8 +111,10 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
109
111
|
transparent: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.body, ";;label:transparent;"),
|
|
110
112
|
plain: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.body, ";;label:plain;"),
|
|
111
113
|
subdued: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
114
|
+
highlighted: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('plain')), ";;label:highlighted;"),
|
|
112
115
|
primary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
113
116
|
accent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
117
|
+
accentSecondary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
114
118
|
danger: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
115
119
|
warning: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
116
120
|
success: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFilterSelectItemStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../services");
|
|
9
8
|
var _global_styling = require("../../global_styling");
|
|
10
9
|
/*
|
|
11
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -17,7 +16,7 @@ var _global_styling = require("../../global_styling");
|
|
|
17
16
|
|
|
18
17
|
var euiFilterSelectItemStyles = exports.euiFilterSelectItemStyles = function euiFilterSelectItemStyles(euiThemeContext) {
|
|
19
18
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
-
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(
|
|
19
|
+
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.components.filterSelectItemBackgroundFocusDisabled, ";\n }\n ");
|
|
21
20
|
return {
|
|
22
21
|
euiFilterSelectItem: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalShorthandCSS)('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.m)), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " ", (0, _global_styling.logicalTextAlignCSS)('left'), " color:", euiTheme.colors.text, ";", (0, _global_styling.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;"),
|
|
23
22
|
isFocused: /*#__PURE__*/(0, _react.css)(focusStyles, ";;label:isFocused;")
|
|
@@ -7,7 +7,6 @@ exports.euiFlyoutCloseButtonStyles = void 0;
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
9
|
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
10
|
-
var _services = require("../../services");
|
|
11
10
|
var _flyout = require("./flyout.styles");
|
|
12
11
|
/*
|
|
13
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -21,7 +20,7 @@ var euiFlyoutCloseButtonStyles = exports.euiFlyoutCloseButtonStyles = function e
|
|
|
21
20
|
var euiTheme = euiThemeContext.euiTheme;
|
|
22
21
|
return {
|
|
23
22
|
euiFlyout__closeButton: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
24
|
-
inside: /*#__PURE__*/(0, _react.css)("background-color:",
|
|
23
|
+
inside: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.flyoutCloseButtonInsideBackground, ";;label:inside;"),
|
|
25
24
|
outside: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), "animation:none!important;;label:outside;"),
|
|
26
25
|
outsideSide: {
|
|
27
26
|
// `transforms` pull in close buttons a little
|
|
@@ -153,7 +153,7 @@ var EuiFlyout = exports.EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
153
153
|
return _objectSpread(_objectSpread(_objectSpread({}, style), widthStyle), maxWidthStyle);
|
|
154
154
|
}, [style, maxWidth, size]);
|
|
155
155
|
var styles = (0, _services.useEuiMemoizedStyles)(_flyout.euiFlyoutStyles);
|
|
156
|
-
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay, isPushed
|
|
156
|
+
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay.overlay, isPushed ? styles.push[side] : styles.overlay[side], isPushed && !pushAnimation && styles.push.noAnimation, styles[side]];
|
|
157
157
|
var classes = (0, _classnames.default)('euiFlyout', className);
|
|
158
158
|
|
|
159
159
|
/*
|
|
@@ -29,7 +29,8 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29
29
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
30
|
};
|
|
31
31
|
var euiFlyoutStyles = exports.euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
32
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
32
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
33
|
+
colorMode = euiThemeContext.colorMode;
|
|
33
34
|
return {
|
|
34
35
|
euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, FLYOUT_BREAKPOINT), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
|
|
35
36
|
// Flyout sizes
|
|
@@ -42,7 +43,11 @@ var euiFlyoutStyles = exports.euiFlyoutStyles = function euiFlyoutStyles(euiThem
|
|
|
42
43
|
// Left-side flyouts should only be used for navigation
|
|
43
44
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
|
|
44
45
|
// Type
|
|
45
|
-
overlay:
|
|
46
|
+
overlay: {
|
|
47
|
+
overlay: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), " &:has(.euiResizableButton){border-inline:none;};label:overlay;"),
|
|
48
|
+
left: /*#__PURE__*/(0, _react.css)("border-inline-end:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:left;"),
|
|
49
|
+
right: /*#__PURE__*/(0, _react.css)("border-inline-start:", colorMode === 'DARK' ? "".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFloating) : 'none', ";;label:right;")
|
|
50
|
+
},
|
|
46
51
|
push: {
|
|
47
52
|
push: /*#__PURE__*/(0, _react.css)("clip-path:none;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
|
|
48
53
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thick), ";;label:right;"),
|
|
@@ -16,6 +16,6 @@ var _react = require("@emotion/react");
|
|
|
16
16
|
var euiFlyoutFooterStyles = exports.euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
|
|
17
17
|
var euiTheme = euiThemeContext.euiTheme;
|
|
18
18
|
return {
|
|
19
|
-
euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.
|
|
19
|
+
euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.flyoutFooterBackground, ";flex-grow:0;;label:euiFlyoutFooter;")
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiFormVariables = exports.euiFormMaxWidth = exports.euiFormCustomControlVariables = exports.euiFormCustomControlStyles = exports.euiFormControlText = exports.euiFormControlStyles = exports.euiFormControlReadOnlyStyles = exports.euiFormControlInvalidStyles = exports.euiFormControlFocusStyles = exports.euiFormControlDisabledStyles = exports.euiFormControlDefaultShadow = exports.euiFormControlAutoFillStyles = void 0;
|
|
7
7
|
var _services = require("../../services");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
10
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -24,15 +23,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
23
|
// For microperf, we're making this its own util
|
|
25
24
|
var euiFormMaxWidth = exports.euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
26
25
|
var euiTheme = _ref.euiTheme;
|
|
27
|
-
return
|
|
28
|
-
return x * 25;
|
|
29
|
-
});
|
|
26
|
+
return euiTheme.components.forms.maxWidth;
|
|
30
27
|
};
|
|
31
28
|
var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
32
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
33
|
-
|
|
34
|
-
var isColorDark = colorMode === 'DARK';
|
|
35
|
-
var backgroundColor = isColorDark ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.4) : (0, _services.tint)(euiTheme.colors.lightestShade, 0.6);
|
|
29
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
30
|
+
var backgroundColor = euiTheme.components.forms.background;
|
|
36
31
|
var controlHeight = euiTheme.size.xxl;
|
|
37
32
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
38
33
|
var sizes = {
|
|
@@ -51,15 +46,16 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
51
46
|
})
|
|
52
47
|
};
|
|
53
48
|
var colors = {
|
|
54
|
-
textColor: euiTheme.colors.
|
|
49
|
+
textColor: euiTheme.colors.textParagraph,
|
|
50
|
+
textColorDisabled: euiTheme.components.forms.colorDisabled,
|
|
55
51
|
backgroundColor: backgroundColor,
|
|
56
|
-
backgroundDisabledColor:
|
|
57
|
-
backgroundReadOnlyColor: euiTheme.
|
|
58
|
-
borderColor:
|
|
59
|
-
controlDisabledColor: euiTheme.
|
|
52
|
+
backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
|
|
53
|
+
backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
|
|
54
|
+
borderColor: euiTheme.components.forms.border,
|
|
55
|
+
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
60
56
|
controlBoxShadow: '0 0 transparent',
|
|
61
57
|
controlPlaceholderText: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
|
|
62
|
-
appendPrependBackground:
|
|
58
|
+
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
63
59
|
};
|
|
64
60
|
var controlLayout = {
|
|
65
61
|
controlLayoutGroupInputHeight: (0, _global_styling.mathWithUnits)(controlHeight, function (x) {
|
|
@@ -131,38 +127,38 @@ var euiFormControlDefaultShadow = exports.euiFormControlDefaultShadow = function
|
|
|
131
127
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
132
128
|
};
|
|
133
129
|
var euiFormControlFocusStyles = exports.euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref3) {
|
|
134
|
-
var euiTheme = _ref3.euiTheme
|
|
135
|
-
|
|
136
|
-
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(colorMode === 'DARK' ? (0, _services.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");
|
|
130
|
+
var euiTheme = _ref3.euiTheme;
|
|
131
|
+
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.components.forms.backgroundFocused, ";\n background-size: 100% 100%;\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n");
|
|
137
132
|
};
|
|
138
133
|
var euiFormControlInvalidStyles = exports.euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref4) {
|
|
139
134
|
var euiTheme = _ref4.euiTheme;
|
|
140
135
|
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.danger, ";\n background-size: 100% 100%;\n");
|
|
141
136
|
};
|
|
142
137
|
var euiFormControlDisabledStyles = exports.euiFormControlDisabledStyles = function euiFormControlDisabledStyles(euiThemeContext) {
|
|
138
|
+
var _euiTheme$flags;
|
|
143
139
|
var form = euiFormVariables(euiThemeContext);
|
|
144
|
-
|
|
140
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
141
|
+
var hasGlobalFocusColor = (_euiTheme$flags = euiTheme.flags) === null || _euiTheme$flags === void 0 ? void 0 : _euiTheme$flags.hasGlobalFocusColor;
|
|
142
|
+
var border = hasGlobalFocusColor && "\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(euiTheme.colors.borderBaseDisabled, ";\n ").trim();
|
|
143
|
+
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 ");
|
|
145
144
|
};
|
|
146
145
|
var euiFormControlReadOnlyStyles = exports.euiFormControlReadOnlyStyles = function euiFormControlReadOnlyStyles(euiThemeContext) {
|
|
147
146
|
var form = euiFormVariables(euiThemeContext);
|
|
148
147
|
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 ");
|
|
149
148
|
};
|
|
150
149
|
var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
151
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
152
|
-
colorMode = euiThemeContext.colorMode;
|
|
150
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
153
151
|
|
|
154
152
|
// Make the text color slightly less prominent than the default colors.text
|
|
155
153
|
var textColor = euiTheme.colors.darkestShade;
|
|
156
|
-
var
|
|
157
|
-
backgroundColor = _euiButtonColor.backgroundColor;
|
|
158
|
-
var tintedBackgroundColor = colorMode === 'DARK' ? (0, _services.shade)(backgroundColor, 0.5) : (0, _services.tint)(backgroundColor, 0.7);
|
|
154
|
+
var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
|
|
159
155
|
// Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
|
|
160
156
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
|
|
161
157
|
var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
|
|
162
158
|
|
|
163
159
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
164
160
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
165
|
-
var borderColor =
|
|
161
|
+
var borderColor = euiTheme.components.forms.borderAutofilled;
|
|
166
162
|
var invalidBorder = euiTheme.colors.danger;
|
|
167
163
|
var borderShadow = function borderShadow(color) {
|
|
168
164
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
@@ -180,21 +176,21 @@ var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
|
180
176
|
*/
|
|
181
177
|
|
|
182
178
|
var euiFormCustomControlVariables = exports.euiFormCustomControlVariables = function euiFormCustomControlVariables(euiThemeContext) {
|
|
183
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
184
|
-
colorMode = euiThemeContext.colorMode;
|
|
179
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
185
180
|
var sizes = {
|
|
186
181
|
control: euiTheme.size.base,
|
|
187
182
|
lineHeight: euiTheme.size.l,
|
|
188
183
|
labelGap: euiTheme.size.s
|
|
189
184
|
};
|
|
190
185
|
var colors = {
|
|
191
|
-
unselected: euiTheme.
|
|
192
|
-
unselectedBorder:
|
|
193
|
-
: (0, _services.shade)(euiTheme.colors.lightestShade, 0.4),
|
|
186
|
+
unselected: euiTheme.components.forms.controlBackgroundUnselected,
|
|
187
|
+
unselectedBorder: euiTheme.components.forms.controlBorder,
|
|
194
188
|
selected: euiTheme.colors.primary,
|
|
189
|
+
selectedBorder: euiTheme.components.forms.controlBorderSelected,
|
|
195
190
|
selectedIcon: euiTheme.colors.emptyShade,
|
|
196
|
-
disabled: euiTheme.
|
|
197
|
-
|
|
191
|
+
disabled: euiTheme.components.forms.controlBackgroundDisabled,
|
|
192
|
+
disabledBorder: euiTheme.components.forms.controlBorderDisabled,
|
|
193
|
+
disabledIcon: euiTheme.components.forms.iconDisabled,
|
|
198
194
|
disabledLabel: euiTheme.colors.disabledText // Lighter than formVars.disabledColor because it typically doesn't have as dark a background
|
|
199
195
|
};
|
|
200
196
|
var animation = {
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiRangeTooltipValueStyles = exports.euiRangeTooltipStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../../services");
|
|
9
|
-
var _range = require("./range.styles");
|
|
10
8
|
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _popover = require("../../../services/popover");
|
|
10
|
+
var _range = require("./range.styles");
|
|
11
11
|
/*
|
|
12
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -25,25 +25,23 @@ var euiRangeTooltipStyles = exports.euiRangeTooltipStyles = function euiRangeToo
|
|
|
25
25
|
}), ";pointer-events:none;z-index:", range.thumbZIndex, ";;label:euiRangeTooltip;")
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
29
|
-
return colorMode === _services.COLOR_MODES_STANDARD.dark ? (0, _services.shade)(euiTheme.colors.emptyShade, 1) : (0, _services.tint)(euiTheme.colors.fullShade, 0.25);
|
|
30
|
-
};
|
|
31
28
|
var euiRangeTooltipValueStyles = exports.euiRangeTooltipValueStyles = function euiRangeTooltipValueStyles(euiThemeContext) {
|
|
32
29
|
var range = (0, _range.euiRangeVariables)(euiThemeContext);
|
|
33
30
|
var euiTheme = euiThemeContext.euiTheme,
|
|
34
31
|
colorMode = euiThemeContext.colorMode;
|
|
32
|
+
var toolTipBackgroundColor = euiTheme.components.tooltipBackground;
|
|
33
|
+
var borderColor = colorMode === 'DARK' ? toolTipBackgroundColor : 'transparent';
|
|
35
34
|
var arrowSize = euiTheme.size.m;
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
35
|
+
var arrowOffset = euiTheme.size.l;
|
|
36
|
+
var arrowStyles = (0, _popover._popoverArrowStyles)(euiThemeContext, arrowSize);
|
|
39
37
|
return {
|
|
40
38
|
euiRangeTooltip__value: /*#__PURE__*/(0, _react.css)("position:absolute;inset-block-start:50%;max-inline-size:", (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
41
39
|
return x * 16;
|
|
42
|
-
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:
|
|
43
|
-
return x / 2;
|
|
44
|
-
}), ";};label:euiRangeTooltip__value;"),
|
|
45
|
-
left: /*#__PURE__*/(0, _react.css)("margin-inline-end:",
|
|
46
|
-
right: /*#__PURE__*/(0, _react.css)("margin-inline-start:",
|
|
40
|
+
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateY(-50%);", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " line-height:", (0, _global_styling.euiFontSize)(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:", toolTipBackgroundColor, ";border:", euiTheme.border.width.thin, " solid ", toolTipBackgroundColor, ";border:", euiTheme.border.width.thin, " solid ", borderColor, ";border-radius:", euiTheme.border.radius.small, ";&::before{content:'';", arrowStyles._arrowStyles, " inset-block-start:50%;margin-block-start:", (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
41
|
+
return x / -2;
|
|
42
|
+
}), ";background-color:inherit;border:inherit;};label:euiRangeTooltip__value;"),
|
|
43
|
+
left: /*#__PURE__*/(0, _react.css)("margin-inline-end:", arrowOffset, ";&::before{", arrowStyles.positions.left, " inset-inline-start:100%;};label:left;"),
|
|
44
|
+
right: /*#__PURE__*/(0, _react.css)("margin-inline-start:", arrowOffset, ";&::before{", arrowStyles.positions.right, " inset-inline-end:100%;};label:right;"),
|
|
47
45
|
hasTicks: /*#__PURE__*/(0, _react.css)("inset-block-start:", (0, _global_styling.mathWithUnits)(range.thumbWidth, function (x) {
|
|
48
46
|
return x / 2;
|
|
49
47
|
}), ";;label:hasTicks;")
|
|
@@ -24,12 +24,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
26
|
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); }
|
|
27
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
28
|
-
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."); }
|
|
29
|
-
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; } }
|
|
30
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
31
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
32
|
-
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; }
|
|
33
27
|
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; }
|
|
34
28
|
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; }
|
|
35
29
|
var EuiSwitch = exports.EuiSwitch = function EuiSwitch(_ref) {
|
|
@@ -72,7 +66,9 @@ var EuiSwitch = exports.EuiSwitch = function EuiSwitch(_ref) {
|
|
|
72
66
|
var buttonStyles = [styles.button.euiSwitch__button, styles.button[size]];
|
|
73
67
|
var bodyStyles = [styles.body.euiSwitch__body, disabled ? styles.body.disabled[size] : checked ? styles.body.on : styles.body.off];
|
|
74
68
|
var iconsStyles = [styles.icons.euiSwitch__icons, checked ? styles.icons.on : styles.icons.off, disabled ? styles.icons.disabled : styles.icons.enabled];
|
|
75
|
-
var thumbStyles = [styles.thumb.euiSwitch__thumb,
|
|
69
|
+
var thumbStyles = [styles.thumb.euiSwitch__thumb, !disabled && [styles.thumb.enabled.enabled, styles.thumb.enabled[size]],
|
|
70
|
+
// keep checked styles after enabled styles to ensure checked overrides enabled.off state
|
|
71
|
+
checked ? styles.thumb.on[size] : styles.thumb.off, disabled && [styles.thumb.disabled.disabled, styles.thumb.disabled[size]]];
|
|
76
72
|
var labelStyles = [styles.label.euiSwitch__label, styles.label[size], disabled && styles.label.disabled, labelProps === null || labelProps === void 0 ? void 0 : labelProps.css];
|
|
77
73
|
return (0, _react2.jsx)("div", {
|
|
78
74
|
css: cssStyles,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiSwitchStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _services = require("../../../services");
|
|
9
8
|
var _global_styling = require("../../../global_styling");
|
|
10
9
|
var _form = require("../form.styles");
|
|
11
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)."; } /*
|
|
@@ -19,12 +18,15 @@ var euiSwitchVars = function euiSwitchVars(euiThemeContext) {
|
|
|
19
18
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
19
|
var formVars = (0, _form.euiFormCustomControlVariables)(euiThemeContext);
|
|
21
20
|
var colors = {
|
|
22
|
-
on:
|
|
23
|
-
off:
|
|
21
|
+
on: euiTheme.components.switchBackgroundOn,
|
|
22
|
+
off: euiTheme.components.switchBackgroundOff,
|
|
24
23
|
disabled: formVars.colors.disabled,
|
|
25
24
|
thumb: formVars.colors.selectedIcon,
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
thumbDisabled: euiTheme.components.switchThumbBackgroundDisabled,
|
|
26
|
+
thumbBorder: euiTheme.components.switchThumbBorderOff,
|
|
27
|
+
thumbBorderOn: euiTheme.components.switchThumbBorderOn,
|
|
28
|
+
thumbBorderDisabled: formVars.colors.disabledBorder,
|
|
29
|
+
iconDisabled: euiTheme.components.switchIconDisabled
|
|
28
30
|
};
|
|
29
31
|
var sizes = {
|
|
30
32
|
uncompressed: {
|
|
@@ -136,23 +138,16 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
136
138
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
137
139
|
};
|
|
138
140
|
var bodyStyles = function bodyStyles(_ref4, _ref5) {
|
|
139
|
-
var
|
|
141
|
+
var euiTheme = _ref4.euiTheme;
|
|
140
142
|
var colors = _ref5.colors;
|
|
141
|
-
// This is probably very extra, but the visual weight of the default
|
|
142
|
-
// disabled custom control feels different in light mode depending
|
|
143
|
-
// on the size of the switch, so I'm tinting it based on that.
|
|
144
|
-
// Gotta justify my stupidly expensive art degree!
|
|
145
|
-
var _calculateDisabledColor = function _calculateDisabledColor(tintAmount) {
|
|
146
|
-
return /*#__PURE__*/(0, _react.css)("label:disabled;background-color:", colorMode === 'DARK' ? colors.disabled : (0, _services.tint)(colors.disabled, tintAmount), ";");
|
|
147
|
-
};
|
|
148
143
|
return {
|
|
149
144
|
euiSwitch__body: _ref,
|
|
150
145
|
on: /*#__PURE__*/(0, _react.css)("background-color:", colors.on, ";;label:on;"),
|
|
151
146
|
off: /*#__PURE__*/(0, _react.css)("background-color:", colors.off, ";;label:off;"),
|
|
152
147
|
disabled: {
|
|
153
|
-
uncompressed:
|
|
154
|
-
compressed:
|
|
155
|
-
mini:
|
|
148
|
+
uncompressed: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.switchUncompressedBackgroundDisabled, ";;label:uncompressed;"),
|
|
149
|
+
compressed: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.switchCompressedBackgroundDisabled, ";;label:compressed;"),
|
|
150
|
+
mini: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.switchMiniBackgroundDisabled, ";;label:mini;")
|
|
156
151
|
}
|
|
157
152
|
};
|
|
158
153
|
};
|
|
@@ -165,7 +160,7 @@ var iconStyles = function iconStyles(_ref6, _ref7) {
|
|
|
165
160
|
on: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '-25%'), ";;label:on;"),
|
|
166
161
|
off: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', '-75%'), ";;label:off;"),
|
|
167
162
|
enabled: /*#__PURE__*/(0, _react.css)("color:", colors.thumb, ";;label:enabled;"),
|
|
168
|
-
disabled: /*#__PURE__*/(0, _react.css)("color:", colors.
|
|
163
|
+
disabled: /*#__PURE__*/(0, _react.css)("color:", colors.iconDisabled, ";;label:disabled;")
|
|
169
164
|
};
|
|
170
165
|
};
|
|
171
166
|
var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
@@ -185,13 +180,15 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
185
180
|
euiSwitch__thumb: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('vertical', 0), " aspect-ratio:1;", (0, _global_styling.logicalCSS)('width', 'fit-content'), " ", (0, _global_styling.logicalCSS)('height', '100%'), " border-radius:50%;pointer-events:none;", _global_styling.euiCanAnimate, "{transition-property:inset-inline-start,transform,background-color,border-color;transition-duration:", animation.speed, ";transition-timing-function:", animation.easing, ";};label:euiSwitch__thumb;"),
|
|
186
181
|
off: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), ";;label:off;"),
|
|
187
182
|
get on() {
|
|
183
|
+
var baseStyles = "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(colors.thumbBorderOn, ";\n ");
|
|
184
|
+
|
|
188
185
|
// right: 0 works but doesn't transition/animate, so we need to
|
|
189
186
|
// manually calculate the left position per switch size
|
|
190
187
|
var _calculateLeft = function _calculateLeft(bodyWidth, thumbWidth) {
|
|
191
188
|
var leftPosition = (0, _global_styling.mathWithUnits)([bodyWidth, thumbWidth], function (x, y) {
|
|
192
189
|
return x - y;
|
|
193
190
|
});
|
|
194
|
-
return /*#__PURE__*/(0, _react.css)("label:on;", (0, _global_styling.logicalCSS)('left', leftPosition), ";");
|
|
191
|
+
return /*#__PURE__*/(0, _react.css)("label:on;", (0, _global_styling.logicalCSS)('left', leftPosition), " ", baseStyles, ";");
|
|
195
192
|
};
|
|
196
193
|
return {
|
|
197
194
|
uncompressed: _calculateLeft(uncompressed.width, uncompressed.height),
|
|
@@ -206,7 +203,7 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
206
203
|
mini: _calculateScale('mini', false)
|
|
207
204
|
},
|
|
208
205
|
disabled: {
|
|
209
|
-
disabled: /*#__PURE__*/(0, _react.css)("background-color:
|
|
206
|
+
disabled: /*#__PURE__*/(0, _react.css)("background-color:", colors.thumbDisabled, ";border:", euiTheme.border.width.thin, " solid ", colors.thumbBorderDisabled, ";;label:disabled;"),
|
|
210
207
|
uncompressed: _calculateScale('uncompressed', false),
|
|
211
208
|
compressed: _calculateScale('compressed', false),
|
|
212
209
|
mini: _calculateScale('mini', false)
|