diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c6b62723f2..bcc975810b 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -31,6 +31,10 @@ "messageformat": "Clear", "description": "Axo Design System > Text Field Component > Clear Button > Generic accessibility label" }, + "icu:AxoBadge.MaxOverflow": { + "messageformat": "{max, number}+", + "description": "Axo Design System > Badge Component > When numeric value is greater than max (Ex: 99 -> '99', 100 -> '99+')" + }, "icu:AddUserToAnotherGroupModal__title": { "messageformat": "Add to a group", "description": "Shown as the title of the dialog that allows you to add a contact to an group" @@ -435,6 +439,10 @@ "messageformat": "{maxCount, number}+", "description": "Left Pane > Inbox > Chat List > Chat Folders > Item > Badge Count > When over the max count (Example: 1000 or more would be 999+)" }, + "icu:LeftPaneChatFolders__ItemUnreadBadge__AccessibleLabel": { + "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", + "description": "Left Pane > Inbox > Chat List > Chat Folders > Item > Badge Count > Accessible Label" + }, "icu:LeftPaneChatFolders__Item__ContextMenu__MarkAllRead": { "messageformat": "Mark all read", "description": "Left Pane > Inbox > Chat List > Chat Folders > Item > Right-Click Context Menu > Mark all unread chats in chat folder as read" diff --git a/ts/axo/AxoBadge.dom.stories.tsx b/ts/axo/AxoBadge.dom.stories.tsx index 36a2dc53ea..2f259df64c 100644 --- a/ts/axo/AxoBadge.dom.stories.tsx +++ b/ts/axo/AxoBadge.dom.stories.tsx @@ -3,56 +3,95 @@ import type { JSX } from 'react'; import type { Meta } from '@storybook/react'; -import { ExperimentalAxoBadge } from './AxoBadge.dom.tsx'; +import { AxoBadge } from './AxoBadge.dom.tsx'; import { tw } from './tw.dom.tsx'; export default { - title: 'Axo/AriaBadge (Experimental)', + title: 'Axo/AxoBadge', } satisfies Meta; -export function All(): JSX.Element { - const values: ReadonlyArray = [ - -1, - 0, - 1, - 10, - 123, - 1234, - 12345, - 'mention', - 'unread', - ]; - +function Template(props: Partial) { return ( - - - - {values.map(value => { - return ; - })} - - - {ExperimentalAxoBadge._getAllSizes().map(size => { - return ( - - - {values.map(value => { - return ( - - ); - })} - - ); - })} - -
size{value}
{size} - -
+ + ); +} + +export function Basic(): JSX.Element { + return