diff --git a/.changeset/wise-adults-lay.md b/.changeset/wise-adults-lay.md new file mode 100644 index 00000000000..5577ae3e0e0 --- /dev/null +++ b/.changeset/wise-adults-lay.md @@ -0,0 +1,5 @@ +--- +"@primer/react": minor +--- + +ActionBar: Move to main directory diff --git a/packages/react/src/drafts/ActionBar/ActionBar.docs.json b/packages/react/src/ActionBar/ActionBar.docs.json similarity index 94% rename from packages/react/src/drafts/ActionBar/ActionBar.docs.json rename to packages/react/src/ActionBar/ActionBar.docs.json index c73929c5802..7b8f2659f96 100644 --- a/packages/react/src/drafts/ActionBar/ActionBar.docs.json +++ b/packages/react/src/ActionBar/ActionBar.docs.json @@ -1,10 +1,10 @@ { "id": "actionbar", "name": "ActionBar", - "status": "draft", - "a11yReviewed": false, + "status": "alpha", + "a11yReviewed": true, "stories": [], - "importPath": "@primer/react/experimental", + "importPath": "@primer/react", "props": [ { "name": "size", diff --git a/packages/react/src/drafts/ActionBar/ActionBar.stories.tsx b/packages/react/src/ActionBar/ActionBar.stories.tsx similarity index 96% rename from packages/react/src/drafts/ActionBar/ActionBar.stories.tsx rename to packages/react/src/ActionBar/ActionBar.stories.tsx index f2dd0563a0a..95a4f72f720 100644 --- a/packages/react/src/drafts/ActionBar/ActionBar.stories.tsx +++ b/packages/react/src/ActionBar/ActionBar.stories.tsx @@ -1,7 +1,7 @@ import React from 'react' import type {Meta} from '@storybook/react' import ActionBar from '.' -import Text from '../../Text' +import Text from '../Text' import { PencilIcon, BoldIcon, @@ -18,12 +18,12 @@ import { ReplyIcon, ThreeBarsIcon, } from '@primer/octicons-react' -import {MarkdownInput} from '../MarkdownEditor/_MarkdownInput' -import {ViewSwitch} from '../MarkdownEditor/_ViewSwitch' -import type {MarkdownViewMode} from '../MarkdownEditor/_ViewSwitch' -import {Box, Dialog, Button, Avatar, ActionMenu, IconButton, ActionList} from '../..' -import {Divider} from '../../deprecated/ActionList/Divider' -import mockData from '../SelectPanel2/mock-story-data' +import {MarkdownInput} from '../drafts/MarkdownEditor/_MarkdownInput' +import {ViewSwitch} from '../drafts/MarkdownEditor/_ViewSwitch' +import type {MarkdownViewMode} from '../drafts/MarkdownEditor/_ViewSwitch' +import {Box, Dialog, Button, Avatar, ActionMenu, IconButton, ActionList} from '../' +import {Divider} from '../deprecated/ActionList/Divider' +import mockData from '../drafts/SelectPanel2/mock-story-data' export default { title: 'Drafts/Components/ActionBar', diff --git a/packages/react/src/drafts/ActionBar/ActionBar.test.tsx b/packages/react/src/ActionBar/ActionBar.test.tsx similarity index 95% rename from packages/react/src/drafts/ActionBar/ActionBar.test.tsx rename to packages/react/src/ActionBar/ActionBar.test.tsx index 0b8195dd230..2f963d0bc00 100644 --- a/packages/react/src/drafts/ActionBar/ActionBar.test.tsx +++ b/packages/react/src/ActionBar/ActionBar.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {behavesAsComponent} from '../../utils/testing' +import {behavesAsComponent} from '../utils/testing' import {render as HTMLRender} from '@testing-library/react' import {axe} from 'jest-axe' diff --git a/packages/react/src/drafts/ActionBar/ActionBar.tsx b/packages/react/src/ActionBar/ActionBar.tsx similarity index 94% rename from packages/react/src/drafts/ActionBar/ActionBar.tsx rename to packages/react/src/ActionBar/ActionBar.tsx index e3f5b3b9879..aa2238aafc7 100644 --- a/packages/react/src/drafts/ActionBar/ActionBar.tsx +++ b/packages/react/src/ActionBar/ActionBar.tsx @@ -1,20 +1,20 @@ import type {RefObject, MutableRefObject} from 'react' import React, {useState, useCallback, useRef, forwardRef} from 'react' import {KebabHorizontalIcon} from '@primer/octicons-react' -import {ActionList} from '../../ActionList' -import useIsomorphicLayoutEffect from '../../utils/useIsomorphicLayoutEffect' +import {ActionList} from '../ActionList' +import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect' import styled from 'styled-components' -import sx from '../../sx' -import {useOnEscapePress} from '../../hooks/useOnEscapePress' -import type {ResizeObserverEntry} from '../../hooks/useResizeObserver' -import {useResizeObserver} from '../../hooks/useResizeObserver' - -import {useOnOutsideClick} from '../../hooks/useOnOutsideClick' -import type {IconButtonProps} from '../../Button' -import {IconButton} from '../../Button' -import Box from '../../Box' -import {ActionMenu} from '../../ActionMenu' -import {useFocusZone, FocusKeys} from '../../hooks/useFocusZone' +import sx from '../sx' +import {useOnEscapePress} from '../hooks/useOnEscapePress' +import type {ResizeObserverEntry} from '../hooks/useResizeObserver' +import {useResizeObserver} from '../hooks/useResizeObserver' + +import {useOnOutsideClick} from '../hooks/useOnOutsideClick' +import type {IconButtonProps} from '../Button' +import {IconButton} from '../Button' +import Box from '../Box' +import {ActionMenu} from '../ActionMenu' +import {useFocusZone, FocusKeys} from '../hooks/useFocusZone' type ChildSize = { text: string diff --git a/packages/react/src/drafts/ActionBar/index.ts b/packages/react/src/ActionBar/index.ts similarity index 93% rename from packages/react/src/drafts/ActionBar/index.ts rename to packages/react/src/ActionBar/index.ts index ae3069a0ae3..64bf265ed8f 100644 --- a/packages/react/src/drafts/ActionBar/index.ts +++ b/packages/react/src/ActionBar/index.ts @@ -7,3 +7,4 @@ const ActionBar = Object.assign(Bar, { }) export default ActionBar +export {ActionBar} diff --git a/packages/react/src/drafts/index.ts b/packages/react/src/drafts/index.ts index b26c9a7abfa..4a869314e36 100644 --- a/packages/react/src/drafts/index.ts +++ b/packages/react/src/drafts/index.ts @@ -67,8 +67,7 @@ export * from './SelectPanel2' export {default as TabPanels} from './TabPanels' export type {TabPanelsProps, TabPanelsTabProps, TabPanelsPanelProps} from './TabPanels' export * from '../TooltipV2' -export {default as ActionBar} from './ActionBar' -export * from './ActionBar' +export * from '../ActionBar' export {Stack} from '../Stack' export type {StackProps, StackItemProps} from '../Stack' diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index e3148feb8f4..30f2d09c796 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -193,6 +193,9 @@ export type { export {UnderlineNav} from './UnderlineNav' export type {UnderlineNavProps, UnderlineNavItemProps} from './UnderlineNav' +export {ActionBar} from './ActionBar' +export type {ActionBarProps} from './ActionBar' + // eslint-disable-next-line no-restricted-imports export {SSRProvider, useSSRSafeId} from './utils/ssr' export {default as sx, merge} from './sx'