Skip to content

Commit fe12c86

Browse files
authored
Revert "v38: Deprecate PointerBox component (#6704)" (#6738)
1 parent 8efccdd commit fe12c86

8 files changed

Lines changed: 13 additions & 33 deletions

File tree

.changeset/big-lizards-study.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/react/src/PointerBox/PointerBox.docs.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"id": "pointer_box",
33
"name": "PointerBox",
4-
"status": "deprecated",
4+
"status": "alpha",
55
"a11yReviewed": "2025-01-08",
6-
"stories": [],
7-
"importPath": "@primer/react/deprecated",
6+
"stories": [
7+
{
8+
"id": "components-pointerbox--default"
9+
}
10+
],
11+
"importPath": "@primer/react",
812
"props": [
913
{
1014
"name": "bg",

packages/react/src/PointerBox/PointerBox.stories.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@ import PointerBox from './PointerBox'
33
import type {ComponentProps} from '../utils/types'
44

55
export default {
6-
title: 'Deprecated/Components/PointerBox',
7-
parameters: {
8-
docs: {
9-
description: {
10-
component: 'PointerBox is deprecated and will be removed in a future major release. Consider using Overlay.',
11-
},
12-
},
13-
},
6+
title: 'Components/PointerBox',
147
} as Meta<typeof PointerBox>
158

169
export const Default = () => <PointerBox>Pointer box content</PointerBox>

packages/react/src/PointerBox/PointerBox.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {describe, expect, it} from 'vitest'
22
import {render} from '@testing-library/react'
3-
import {ThemeProvider} from '..'
4-
import PointerBox from './PointerBox'
3+
import {PointerBox, ThemeProvider} from '..'
54
import theme from '../theme'
65

76
describe('PointerBox', () => {

packages/react/src/PointerBox/PointerBox.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ type MutatedSxProps = {
1616
}
1717
} & SxProp
1818

19-
/**
20-
* @deprecated PointerBox is deprecated and will be removed in a future major release.
21-
* Consider using Overlay or Position + Box with a caret instead.
22-
*/
2319
export type PointerBoxProps = {
2420
caret?: CaretProps['location']
2521
bg?: CaretProps['bg']
@@ -28,10 +24,6 @@ export type PointerBoxProps = {
2824
} & BoxProps &
2925
MutatedSxProps
3026

31-
/**
32-
* @deprecated PointerBox is deprecated and will be removed in a future major release.
33-
* Consider using Overlay or Position + Box with a caret instead.
34-
*/
3527
function PointerBox(props: PointerBoxProps) {
3628
// don't destructure these, just grab them
3729
const themeContext = React.useContext(ThemeContext)

packages/react/src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ exports[`@primer/react > should not update exports without a semver change 1`] =
112112
"type PageLayoutProps",
113113
"Pagination",
114114
"type PaginationProps",
115+
"PointerBox",
116+
"type PointerBoxProps",
115117
"Popover",
116118
"type PopoverContentProps",
117119
"type PopoverProps",
@@ -234,8 +236,6 @@ exports[`@primer/react/deprecated > should not update exports without a semver c
234236
"type OcticonProps",
235237
"Pagehead",
236238
"type PageheadProps",
237-
"PointerBox",
238-
"type PointerBoxProps",
239239
"TabNav",
240240
"type TabNavLinkProps",
241241
"type TabNavProps",

packages/react/src/deprecated/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,3 @@ export type {TabNavProps, TabNavLinkProps} from '../TabNav'
4242
export {default as Tooltip} from '../Tooltip/Tooltip'
4343
export type {TooltipProps} from '../Tooltip/Tooltip'
4444
// end of v37.0.0
45-
46-
// Deprecated in vNext
47-
export {default as PointerBox} from '../PointerBox'
48-
export type {PointerBoxProps} from '../PointerBox'

packages/react/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ export {default as Overlay} from './Overlay'
122122
export type {OverlayProps} from './Overlay'
123123
export {default as Pagination} from './Pagination'
124124
export type {PaginationProps} from './Pagination'
125-
// Deprecated: moved to deprecated bundle
125+
export {default as PointerBox} from './PointerBox'
126+
export type {PointerBoxProps} from './PointerBox'
126127
export {default as Popover} from './Popover'
127128
export type {PopoverProps, PopoverContentProps} from './Popover'
128129
export {default as Portal, registerPortalRoot} from './Portal'

0 commit comments

Comments
 (0)