Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/grumpy-actors-see.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Promote AriaStatus and AriaAlert from experimental to stable
Comment thread
joshblack marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ exports[`@primer/react > should not update exports without a semver change 1`] =
"AnchoredOverlay",
"type AnchoredOverlayProps",
"AnchoredPositionHookSettings",
"AriaAlert",
"type AriaAlertProps",
"AriaStatus",
"type AriaStatusProps",
"asSlot",
"Autocomplete",
"type AutocompleteInputProps",
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use client'

export {default as theme, type ThemeColorPaths, type ThemeShadowPaths} from './theme'
export {AriaStatus, AriaAlert} from './live-region'
export type {AriaStatusProps, AriaAlertProps} from './live-region'
Comment on lines +4 to +5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ec481d0AriaAlertProps<As extends ElementType = 'div'> now matches AriaStatusProps.

export {default as BaseStyles} from './BaseStyles'
export type {BaseStylesProps} from './BaseStyles'
export {default as ThemeProvider} from './ThemeProvider'
Expand Down
23 changes: 23 additions & 0 deletions packages/react/src/live-region/AriaAlert.docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "aria-alert",
"name": "AriaAlert",
"status": "alpha",
"a11yReviewed": false,
"importPath": "@primer/react",
"stories": [],
"props": [
{
"name": "announceOnShow",
"type": "boolean",
"description": "Specify if the content of the element should be announced when this component is rendered and is not hidden",
"defaultValue": "true"
}
},
{
"name": "hidden",
"type": "boolean",
"description": "Specify if the element is hidden",
"defaultValue": "false"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {AriaAlert} from './AriaAlert'
import {VisuallyHidden} from '../VisuallyHidden'

export default {
title: 'Experimental/Components/AriaAlert/Features',
title: 'Components/AriaAlert/Features',
component: AriaAlert,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/live-region/AriaAlert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useEffect, useState} from 'react'
import {AriaAlert} from './AriaAlert'

export default {
title: 'Experimental/Components/AriaAlert',
title: 'Components/AriaAlert',
component: AriaAlert,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/live-region/AriaAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {type ElementType} from 'react'
import {Announce} from './Announce'
import type {PolymorphicProps} from '../utils/modern-polymorphic'

export type AriaAlertProps<As extends ElementType> = PolymorphicProps<
export type AriaAlertProps<As extends ElementType = 'div'> = PolymorphicProps<
As,
'div',
{
Expand Down
27 changes: 27 additions & 0 deletions packages/react/src/live-region/AriaStatus.docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"id": "aria-status",
"name": "AriaStatus",
"status": "alpha",
"a11yReviewed": false,
"importPath": "@primer/react",
"stories": [],
"props": [
{
"name": "announceOnShow",
"type": "boolean",
"description": "Specify if the content of the element should be announced when this component is rendered and is not hidden",
"defaultValue": "false"
},
{
"name": "hidden",
"type": "boolean",
"description": "Specify if the element is hidden",
"defaultValue": "false"
},
{
"name": "delayMs",
"type": "number",
"description": "Provide a delay in milliseconds before the announcement is made"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {AriaStatus} from './AriaStatus'
import {VisuallyHidden} from '../VisuallyHidden'

export default {
title: 'Experimental/Components/AriaStatus/Features',
title: 'Components/AriaStatus/Features',
component: AriaStatus,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/live-region/AriaStatus.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useEffect, useState} from 'react'
import {AriaStatus} from './AriaStatus'

export default {
title: 'Experimental/Components/AriaStatus',
title: 'Components/AriaStatus',
component: AriaStatus,
}

Expand Down
Loading