diff --git a/src/components/lab/Popover/Popover.tsx b/src/components/Popover/Popover.tsx similarity index 92% rename from src/components/lab/Popover/Popover.tsx rename to src/components/Popover/Popover.tsx index 1d91d8d9e..0022c7688 100644 --- a/src/components/lab/Popover/Popover.tsx +++ b/src/components/Popover/Popover.tsx @@ -9,12 +9,12 @@ import { } from '@floating-ui/react'; import type {UseInteractionsReturn} from '@floating-ui/react'; -import {useControlledState, useForkRef} from '../../../hooks'; -import {Popup} from '../../Popup'; -import type {PopupProps} from '../../Popup'; -import type {AriaLabelingProps, DOMProps, QAProps} from '../../types'; -import {block} from '../../utils/cn'; -import {getElementRef} from '../../utils/getElementRef'; +import {useControlledState, useForkRef} from '../../hooks'; +import {Popup} from '../Popup'; +import type {PopupProps} from '../Popup'; +import type {AriaLabelingProps, DOMProps, QAProps} from '../types'; +import {block} from '../utils/cn'; +import {getElementRef} from '../utils/getElementRef'; export interface PopoverProps extends AriaLabelingProps, diff --git a/src/components/lab/Popover/README.md b/src/components/Popover/README.md similarity index 97% rename from src/components/lab/Popover/README.md rename to src/components/Popover/README.md index a7acef1af..8f77a8b8c 100644 --- a/src/components/lab/Popover/README.md +++ b/src/components/Popover/README.md @@ -8,7 +8,7 @@ import {Popover} from '@gravity-ui/uikit'; ``` -The `Popover` component is technically the [`Popup`](./TODO) with some trigger interactivity built-in. The `Popover` uses passed `ReactElement` +The `Popover` component is technically the [`Popup`](../Popup/README.md) with some trigger interactivity built-in. The `Popover` uses passed `ReactElement` from `children` property as a trigger, and opens whenever trigger is hovered or clicked. Content of the `Popover` might contain interactive elements like links or buttons. diff --git a/src/components/lab/Popover/__stories__/Docs.mdx b/src/components/Popover/__stories__/Docs.mdx similarity index 100% rename from src/components/lab/Popover/__stories__/Docs.mdx rename to src/components/Popover/__stories__/Docs.mdx diff --git a/src/components/lab/Popover/__stories__/Popover.stories.tsx b/src/components/Popover/__stories__/Popover.stories.tsx similarity index 93% rename from src/components/lab/Popover/__stories__/Popover.stories.tsx rename to src/components/Popover/__stories__/Popover.stories.tsx index 86dbc110e..0006eddbb 100644 --- a/src/components/lab/Popover/__stories__/Popover.stories.tsx +++ b/src/components/Popover/__stories__/Popover.stories.tsx @@ -1,13 +1,13 @@ import {action} from '@storybook/addon-actions'; import type {Meta, StoryObj} from '@storybook/react'; -import {Button} from '../../../Button'; -import {Link} from '../../../Link'; -import {Flex} from '../../../layout'; +import {Button} from '../../Button'; +import {Link} from '../../Link'; +import {Flex} from '../../layout'; import {Popover} from '../Popover'; const meta: Meta = { - title: 'Lab/Popover', + title: 'Components/Overlays/Popover', component: Popover, parameters: { layout: 'centered', diff --git a/src/components/Popover/index.ts b/src/components/Popover/index.ts new file mode 100644 index 000000000..8f473de4b --- /dev/null +++ b/src/components/Popover/index.ts @@ -0,0 +1 @@ +export * from './Popover'; diff --git a/src/components/index.ts b/src/components/index.ts index f2eccd664..d1deaff65 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -36,6 +36,7 @@ export * from './Palette'; export * from './UserLabel'; export * from './PinInput'; export * from './PlaceholderContainer'; +export * from './Popover'; export * from './Popup'; export * from './Portal'; export * from './Progress';