diff --git a/packages/kbn-babel-preset/styled_components_files.js b/packages/kbn-babel-preset/styled_components_files.js index 0fc99e5ee53fa..2b1775bdb9e1d 100644 --- a/packages/kbn-babel-preset/styled_components_files.js +++ b/packages/kbn-babel-preset/styled_components_files.js @@ -401,26 +401,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 f6f025a60d229..c6e251a640a59 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 ecc40a6243d5e..27563b76454cf 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 e0f17103fbeb8..c2d8393ec2bf7 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 47c27aa542457..ac1e0804b1701 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 b827648445f7e..600fc7c299c14 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 7e781c2f94ce8..8a72071609b5e 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 @@ -10,75 +10,17 @@ exports[`Netflow renders correctly against snapshot 1`] = ` display: inline-block; } -.c8 svg { +.c3 svg { position: relative; top: -1px; } -.c17 { - margin-right: 5px; -} - -.c16 { - margin-right: 5px; -} - -.c10 { - position: relative; - top: 1px; -} - -.c9 { - margin-right: 5px; -} - -.c12 { - background-color: #343741; - height: 2.8px; - width: 25px; -} - -.c15 { - background-color: #343741; - height: 2.2px; - width: 25px; -} - -.c14 { +.c5 { margin-right: 5px; } -.c11 { - margin: 0 2px; -} - -.c11 .euiToolTipAnchor { - white-space: nowrap; -} - -.c13 { - margin: 0 5px; -} - -.c3 { - margin-right: 3px; -} - .c4 { - margin: 0 5px; -} - -.c7 { - margin: 0 3px; -} - -.c6 { - font-weight: bold; - margin-top: 2px; -} - -.c5 { - margin-top: 3px; + margin-right: 5px; } .c2 { @@ -316,7 +258,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexGroup emotion-euiFlexGroup-responsive-none-center-center-row" >
100B @@ -410,7 +352,7 @@ exports[`Netflow renders correctly against snapshot 1`] = `
3 pkts @@ -435,7 +377,7 @@ exports[`Netflow renders correctly against snapshot 1`] = `
Source
@@ -567,7 +509,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" > : @@ -577,7 +519,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
🇺🇸 @@ -704,7 +646,7 @@ exports[`Netflow renders correctly against snapshot 1`] = `
@@ -796,10 +738,10 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(60.00%) @@ -815,7 +757,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -834,7 +776,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
2 pkts @@ -848,7 +790,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -882,7 +824,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -909,10 +851,10 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(40.00%) @@ -932,7 +874,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -951,7 +893,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
1 pkts @@ -965,7 +907,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -994,7 +936,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
Destination
@@ -1033,7 +975,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" > : @@ -1043,7 +985,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
🇺🇸 @@ -1170,7 +1112,7 @@ exports[`Netflow renders correctly against snapshot 1`] = `
ja3 @@ -1333,7 +1275,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` class="euiBadge__text emotion-euiBadge__text" > client cert @@ -1393,7 +1335,7 @@ exports[`Netflow renders correctly against snapshot 1`] = ` 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 f3c0ade04d197..9d967072d0395 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 @@ -24,77 +24,19 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` display: inline-block; } -.c10 svg { +.c5 svg { position: relative; top: -1px; } -.c19 { - margin-right: 5px; -} - -.c18 { +.c7 { margin-right: 5px; } -.c5 { - margin-right: 3px; -} - .c6 { - margin: 0 5px; -} - -.c14 { - background-color: #343741; - height: 2.8px; - width: 25px; -} - -.c17 { - background-color: #343741; - height: 2.2px; - width: 25px; -} - -.c16 { - margin-right: 5px; -} - -.c13 { - margin: 0 2px; -} - -.c13 .euiToolTipAnchor { - white-space: nowrap; -} - -.c15 { - margin: 0 5px; -} - -.c12 { - position: relative; - top: 1px; -} - -.c11 { margin-right: 5px; } -.c9 { - margin: 0 3px; -} - -.c8 { - font-weight: bold; - margin-top: 2px; -} - -.c7 { - margin-top: 3px; -} - .c4 { margin-right: 3px; position: relative; @@ -340,7 +282,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexGroup emotion-euiFlexGroup-responsive-none-center-center-row" >
100B @@ -434,7 +376,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = `
3 pkts @@ -459,7 +401,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = `
Source
@@ -591,7 +533,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" > : @@ -601,7 +543,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
🇺🇸 @@ -728,7 +670,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = `
@@ -820,10 +762,10 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(60.00%) @@ -839,7 +781,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -858,7 +800,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
2 pkts @@ -872,7 +814,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -906,7 +848,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -933,10 +875,10 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
(40.00%) @@ -956,7 +898,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -975,7 +917,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" >
1 pkts @@ -989,7 +931,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
@@ -1018,7 +960,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >
Destination
@@ -1057,7 +999,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" > : @@ -1067,7 +1009,7 @@ exports[`netflowRowRenderer renders correctly against snapshot 1`] = ` class="euiFlexItem emotion-euiFlexItem-growZero" >