diff --git a/packages/kbn-unified-field-list/src/components/field_item_button/field_item_button.scss b/packages/kbn-unified-field-list/src/components/field_item_button/field_item_button.scss index 75c6cce839e11..70073c37ea31c 100644 --- a/packages/kbn-unified-field-list/src/components/field_item_button/field_item_button.scss +++ b/packages/kbn-unified-field-list/src/components/field_item_button/field_item_button.scss @@ -70,36 +70,3 @@ background: lightOrDarkTheme(transparentize($euiColorMediumShade, .9), $euiColorEmptyShade); color: $euiColorDarkShade; } - -// A drag handle will appear only on item hover/focus -.unifiedFieldListItemButton--withDragHandle { - &.kbnFieldButton { - padding: 0; - margin-bottom: $euiSizeXS / 2; - } - - .kbnFieldButton__dragHandle { - margin-right: 0; - width: 0; - overflow: hidden; - transition: $euiAnimSpeedNormal ease-in-out; - transition-property: width, margin-right; - } - - &.domDragDrop-isDraggable { - box-shadow: none; - } - &.domDragDrop-isDraggable:hover { - transform: none; - } - - &:hover, - &[class*='-isActive'], - .domDragDrop__keyboardHandler:focus + &, - &:focus-within { - .kbnFieldButton__dragHandle { - margin-right: $euiSizeS; - width: $euiSize; - } - } -} diff --git a/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item.tsx b/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item.tsx index 24f9cd14fe066..0e442a56e1e72 100644 --- a/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item.tsx +++ b/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item.tsx @@ -25,14 +25,11 @@ import { UnifiedFieldListItemStats, type UnifiedFieldListItemStatsProps, } from './field_list_item_stats'; -import { FieldListItemHandle } from './field_list_item_handle'; import type { UnifiedFieldListSidebarContainerStateService, AddFieldFilterHandler, } from '../../types'; -const DRAG_HANDLE = ; - interface GetCommonFieldItemButtonPropsParams { stateService: UnifiedFieldListSidebarContainerStateService; field: DataViewField; @@ -343,7 +340,6 @@ function UnifiedFieldListItemComponent({ isActive={infoIsOpen} flush={alwaysShowActionButton ? 'both' : undefined} shouldAlwaysShowAction={alwaysShowActionButton} - dragHandle={isDragDisabled ? undefined : DRAG_HANDLE} onClick={field.type !== '_source' ? togglePopover : undefined} {...getCommonFieldItemButtonProps({ stateService, field, isSelected, toggleDisplay })} /> diff --git a/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item_handle.tsx b/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item_handle.tsx deleted file mode 100644 index e8eb5577b87e0..0000000000000 --- a/packages/kbn-unified-field-list/src/containers/unified_field_list_item/field_list_item_handle.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { EuiIcon } from '@elastic/eui'; -import { css } from '@emotion/react'; - -/** - * A temporary icon for the field list drag handle - * @constructor - */ -export const FieldListItemHandle: React.FC = () => { - // TODO: replace with a new Eui icon type once it's available and remove svg - return ( -
- -
- ); -}; - -const DragHandleIcon = () => ( - - - - - - - - - - -); diff --git a/packages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.scss b/packages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.scss index ec7eedc397875..61636e569dc5a 100644 --- a/packages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.scss +++ b/packages/kbn-unified-field-list/src/containers/unified_field_list_sidebar/field_list_sidebar.scss @@ -43,3 +43,14 @@ .unifiedFieldListSidebar__flyoutHeader { align-items: center; } + +.unifiedFieldListSidebar .unifiedFieldListItemButton { + &.kbnFieldButton { + padding: 0; + margin-bottom: $euiSizeXS / 2; + } + + &.domDragDrop-isDraggable { + box-shadow: none; + } +}