@elastic/eui 97.1.0 → 97.3.0-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/es/components/badge/badge.js +1 -1
- package/es/components/badge/badge.styles.js +2 -2
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/es/components/badge/color_utils.js +8 -7
- package/es/components/badge/notification_badge/badge_notification.js +1 -1
- package/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +4 -4
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.styles.js +1 -1
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- 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.styles.js +1 -2
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/combo_box/combo_box.js +9 -6
- package/es/components/common.js +0 -28
- package/es/components/context_menu/context_menu_panel.js +17 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/es/components/datagrid/body/data_grid_body.js +8 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/es/components/datagrid/controls/display_selector.js +277 -207
- package/es/components/datagrid/data_grid.stories.utils.js +28 -2
- package/es/components/datagrid/data_grid.styles.js +4 -6
- package/es/components/datagrid/utils/col_widths.js +7 -13
- package/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +29 -13
- 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.styles.js +5 -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/form/form.styles.js +21 -28
- package/es/components/form/range/range_tooltip.styles.js +3 -7
- 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 +12 -6
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_links/header_links.styles.js +1 -0
- 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/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/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +8 -6
- 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 +3 -5
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +40 -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/hooks/useDeepEqual.js +18 -6
- package/es/services/theme/provider.js +11 -0
- 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/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
- package/es/themes/amsterdam/global_styling/variables/_components.js +442 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +149 -0
- package/es/themes/amsterdam/theme.js +3 -1
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +7 -0
- package/eui.d.ts +2121 -2627
- package/i18ntokens.json +92 -110
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/badge.styles.js +2 -2
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/lib/components/badge/color_utils.js +13 -12
- package/lib/components/badge/notification_badge/badge_notification.js +1 -1
- package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.styles.js +1 -1
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- 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.styles.js +1 -2
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/combo_box/combo_box.js +9 -6
- package/lib/components/common.js +0 -28
- package/lib/components/context_menu/context_menu_panel.js +17 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/lib/components/datagrid/body/data_grid_body.js +8 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/lib/components/datagrid/controls/display_selector.js +275 -204
- package/lib/components/datagrid/data_grid.stories.utils.js +28 -2
- package/lib/components/datagrid/data_grid.styles.js +4 -6
- package/lib/components/datagrid/utils/col_widths.js +7 -13
- package/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +29 -13
- 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.styles.js +4 -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/form/form.styles.js +20 -27
- package/lib/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_links/header_links.styles.js +1 -0
- 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/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/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +8 -6
- 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 +3 -5
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -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/hooks/useDeepEqual.js +17 -7
- package/lib/services/theme/provider.js +11 -0
- 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/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/lib/themes/amsterdam/global_styling/variables/_components.js +446 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/lib/themes/amsterdam/theme.js +3 -1
- package/lib/themes/index.js +7 -0
- package/lib/themes/themes.js +8 -1
- package/optimize/es/components/badge/badge.js +1 -1
- package/optimize/es/components/badge/badge.styles.js +2 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/es/components/badge/color_utils.js +8 -7
- package/optimize/es/components/badge/notification_badge/badge_notification.js +1 -1
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +4 -4
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +1 -1
- 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/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.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/combo_box/combo_box.js +9 -6
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/context_menu/context_menu_panel.js +11 -1
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +15 -8
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +0 -1
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +0 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/optimize/es/components/datagrid/controls/display_selector.js +277 -207
- package/optimize/es/components/datagrid/data_grid.styles.js +4 -6
- package/optimize/es/components/datagrid/utils/col_widths.js +7 -13
- package/optimize/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +29 -13
- 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 +5 -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/form/form.styles.js +21 -28
- package/optimize/es/components/form/range/range_tooltip.styles.js +3 -7
- 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 +12 -6
- package/optimize/es/components/header/header_links/header_links.js +1 -1
- package/optimize/es/components/header/header_links/header_links.styles.js +1 -0
- 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/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/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/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +8 -6
- 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 +3 -5
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +40 -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/hooks/useDeepEqual.js +13 -6
- package/optimize/es/services/theme/provider.js +11 -0
- 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/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +434 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +141 -0
- package/optimize/es/themes/amsterdam/theme.js +3 -1
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +7 -0
- package/optimize/lib/components/badge/badge.js +1 -1
- package/optimize/lib/components/badge/badge.styles.js +2 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/lib/components/badge/color_utils.js +13 -12
- package/optimize/lib/components/badge/notification_badge/badge_notification.js +1 -1
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +1 -1
- 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/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.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/combo_box/combo_box.js +9 -6
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/context_menu/context_menu_panel.js +11 -1
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +15 -8
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +0 -1
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +0 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/optimize/lib/components/datagrid/controls/display_selector.js +274 -204
- package/optimize/lib/components/datagrid/data_grid.styles.js +4 -6
- package/optimize/lib/components/datagrid/utils/col_widths.js +7 -13
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +29 -13
- 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 +4 -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/form/form.styles.js +20 -27
- package/optimize/lib/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/optimize/lib/components/header/header_links/header_links.js +1 -1
- package/optimize/lib/components/header/header_links/header_links.styles.js +1 -0
- 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/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/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/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +8 -6
- 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 +3 -5
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -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/hooks/useDeepEqual.js +12 -5
- package/optimize/lib/services/theme/provider.js +11 -0
- 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/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +439 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +146 -0
- package/optimize/lib/themes/amsterdam/theme.js +3 -1
- package/optimize/lib/themes/index.js +7 -0
- package/optimize/lib/themes/themes.js +8 -1
- package/package.json +8 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -16
- 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 -15
- package/src/global_styling/variables/_states.scss +1 -14
- package/src/global_styling/variables/_typography.scss +1 -75
- package/src/global_styling/variables/_z_index.scss +1 -33
- package/src/themes/amsterdam/_colors_dark.scss +80 -8
- package/src/themes/amsterdam/_colors_light.scss +80 -8
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +1 -0
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/badge.styles.js +2 -2
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/test-env/components/badge/color_utils.js +13 -12
- package/test-env/components/badge/notification_badge/badge_notification.js +1 -1
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.styles.js +1 -1
- 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/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.styles.js +1 -2
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/combo_box/combo_box.js +9 -6
- package/test-env/components/common.js +0 -28
- package/test-env/components/context_menu/context_menu_panel.js +17 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/test-env/components/datagrid/body/data_grid_body.js +8 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/test-env/components/datagrid/controls/display_selector.js +274 -204
- package/test-env/components/datagrid/data_grid.stories.utils.js +28 -2
- package/test-env/components/datagrid/data_grid.styles.js +4 -6
- package/test-env/components/datagrid/utils/col_widths.js +7 -13
- package/test-env/components/datagrid/utils/grid_height_width.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +29 -13
- 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.styles.js +4 -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/form/form.styles.js +20 -27
- package/test-env/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_links/header_links.styles.js +1 -0
- 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/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/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/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +8 -6
- 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 +3 -5
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -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/hooks/useDeepEqual.js +12 -5
- package/test-env/services/theme/provider.js +11 -0
- 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/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +439 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +146 -0
- package/test-env/themes/amsterdam/theme.js +3 -1
- package/test-env/themes/index.js +7 -0
- package/test-env/themes/themes.js +8 -1
|
@@ -67,7 +67,7 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
67
67
|
}
|
|
68
68
|
}, {
|
|
69
69
|
key: "getCalculatedHeight",
|
|
70
|
-
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex,
|
|
70
|
+
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex, rowHeightsOptions) {
|
|
71
71
|
if ((0, _predicate.isObject)(heightOption) && heightOption.height) {
|
|
72
72
|
return Math.max(heightOption.height, defaultHeight);
|
|
73
73
|
}
|
|
@@ -75,8 +75,13 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
75
75
|
return Math.max(heightOption, defaultHeight);
|
|
76
76
|
}
|
|
77
77
|
if ((0, _predicate.isObject)(heightOption) && heightOption.lineCount) {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
var _ref = rowHeightsOptions || {},
|
|
79
|
+
autoBelowLineCount = _ref.autoBelowLineCount; // uses auto height cache
|
|
80
|
+
var isRowHeightOverride =
|
|
81
|
+
// lineCount overrides are stored in the heights cache
|
|
82
|
+
rowIndex != null && this.isRowHeightOverride(rowIndex, rowHeightsOptions);
|
|
83
|
+
if (autoBelowLineCount || isRowHeightOverride) {
|
|
84
|
+
return this.getRowHeight(rowIndex) || defaultHeight;
|
|
80
85
|
} else {
|
|
81
86
|
return defaultHeight; // default lineCount height is set in minRowHeight state in grid_row_body
|
|
82
87
|
}
|
|
@@ -107,6 +112,14 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
107
112
|
// Assumes both padding-top and bottom are the same
|
|
108
113
|
return contentHeight + padding * 2;
|
|
109
114
|
}
|
|
115
|
+
}, {
|
|
116
|
+
key: "isAutoBelowLineCount",
|
|
117
|
+
value: function isAutoBelowLineCount(options, option) {
|
|
118
|
+
var _this$getLineCount;
|
|
119
|
+
if (!(options !== null && options !== void 0 && options.autoBelowLineCount)) return false;
|
|
120
|
+
if (((_this$getLineCount = this.getLineCount(option)) !== null && _this$getLineCount !== void 0 ? _this$getLineCount : 0) > 1) return true;
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
110
123
|
|
|
111
124
|
/**
|
|
112
125
|
* Auto height utils
|
|
@@ -118,6 +131,9 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
118
131
|
if (height === AUTO_HEIGHT) {
|
|
119
132
|
return true;
|
|
120
133
|
}
|
|
134
|
+
if (this.isAutoBelowLineCount(rowHeightsOptions, height)) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
121
137
|
return false;
|
|
122
138
|
}
|
|
123
139
|
}, {
|
|
@@ -147,8 +163,8 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
147
163
|
}, {
|
|
148
164
|
key: "pruneHiddenColumnHeights",
|
|
149
165
|
value: function pruneHiddenColumnHeights(visibleColumns) {
|
|
150
|
-
var visibleColumnIds = new Set(visibleColumns.map(function (
|
|
151
|
-
var id =
|
|
166
|
+
var visibleColumnIds = new Set(visibleColumns.map(function (_ref2) {
|
|
167
|
+
var id = _ref2.id;
|
|
152
168
|
return id;
|
|
153
169
|
}));
|
|
154
170
|
var didModify = false;
|
|
@@ -258,10 +274,10 @@ var RowHeightVirtualizationUtils = exports.RowHeightVirtualizationUtils = /*#__P
|
|
|
258
274
|
* Hook for instantiating RowHeightUtils, setting internal class vars,
|
|
259
275
|
* and setting up various row-height-related side effects
|
|
260
276
|
*/
|
|
261
|
-
var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(
|
|
262
|
-
var virtualization =
|
|
263
|
-
rowHeightsOptions =
|
|
264
|
-
columns =
|
|
277
|
+
var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(_ref3) {
|
|
278
|
+
var virtualization = _ref3.virtualization,
|
|
279
|
+
rowHeightsOptions = _ref3.rowHeightsOptions,
|
|
280
|
+
columns = _ref3.columns;
|
|
265
281
|
var forceRenderRef = (0, _services.useLatest)((0, _services.useForceRender)());
|
|
266
282
|
var _useState = (0, _react.useState)(function () {
|
|
267
283
|
if (virtualization) {
|
|
@@ -294,9 +310,9 @@ var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(_
|
|
|
294
310
|
}, [rowHeightUtils, columns]);
|
|
295
311
|
return rowHeightUtils;
|
|
296
312
|
};
|
|
297
|
-
var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHeight(
|
|
298
|
-
var rowHeightsOptions =
|
|
299
|
-
rowHeightUtils =
|
|
313
|
+
var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHeight(_ref4) {
|
|
314
|
+
var rowHeightsOptions = _ref4.rowHeightsOptions,
|
|
315
|
+
rowHeightUtils = _ref4.rowHeightUtils;
|
|
300
316
|
var _useContext = (0, _react.useContext)(_sorting.DataGridSortedContext),
|
|
301
317
|
getCorrectRowIndex = _useContext.getCorrectRowIndex;
|
|
302
318
|
|
|
@@ -320,7 +336,7 @@ var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHe
|
|
|
320
336
|
// Account for row-specific height overrides
|
|
321
337
|
var rowHeightOption = rowHeightUtils.getRowHeightOption(correctRowIndex, rowHeightsOptions);
|
|
322
338
|
if (rowHeightOption) {
|
|
323
|
-
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex,
|
|
339
|
+
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex, rowHeightsOptions);
|
|
324
340
|
}
|
|
325
341
|
|
|
326
342
|
// Use the row-specific height if it exists, if not, fall back to the default
|
|
@@ -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)
|
|
@@ -8,6 +8,7 @@ exports.euiEmptyPromptStyles = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _global_styling = require("../../global_styling");
|
|
11
|
+
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
11
12
|
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
13
|
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) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
14
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
@@ -72,7 +73,8 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
75
|
var generateFooterBorder = function generateFooterBorder(color) {
|
|
75
|
-
|
|
76
|
+
var borderToken = (0, _euiThemeCommon.getTokenName)('borderStrong', color);
|
|
77
|
+
return "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors[borderToken]);
|
|
76
78
|
};
|
|
77
79
|
return {
|
|
78
80
|
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,6 +111,7 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
109
111
|
subdued: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
110
112
|
primary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
111
113
|
accent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
114
|
+
accentSecondary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
112
115
|
danger: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
113
116
|
warning: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
114
117
|
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
|
|
@@ -8,7 +8,6 @@ exports.euiFormVariables = exports.euiFormMaxWidth = exports.euiFormCustomContro
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _services = require("../../services");
|
|
10
10
|
var _global_styling = require("../../global_styling");
|
|
11
|
-
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
12
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; }
|
|
13
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) { (0, _defineProperty2.default)(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; } /*
|
|
14
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -27,10 +26,8 @@ var euiFormMaxWidth = exports.euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
28
|
var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
30
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
31
|
-
|
|
32
|
-
var isColorDark = colorMode === 'DARK';
|
|
33
|
-
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;
|
|
34
31
|
var controlHeight = euiTheme.size.xxl;
|
|
35
32
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
36
33
|
var sizes = {
|
|
@@ -49,15 +46,15 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
49
46
|
})
|
|
50
47
|
};
|
|
51
48
|
var colors = {
|
|
52
|
-
textColor: euiTheme.colors.
|
|
49
|
+
textColor: euiTheme.colors.textParagraph,
|
|
53
50
|
backgroundColor: backgroundColor,
|
|
54
|
-
backgroundDisabledColor:
|
|
55
|
-
backgroundReadOnlyColor: euiTheme.
|
|
56
|
-
borderColor:
|
|
57
|
-
controlDisabledColor: euiTheme.
|
|
51
|
+
backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
|
|
52
|
+
backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
|
|
53
|
+
borderColor: euiTheme.components.forms.border,
|
|
54
|
+
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
58
55
|
controlBoxShadow: '0 0 transparent',
|
|
59
56
|
controlPlaceholderText: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
|
|
60
|
-
appendPrependBackground:
|
|
57
|
+
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
61
58
|
};
|
|
62
59
|
var controlLayout = {
|
|
63
60
|
controlLayoutGroupInputHeight: (0, _global_styling.mathWithUnits)(controlHeight, function (x) {
|
|
@@ -129,9 +126,8 @@ var euiFormControlDefaultShadow = exports.euiFormControlDefaultShadow = function
|
|
|
129
126
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
130
127
|
};
|
|
131
128
|
var euiFormControlFocusStyles = exports.euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref3) {
|
|
132
|
-
var euiTheme = _ref3.euiTheme
|
|
133
|
-
|
|
134
|
-
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");
|
|
129
|
+
var euiTheme = _ref3.euiTheme;
|
|
130
|
+
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");
|
|
135
131
|
};
|
|
136
132
|
var euiFormControlInvalidStyles = exports.euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref4) {
|
|
137
133
|
var euiTheme = _ref4.euiTheme;
|
|
@@ -146,21 +142,18 @@ var euiFormControlReadOnlyStyles = exports.euiFormControlReadOnlyStyles = functi
|
|
|
146
142
|
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 ");
|
|
147
143
|
};
|
|
148
144
|
var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
149
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
150
|
-
colorMode = euiThemeContext.colorMode;
|
|
145
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
151
146
|
|
|
152
147
|
// Make the text color slightly less prominent than the default colors.text
|
|
153
148
|
var textColor = euiTheme.colors.darkestShade;
|
|
154
|
-
var
|
|
155
|
-
backgroundColor = _euiButtonColor.backgroundColor;
|
|
156
|
-
var tintedBackgroundColor = colorMode === 'DARK' ? (0, _services.shade)(backgroundColor, 0.5) : (0, _services.tint)(backgroundColor, 0.7);
|
|
149
|
+
var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
|
|
157
150
|
// Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
|
|
158
151
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
|
|
159
152
|
var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
|
|
160
153
|
|
|
161
154
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
162
155
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
163
|
-
var borderColor =
|
|
156
|
+
var borderColor = euiTheme.components.forms.borderAutofilled;
|
|
164
157
|
var invalidBorder = euiTheme.colors.danger;
|
|
165
158
|
var borderShadow = function borderShadow(color) {
|
|
166
159
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
@@ -178,21 +171,21 @@ var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
|
178
171
|
*/
|
|
179
172
|
|
|
180
173
|
var euiFormCustomControlVariables = exports.euiFormCustomControlVariables = function euiFormCustomControlVariables(euiThemeContext) {
|
|
181
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
182
|
-
colorMode = euiThemeContext.colorMode;
|
|
174
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
183
175
|
var sizes = {
|
|
184
176
|
control: euiTheme.size.base,
|
|
185
177
|
lineHeight: euiTheme.size.l,
|
|
186
178
|
labelGap: euiTheme.size.s
|
|
187
179
|
};
|
|
188
180
|
var colors = {
|
|
189
|
-
unselected: euiTheme.
|
|
190
|
-
unselectedBorder:
|
|
191
|
-
: (0, _services.shade)(euiTheme.colors.lightestShade, 0.4),
|
|
181
|
+
unselected: euiTheme.components.forms.controlBackgroundUnselected,
|
|
182
|
+
unselectedBorder: euiTheme.components.forms.controlBorder,
|
|
192
183
|
selected: euiTheme.colors.primary,
|
|
184
|
+
selectedBorder: euiTheme.components.forms.controlBorderSelected,
|
|
193
185
|
selectedIcon: euiTheme.colors.emptyShade,
|
|
194
|
-
disabled: euiTheme.
|
|
195
|
-
|
|
186
|
+
disabled: euiTheme.components.forms.colorDisabled,
|
|
187
|
+
disabledBorder: euiTheme.components.forms.controlBorderDisabled,
|
|
188
|
+
disabledIcon: euiTheme.components.forms.iconDisabled,
|
|
196
189
|
disabledLabel: euiTheme.colors.disabledText // Lighter than formVars.disabledColor because it typically doesn't have as dark a background
|
|
197
190
|
};
|
|
198
191
|
var animation = {
|
|
@@ -5,7 +5,6 @@ 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
8
|
var _range = require("./range.styles");
|
|
10
9
|
var _global_styling = require("../../../global_styling");
|
|
11
10
|
/*
|
|
@@ -25,21 +24,18 @@ var euiRangeTooltipStyles = exports.euiRangeTooltipStyles = function euiRangeToo
|
|
|
25
24
|
}), ";pointer-events:none;z-index:", range.thumbZIndex, ";;label:euiRangeTooltip;")
|
|
26
25
|
};
|
|
27
26
|
};
|
|
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
27
|
var euiRangeTooltipValueStyles = exports.euiRangeTooltipValueStyles = function euiRangeTooltipValueStyles(euiThemeContext) {
|
|
32
28
|
var range = (0, _range.euiRangeVariables)(euiThemeContext);
|
|
33
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
34
|
-
colorMode = euiThemeContext.colorMode;
|
|
29
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
35
30
|
var arrowSize = euiTheme.size.m;
|
|
36
31
|
var arrowSizeInt = parseInt(arrowSize, 10);
|
|
37
32
|
var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px"); // Shift arrow 1px more than half its size to account for border radius
|
|
38
33
|
|
|
34
|
+
var toolTipBackgroundColor = euiTheme.components.tooltipBackground;
|
|
39
35
|
return {
|
|
40
36
|
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
37
|
return x * 16;
|
|
42
|
-
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateX(0) translateY(-50%);", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), " line-height:", (0, _global_styling.euiFontSize)(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:",
|
|
38
|
+
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateX(0) 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-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:", toolTipBackgroundColor, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
43
39
|
return x / 2;
|
|
44
40
|
}), ";};label:euiRangeTooltip__value;"),
|
|
45
41
|
left: /*#__PURE__*/(0, _react.css)("margin-inline-end:", euiTheme.size.l, ";&::before{inset-inline-end:", arrowMinusSize, ";};label:left;"),
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.EuiSwitch = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -65,7 +64,9 @@ var EuiSwitch = exports.EuiSwitch = function EuiSwitch(_ref) {
|
|
|
65
64
|
var buttonStyles = [styles.button.euiSwitch__button, styles.button[size]];
|
|
66
65
|
var bodyStyles = [styles.body.euiSwitch__body, disabled ? styles.body.disabled[size] : checked ? styles.body.on : styles.body.off];
|
|
67
66
|
var iconsStyles = [styles.icons.euiSwitch__icons, checked ? styles.icons.on : styles.icons.off, disabled ? styles.icons.disabled : styles.icons.enabled];
|
|
68
|
-
var thumbStyles = [styles.thumb.euiSwitch__thumb,
|
|
67
|
+
var thumbStyles = [styles.thumb.euiSwitch__thumb, !disabled && [styles.thumb.enabled.enabled, styles.thumb.enabled[size]],
|
|
68
|
+
// keep checked styles after enabled styles to ensure checked overrides enabled.off state
|
|
69
|
+
checked ? styles.thumb.on[size] : styles.thumb.off, disabled && [styles.thumb.disabled.disabled, styles.thumb.disabled[size]]];
|
|
69
70
|
var labelStyles = [styles.label.euiSwitch__label, styles.label[size], disabled && styles.label.disabled, labelProps === null || labelProps === void 0 ? void 0 : labelProps.css];
|
|
70
71
|
return (0, _react2.jsx)("div", {
|
|
71
72
|
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)
|
|
@@ -36,7 +36,7 @@ var euiHeaderStyles = exports.euiHeaderStyles = function euiHeaderStyles(euiThem
|
|
|
36
36
|
static: /*#__PURE__*/(0, _react.css)("z-index:", Number(euiTheme.levels.header) - 1, ";position:relative;;label:static;"),
|
|
37
37
|
fixed: /*#__PURE__*/(0, _react.css)("z-index:", euiTheme.levels.header, ";position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('horizontal', 0), ";;label:fixed;"),
|
|
38
38
|
// Theme
|
|
39
|
-
default: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.
|
|
39
|
+
default: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.headerBackground, ";;label:default;"),
|
|
40
40
|
dark: /*#__PURE__*/(0, _react.css)(euiHeaderDarkStyles(euiThemeContext), ";label:dark;")
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -52,10 +52,16 @@ var euiHeaderStyles = exports.euiHeaderStyles = function euiHeaderStyles(euiThem
|
|
|
52
52
|
*/
|
|
53
53
|
|
|
54
54
|
var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
55
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
56
|
-
colorMode = euiThemeContext.colorMode;
|
|
55
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
57
56
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
58
57
|
controlPlaceholderText = _euiFormVariables.controlPlaceholderText;
|
|
59
|
-
var backgroundColor =
|
|
60
|
-
|
|
58
|
+
var backgroundColor = euiTheme.components.headerDarkBackground;
|
|
59
|
+
|
|
60
|
+
// Specific color overrides for EuiSelectableTemplateSitewide
|
|
61
|
+
var selectableSitewide = {
|
|
62
|
+
color: euiTheme.colors.ghost,
|
|
63
|
+
borderColor: (0, _services.transparentize)(euiTheme.colors.ghost, 0.3),
|
|
64
|
+
placeholderColor: (0, _services.makeHighContrastColor)(controlPlaceholderText, 8)(backgroundColor)
|
|
65
|
+
};
|
|
66
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
|
|
61
67
|
};
|
|
@@ -30,7 +30,7 @@ var _excluded = ["children", "className", "gutterSize", "popoverBreakpoints", "p
|
|
|
30
30
|
*/
|
|
31
31
|
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); }
|
|
32
32
|
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; }
|
|
33
|
-
var GUTTER_SIZES = exports.GUTTER_SIZES = ['xs', 's', 'm', 'l'];
|
|
33
|
+
var GUTTER_SIZES = exports.GUTTER_SIZES = ['xxs', 'xs', 's', 'm', 'l'];
|
|
34
34
|
var EuiHeaderLinks = exports.EuiHeaderLinks = function EuiHeaderLinks(_ref) {
|
|
35
35
|
var children = _ref.children,
|
|
36
36
|
className = _ref.className,
|
|
@@ -35,6 +35,7 @@ var euiHeaderLinksStyles = exports.euiHeaderLinksStyles = function euiHeaderLink
|
|
|
35
35
|
euiHeaderLinks: _ref2,
|
|
36
36
|
euiHeaderLinks__list: _ref,
|
|
37
37
|
gutterSizes: {
|
|
38
|
+
xxs: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xs, ";;label:xxs;"),
|
|
38
39
|
xs: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.s, ";;label:xs;"),
|
|
39
40
|
s: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.m, ";;label:s;"),
|
|
40
41
|
m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.base, ";;label:m;"),
|
|
@@ -40,14 +40,15 @@ var euiIconStyles = exports.euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
40
40
|
// Base
|
|
41
41
|
euiIcon: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;vertical-align:middle;fill:currentColor;transform:translate(0, 0);.euiIcon__fillNegative{fill:", euiTheme.colors.darkestShade, ";};label:euiIcon;"),
|
|
42
42
|
// Colors
|
|
43
|
-
accent: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
44
|
-
|
|
43
|
+
accent: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textAccent, ";;label:accent;"),
|
|
44
|
+
accentSecondary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textAccentSecondary, ";;label:accentSecondary;"),
|
|
45
|
+
danger: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textDanger, ";;label:danger;"),
|
|
45
46
|
ghost: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.ghost, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:ghost;"),
|
|
46
|
-
primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
47
|
-
success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
48
|
-
subdued: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
49
|
-
text: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
50
|
-
warning: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.
|
|
47
|
+
primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
|
|
48
|
+
success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSuccess, ";;label:success;"),
|
|
49
|
+
subdued: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSubdued, ";;label:subdued;"),
|
|
50
|
+
text: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textHeading, ";*[fill],.euiIcon__fillNegative{fill:currentColor!important;};label:text;"),
|
|
51
|
+
warning: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textWarning, ";;label:warning;"),
|
|
51
52
|
inherit: _ref2,
|
|
52
53
|
default: /*#__PURE__*/(0, _react.css)(";label:default;"),
|
|
53
54
|
customColor: /*#__PURE__*/(0, _react.css)(";label:customColor;"),
|
|
@@ -61,7 +62,7 @@ var euiIconStyles = exports.euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
61
62
|
xxl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.xxl), ";label:xxl;"),
|
|
62
63
|
// Variants
|
|
63
64
|
// App icons are two-toned. This provides the base color.
|
|
64
|
-
app: /*#__PURE__*/(0, _react.css)("fill:", euiTheme.colors.text, ";.euiIcon__fillSecondary{fill:", euiTheme.colors.
|
|
65
|
+
app: /*#__PURE__*/(0, _react.css)("fill:", euiTheme.colors.text, ";.euiIcon__fillSecondary{fill:", euiTheme.colors.textSuccess, ";};label:app;"),
|
|
65
66
|
logo: /*#__PURE__*/(0, _react.css)(";label:logo;"),
|
|
66
67
|
// Loading states
|
|
67
68
|
isLoading: /*#__PURE__*/(0, _react.css)("opacity:", iconLoadingOpacity, ";background-color:currentColor;border-radius:", euiTheme.border.radius.small, ";;label:isLoading;"),
|
|
@@ -13,7 +13,7 @@ exports.isNamedColor = isNamedColor;
|
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
var COLORS = exports.COLORS = ['default', 'primary', 'success', 'accent', 'warning', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
16
|
+
var COLORS = exports.COLORS = ['default', 'primary', 'success', 'accent', 'accentSecondary', 'warning', 'danger', 'text', 'subdued', 'ghost', 'inherit'];
|
|
17
17
|
function isNamedColor(name) {
|
|
18
18
|
return COLORS.includes(name);
|
|
19
19
|
}
|