diff --git a/packages/kbn-babel-preset/styled_components_files.js b/packages/kbn-babel-preset/styled_components_files.js index 6f5f53e710518..816074bd840a0 100644 --- a/packages/kbn-babel-preset/styled_components_files.js +++ b/packages/kbn-babel-preset/styled_components_files.js @@ -402,26 +402,6 @@ module.exports = { /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]exceptions[\/\\]pages[\/\\]shared_lists[\/\\]index.tsx/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]components[\/\\]paginated_table[\/\\]index.test.tsx/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]components[\/\\]paginated_table[\/\\]index.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]components[\/\\]stat_items[\/\\]utils.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]hosts[\/\\]pages[\/\\]display.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]hosts[\/\\]pages[\/\\]hosts.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]arrows[\/\\]index.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]embeddables[\/\\]embeddable.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]embeddables[\/\\]embedded_map.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]embeddables[\/\\]map_tool_tip[\/\\]line_tool_tip_content.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]embeddables[\/\\]map_tool_tip[\/\\]tooltip_footer.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]flow_target_select_connected[\/\\]index.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]country_flag.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]geo_fields.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]index.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]ip_with_port.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]label.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]network.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]components[\/\\]source_destination[\/\\]source_destination_arrows.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]pages[\/\\]navigation[\/\\]conditional_flex_group.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]pages[\/\\]navigation[\/\\]network_routes_loading.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]network[\/\\]pages[\/\\]network.tsx/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]explore[\/\\]users[\/\\]pages[\/\\]users.tsx/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]flyout[\/\\]document_details[\/\\]left[\/\\]components[\/\\]investigation_guide_view.tsx/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]flyout[\/\\]document_details[\/\\]left[\/\\]components[\/\\]response_details.tsx/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]public[\/\\]flyout[\/\\]document_details[\/\\]left[\/\\]components[\/\\]threat_details_view_enrichment_button_content.tsx/, diff --git a/x-pack/solutions/security/plugins/security_solution/emotion.d.ts b/x-pack/solutions/security/plugins/security_solution/emotion.d.ts new file mode 100644 index 0000000000000..213178080e536 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/emotion.d.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import '@emotion/react'; +import type { UseEuiTheme } from '@elastic/eui'; + +declare module '@emotion/react' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Theme extends UseEuiTheme {} +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/components/stat_items/utils.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/components/stat_items/utils.tsx index f0393cf5cc71c..986c9f4e92a52 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/components/stat_items/utils.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/components/stat_items/utils.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/display.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/display.tsx index a907f1fdb5997..89caffb24e32a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/display.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/display.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import styled from 'styled-components'; +import styled from '@emotion/styled'; -export const Display = styled.div<{ show: boolean }>` - ${({ show }) => (show ? '' : 'display: none;')}; -`; +export const Display = styled.div<{ show: boolean }>(({ show }) => ({ + display: show ? undefined : 'none', +})); Display.displayName = 'Display'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/hosts.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/hosts.tsx index 0fe710e2cc920..4f1b221a6f61e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/hosts.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/hosts/pages/hosts.tsx @@ -6,7 +6,7 @@ */ import { EuiSpacer, EuiWindowEvent } from '@elastic/eui'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef } from 'react'; import { useParams } from 'react-router-dom'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap index 7702695520790..64bf33f3db0ae 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap @@ -1,17 +1,1102 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`arrows ArrowBody renders correctly against snapshot 1`] = ` -.c0 { - background-color: #343741; - height: 3px; - width: 25px; -} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + , + ], + }, + } + } + isStringTag={true} + serialized={ + Object { + "map": undefined, + "name": "4rtwwc", + "next": undefined, + "styles": " + background-color: #D3DAE6; + height: 3px; + width: 25px; +", + "toString": [Function], + } + } + /> diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/index.tsx index 4acfc6de98f20..c7a4ff7cfd7d8 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/index.tsx @@ -7,11 +7,11 @@ import { EuiIcon } from '@elastic/eui'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; /** Renders the body (non-pointy part) of an arrow */ export const ArrowBody = styled.span<{ height: number }>` - background-color: ${(props) => props.theme.eui.euiColorLightShade}; + background-color: ${(props) => props.theme.euiTheme.colors.lightShade}; height: ${({ height }) => `${height}px`}; width: 25px; `; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx index 55950b2bffff5..3d6941f92fff2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx @@ -8,7 +8,7 @@ import { EuiPanel } from '@elastic/eui'; import type { PropsWithChildren } from 'react'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; const Panel = styled(EuiPanel)` overflow: hidden; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx index bdd86a09ba231..6aa55916a40fd 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx @@ -11,7 +11,8 @@ import { EuiAccordion, EuiLink, EuiText } from '@elastic/eui'; import React, { useCallback, useEffect, useState, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { createHtmlPortalNode, InPortal, OutPortal } from 'react-reverse-portal'; -import styled, { css } from 'styled-components'; +import styled from '@emotion/styled'; +import { css } from '@emotion/react'; import type { Filter, Query } from '@kbn/es-query'; import { isEqual } from 'lodash/fp'; import type { MapApi, RenderTooltipContentParams } from '@kbn/maps-plugin/public'; @@ -37,23 +38,19 @@ interface EmbeddableMapProps { maintainRatio?: boolean; } -const EmbeddableMapRatioHolder = styled.div.attrs(() => ({ - className: 'siemEmbeddable__map', -}))` +const EmbeddableMapRatioHolder = styled.div` .mapToolbarOverlay__button { display: none; } - - ${({ maintainRatio }) => + ${({ maintainRatio, theme: { euiTheme } }) => maintainRatio && css` padding-top: calc(3 / 4 * 100%); /* 4:3 (standard) ratio */ position: relative; - @media only screen and (min-width: ${({ theme }) => theme.eui.euiBreakpoints.m}) { + @media only screen and (min-width: ${euiTheme.breakpoint.m}) { padding-top: calc(9 / 32 * 100%); /* 32:9 (ultra widescreen) ratio */ } - @media only screen and (min-width: 1441px) and (min-height: 901px) { padding-top: calc(9 / 21 * 100%); /* 21:9 (ultrawide) ratio */ } @@ -188,7 +185,7 @@ export const EmbeddedMapComponent = ({ - + {isIndexError ? ( ) : ( diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx index fb6d0dc6898d5..858dac720b9de 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { SourceDestinationArrows } from '../../source_destination/source_destination_arrows'; import { diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx index fd57256602aa5..7d5e55a0172a7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx @@ -15,7 +15,7 @@ import { EuiText, } from '@elastic/eui'; import { euiLightVars as theme } from '@kbn/ui-theme'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import * as i18n from '../translations'; export const Icon = styled(EuiIcon)` diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx index b175f44a5532b..742e715915fe7 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx @@ -9,7 +9,7 @@ import type { Location } from 'history'; import { EuiFlexItem } from '@elastic/eui'; import React, { useCallback } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import * as i18nIp from '../details/translations'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx index 2a991dfa35fcb..0e2a4f00a02ac 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx @@ -10,7 +10,7 @@ import { isEmpty } from 'lodash/fp'; import { EuiToolTip } from '@elastic/eui'; import countries from 'i18n-iso-countries'; import countryJson from 'i18n-iso-countries/langs/en.json'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; // Fixes vertical alignment of the flag const FlagWrapper = styled.span` diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx index 65521d03f3d38..df7f7902689d6 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { get, uniq } from 'lodash/fp'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { DefaultDraggable } from '../../../../common/components/draggables'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/index.tsx index b546716e58ab4..c29d1dba5a5a0 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/index.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { Network } from './network'; import { SourceDestinationWithArrows } from './source_destination_with_arrows'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx index e99aecbc535e7..6fe257851e1e5 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { Ip } from '../ip'; import { Port } from '../port'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/label.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/label.tsx index 4366ca8b8dd1a..e11640c2250a5 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/label.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/label.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import styled from 'styled-components'; +import styled from '@emotion/styled'; export const Label = styled.div` font-weight: bold; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/network.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/network.tsx index ff29cdcb0f5b4..4385dd3750951 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/network.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/network.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import { uniq } from 'lodash/fp'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { DirectionBadge } from '../direction'; import { DefaultDraggable, DraggableBadge } from '../../../../common/components/draggables'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx index 050dedd79325c..8f033abc1ac23 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import numeral from '@elastic/numeral'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { ArrowBody, ArrowHead } from '../arrows'; import { diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx index 680533f1a17dc..a8cf91ac73be9 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx @@ -6,7 +6,7 @@ */ import { EuiFlexGroup } from '@elastic/eui'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; export const ConditionalFlexGroup = styled(EuiFlexGroup)` @media only screen and (min-width: 1441px) { diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx index 7074aa95051a1..ed0a19e48748b 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { EuiFlexItem, EuiLoadingSpinner, EuiFlexGroup } from '@elastic/eui'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/network.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/network.tsx index 00a88da0cfcf5..ef525e41a54d9 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/network.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/network/pages/network.tsx @@ -9,7 +9,7 @@ import { EuiPanel, EuiSpacer, EuiWindowEvent } from '@elastic/eui'; import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef } from 'react'; import { useParams } from 'react-router-dom'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/users/pages/users.tsx b/x-pack/solutions/security/plugins/security_solution/public/explore/users/pages/users.tsx index 01c15e6f22287..2078fd9e90979 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/users/pages/users.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/users/pages/users.tsx @@ -6,7 +6,7 @@ */ import { EuiSpacer, EuiWindowEvent } from '@elastic/eui'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef } from 'react'; import { useParams } from 'react-router-dom'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap index 51a976a3c3614..2b9b8e4675ced 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap @@ -2,8 +2,8 @@ exports[`Netflow renders correctly against snapshot 1`] = ` - .c11, -.c11 * { + .c7, +.c7 * { display: inline-block; max-width: 100%; overflow: hidden; @@ -106,75 +106,17 @@ tr:hover .c3:focus::before { vertical-align: top; } -.c13 svg { +.c8 svg { position: relative; top: -1px; } -.c22 { - margin-right: 5px; -} - -.c21 { - margin-right: 5px; -} - -.c15 { - position: relative; - top: 1px; -} - -.c14 { - margin-right: 5px; -} - -.c17 { - background-color: #343741; - height: 2.8px; - width: 25px; -} - -.c20 { - background-color: #343741; - height: 2.2px; - width: 25px; -} - -.c19 { - margin-right: 5px; -} - -.c16 { - margin: 0 2px; -} - -.c16 .euiToolTipAnchor { - white-space: nowrap; -} - -.c18 { - margin: 0 5px; -} - -.c7 { - margin-right: 3px; -} - -.c8 { - margin: 0 5px; -} - -.c12 { - margin: 0 3px; -} - .c10 { - font-weight: bold; - margin-top: 2px; + margin-right: 5px; } .c9 { - margin-top: 3px; + margin-right: 5px; } .c6 { @@ -537,7 +479,7 @@ tr:hover .c3:focus::before { class="euiFlexGroup emotion-euiFlexGroup-responsive-none-center-center-row" >
100B @@ -706,7 +648,7 @@ tr:hover .c3:focus::before {
3 pkts @@ -756,7 +698,7 @@ tr:hover .c3:focus::before {
Source
@@ -954,7 +896,7 @@ tr:hover .c3:focus::before { tabindex="-1" > : @@ -995,7 +937,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
🇺🇸 @@ -1197,7 +1139,7 @@ tr:hover .c3:focus::before {
@@ -1361,10 +1303,10 @@ tr:hover .c3:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(60.00%) @@ -1383,7 +1325,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1424,7 +1366,7 @@ tr:hover .c3:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
2 pkts @@ -1441,7 +1383,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1475,7 +1417,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1524,10 +1466,10 @@ tr:hover .c3:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(40.00%) @@ -1550,7 +1492,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1591,7 +1533,7 @@ tr:hover .c3:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
1 pkts @@ -1608,7 +1550,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1637,7 +1579,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
Destination
@@ -1692,7 +1634,7 @@ tr:hover .c3:focus::before { tabindex="-1" >
: @@ -1733,7 +1675,7 @@ tr:hover .c3:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
🇺🇸 @@ -1935,7 +1877,7 @@ tr:hover .c3:focus::before {
ja3 @@ -2195,7 +2137,7 @@ tr:hover .c3:focus::before { class="euiBadge__text emotion-euiBadge__text" > client cert @@ -2280,7 +2222,7 @@ tr:hover .c3:focus::before { class="euiBadge__text emotion-euiBadge__text" > server cert diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap index ba36ad1878592..6b6501e1e6857 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap @@ -16,8 +16,8 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` border-radius: 4px; } -.c13, -.c13 * { +.c9, +.c9 * { display: inline-block; max-width: 100%; overflow: hidden; @@ -120,75 +120,17 @@ tr:hover .c5:focus::before { vertical-align: top; } -.c15 svg { +.c10 svg { position: relative; top: -1px; } -.c24 { - margin-right: 5px; -} - -.c23 { - margin-right: 5px; -} - -.c9 { - margin-right: 3px; -} - -.c10 { - margin: 0 5px; -} - -.c19 { - background-color: #343741; - height: 2.8px; - width: 25px; -} - -.c22 { - background-color: #343741; - height: 2.2px; - width: 25px; -} - -.c21 { - margin-right: 5px; -} - -.c18 { - margin: 0 2px; -} - -.c18 .euiToolTipAnchor { - white-space: nowrap; -} - -.c20 { - margin: 0 5px; -} - -.c17 { - position: relative; - top: 1px; -} - -.c16 { - margin-right: 5px; -} - -.c14 { - margin: 0 3px; -} - .c12 { - font-weight: bold; - margin-top: 2px; + margin-right: 5px; } .c11 { - margin-top: 3px; + margin-right: 5px; } .c8 { @@ -611,7 +553,7 @@ tr:hover .c5:focus::before { class="euiFlexGroup emotion-euiFlexGroup-responsive-none-center-center-row" >
100B @@ -810,7 +752,7 @@ tr:hover .c5:focus::before {
3 pkts @@ -870,7 +812,7 @@ tr:hover .c5:focus::before {
Source
@@ -1093,7 +1035,7 @@ tr:hover .c5:focus::before { source.ip

: @@ -1185,7 +1127,7 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
🇺🇸 @@ -1432,7 +1374,7 @@ tr:hover .c5:focus::before {
@@ -1621,10 +1563,10 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(60.00%) @@ -1648,7 +1590,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1694,7 +1636,7 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
2 pkts @@ -1716,7 +1658,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1750,7 +1692,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1804,10 +1746,10 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(40.00%) @@ -1835,7 +1777,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1881,7 +1823,7 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
1 pkts @@ -1903,7 +1845,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1932,7 +1874,7 @@ tr:hover .c5:focus::before { class="euiFlexItem emotion-euiFlexItem-growZero" >
Destination
@@ -1992,7 +1934,7 @@ tr:hover .c5:focus::before { destination.ip

: @@ -2084,7 +2026,7 @@ tr:hover .c5:focus::before { class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >