@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
|
@@ -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,17 +42,16 @@ 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;
|
|
52
50
|
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.
|
|
51
|
+
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
52
|
cellPadding: {
|
|
55
53
|
cellPadding: function cellPadding(size) {
|
|
56
|
-
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{", (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;");
|
|
54
|
+
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;");
|
|
57
55
|
},
|
|
58
56
|
get s() {
|
|
59
57
|
return /*#__PURE__*/(0, _react.css)(this.cellPadding('s'), ";label:s;");
|
|
@@ -84,7 +82,7 @@ var euiDataGridStyles = exports.euiDataGridStyles = function euiDataGridStyles(e
|
|
|
84
82
|
none: null,
|
|
85
83
|
horizontal: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";};label:horizontal;"),
|
|
86
84
|
all: /*#__PURE__*/(0, _react.css)("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('border-right', // Visually lighten vertical borders
|
|
87
|
-
"".concat(euiTheme.border.width.thin, " solid ").concat(
|
|
85
|
+
"".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.dataGridVerticalLineBorderColor)), ";}&--firstColumn{", (0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin), ";}&--lastColumn{", (0, _global_styling.logicalCSS)('border-right-color', euiTheme.border.color), ";}}.euiDataGridFooterCell,.euiDataGridHeaderCell{", (0, _global_styling.logicalCSS)('border-right', euiTheme.border.thin), " &:first-of-type{", (0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin), ";}}.euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), ";}&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), ";}&:is(.euiDataGrid--noControls) .euiDataGridHeader{", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";}.euiDataGrid__controls{border:", euiTheme.border.thin, ";background-color:", euiTheme.colors.body, ";};label:all;")
|
|
88
86
|
},
|
|
89
87
|
// Sits below the controls above it and pagination below it
|
|
90
88
|
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;background-color:", euiTheme.colors.body, ";font-feature-settings:'tnum' 1;;label:euiDataGrid__content;"),
|
|
@@ -61,27 +61,21 @@ var useColumnWidths = exports.useColumnWidths = function useColumnWidths(_ref) {
|
|
|
61
61
|
trailingControlColumns = _ref.trailingControlColumns,
|
|
62
62
|
defaultColumnWidth = _ref.defaultColumnWidth,
|
|
63
63
|
onColumnResize = _ref.onColumnResize;
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
initialWidth = _ref2.initialWidth;
|
|
69
|
-
if (columnWidths[id] == null) {
|
|
70
|
-
columnWidths[id] = initialWidth;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
return columnWidths;
|
|
64
|
+
var computeColumnWidths = (0, _react.useCallback)(function () {
|
|
65
|
+
return columns.filter(doesColumnHaveAnInitialWidth).reduce(function (initialWidths, column) {
|
|
66
|
+
return _objectSpread(_objectSpread({}, initialWidths), {}, _defineProperty({}, column.id, column.initialWidth));
|
|
67
|
+
}, {});
|
|
74
68
|
}, [columns]);
|
|
75
69
|
|
|
76
70
|
// Passes initializer function for performance, so computing only runs once on init
|
|
77
71
|
// @see https://react.dev/reference/react/useState#examples-initializer
|
|
78
|
-
var _useState = (0, _react.useState)(
|
|
72
|
+
var _useState = (0, _react.useState)(computeColumnWidths),
|
|
79
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
80
74
|
columnWidths = _useState2[0],
|
|
81
75
|
setColumnWidths = _useState2[1];
|
|
82
76
|
(0, _services.useUpdateEffect)(function () {
|
|
83
|
-
setColumnWidths(
|
|
84
|
-
}, [
|
|
77
|
+
setColumnWidths(computeColumnWidths());
|
|
78
|
+
}, [computeColumnWidths]);
|
|
85
79
|
var setColumnWidth = (0, _react.useCallback)(function (columnId, width) {
|
|
86
80
|
setColumnWidths(function (prevColumnWidths) {
|
|
87
81
|
return _objectSpread(_objectSpread({}, prevColumnWidths), {}, _defineProperty({}, columnId, width));
|
|
@@ -111,7 +111,7 @@ var useUnconstrainedHeight = exports.useUnconstrainedHeight = function useUncons
|
|
|
111
111
|
if (rowHeightOption) {
|
|
112
112
|
// this row's height is known
|
|
113
113
|
knownRowCount++;
|
|
114
|
-
knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex,
|
|
114
|
+
knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex, rowHeightsOptions);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -78,7 +78,7 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
78
78
|
}
|
|
79
79
|
}, {
|
|
80
80
|
key: "getCalculatedHeight",
|
|
81
|
-
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex,
|
|
81
|
+
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex, rowHeightsOptions) {
|
|
82
82
|
if ((0, _predicate.isObject)(heightOption) && heightOption.height) {
|
|
83
83
|
return Math.max(heightOption.height, defaultHeight);
|
|
84
84
|
}
|
|
@@ -86,8 +86,13 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
86
86
|
return Math.max(heightOption, defaultHeight);
|
|
87
87
|
}
|
|
88
88
|
if ((0, _predicate.isObject)(heightOption) && heightOption.lineCount) {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
var _ref = rowHeightsOptions || {},
|
|
90
|
+
autoBelowLineCount = _ref.autoBelowLineCount; // uses auto height cache
|
|
91
|
+
var isRowHeightOverride =
|
|
92
|
+
// lineCount overrides are stored in the heights cache
|
|
93
|
+
rowIndex != null && this.isRowHeightOverride(rowIndex, rowHeightsOptions);
|
|
94
|
+
if (autoBelowLineCount || isRowHeightOverride) {
|
|
95
|
+
return this.getRowHeight(rowIndex) || defaultHeight;
|
|
91
96
|
} else {
|
|
92
97
|
return defaultHeight; // default lineCount height is set in minRowHeight state in grid_row_body
|
|
93
98
|
}
|
|
@@ -118,6 +123,14 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
118
123
|
// Assumes both padding-top and bottom are the same
|
|
119
124
|
return contentHeight + padding * 2;
|
|
120
125
|
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "isAutoBelowLineCount",
|
|
128
|
+
value: function isAutoBelowLineCount(options, option) {
|
|
129
|
+
var _this$getLineCount;
|
|
130
|
+
if (!(options !== null && options !== void 0 && options.autoBelowLineCount)) return false;
|
|
131
|
+
if (((_this$getLineCount = this.getLineCount(option)) !== null && _this$getLineCount !== void 0 ? _this$getLineCount : 0) > 1) return true;
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
121
134
|
|
|
122
135
|
/**
|
|
123
136
|
* Auto height utils
|
|
@@ -129,6 +142,9 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
129
142
|
if (height === AUTO_HEIGHT) {
|
|
130
143
|
return true;
|
|
131
144
|
}
|
|
145
|
+
if (this.isAutoBelowLineCount(rowHeightsOptions, height)) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
132
148
|
return false;
|
|
133
149
|
}
|
|
134
150
|
}, {
|
|
@@ -158,8 +174,8 @@ var RowHeightUtils = exports.RowHeightUtils = /*#__PURE__*/function () {
|
|
|
158
174
|
}, {
|
|
159
175
|
key: "pruneHiddenColumnHeights",
|
|
160
176
|
value: function pruneHiddenColumnHeights(visibleColumns) {
|
|
161
|
-
var visibleColumnIds = new Set(visibleColumns.map(function (
|
|
162
|
-
var id =
|
|
177
|
+
var visibleColumnIds = new Set(visibleColumns.map(function (_ref2) {
|
|
178
|
+
var id = _ref2.id;
|
|
163
179
|
return id;
|
|
164
180
|
}));
|
|
165
181
|
var didModify = false;
|
|
@@ -269,10 +285,10 @@ var RowHeightVirtualizationUtils = exports.RowHeightVirtualizationUtils = /*#__P
|
|
|
269
285
|
* Hook for instantiating RowHeightUtils, setting internal class vars,
|
|
270
286
|
* and setting up various row-height-related side effects
|
|
271
287
|
*/
|
|
272
|
-
var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(
|
|
273
|
-
var virtualization =
|
|
274
|
-
rowHeightsOptions =
|
|
275
|
-
columns =
|
|
288
|
+
var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(_ref3) {
|
|
289
|
+
var virtualization = _ref3.virtualization,
|
|
290
|
+
rowHeightsOptions = _ref3.rowHeightsOptions,
|
|
291
|
+
columns = _ref3.columns;
|
|
276
292
|
var forceRenderRef = (0, _services.useLatest)((0, _services.useForceRender)());
|
|
277
293
|
var _useState = (0, _react.useState)(function () {
|
|
278
294
|
if (virtualization) {
|
|
@@ -305,9 +321,9 @@ var useRowHeightUtils = exports.useRowHeightUtils = function useRowHeightUtils(_
|
|
|
305
321
|
}, [rowHeightUtils, columns]);
|
|
306
322
|
return rowHeightUtils;
|
|
307
323
|
};
|
|
308
|
-
var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHeight(
|
|
309
|
-
var rowHeightsOptions =
|
|
310
|
-
rowHeightUtils =
|
|
324
|
+
var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHeight(_ref4) {
|
|
325
|
+
var rowHeightsOptions = _ref4.rowHeightsOptions,
|
|
326
|
+
rowHeightUtils = _ref4.rowHeightUtils;
|
|
311
327
|
var _useContext = (0, _react.useContext)(_sorting.DataGridSortedContext),
|
|
312
328
|
getCorrectRowIndex = _useContext.getCorrectRowIndex;
|
|
313
329
|
|
|
@@ -331,7 +347,7 @@ var useDefaultRowHeight = exports.useDefaultRowHeight = function useDefaultRowHe
|
|
|
331
347
|
// Account for row-specific height overrides
|
|
332
348
|
var rowHeightOption = rowHeightUtils.getRowHeightOption(correctRowIndex, rowHeightsOptions);
|
|
333
349
|
if (rowHeightOption) {
|
|
334
|
-
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex,
|
|
350
|
+
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex, rowHeightsOptions);
|
|
335
351
|
}
|
|
336
352
|
|
|
337
353
|
// 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)
|
|
@@ -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)('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;"),
|
|
@@ -111,6 +113,7 @@ var euiEmptyPromptStyles = exports.euiEmptyPromptStyles = function euiEmptyPromp
|
|
|
111
113
|
subdued: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
112
114
|
primary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
113
115
|
accent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
116
|
+
accentSecondary: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
114
117
|
danger: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
115
118
|
warning: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
116
119
|
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
|
|
@@ -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; }
|
|
@@ -29,10 +28,8 @@ var euiFormMaxWidth = exports.euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
|
29
28
|
});
|
|
30
29
|
};
|
|
31
30
|
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);
|
|
31
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
32
|
+
var backgroundColor = euiTheme.components.forms.background;
|
|
36
33
|
var controlHeight = euiTheme.size.xxl;
|
|
37
34
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
38
35
|
var sizes = {
|
|
@@ -51,15 +48,15 @@ var euiFormVariables = exports.euiFormVariables = function euiFormVariables(euiT
|
|
|
51
48
|
})
|
|
52
49
|
};
|
|
53
50
|
var colors = {
|
|
54
|
-
textColor: euiTheme.colors.
|
|
51
|
+
textColor: euiTheme.colors.textParagraph,
|
|
55
52
|
backgroundColor: backgroundColor,
|
|
56
|
-
backgroundDisabledColor:
|
|
57
|
-
backgroundReadOnlyColor: euiTheme.
|
|
58
|
-
borderColor:
|
|
59
|
-
controlDisabledColor: euiTheme.
|
|
53
|
+
backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
|
|
54
|
+
backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
|
|
55
|
+
borderColor: euiTheme.components.forms.border,
|
|
56
|
+
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
60
57
|
controlBoxShadow: '0 0 transparent',
|
|
61
58
|
controlPlaceholderText: (0, _services.makeHighContrastColor)(euiTheme.colors.subduedText)(backgroundColor),
|
|
62
|
-
appendPrependBackground:
|
|
59
|
+
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
63
60
|
};
|
|
64
61
|
var controlLayout = {
|
|
65
62
|
controlLayoutGroupInputHeight: (0, _global_styling.mathWithUnits)(controlHeight, function (x) {
|
|
@@ -131,9 +128,8 @@ var euiFormControlDefaultShadow = exports.euiFormControlDefaultShadow = function
|
|
|
131
128
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
132
129
|
};
|
|
133
130
|
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");
|
|
131
|
+
var euiTheme = _ref3.euiTheme;
|
|
132
|
+
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
133
|
};
|
|
138
134
|
var euiFormControlInvalidStyles = exports.euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref4) {
|
|
139
135
|
var euiTheme = _ref4.euiTheme;
|
|
@@ -148,21 +144,18 @@ var euiFormControlReadOnlyStyles = exports.euiFormControlReadOnlyStyles = functi
|
|
|
148
144
|
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
145
|
};
|
|
150
146
|
var euiFormControlAutoFillStyles = exports.euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
151
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
152
|
-
colorMode = euiThemeContext.colorMode;
|
|
147
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
153
148
|
|
|
154
149
|
// Make the text color slightly less prominent than the default colors.text
|
|
155
150
|
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);
|
|
151
|
+
var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
|
|
159
152
|
// Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
|
|
160
153
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
|
|
161
154
|
var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
|
|
162
155
|
|
|
163
156
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
164
157
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
165
|
-
var borderColor =
|
|
158
|
+
var borderColor = euiTheme.components.forms.borderAutofilled;
|
|
166
159
|
var invalidBorder = euiTheme.colors.danger;
|
|
167
160
|
var borderShadow = function borderShadow(color) {
|
|
168
161
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
@@ -180,21 +173,21 @@ var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
|
180
173
|
*/
|
|
181
174
|
|
|
182
175
|
var euiFormCustomControlVariables = exports.euiFormCustomControlVariables = function euiFormCustomControlVariables(euiThemeContext) {
|
|
183
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
184
|
-
colorMode = euiThemeContext.colorMode;
|
|
176
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
185
177
|
var sizes = {
|
|
186
178
|
control: euiTheme.size.base,
|
|
187
179
|
lineHeight: euiTheme.size.l,
|
|
188
180
|
labelGap: euiTheme.size.s
|
|
189
181
|
};
|
|
190
182
|
var colors = {
|
|
191
|
-
unselected: euiTheme.
|
|
192
|
-
unselectedBorder:
|
|
193
|
-
: (0, _services.shade)(euiTheme.colors.lightestShade, 0.4),
|
|
183
|
+
unselected: euiTheme.components.forms.controlBackgroundUnselected,
|
|
184
|
+
unselectedBorder: euiTheme.components.forms.controlBorder,
|
|
194
185
|
selected: euiTheme.colors.primary,
|
|
186
|
+
selectedBorder: euiTheme.components.forms.controlBorderSelected,
|
|
195
187
|
selectedIcon: euiTheme.colors.emptyShade,
|
|
196
|
-
disabled: euiTheme.
|
|
197
|
-
|
|
188
|
+
disabled: euiTheme.components.forms.colorDisabled,
|
|
189
|
+
disabledBorder: euiTheme.components.forms.controlBorderDisabled,
|
|
190
|
+
disabledIcon: euiTheme.components.forms.iconDisabled,
|
|
198
191
|
disabledLabel: euiTheme.colors.disabledText // Lighter than formVars.disabledColor because it typically doesn't have as dark a background
|
|
199
192
|
};
|
|
200
193
|
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;"),
|
|
@@ -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)
|