diff --git a/src/components/TreeSelect/TreeSelect.tsx b/src/components/TreeSelect/TreeSelect.tsx index df374aa8b5..70be51b529 100644 --- a/src/components/TreeSelect/TreeSelect.tsx +++ b/src/components/TreeSelect/TreeSelect.tsx @@ -1,6 +1,11 @@ import React from 'react'; import {useForkRef, useUniqId} from '../../hooks'; +import {SelectControl} from '../Select/components'; +import {SelectPopup} from '../Select/components/SelectPopup/SelectPopup'; +import {borderRadius} from '../borderRadius'; +import {Flex} from '../layout'; +import {useMobile} from '../mobile'; import { type ListItemId, ListItemView, @@ -9,12 +14,7 @@ import { useList, useListKeydown, useListState, -} from '../ListNext'; -import {SelectControl} from '../Select/components'; -import {SelectPopup} from '../Select/components/SelectPopup/SelectPopup'; -import {borderRadius} from '../borderRadius'; -import {Flex} from '../layout'; -import {useMobile} from '../mobile'; +} from '../useList'; import {block} from '../utils/cn'; import {TreeListContainer} from './components/TreeListContainer/TreeListContainer'; diff --git a/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx b/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx index c1c68be115..d0e5f55bce 100644 --- a/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx +++ b/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx @@ -3,8 +3,8 @@ import React from 'react'; import type {Meta, StoryFn} from '@storybook/react'; import identity from 'lodash/identity'; -import {createRandomizedData} from '../../ListNext/__stories__/utils/makeData'; import {Flex} from '../../layout'; +import {createRandomizedData} from '../../useList/__stories__/utils/makeData'; import {TreeSelect} from '../TreeSelect'; import type {TreeSelectProps} from '../types'; diff --git a/src/components/TreeSelect/__stories__/components/InfinityScrollExample.tsx b/src/components/TreeSelect/__stories__/components/InfinityScrollExample.tsx index 8dc445b84a..dfbd5d39e2 100644 --- a/src/components/TreeSelect/__stories__/components/InfinityScrollExample.tsx +++ b/src/components/TreeSelect/__stories__/components/InfinityScrollExample.tsx @@ -3,11 +3,11 @@ import React from 'react'; import identity from 'lodash/identity'; import {Label} from '../../../Label'; -import {ListItemView} from '../../../ListNext'; -import {useInfinityFetch} from '../../../ListNext/__stories__/utils/useInfinityFetch'; -import {IntersectionContainer} from '../../../ListNext/components/IntersectionContainer/IntersectionContainer'; import {Loader} from '../../../Loader'; import {Flex, spacing} from '../../../layout'; +import {ListItemView} from '../../../useList'; +import {useInfinityFetch} from '../../../useList/__stories__/utils/useInfinityFetch'; +import {IntersectionContainer} from '../../../useList/components/IntersectionContainer/IntersectionContainer'; import {TreeSelect} from '../../TreeSelect'; import type {TreeSelectProps} from '../../types'; diff --git a/src/components/TreeSelect/__stories__/components/RenderVirtualizedContainer.tsx b/src/components/TreeSelect/__stories__/components/RenderVirtualizedContainer.tsx index 265148e6b9..e5494dd789 100644 --- a/src/components/TreeSelect/__stories__/components/RenderVirtualizedContainer.tsx +++ b/src/components/TreeSelect/__stories__/components/RenderVirtualizedContainer.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import {ListContainerView, computeItemSize} from '../../../ListNext'; -import {VirtualizedListContainer} from '../../../ListNext/__stories__/components/VirtualizedListContainer'; +import {ListContainerView, computeItemSize} from '../../../useList'; +import {VirtualizedListContainer} from '../../../useList/__stories__/components/VirtualizedListContainer'; import type {RenderContainerProps} from '../../types'; // custom container renderer example diff --git a/src/components/TreeSelect/__stories__/components/WithDndListExample.tsx b/src/components/TreeSelect/__stories__/components/WithDndListExample.tsx index 704a5eae6c..a831baf8af 100644 --- a/src/components/TreeSelect/__stories__/components/WithDndListExample.tsx +++ b/src/components/TreeSelect/__stories__/components/WithDndListExample.tsx @@ -14,10 +14,10 @@ import { } from 'react-beautiful-dnd'; import {Icon} from '../../../Icon'; -import {ListContainerView, ListItemView, ListItemViewProps} from '../../../ListNext'; -import {createRandomizedData} from '../../../ListNext/__stories__/utils/makeData'; -import {reorderArray} from '../../../ListNext/__stories__/utils/reorderArray'; import {Flex} from '../../../layout'; +import {ListContainerView, ListItemView, ListItemViewProps} from '../../../useList'; +import {createRandomizedData} from '../../../useList/__stories__/utils/makeData'; +import {reorderArray} from '../../../useList/__stories__/utils/reorderArray'; import {TreeSelect} from '../../TreeSelect'; import type {TreeSelectProps} from '../../types'; diff --git a/src/components/TreeSelect/__stories__/components/WithFiltrationAndControlsExample.tsx b/src/components/TreeSelect/__stories__/components/WithFiltrationAndControlsExample.tsx index d01e479582..1624587ea1 100644 --- a/src/components/TreeSelect/__stories__/components/WithFiltrationAndControlsExample.tsx +++ b/src/components/TreeSelect/__stories__/components/WithFiltrationAndControlsExample.tsx @@ -3,11 +3,11 @@ import React from 'react'; import identity from 'lodash/identity'; import {Button} from '../../../Button'; -import {useListFilter} from '../../../ListNext'; -import {createRandomizedData} from '../../../ListNext/__stories__/utils/makeData'; import {Text} from '../../../Text'; import {TextInput} from '../../../controls'; import {Flex, spacing} from '../../../layout'; +import {useListFilter} from '../../../useList'; +import {createRandomizedData} from '../../../useList/__stories__/utils/makeData'; import {TreeSelect} from '../../TreeSelect'; import type {TreeSelectProps} from '../../types'; diff --git a/src/components/TreeSelect/__stories__/components/WithGroupSelectionControlledStateAndCustomIcon.tsx b/src/components/TreeSelect/__stories__/components/WithGroupSelectionControlledStateAndCustomIcon.tsx index a6bdf563eb..ba15b7fb8e 100644 --- a/src/components/TreeSelect/__stories__/components/WithGroupSelectionControlledStateAndCustomIcon.tsx +++ b/src/components/TreeSelect/__stories__/components/WithGroupSelectionControlledStateAndCustomIcon.tsx @@ -5,9 +5,9 @@ import identity from 'lodash/identity'; import {Button} from '../../../Button'; import {Icon} from '../../../Icon'; -import {ListItemId, ListItemType, ListItemView, getListParsedState} from '../../../ListNext'; -import {createRandomizedData} from '../../../ListNext/__stories__/utils/makeData'; import {Flex, spacing} from '../../../layout'; +import {ListItemId, ListItemType, ListItemView, getListParsedState} from '../../../useList'; +import {createRandomizedData} from '../../../useList/__stories__/utils/makeData'; import {TreeSelect} from '../../TreeSelect'; import type {TreeSelectProps} from '../../types'; diff --git a/src/components/TreeSelect/__stories__/components/WithItemLinksAndActionsExample.tsx b/src/components/TreeSelect/__stories__/components/WithItemLinksAndActionsExample.tsx index 41a769bc23..884b5e42fb 100644 --- a/src/components/TreeSelect/__stories__/components/WithItemLinksAndActionsExample.tsx +++ b/src/components/TreeSelect/__stories__/components/WithItemLinksAndActionsExample.tsx @@ -6,9 +6,9 @@ import identity from 'lodash/identity'; import {Button} from '../../../Button'; import {DropdownMenu} from '../../../DropdownMenu'; import {Icon} from '../../../Icon'; -import {ListItemId, ListItemView} from '../../../ListNext'; -import {createRandomizedData} from '../../../ListNext/__stories__/utils/makeData'; import {Flex, spacing} from '../../../layout'; +import {ListItemId, ListItemView} from '../../../useList'; +import {createRandomizedData} from '../../../useList/__stories__/utils/makeData'; import {TreeSelect} from '../../TreeSelect'; import type {TreeSelectProps} from '../../types'; diff --git a/src/components/TreeSelect/components/TreeListContainer/TreeListContainer.tsx b/src/components/TreeSelect/components/TreeListContainer/TreeListContainer.tsx index 24bc21c8e5..b4d8a884d4 100644 --- a/src/components/TreeSelect/components/TreeListContainer/TreeListContainer.tsx +++ b/src/components/TreeSelect/components/TreeListContainer/TreeListContainer.tsx @@ -2,8 +2,8 @@ import React from 'react'; import type {RenderContainerProps} from 'src/components/TreeSelect/types'; -import {ListContainerView} from '../../../ListNext'; -import {ListItemRecursiveRenderer} from '../../../ListNext/components/ListRecursiveRenderer/ListRecursiveRenderer'; +import {ListContainerView} from '../../../useList'; +import {ListItemRecursiveRenderer} from '../../../useList/components/ListRecursiveRenderer/ListRecursiveRenderer'; export const TreeListContainer = ({ items, diff --git a/src/components/TreeSelect/hooks/useTreeSelectSelection.ts b/src/components/TreeSelect/hooks/useTreeSelectSelection.ts index 5070b677ac..ebb06a8383 100644 --- a/src/components/TreeSelect/hooks/useTreeSelectSelection.ts +++ b/src/components/TreeSelect/hooks/useTreeSelectSelection.ts @@ -2,7 +2,7 @@ import React from 'react'; import type {UseOpenProps} from '../../../hooks/useSelect/types'; import {useOpenState} from '../../../hooks/useSelect/useOpenState'; -import type {ListItemId} from '../../ListNext/types'; +import type {ListItemId} from '../../useList/types'; type UseTreeSelectSelectionProps = { value?: ListItemId[]; diff --git a/src/components/TreeSelect/types.ts b/src/components/TreeSelect/types.ts index 49a6918768..dccaa3641d 100644 --- a/src/components/TreeSelect/types.ts +++ b/src/components/TreeSelect/types.ts @@ -1,5 +1,6 @@ import type React from 'react'; +import type {QAProps} from '../types'; import type { KnownItemStructure, ListItemId, @@ -10,8 +11,7 @@ import type { OverrideItemContext, RenderItemContext, RenderItemState, -} from '../ListNext'; -import type {QAProps} from '../types'; +} from '../useList'; export type RenderControlProps = { open: boolean; diff --git a/src/components/ListNext/__stories__/DndExample.stories.tsx b/src/components/useList/__stories__/DndExample.stories.tsx similarity index 100% rename from src/components/ListNext/__stories__/DndExample.stories.tsx rename to src/components/useList/__stories__/DndExample.stories.tsx diff --git a/src/components/ListNext/__stories__/FlattenRenderer.stories.tsx b/src/components/useList/__stories__/FlattenRenderer.stories.tsx similarity index 100% rename from src/components/ListNext/__stories__/FlattenRenderer.stories.tsx rename to src/components/useList/__stories__/FlattenRenderer.stories.tsx diff --git a/src/components/ListNext/__stories__/ListInfinityScroll.stories.tsx b/src/components/useList/__stories__/ListInfinityScroll.stories.tsx similarity index 100% rename from src/components/ListNext/__stories__/ListInfinityScroll.stories.tsx rename to src/components/useList/__stories__/ListInfinityScroll.stories.tsx diff --git a/src/components/ListNext/__stories__/PopupWithToggler.stories.tsx b/src/components/useList/__stories__/PopupWithToggler.stories.tsx similarity index 100% rename from src/components/ListNext/__stories__/PopupWithToggler.stories.tsx rename to src/components/useList/__stories__/PopupWithToggler.stories.tsx diff --git a/src/components/ListNext/__stories__/RecursiveRenderer.stories.tsx b/src/components/useList/__stories__/RecursiveRenderer.stories.tsx similarity index 100% rename from src/components/ListNext/__stories__/RecursiveRenderer.stories.tsx rename to src/components/useList/__stories__/RecursiveRenderer.stories.tsx diff --git a/src/components/ListNext/__stories__/components/FlattenList.tsx b/src/components/useList/__stories__/components/FlattenList.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/FlattenList.tsx rename to src/components/useList/__stories__/components/FlattenList.tsx diff --git a/src/components/ListNext/__stories__/components/InfinityScrollList.tsx b/src/components/useList/__stories__/components/InfinityScrollList.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/InfinityScrollList.tsx rename to src/components/useList/__stories__/components/InfinityScrollList.tsx diff --git a/src/components/ListNext/__stories__/components/ListWithDnd.tsx b/src/components/useList/__stories__/components/ListWithDnd.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/ListWithDnd.tsx rename to src/components/useList/__stories__/components/ListWithDnd.tsx diff --git a/src/components/ListNext/__stories__/components/PopupWithTogglerList.tsx b/src/components/useList/__stories__/components/PopupWithTogglerList.tsx similarity index 91% rename from src/components/ListNext/__stories__/components/PopupWithTogglerList.tsx rename to src/components/useList/__stories__/components/PopupWithTogglerList.tsx index 8a12f506b7..998bd58284 100644 --- a/src/components/ListNext/__stories__/components/PopupWithTogglerList.tsx +++ b/src/components/useList/__stories__/components/PopupWithTogglerList.tsx @@ -108,7 +108,7 @@ export const PopupWithTogglerList = ({size, itemsCount}: PopupWithTogglerListPro expandedById={listState.expandedById} > {(id) => { - const [data, state, _context] = getItemRenderState({ + const [data, state, listContext] = getItemRenderState({ id, size, onItemClick, @@ -116,7 +116,13 @@ export const PopupWithTogglerList = ({size, itemsCount}: PopupWithTogglerListPro ...listState, }); - return ; + return ( + + ); }} ))} diff --git a/src/components/ListNext/__stories__/components/RecursiveList.tsx b/src/components/useList/__stories__/components/RecursiveList.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/RecursiveList.tsx rename to src/components/useList/__stories__/components/RecursiveList.tsx diff --git a/src/components/ListNext/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.async.tsx b/src/components/useList/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.async.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.async.tsx rename to src/components/useList/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.async.tsx diff --git a/src/components/ListNext/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.tsx b/src/components/useList/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.tsx similarity index 100% rename from src/components/ListNext/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.tsx rename to src/components/useList/__stories__/components/VirtualizedListContainer/VirtualizedListContainer.tsx diff --git a/src/components/ListNext/__stories__/components/VirtualizedListContainer/index.ts b/src/components/useList/__stories__/components/VirtualizedListContainer/index.ts similarity index 100% rename from src/components/ListNext/__stories__/components/VirtualizedListContainer/index.ts rename to src/components/useList/__stories__/components/VirtualizedListContainer/index.ts diff --git a/src/components/ListNext/__stories__/components/VirtualizedListContainer/types.ts b/src/components/useList/__stories__/components/VirtualizedListContainer/types.ts similarity index 100% rename from src/components/ListNext/__stories__/components/VirtualizedListContainer/types.ts rename to src/components/useList/__stories__/components/VirtualizedListContainer/types.ts diff --git a/src/components/ListNext/__stories__/utils/makeData.ts b/src/components/useList/__stories__/utils/makeData.ts similarity index 100% rename from src/components/ListNext/__stories__/utils/makeData.ts rename to src/components/useList/__stories__/utils/makeData.ts diff --git a/src/components/ListNext/__stories__/utils/reorderArray.ts b/src/components/useList/__stories__/utils/reorderArray.ts similarity index 100% rename from src/components/ListNext/__stories__/utils/reorderArray.ts rename to src/components/useList/__stories__/utils/reorderArray.ts diff --git a/src/components/ListNext/__stories__/utils/useInfinityFetch.ts b/src/components/useList/__stories__/utils/useInfinityFetch.ts similarity index 100% rename from src/components/ListNext/__stories__/utils/useInfinityFetch.ts rename to src/components/useList/__stories__/utils/useInfinityFetch.ts diff --git a/src/components/ListNext/components/IntersectionContainer/IntersectionContainer.tsx b/src/components/useList/components/IntersectionContainer/IntersectionContainer.tsx similarity index 100% rename from src/components/ListNext/components/IntersectionContainer/IntersectionContainer.tsx rename to src/components/useList/components/IntersectionContainer/IntersectionContainer.tsx diff --git a/src/components/ListNext/components/ListContainerView/ListContainerView.scss b/src/components/useList/components/ListContainerView/ListContainerView.scss similarity index 100% rename from src/components/ListNext/components/ListContainerView/ListContainerView.scss rename to src/components/useList/components/ListContainerView/ListContainerView.scss diff --git a/src/components/ListNext/components/ListContainerView/ListContainerView.tsx b/src/components/useList/components/ListContainerView/ListContainerView.tsx similarity index 100% rename from src/components/ListNext/components/ListContainerView/ListContainerView.tsx rename to src/components/useList/components/ListContainerView/ListContainerView.tsx diff --git a/src/components/ListNext/components/ListItemView/ListItemView.scss b/src/components/useList/components/ListItemView/ListItemView.scss similarity index 100% rename from src/components/ListNext/components/ListItemView/ListItemView.scss rename to src/components/useList/components/ListItemView/ListItemView.scss diff --git a/src/components/ListNext/components/ListItemView/ListItemView.tsx b/src/components/useList/components/ListItemView/ListItemView.tsx similarity index 96% rename from src/components/ListNext/components/ListItemView/ListItemView.tsx rename to src/components/useList/components/ListItemView/ListItemView.tsx index a7a325fa09..5e86e17446 100644 --- a/src/components/ListNext/components/ListItemView/ListItemView.tsx +++ b/src/components/useList/components/ListItemView/ListItemView.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import {Check} from '@gravity-ui/icons'; +import {Check, ChevronDown, ChevronUp} from '@gravity-ui/icons'; -import {ArrowToggle} from '../../../ArrowToggle'; import {Icon} from '../../../Icon'; import {Text, colorText} from '../../../Text'; import {borderRadius} from '../../../borderRadius'; @@ -159,7 +158,9 @@ export const ListItemView = React.forwardRef( {renderSafeIndentation(indentation)} {startSlot ?? - (isGroup ? : null)} + (isGroup ? ( + + ) : null)} {typeof title === 'string' ? ( diff --git a/src/components/ListNext/components/ListItemView/__stories__/ListItemView.stories.tsx b/src/components/useList/components/ListItemView/__stories__/ListItemView.stories.tsx similarity index 100% rename from src/components/ListNext/components/ListItemView/__stories__/ListItemView.stories.tsx rename to src/components/useList/components/ListItemView/__stories__/ListItemView.stories.tsx diff --git a/src/components/ListNext/components/ListRecursiveRenderer/ListRecursiveRenderer.scss b/src/components/useList/components/ListRecursiveRenderer/ListRecursiveRenderer.scss similarity index 100% rename from src/components/ListNext/components/ListRecursiveRenderer/ListRecursiveRenderer.scss rename to src/components/useList/components/ListRecursiveRenderer/ListRecursiveRenderer.scss diff --git a/src/components/ListNext/components/ListRecursiveRenderer/ListRecursiveRenderer.tsx b/src/components/useList/components/ListRecursiveRenderer/ListRecursiveRenderer.tsx similarity index 100% rename from src/components/ListNext/components/ListRecursiveRenderer/ListRecursiveRenderer.tsx rename to src/components/useList/components/ListRecursiveRenderer/ListRecursiveRenderer.tsx diff --git a/src/components/ListNext/constants.ts b/src/components/useList/constants.ts similarity index 100% rename from src/components/ListNext/constants.ts rename to src/components/useList/constants.ts diff --git a/src/components/ListNext/hooks/useFlattenListItems.ts b/src/components/useList/hooks/useFlattenListItems.ts similarity index 100% rename from src/components/ListNext/hooks/useFlattenListItems.ts rename to src/components/useList/hooks/useFlattenListItems.ts diff --git a/src/components/ListNext/hooks/useList.ts b/src/components/useList/hooks/useList.ts similarity index 100% rename from src/components/ListNext/hooks/useList.ts rename to src/components/useList/hooks/useList.ts diff --git a/src/components/ListNext/hooks/useListFilter.ts b/src/components/useList/hooks/useListFilter.ts similarity index 100% rename from src/components/ListNext/hooks/useListFilter.ts rename to src/components/useList/hooks/useListFilter.ts diff --git a/src/components/ListNext/hooks/useListKeydown.tsx b/src/components/useList/hooks/useListKeydown.tsx similarity index 100% rename from src/components/ListNext/hooks/useListKeydown.tsx rename to src/components/useList/hooks/useListKeydown.tsx diff --git a/src/components/ListNext/hooks/useListParsedState.ts b/src/components/useList/hooks/useListParsedState.ts similarity index 100% rename from src/components/ListNext/hooks/useListParsedState.ts rename to src/components/useList/hooks/useListParsedState.ts diff --git a/src/components/ListNext/hooks/useListState.ts b/src/components/useList/hooks/useListState.ts similarity index 100% rename from src/components/ListNext/hooks/useListState.ts rename to src/components/useList/hooks/useListState.ts diff --git a/src/components/ListNext/index.ts b/src/components/useList/index.ts similarity index 100% rename from src/components/ListNext/index.ts rename to src/components/useList/index.ts diff --git a/src/components/ListNext/types.ts b/src/components/useList/types.ts similarity index 100% rename from src/components/ListNext/types.ts rename to src/components/useList/types.ts diff --git a/src/components/ListNext/utils/computeItemSize.ts b/src/components/useList/utils/computeItemSize.ts similarity index 100% rename from src/components/ListNext/utils/computeItemSize.ts rename to src/components/useList/utils/computeItemSize.ts diff --git a/src/components/ListNext/utils/createListItemId.ts b/src/components/useList/utils/createListItemId.ts similarity index 100% rename from src/components/ListNext/utils/createListItemId.ts rename to src/components/useList/utils/createListItemId.ts diff --git a/src/components/ListNext/utils/defaultFilterItems.ts b/src/components/useList/utils/defaultFilterItems.ts similarity index 100% rename from src/components/ListNext/utils/defaultFilterItems.ts rename to src/components/useList/utils/defaultFilterItems.ts diff --git a/src/components/ListNext/utils/findNextIndex.ts b/src/components/useList/utils/findNextIndex.ts similarity index 100% rename from src/components/ListNext/utils/findNextIndex.ts rename to src/components/useList/utils/findNextIndex.ts diff --git a/src/components/ListNext/utils/flattenItems.ts b/src/components/useList/utils/flattenItems.ts similarity index 100% rename from src/components/ListNext/utils/flattenItems.ts rename to src/components/useList/utils/flattenItems.ts diff --git a/src/components/ListNext/utils/getItemRenderState.tsx b/src/components/useList/utils/getItemRenderState.tsx similarity index 97% rename from src/components/ListNext/utils/getItemRenderState.tsx rename to src/components/useList/utils/getItemRenderState.tsx index 7d213c9d33..f181bd6d42 100644 --- a/src/components/ListNext/utils/getItemRenderState.tsx +++ b/src/components/useList/utils/getItemRenderState.tsx @@ -1,3 +1,4 @@ +/* eslint-disable valid-jsdoc */ import type { ItemsParsedState, ListGroupState, diff --git a/src/components/ListNext/utils/getListItemId.ts b/src/components/useList/utils/getListItemId.ts similarity index 100% rename from src/components/ListNext/utils/getListItemId.ts rename to src/components/useList/utils/getListItemId.ts diff --git a/src/components/ListNext/utils/getListParsedState.ts b/src/components/useList/utils/getListParsedState.ts similarity index 100% rename from src/components/ListNext/utils/getListParsedState.ts rename to src/components/useList/utils/getListParsedState.ts diff --git a/src/components/ListNext/utils/groupItemId.ts b/src/components/useList/utils/groupItemId.ts similarity index 100% rename from src/components/ListNext/utils/groupItemId.ts rename to src/components/useList/utils/groupItemId.ts diff --git a/src/components/ListNext/utils/isTreeItemGuard.ts b/src/components/useList/utils/isTreeItemGuard.ts similarity index 100% rename from src/components/ListNext/utils/isTreeItemGuard.ts rename to src/components/useList/utils/isTreeItemGuard.ts diff --git a/src/components/ListNext/utils/scrollToListItem.ts b/src/components/useList/utils/scrollToListItem.ts similarity index 100% rename from src/components/ListNext/utils/scrollToListItem.ts rename to src/components/useList/utils/scrollToListItem.ts diff --git a/src/unstable.ts b/src/unstable.ts index 83d038af79..c96cb6e2e6 100644 --- a/src/unstable.ts +++ b/src/unstable.ts @@ -1,2 +1,2 @@ -export {useList, useListFilter, useListKeydown} from './components/ListNext'; +export {useList, useListFilter, useListKeydown} from './components/useList'; export * from './components/TreeSelect';