From cff067afd997988fea9cec4ce9167c07a5d7acbc Mon Sep 17 00:00:00 2001 From: Josh Black Date: Tue, 1 Oct 2024 11:04:09 -0500 Subject: [PATCH] feat: update stable and deprecated exports (#5021) * feat: update stable and deprecated exports * chore: add changeset --------- Co-authored-by: Josh Black --- .changeset/sour-cycles-warn.md | 5 +++++ .../react/src/__tests__/__snapshots__/exports.test.ts.snap | 2 +- packages/react/src/deprecated/index.ts | 1 - packages/react/src/index.ts | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/sour-cycles-warn.md diff --git a/.changeset/sour-cycles-warn.md b/.changeset/sour-cycles-warn.md new file mode 100644 index 00000000000..e2b8d18cd88 --- /dev/null +++ b/.changeset/sour-cycles-warn.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +Add ResponsiveValue type to `@primer/react` entrypoint diff --git a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap index 488a481727f..dd5d8d91184 100644 --- a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap +++ b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap @@ -124,6 +124,7 @@ exports[`@primer/react should not update exports without a semver change 1`] = ` "registerPortalRoot", "RelativeTime", "type RelativeTimeProps", + "ResponsiveValue", "SegmentedControl", "Select", "SelectPanel", @@ -221,7 +222,6 @@ exports[`@primer/react/deprecated should not update exports without a semver cha "type DialogProps", "FilteredSearch", "type FilteredSearchProps", - "type ForwardRefComponent", "Octicon", "type OcticonProps", "Pagehead", diff --git a/packages/react/src/deprecated/index.ts b/packages/react/src/deprecated/index.ts index 8ddf7190b73..c0df1270469 100644 --- a/packages/react/src/deprecated/index.ts +++ b/packages/react/src/deprecated/index.ts @@ -41,5 +41,4 @@ export {default as TabNav} from '../TabNav' export type {TabNavProps, TabNavLinkProps} from '../TabNav' export {default as Tooltip} from '../Tooltip/Tooltip' export type {TooltipProps} from '../Tooltip/Tooltip' -export type {ForwardRefComponent} from '../utils/polymorphic' // end of v37.0.0 diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 8ad64df569c..cbc739faf4b 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -43,7 +43,7 @@ export {useFocusZone} from './hooks/useFocusZone' export type {FocusZoneHookSettings} from './hooks/useFocusZone' export {useRefObjectAsForwardedRef} from './hooks/useRefObjectAsForwardedRef' export {useResizeObserver} from './hooks/useResizeObserver' -export {useResponsiveValue} from './hooks/useResponsiveValue' +export {useResponsiveValue, type ResponsiveValue} from './hooks/useResponsiveValue' export {default as useIsomorphicLayoutEffect} from './utils/useIsomorphicLayoutEffect' export {useProvidedRefOrCreate} from './hooks/useProvidedRefOrCreate'