@elastic/eui 67.1.2 → 68.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +17 -292
- package/dist/eui_theme_dark.json +10 -32
- package/dist/eui_theme_dark.json.d.ts +6 -28
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +17 -292
- package/dist/eui_theme_light.json +10 -32
- package/dist/eui_theme_light.json.d.ts +6 -28
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +78 -63
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/badge_group/badge_group.js +11 -16
- package/es/components/badge/badge_group/badge_group.styles.js +19 -0
- package/es/components/badge/beta_badge/beta_badge.js +17 -27
- package/es/components/badge/beta_badge/beta_badge.styles.js +73 -0
- package/es/components/badge/notification_badge/badge_notification.js +11 -14
- package/es/components/badge/notification_badge/badge_notification.styles.js +27 -0
- package/es/components/basic_table/basic_table.js +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.js +1 -1
- package/es/components/button/_button_content_deprecated.js +1 -1
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +3 -3
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/color_picker/color_stops/color_stop_thumb.js +21 -5
- package/es/components/color_picker/color_stops/color_stops.js +14 -4
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +40 -39
- package/es/components/datagrid/body/data_grid_cell.js +75 -74
- package/es/components/datagrid/body/header/data_grid_header_cell.js +39 -38
- package/es/components/datagrid/body/header/data_grid_header_row.js +40 -39
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/data_grid.js +40 -39
- package/es/components/datagrid/utils/in_memory.js +39 -38
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.js +5 -3
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout.styles.js +6 -5
- package/es/components/flyout/index.js +2 -1
- package/es/components/form/checkbox/checkbox.js +9 -1
- package/es/components/form/field_number/field_number.js +1 -1
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form.styles.js +99 -3
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/range/dual_range.js +9 -1
- package/es/components/form/switch/switch.js +9 -1
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo.js +1 -1
- package/es/components/icon/assets/beta.js +38 -0
- package/es/components/icon/assets/launch.js +45 -0
- package/es/components/icon/assets/spaces.js +41 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +3 -0
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +48 -55
- package/es/components/list_group/list_group.styles.js +47 -0
- package/es/components/list_group/list_group_item.js +70 -59
- package/es/components/list_group/list_group_item.styles.js +95 -0
- package/es/components/list_group/list_group_item_extra_action.js +94 -0
- package/es/components/list_group/list_group_item_extra_action.styles.js +38 -0
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +43 -38
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.styles.js +30 -0
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/popover/input_popover.js +3 -2
- package/es/components/resizable_container/resizable_panel.js +2 -4
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/suggest/suggest.js +1 -1
- package/es/components/suggest/suggest_item.js +1 -1
- package/es/components/table/table_header_button.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/services/color/manipulation.js +9 -0
- package/es/services/index.js +1 -1
- package/es/test/rtl/component_helpers.d.ts +3 -0
- package/es/test/rtl/component_helpers.js +4 -1
- package/eui.d.ts +269 -64
- package/i18ntokens.json +20 -20
- package/lib/components/accessibility/skip_link/skip_link.js +84 -63
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/badge_group/badge_group.js +12 -16
- package/lib/components/badge/badge_group/badge_group.styles.js +30 -0
- package/lib/components/badge/beta_badge/beta_badge.js +18 -29
- package/lib/components/badge/beta_badge/beta_badge.styles.js +80 -0
- package/lib/components/badge/notification_badge/badge_notification.js +12 -14
- package/lib/components/badge/notification_badge/badge_notification.styles.js +40 -0
- package/lib/components/basic_table/basic_table.js +1 -1
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.js +1 -1
- package/lib/components/button/_button_content_deprecated.js +1 -1
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +3 -3
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/color_picker/color_stops/color_stop_thumb.js +21 -5
- package/lib/components/color_picker/color_stops/color_stops.js +14 -4
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +40 -39
- package/lib/components/datagrid/body/data_grid_cell.js +75 -74
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +39 -38
- package/lib/components/datagrid/body/header/data_grid_header_row.js +40 -39
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/data_grid.js +40 -39
- package/lib/components/datagrid/utils/in_memory.js +39 -38
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +5 -3
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout.styles.js +6 -3
- package/lib/components/flyout/index.js +15 -1
- package/lib/components/form/checkbox/checkbox.js +10 -3
- package/lib/components/form/field_number/field_number.js +1 -1
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form.styles.js +110 -13
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/range/dual_range.js +10 -3
- package/lib/components/form/switch/switch.js +10 -3
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo.js +1 -1
- package/lib/components/icon/assets/beta.js +45 -0
- package/lib/components/icon/assets/launch.js +52 -0
- package/lib/components/icon/assets/spaces.js +48 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +3 -0
- package/lib/components/icon/svgs/beta.svg +3 -0
- package/lib/components/icon/svgs/launch.svg +5 -0
- package/lib/components/icon/svgs/spaces.svg +3 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +52 -55
- package/lib/components/list_group/list_group.styles.js +51 -0
- package/lib/components/list_group/list_group_item.js +72 -59
- package/lib/components/list_group/list_group_item.styles.js +111 -0
- package/lib/components/list_group/list_group_item_extra_action.js +105 -0
- package/lib/components/list_group/list_group_item_extra_action.styles.js +41 -0
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +45 -39
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.styles.js +33 -0
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/popover/input_popover.js +2 -1
- package/lib/components/resizable_container/resizable_panel.js +2 -4
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/suggest/suggest.js +1 -1
- package/lib/components/suggest/suggest_item.js +1 -1
- package/lib/components/table/table_header_button.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/services/color/manipulation.js +14 -2
- package/lib/services/index.js +7 -0
- package/lib/test/rtl/component_helpers.d.ts +3 -0
- package/lib/test/rtl/component_helpers.js +4 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +58 -40
- package/optimize/es/components/badge/badge_group/badge_group.js +9 -13
- package/optimize/es/components/badge/badge_group/badge_group.styles.js +19 -0
- package/optimize/es/components/badge/beta_badge/beta_badge.js +14 -24
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +63 -0
- package/optimize/es/components/badge/notification_badge/badge_notification.js +9 -12
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +27 -0
- package/optimize/es/components/color_picker/color_stops/color_stop_thumb.js +15 -5
- package/optimize/es/components/color_picker/color_stops/color_stops.js +9 -4
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +5 -3
- package/optimize/es/components/flyout/flyout.styles.js +6 -5
- package/optimize/es/components/flyout/index.js +2 -1
- package/optimize/es/components/form/checkbox/checkbox.js +9 -1
- package/optimize/es/components/form/form.styles.js +99 -3
- package/optimize/es/components/form/range/dual_range.js +9 -1
- package/optimize/es/components/form/switch/switch.js +9 -1
- package/optimize/es/components/icon/assets/beta.js +34 -0
- package/optimize/es/components/icon/assets/launch.js +41 -0
- package/optimize/es/components/icon/assets/spaces.js +37 -0
- package/optimize/es/components/icon/icon_map.js +3 -0
- package/optimize/es/components/list_group/list_group.js +30 -39
- package/optimize/es/components/list_group/list_group.styles.js +47 -0
- package/optimize/es/components/list_group/list_group_item.js +61 -51
- package/optimize/es/components/list_group/list_group_item.styles.js +95 -0
- package/optimize/es/components/list_group/list_group_item_extra_action.js +38 -0
- package/optimize/es/components/list_group/list_group_item_extra_action.styles.js +38 -0
- package/optimize/es/components/list_group/pinnable_list_group/pinnable_list_group.js +16 -14
- package/optimize/es/components/list_group/pinnable_list_group/pinnable_list_group.styles.js +30 -0
- package/optimize/es/components/popover/input_popover.js +3 -2
- package/optimize/es/components/resizable_container/resizable_panel.js +2 -4
- package/optimize/es/services/color/manipulation.js +9 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/test/rtl/component_helpers.d.ts +3 -0
- package/optimize/es/test/rtl/component_helpers.js +4 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +70 -46
- package/optimize/lib/components/badge/badge_group/badge_group.js +10 -13
- package/optimize/lib/components/badge/badge_group/badge_group.styles.js +30 -0
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +15 -26
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +72 -0
- package/optimize/lib/components/badge/notification_badge/badge_notification.js +10 -12
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +40 -0
- package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.js +17 -12
- package/optimize/lib/components/color_picker/color_stops/color_stops.js +11 -4
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +5 -3
- package/optimize/lib/components/flyout/flyout.styles.js +6 -3
- package/optimize/lib/components/flyout/index.js +15 -1
- package/optimize/lib/components/form/checkbox/checkbox.js +10 -3
- package/optimize/lib/components/form/form.styles.js +112 -13
- package/optimize/lib/components/form/range/dual_range.js +10 -3
- package/optimize/lib/components/form/switch/switch.js +10 -3
- package/optimize/lib/components/icon/assets/beta.js +44 -0
- package/optimize/lib/components/icon/assets/launch.js +51 -0
- package/optimize/lib/components/icon/assets/spaces.js +47 -0
- package/optimize/lib/components/icon/icon_map.js +3 -0
- package/optimize/lib/components/icon/svgs/beta.svg +3 -0
- package/optimize/lib/components/icon/svgs/launch.svg +5 -0
- package/optimize/lib/components/icon/svgs/spaces.svg +3 -0
- package/optimize/lib/components/list_group/list_group.js +34 -39
- package/optimize/lib/components/list_group/list_group.styles.js +51 -0
- package/optimize/lib/components/list_group/list_group_item.js +63 -51
- package/optimize/lib/components/list_group/list_group_item.styles.js +111 -0
- package/optimize/lib/components/list_group/list_group_item_extra_action.js +49 -0
- package/optimize/lib/components/list_group/list_group_item_extra_action.styles.js +41 -0
- package/optimize/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +18 -15
- package/optimize/lib/components/list_group/pinnable_list_group/pinnable_list_group.styles.js +33 -0
- package/optimize/lib/components/popover/input_popover.js +2 -1
- package/optimize/lib/components/resizable_container/resizable_panel.js +2 -4
- package/optimize/lib/services/color/manipulation.js +14 -2
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/test/rtl/component_helpers.d.ts +3 -0
- package/optimize/lib/test/rtl/component_helpers.js +4 -1
- package/package.json +2 -2
- package/src/components/index.scss +0 -2
- package/src/global_styling/mixins/_form.scss +13 -4
- package/src/global_styling/variables/_borders.scss +2 -2
- package/src/global_styling/variables/_form.scss +17 -9
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -1
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -2
- package/src/themes/amsterdam/overrides/_index.scss +0 -2
- package/test-env/components/accessibility/skip_link/skip_link.js +74 -63
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/badge_group/badge_group.js +12 -16
- package/test-env/components/badge/badge_group/badge_group.styles.js +30 -0
- package/test-env/components/badge/beta_badge/beta_badge.js +18 -29
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +72 -0
- package/test-env/components/badge/notification_badge/badge_notification.js +12 -14
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +40 -0
- package/test-env/components/basic_table/basic_table.js +1 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.js +1 -1
- package/test-env/components/button/_button_content_deprecated.js +1 -1
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +3 -3
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/color_picker/color_stops/color_stop_thumb.js +18 -12
- package/test-env/components/color_picker/color_stops/color_stops.js +12 -5
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +40 -39
- package/test-env/components/datagrid/body/data_grid_cell.js +75 -74
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +39 -38
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +40 -39
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/data_grid.js +40 -39
- package/test-env/components/datagrid/utils/in_memory.js +39 -38
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +5 -3
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout.styles.js +6 -3
- package/test-env/components/flyout/index.js +15 -1
- package/test-env/components/form/checkbox/checkbox.js +10 -3
- package/test-env/components/form/field_number/field_number.js +1 -1
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form.styles.js +112 -13
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/range/dual_range.js +10 -3
- package/test-env/components/form/switch/switch.js +10 -3
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo.js +1 -1
- package/test-env/components/icon/assets/beta.js +44 -0
- package/test-env/components/icon/assets/launch.js +51 -0
- package/test-env/components/icon/assets/spaces.js +47 -0
- package/test-env/components/icon/icon_map.js +3 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +52 -55
- package/test-env/components/list_group/list_group.styles.js +51 -0
- package/test-env/components/list_group/list_group_item.js +72 -59
- package/test-env/components/list_group/list_group_item.styles.js +111 -0
- package/test-env/components/list_group/list_group_item_extra_action.js +102 -0
- package/test-env/components/list_group/list_group_item_extra_action.styles.js +41 -0
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +45 -39
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.styles.js +33 -0
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/popover/input_popover.js +2 -1
- package/test-env/components/resizable_container/resizable_panel.js +2 -4
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/suggest/suggest.js +1 -1
- package/test-env/components/suggest/suggest_item.js +1 -1
- package/test-env/components/table/table_header_button.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/services/color/manipulation.js +14 -2
- package/test-env/services/index.js +7 -0
- package/test-env/test/rtl/component_helpers.js +4 -1
- package/src/components/badge/_index.scss +0 -3
- package/src/components/badge/badge_group/_badge_group.scss +0 -23
- package/src/components/badge/badge_group/_index.scss +0 -1
- package/src/components/badge/beta_badge/_beta_badge.scss +0 -91
- package/src/components/badge/beta_badge/_index.scss +0 -1
- package/src/components/badge/notification_badge/_index.scss +0 -1
- package/src/components/badge/notification_badge/_notification_badge.scss +0 -34
- package/src/components/list_group/_index.scss +0 -5
- package/src/components/list_group/_list_group.scss +0 -32
- package/src/components/list_group/_list_group_item.scss +0 -151
- package/src/components/list_group/_variables.scss +0 -21
- package/src/components/list_group/pinnable_list_group/_index.scss +0 -1
- package/src/components/list_group/pinnable_list_group/_pinnable_list_group.scss +0 -9
- package/src/themes/amsterdam/global_styling/mixins/_form.scss +0 -47
- package/src/themes/amsterdam/global_styling/variables/_borders.scss +0 -2
- package/src/themes/amsterdam/global_styling/variables/_form.scss +0 -23
- package/src/themes/amsterdam/overrides/_list_group_item.scss +0 -3
- package/src/themes/amsterdam/overrides/_notification_badge.scss +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
|
|
5
|
-
_excluded2 = ["iconType", "alwaysShow", "
|
|
4
|
+
var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "css", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
|
|
5
|
+
_excluded2 = ["iconType", "alwaysShow", "isDisabled"];
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -13,28 +13,17 @@ var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "cl
|
|
|
13
13
|
*/
|
|
14
14
|
import React, { Fragment } from 'react';
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import { EuiButtonIcon } from '../button';
|
|
17
16
|
import { EuiIcon } from '../icon';
|
|
18
17
|
import { EuiToolTip } from '../tool_tip';
|
|
19
18
|
import { useInnerText } from '../inner_text';
|
|
20
|
-
import {
|
|
19
|
+
import { EuiListGroupItemExtraAction } from './list_group_item_extra_action';
|
|
20
|
+
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
21
|
+
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
21
22
|
import { validateHref } from '../../services/security/href_validator';
|
|
23
|
+
import { euiListGroupItemStyles, euiListGroupItemIconStyles, euiListGroupItemInnerStyles, euiListGroupItemTooltipStyles, euiListGroupItemLabelStyles } from './list_group_item.styles';
|
|
22
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
s: 'euiListGroupItem--small',
|
|
26
|
-
m: 'euiListGroupItem--medium',
|
|
27
|
-
l: 'euiListGroupItem--large'
|
|
28
|
-
};
|
|
29
|
-
export var SIZES = Object.keys(sizeToClassNameMap);
|
|
30
|
-
var colorToClassNameMap = {
|
|
31
|
-
inherit: '',
|
|
32
|
-
primary: 'euiListGroupItem--primary',
|
|
33
|
-
text: 'euiListGroupItem--text',
|
|
34
|
-
subdued: 'euiListGroupItem--subdued',
|
|
35
|
-
ghost: 'euiListGroupItem--ghost'
|
|
36
|
-
};
|
|
37
|
-
export var COLORS = Object.keys(colorToClassNameMap);
|
|
25
|
+
export var SIZES = ['xs', 's', 'm', 'l'];
|
|
26
|
+
export var COLORS = ['primary', 'text', 'subdued'];
|
|
38
27
|
export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
39
28
|
var label = _ref.label,
|
|
40
29
|
_ref$isActive = _ref.isActive,
|
|
@@ -45,6 +34,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
45
34
|
target = _ref.target,
|
|
46
35
|
rel = _ref.rel,
|
|
47
36
|
className = _ref.className,
|
|
37
|
+
customCss = _ref.css,
|
|
48
38
|
iconType = _ref.iconType,
|
|
49
39
|
icon = _ref.icon,
|
|
50
40
|
iconProps = _ref.iconProps,
|
|
@@ -53,7 +43,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
53
43
|
_ref$size = _ref.size,
|
|
54
44
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
55
45
|
_ref$color = _ref.color,
|
|
56
|
-
color = _ref$color === void 0 ? '
|
|
46
|
+
color = _ref$color === void 0 ? 'text' : _ref$color,
|
|
57
47
|
_ref$showToolTip = _ref.showToolTip,
|
|
58
48
|
showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
|
|
59
49
|
wrapText = _ref.wrapText,
|
|
@@ -61,21 +51,19 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
61
51
|
toolTipText = _ref.toolTipText,
|
|
62
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
63
53
|
|
|
54
|
+
var isClickable = !!(href || onClick);
|
|
64
55
|
var isHrefValid = !href || validateHref(href);
|
|
65
56
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'euiListGroupItem-isClickable': href || onClick,
|
|
70
|
-
'euiListGroupItem-hasExtraAction': extraAction,
|
|
71
|
-
'euiListGroupItem--wrapText': wrapText
|
|
72
|
-
}, className);
|
|
57
|
+
var euiTheme = useEuiTheme();
|
|
58
|
+
var iconStyles = euiListGroupItemIconStyles(euiTheme);
|
|
59
|
+
var cssIconStyles = [iconStyles.euiListGroupItem__icon];
|
|
73
60
|
var iconNode;
|
|
74
61
|
|
|
75
62
|
if (iconType) {
|
|
76
63
|
iconNode = ___EmotionJSX(EuiIcon, _extends({
|
|
77
64
|
color: "inherit" // forces the icon to inherit its parent color
|
|
78
|
-
|
|
65
|
+
,
|
|
66
|
+
css: cssIconStyles
|
|
79
67
|
}, iconProps, {
|
|
80
68
|
type: iconType,
|
|
81
69
|
className: classNames('euiListGroupItem__icon', iconProps === null || iconProps === void 0 ? void 0 : iconProps.className)
|
|
@@ -85,7 +73,8 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
85
73
|
console.warn('Both `iconType` and `icon` were passed to EuiListGroupItem but only one can exist. The `iconType` was used.');
|
|
86
74
|
}
|
|
87
75
|
} else if (icon) {
|
|
88
|
-
iconNode =
|
|
76
|
+
iconNode = cloneElementWithCss(icon, {
|
|
77
|
+
css: cssIconStyles,
|
|
89
78
|
className: classNames('euiListGroupItem__icon', icon.props.className)
|
|
90
79
|
});
|
|
91
80
|
}
|
|
@@ -95,22 +84,26 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
95
84
|
if (extraAction) {
|
|
96
85
|
var _iconType = extraAction.iconType,
|
|
97
86
|
alwaysShow = extraAction.alwaysShow,
|
|
98
|
-
_className = extraAction.className,
|
|
99
87
|
actionIsDisabled = extraAction.isDisabled,
|
|
100
|
-
_rest = _objectWithoutProperties(extraAction, _excluded2);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
_rest = _objectWithoutProperties(extraAction, _excluded2); // EuiListGroupItemExtraActionProps extends EuiButtonIconPropsForButton
|
|
89
|
+
// which doesn't have the color `subdued` so we need to assign a valid color
|
|
90
|
+
// the most similar is `text` so we'll use that
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
var extraActionColor = color === 'subdued' ? 'text' : color;
|
|
94
|
+
extraActionNode = ___EmotionJSX(EuiListGroupItemExtraAction, _extends({
|
|
95
|
+
color: extraActionColor,
|
|
96
|
+
iconType: _iconType,
|
|
97
|
+
alwaysShow: alwaysShow
|
|
108
98
|
}, _rest, {
|
|
109
|
-
|
|
99
|
+
isDisabled: actionIsDisabled,
|
|
100
|
+
parentIsDisabled: isDisabled
|
|
110
101
|
}));
|
|
111
|
-
}
|
|
112
|
-
// Also ensure the value of the title attribute is a string
|
|
102
|
+
}
|
|
113
103
|
|
|
104
|
+
var labelStyles = euiListGroupItemLabelStyles();
|
|
105
|
+
var cssLabelStyles = [labelStyles.euiListGroupItem__label, wrapText ? labelStyles.wrapText : labelStyles.truncate]; // Only add the label as the title attribute if it's possibly truncated
|
|
106
|
+
// Also ensure the value of the title attribute is a string
|
|
114
107
|
|
|
115
108
|
var _useInnerText = useInnerText(),
|
|
116
109
|
_useInnerText2 = _slicedToArray(_useInnerText, 2),
|
|
@@ -121,52 +114,69 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
121
114
|
var labelContent = shouldRenderTitle ? ___EmotionJSX("span", {
|
|
122
115
|
ref: ref,
|
|
123
116
|
className: "euiListGroupItem__label",
|
|
117
|
+
css: cssLabelStyles,
|
|
124
118
|
title: typeof label === 'string' ? label : innerText
|
|
125
119
|
}, label) : ___EmotionJSX("span", {
|
|
126
|
-
className: "euiListGroupItem__label"
|
|
120
|
+
className: "euiListGroupItem__label",
|
|
121
|
+
css: cssLabelStyles
|
|
127
122
|
}, label); // Handle the variety of interaction behavior
|
|
128
123
|
|
|
129
124
|
var itemContent;
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
rel: rel,
|
|
133
|
-
target: target
|
|
134
|
-
});
|
|
125
|
+
var innerStyles = euiListGroupItemInnerStyles(euiTheme);
|
|
126
|
+
var cssInnerStyles = [innerStyles.euiListGroupItem__inner, innerStyles[size], !isDisabled && innerStyles[color], isActive && innerStyles.isActive, isDisabled && innerStyles.isDisabled, isClickable && !isDisabled && innerStyles.isClickable];
|
|
135
127
|
|
|
136
128
|
if (href && !isDisabled) {
|
|
137
129
|
itemContent = ___EmotionJSX("a", _extends({
|
|
138
130
|
className: "euiListGroupItem__button",
|
|
131
|
+
css: cssInnerStyles,
|
|
139
132
|
href: href,
|
|
140
133
|
target: target,
|
|
141
|
-
rel:
|
|
134
|
+
rel: getSecureRelForTarget({
|
|
135
|
+
href: href,
|
|
136
|
+
rel: rel,
|
|
137
|
+
target: target
|
|
138
|
+
}),
|
|
142
139
|
onClick: onClick
|
|
143
140
|
}, rest), iconNode, labelContent);
|
|
144
141
|
} else if (href && isDisabled || onClick) {
|
|
145
142
|
itemContent = ___EmotionJSX("button", _extends({
|
|
146
143
|
type: "button",
|
|
147
144
|
className: "euiListGroupItem__button",
|
|
145
|
+
css: cssInnerStyles,
|
|
148
146
|
disabled: isDisabled,
|
|
149
147
|
onClick: onClick,
|
|
150
148
|
ref: buttonRef
|
|
151
149
|
}, rest), iconNode, labelContent);
|
|
152
150
|
} else {
|
|
153
151
|
itemContent = ___EmotionJSX("span", _extends({
|
|
154
|
-
className: "euiListGroupItem__text"
|
|
152
|
+
className: "euiListGroupItem__text",
|
|
153
|
+
css: cssInnerStyles
|
|
155
154
|
}, rest), iconNode, labelContent);
|
|
156
155
|
}
|
|
157
156
|
|
|
157
|
+
var styles = euiListGroupItemStyles(euiTheme);
|
|
158
|
+
var cssStyles = [styles.euiListGroupItem, !isDisabled && isActive && styles.colors.isActive[color], !isDisabled && isClickable && styles.colors.isClickable[color], styles[size], customCss];
|
|
159
|
+
var classes = classNames('euiListGroupItem', className);
|
|
160
|
+
|
|
158
161
|
if (showToolTip) {
|
|
162
|
+
var tooltipStyles = euiListGroupItemTooltipStyles();
|
|
163
|
+
var cssTooltipStyles = [tooltipStyles.euiListGroupItem__tooltip];
|
|
159
164
|
itemContent = ___EmotionJSX("li", {
|
|
160
|
-
className: classes
|
|
165
|
+
className: classes,
|
|
166
|
+
css: cssStyles
|
|
161
167
|
}, ___EmotionJSX(EuiToolTip, {
|
|
162
168
|
anchorClassName: "euiListGroupItem__tooltip",
|
|
169
|
+
anchorProps: {
|
|
170
|
+
css: cssTooltipStyles
|
|
171
|
+
},
|
|
163
172
|
content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
|
|
164
173
|
position: "right",
|
|
165
174
|
delay: "long"
|
|
166
175
|
}, itemContent));
|
|
167
176
|
} else {
|
|
168
177
|
itemContent = ___EmotionJSX("li", {
|
|
169
|
-
className: classes
|
|
178
|
+
className: classes,
|
|
179
|
+
css: cssStyles
|
|
170
180
|
}, itemContent, extraActionNode);
|
|
171
181
|
}
|
|
172
182
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiCanAnimate, euiFontSize, logicalCSS, euiBackgroundColor, euiTextTruncate, euiTextBreakWord } from '../../global_styling';
|
|
12
|
+
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins/button';
|
|
13
|
+
export var euiListGroupItemStyles = function euiListGroupItemStyles(euiThemeContext) {
|
|
14
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
15
|
+
var primaryBgColor = euiBackgroundColor(euiThemeContext, 'primary', {
|
|
16
|
+
method: 'transparent'
|
|
17
|
+
});
|
|
18
|
+
var subduedBgColor = euiBackgroundColor(euiThemeContext, 'subdued', {
|
|
19
|
+
method: 'transparent'
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
// Base
|
|
23
|
+
euiListGroupItem: /*#__PURE__*/css("padding:0;display:flex;align-items:center;position:relative;", euiCanAnimate, "{transition:background-color ", euiTheme.animation.fast, ";};label:euiListGroupItem;"),
|
|
24
|
+
// Sizes
|
|
25
|
+
xs: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.small, ";;label:xs;"),
|
|
26
|
+
s: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.small, ";;label:s;"),
|
|
27
|
+
m: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";;label:m;"),
|
|
28
|
+
l: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";;label:l;"),
|
|
29
|
+
// Colors
|
|
30
|
+
colors: {
|
|
31
|
+
isActive: {
|
|
32
|
+
primary: /*#__PURE__*/css("background-color:", primaryBgColor, ";;label:primary;"),
|
|
33
|
+
text: /*#__PURE__*/css("background-color:", subduedBgColor, ";;label:text;"),
|
|
34
|
+
subdued: /*#__PURE__*/css("background-color:", subduedBgColor, ";;label:subdued;")
|
|
35
|
+
},
|
|
36
|
+
isClickable: {
|
|
37
|
+
primary: /*#__PURE__*/css("&:hover,&:focus-within{background-color:", primaryBgColor, ";};label:primary;"),
|
|
38
|
+
text: /*#__PURE__*/css("&:hover,&:focus-within{background-color:", subduedBgColor, ";};label:text;"),
|
|
39
|
+
subdued: /*#__PURE__*/css("&:hover,&:focus-within{background-color:", subduedBgColor, ";};label:subdued;")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
46
|
+
name: "1sre2yb-isClickable",
|
|
47
|
+
styles: "&:hover,&:focus{text-decoration:underline;};label:isClickable;"
|
|
48
|
+
} : {
|
|
49
|
+
name: "1sre2yb-isClickable",
|
|
50
|
+
styles: "&:hover,&:focus{text-decoration:underline;};label:isClickable;",
|
|
51
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export var euiListGroupItemInnerStyles = function euiListGroupItemInnerStyles(euiThemeContext) {
|
|
55
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
56
|
+
return {
|
|
57
|
+
// Base
|
|
58
|
+
euiListGroupItem__inner: /*#__PURE__*/css("padding:", euiTheme.size.xs, " ", euiTheme.size.s, ";display:flex;align-items:center;flex-grow:1;max-inline-size:100%;overflow:hidden;text-align:start;font-weight:inherit;;label:euiListGroupItem__inner;"),
|
|
59
|
+
// Sizes
|
|
60
|
+
xs: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";font-weight:", euiTheme.font.weight.medium, ";letter-spacing:0;", logicalCSS('min-height', euiTheme.size.l), ";;label:xs;"),
|
|
61
|
+
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";font-weight:", euiTheme.font.weight.medium, ";letter-spacing:0;", logicalCSS('min-height', euiTheme.size.xl), ";;label:s;"),
|
|
62
|
+
m: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'm'), ";", logicalCSS('min-height', euiTheme.size.xl), ";;label:m;"),
|
|
63
|
+
l: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'l'), ";", logicalCSS('min-height', euiTheme.size.xxl), ";;label:l;"),
|
|
64
|
+
// Colors
|
|
65
|
+
primary: /*#__PURE__*/css("color:", euiButtonColor(euiThemeContext, 'primary').color, ";;label:primary;"),
|
|
66
|
+
text: /*#__PURE__*/css("color:", euiButtonColor(euiThemeContext, 'text').color, ";;label:text;"),
|
|
67
|
+
subdued: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";;label:subdued;"),
|
|
68
|
+
ghost: /*#__PURE__*/css("color:", euiTheme.colors.ghost, ";;label:ghost;"),
|
|
69
|
+
// Variants
|
|
70
|
+
isDisabled: /*#__PURE__*/css("cursor:not-allowed;&,&:hover,&:focus{color:", euiButtonColor(euiThemeContext, 'disabled').color, ";cursor:not-allowed;background-color:transparent;text-decoration:none;};label:isDisabled;"),
|
|
71
|
+
isActive: /*#__PURE__*/css(";label:isActive;"),
|
|
72
|
+
isClickable: _ref
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export var euiListGroupItemLabelStyles = function euiListGroupItemLabelStyles() {
|
|
76
|
+
return {
|
|
77
|
+
// Base
|
|
78
|
+
euiListGroupItem__label: /*#__PURE__*/css(";label:euiListGroupItem__label;"),
|
|
79
|
+
truncate: /*#__PURE__*/css(euiTextTruncate(), ";;label:truncate;"),
|
|
80
|
+
wrapText: /*#__PURE__*/css(euiTextBreakWord(), ";;label:wrapText;")
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export var euiListGroupItemIconStyles = function euiListGroupItemIconStyles(_ref2) {
|
|
84
|
+
var euiTheme = _ref2.euiTheme;
|
|
85
|
+
return {
|
|
86
|
+
// Base
|
|
87
|
+
euiListGroupItem__icon: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.m), ";flex-grow:0;flex-shrink:0;;label:euiListGroupItem__icon;")
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export var euiListGroupItemTooltipStyles = function euiListGroupItemTooltipStyles() {
|
|
91
|
+
return {
|
|
92
|
+
// Base
|
|
93
|
+
euiListGroupItem__tooltip: /*#__PURE__*/css("display:inline-flex;", logicalCSS('width', '100%'), ";;label:euiListGroupItem__tooltip;")
|
|
94
|
+
};
|
|
95
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["iconType", "alwaysShow", "className", "isDisabled", "parentIsDisabled", "color"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { EuiButtonIcon } from '../button';
|
|
15
|
+
import { useEuiTheme } from '../../services';
|
|
16
|
+
import { euiListGroupItemExtraActionStyles } from './list_group_item_extra_action.styles';
|
|
17
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
export var EuiListGroupItemExtraAction = function EuiListGroupItemExtraAction(_ref) {
|
|
19
|
+
var iconType = _ref.iconType,
|
|
20
|
+
alwaysShow = _ref.alwaysShow,
|
|
21
|
+
className = _ref.className,
|
|
22
|
+
isDisabled = _ref.isDisabled,
|
|
23
|
+
parentIsDisabled = _ref.parentIsDisabled,
|
|
24
|
+
color = _ref.color,
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
|
|
27
|
+
var extraActionClasses = classNames('euiListGroupItemExtraAction', className);
|
|
28
|
+
var euiTheme = useEuiTheme();
|
|
29
|
+
var extraActionStyles = euiListGroupItemExtraActionStyles(euiTheme);
|
|
30
|
+
var cssExtraActionStyles = [extraActionStyles.euiListGroupItemExtraAction, alwaysShow && extraActionStyles.alwaysShow, !alwaysShow && !parentIsDisabled && extraActionStyles.hoverStyles];
|
|
31
|
+
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
32
|
+
color: color,
|
|
33
|
+
className: extraActionClasses,
|
|
34
|
+
css: cssExtraActionStyles,
|
|
35
|
+
iconType: iconType,
|
|
36
|
+
disabled: isDisabled || parentIsDisabled
|
|
37
|
+
}, rest));
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiCanAnimate, logicalCSS } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "ls7zqx-alwaysShow",
|
|
15
|
+
styles: "opacity:1;label:alwaysShow;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "ls7zqx-alwaysShow",
|
|
18
|
+
styles: "opacity:1;label:alwaysShow;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "3r3xc1-hoverStyles",
|
|
24
|
+
styles: ".euiListGroupItem:hover &,.euiListGroupItem__button:focus+&,&:focus{opacity:1;};label:hoverStyles;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "3r3xc1-hoverStyles",
|
|
27
|
+
styles: ".euiListGroupItem:hover &,.euiListGroupItem__button:focus+&,&:focus{opacity:1;};label:hoverStyles;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export var euiListGroupItemExtraActionStyles = function euiListGroupItemExtraActionStyles(_ref3) {
|
|
32
|
+
var euiTheme = _ref3.euiTheme;
|
|
33
|
+
return {
|
|
34
|
+
euiListGroupItemExtraAction: /*#__PURE__*/css("flex-shrink:0;opacity:0;", logicalCSS('margin-right', euiTheme.size.s), ";", euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, ";};label:euiListGroupItemExtraAction;"),
|
|
35
|
+
hoverStyles: _ref2,
|
|
36
|
+
alwaysShow: _ref
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -20,20 +20,9 @@ import React from 'react';
|
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import { EuiI18n } from '../../i18n';
|
|
22
22
|
import { EuiListGroup } from '../list_group';
|
|
23
|
+
import { useEuiTheme } from '../../../services';
|
|
24
|
+
import { euiPinnableListGroupItemExtraActionStyles } from './pinnable_list_group.styles';
|
|
23
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
|
-
var pinExtraAction = {
|
|
25
|
-
color: 'primary',
|
|
26
|
-
iconType: 'pinFilled',
|
|
27
|
-
iconSize: 's',
|
|
28
|
-
className: 'euiPinnableListGroup__itemExtraAction'
|
|
29
|
-
};
|
|
30
|
-
var pinnedExtraAction = {
|
|
31
|
-
color: 'primary',
|
|
32
|
-
iconType: 'pinFilled',
|
|
33
|
-
iconSize: 's',
|
|
34
|
-
className: 'euiPinnableListGroup__itemExtraAction euiPinnableListGroup__itemExtraAction-pinned',
|
|
35
|
-
alwaysShow: true
|
|
36
|
-
};
|
|
37
26
|
export var EuiPinnableListGroup = function EuiPinnableListGroup(_ref) {
|
|
38
27
|
var className = _ref.className,
|
|
39
28
|
listItems = _ref.listItems,
|
|
@@ -42,7 +31,20 @@ export var EuiPinnableListGroup = function EuiPinnableListGroup(_ref) {
|
|
|
42
31
|
onPinClick = _ref.onPinClick,
|
|
43
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
33
|
|
|
45
|
-
var classes = classNames('euiPinnableListGroup', className);
|
|
34
|
+
var classes = classNames('euiPinnableListGroup', className);
|
|
35
|
+
var euiTheme = useEuiTheme();
|
|
36
|
+
var itemExtraActionStyles = euiPinnableListGroupItemExtraActionStyles(euiTheme);
|
|
37
|
+
var pinExtraAction = {
|
|
38
|
+
iconType: 'pinFilled',
|
|
39
|
+
iconSize: 's',
|
|
40
|
+
css: itemExtraActionStyles.euiPinnableListGroup__itemExtraAction
|
|
41
|
+
};
|
|
42
|
+
var pinnedExtraAction = {
|
|
43
|
+
iconType: 'pinFilled',
|
|
44
|
+
iconSize: 's',
|
|
45
|
+
css: [itemExtraActionStyles.euiPinnableListGroup__itemExtraAction, itemExtraActionStyles.pinned],
|
|
46
|
+
alwaysShow: true
|
|
47
|
+
}; // Alter listItems object with extra props
|
|
46
48
|
|
|
47
49
|
var getNewListItems = function getNewListItems(pinExtraActionLabel, pinnedExtraActionLabel) {
|
|
48
50
|
return listItems.map(function (item) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { makeHighContrastColor } from '../../../services';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "1du20m7-euiPinnableListGroup__itemExtraAction",
|
|
15
|
+
styles: "svg{transform:rotate(45deg);};label:euiPinnableListGroup__itemExtraAction;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "1du20m7-euiPinnableListGroup__itemExtraAction",
|
|
18
|
+
styles: "svg{transform:rotate(45deg);};label:euiPinnableListGroup__itemExtraAction;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export var euiPinnableListGroupItemExtraActionStyles = function euiPinnableListGroupItemExtraActionStyles(_ref2) {
|
|
23
|
+
var euiTheme = _ref2.euiTheme;
|
|
24
|
+
return {
|
|
25
|
+
// Base
|
|
26
|
+
euiPinnableListGroup__itemExtraAction: _ref,
|
|
27
|
+
// Variants
|
|
28
|
+
pinned: /*#__PURE__*/css("&:not(:hover):not(:focus){color:", makeHighContrastColor(euiTheme.colors.lightShade)(euiTheme), ";};label:pinned;")
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -17,7 +17,7 @@ import { EuiFocusTrap } from '../focus_trap';
|
|
|
17
17
|
import { EuiPopover } from './popover';
|
|
18
18
|
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
19
19
|
import { cascadingMenuKeys, useCombinedRefs, useEuiTheme } from '../../services';
|
|
20
|
-
import {
|
|
20
|
+
import { euiFormVariables } from '../form/form.styles';
|
|
21
21
|
import { css } from '@emotion/react';
|
|
22
22
|
import { logicalCSS } from '../../global_styling';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -92,8 +92,9 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
var classes = classnames('euiInputPopover', className);
|
|
95
|
+
var form = euiFormVariables(euiThemeContext);
|
|
95
96
|
return ___EmotionJSX(EuiPopover, _extends({
|
|
96
|
-
css: /*#__PURE__*/css(fullWidth ? undefined : logicalCSS('max-width',
|
|
97
|
+
css: /*#__PURE__*/css(fullWidth ? undefined : logicalCSS('max-width', form.maxWidth), ";label:EuiInputPopover;"),
|
|
97
98
|
ownFocus: false,
|
|
98
99
|
button: ___EmotionJSX(EuiResizeObserver, {
|
|
99
100
|
onResize: onResize
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
5
|
-
var _excluded = ["children", "className", "id", "isHorizontal", "size", "initialSize", "minSize", "scrollable", "
|
|
5
|
+
var _excluded = ["children", "className", "id", "isHorizontal", "size", "initialSize", "minSize", "scrollable", "mode", "registration", "onToggleCollapsed", "onToggleCollapsedInternal", "wrapperProps", "hasShadow", "borderRadius", "color", "paddingSize", "wrapperPadding"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -72,8 +72,6 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
72
72
|
minSize = _ref$minSize === void 0 ? '0px' : _ref$minSize,
|
|
73
73
|
_ref$scrollable = _ref.scrollable,
|
|
74
74
|
scrollable = _ref$scrollable === void 0 ? true : _ref$scrollable,
|
|
75
|
-
_ref$style = _ref.style,
|
|
76
|
-
style = _ref$style === void 0 ? {} : _ref$style,
|
|
77
75
|
mode = _ref.mode,
|
|
78
76
|
registration = _ref.registration,
|
|
79
77
|
onToggleCollapsed = _ref.onToggleCollapsed,
|
|
@@ -182,7 +180,7 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
182
180
|
};
|
|
183
181
|
}
|
|
184
182
|
|
|
185
|
-
var styles = _objectSpread(_objectSpread({}, style), dimensions);
|
|
183
|
+
var styles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), dimensions);
|
|
186
184
|
|
|
187
185
|
useEffect(function () {
|
|
188
186
|
if (!registration) return;
|
|
@@ -88,4 +88,13 @@ export var desaturate = function desaturate(color, amount) {
|
|
|
88
88
|
|
|
89
89
|
export var lightness = function lightness(color) {
|
|
90
90
|
return chroma(color).get('hsl.l') * 100;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Returns the darken value of a color. 0-100
|
|
94
|
+
* @param color - Color to manipulate
|
|
95
|
+
* @param amount - Amount to change in absolute terms. 0-1.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
export var darken = function darken(color, amount) {
|
|
99
|
+
return chroma(color).darken(amount).hex();
|
|
91
100
|
};
|
|
@@ -11,7 +11,7 @@ export { keys };
|
|
|
11
11
|
export { accessibleClickKeys, cascadingMenuKeys, comboBoxKeys, htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
12
12
|
export { LEFT_ALIGNMENT, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from './alignment';
|
|
13
13
|
export { useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint, CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint } from './breakpoint';
|
|
14
|
-
export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, makeHighContrastColor, makeDisabledContrastColor, wcagContrastMin } from './color';
|
|
14
|
+
export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, darken, makeHighContrastColor, makeDisabledContrastColor, wcagContrastMin } from './color';
|
|
15
15
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
16
16
|
export * from './console';
|
|
17
17
|
export { copyToClipboard } from './copy_to_clipboard';
|
|
@@ -5,3 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const waitForEuiPopoverOpen: () => Promise<void>;
|
|
7
7
|
export declare const waitForEuiPopoverClose: () => Promise<void>;
|
|
8
|
+
|
|
9
|
+
export declare const waitForEuiToolTipVisible: () => Promise<void>;
|
|
10
|
+
export declare const waitForEuiToolTipHidden: () => Promise<void>;
|
|
@@ -84,7 +84,10 @@ export var waitForEuiToolTipVisible = /*#__PURE__*/function () {
|
|
|
84
84
|
return waitFor(function () {
|
|
85
85
|
var tooltip = document.querySelector('.euiToolTipPopover');
|
|
86
86
|
expect(tooltip).toBeVisible();
|
|
87
|
-
}
|
|
87
|
+
}, {
|
|
88
|
+
timeout: 1500
|
|
89
|
+
} // Account for long delay on tooltips
|
|
90
|
+
);
|
|
88
91
|
|
|
89
92
|
case 2:
|
|
90
93
|
return _context3.abrupt("return", _context3.sent);
|