diff --git a/.changeset/forty-squids-pretend.md b/.changeset/forty-squids-pretend.md new file mode 100644 index 00000000000..4436d16bf75 --- /dev/null +++ b/.changeset/forty-squids-pretend.md @@ -0,0 +1,10 @@ +--- +"@primer/react": minor +--- + +TreeView promoted to [beta](https://primer.style/contribute/component-lifecycle#beta) status. You can now import it from the main bundle instead of `/drafts`: + +```diff +- import {TreeView} from '@primer/react/drafts' ++ import {TreeView} from '@primer/react' +``` diff --git a/docs/content/TreeView.mdx b/docs/content/TreeView.mdx index c857f05c042..2c0ba15a7bf 100644 --- a/docs/content/TreeView.mdx +++ b/docs/content/TreeView.mdx @@ -1,14 +1,17 @@ --- title: TreeView componentId: tree_view -status: Draft +status: Beta description: A hierarchical list of items where nested items can be expanded and collapsed. +a11yReviewed: true +source: https://github.com/primer/react/tree/main/src/TreeView +storybook: '/react/storybook?path=/story/components-treeview' --- import data from '../../src/TreeView/TreeView.docs.json' ```js -import {TreeView} from '@primer/react/drafts' +import {TreeView} from '@primer/react' ``` ## Examples @@ -280,15 +283,18 @@ See [Storybook](https://primer.style/react/storybook?path=/story/components-tree - The component has visual regression coverage of its default and interactive states. + Component has visual regression coverage of its default and interactive states. - The component does not introduce any axe violations. + Component does not introduce any axe violations. Component has been manually reviewed by the accessibility team and any resulting issues have been addressed. diff --git a/generated/components.json b/generated/components.json index f0e59d2526a..afcdabb3127 100644 --- a/generated/components.json +++ b/generated/components.json @@ -4287,8 +4287,8 @@ "tree_view": { "id": "tree_view", "name": "TreeView", - "status": "draft", - "a11yReviewed": false, + "status": "beta", + "a11yReviewed": true, "stories": [ "components-treeview-features--files", "components-treeview-features--files-changed" diff --git a/src/TreeView/TreeView.docs.json b/src/TreeView/TreeView.docs.json index a0d07ec2f1c..b1cb789ed73 100644 --- a/src/TreeView/TreeView.docs.json +++ b/src/TreeView/TreeView.docs.json @@ -1,12 +1,9 @@ { "id": "tree_view", "name": "TreeView", - "status": "draft", - "a11yReviewed": false, - "stories": [ - "components-treeview-features--files", - "components-treeview-features--files-changed" - ], + "status": "beta", + "a11yReviewed": true, + "stories": ["components-treeview-features--files", "components-treeview-features--files-changed"], "props": [ { "name": "children", @@ -146,4 +143,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/__tests__/__snapshots__/exports.test.ts.snap b/src/__tests__/__snapshots__/exports.test.ts.snap index 6e1670d3a46..8afcfb8cee4 100644 --- a/src/__tests__/__snapshots__/exports.test.ts.snap +++ b/src/__tests__/__snapshots__/exports.test.ts.snap @@ -70,6 +70,7 @@ exports[`@primer/react should not update exports without a semver change 1`] = ` "ToggleSwitch", "Token", "Tooltip", + "TreeView", "Truncate", "UnderlineNav", "UnderlineNav2", diff --git a/src/drafts/index.ts b/src/drafts/index.ts index 0bcc0a3b75f..44c36e90f32 100644 --- a/src/drafts/index.ts +++ b/src/drafts/index.ts @@ -30,9 +30,8 @@ export {default as Hidden} from '../Hidden' export * from './hooks' -export * from '../TreeView' - // TODO: Remove these components from the drafts bundle in the next major release +export * from '../TreeView' export * from '../NavList' export * from '../SegmentedControl' export * from '../SplitPageLayout' diff --git a/src/index.ts b/src/index.ts index 0506d9dcf49..3fe9d3bf285 100644 --- a/src/index.ts +++ b/src/index.ts @@ -179,6 +179,15 @@ export type {CheckboxProps} from './Checkbox' export {default as Textarea} from './Textarea' export type {TextareaProps} from './Textarea' +export {TreeView} from './TreeView' +export type { + TreeViewProps, + TreeViewItemProps, + TreeViewSubTreeProps, + TreeViewVisualProps, + TreeViewErrorDialogProps, +} from './TreeView' + export {UnderlineNav as UnderlineNav2} from './UnderlineNav2' export {SSRProvider, useSSRSafeId} from './utils/ssr'