An open source design system that's fully customizable and agent ready
TypeScript
docs: add ToggleButton docs, Chat translations, fix Storybook @example blocks (#1216)
Joey0cf1de8b18bb
diff --git a/packages/core/src/Chat/Chat.doc.mjs b/packages/core/src/Chat/Chat.doc.mjsindex c9eb064886..f07ed6e259 100644--- a/packages/core/src/Chat/Chat.doc.mjs+++ b/packages/core/src/Chat/Chat.doc.mjs@@ -171,3 +171,238 @@ export const docs = {},],};++/** @type {import('../docs-types').TranslationDoc} */+export const docsZh = {+ description:+ 'AI 聊天界面组件。布局(MessageList、Message、Bubble、SystemMessage)+ 编写器(Composer、ComposerInput 触发菜单、ComposerAttachments)。',+ features: [+ '组合模型 — MessageList > Message > Bubble',+ '根据发送者自动调整样式(user、assistant、system),通过上下文传递',+ '自动滚动,带有"新消息"指示器',+ '通过 onScrollToTopAction 和 useTransition 实现无限滚动',+ '密度变体:compact、balanced、spacious(通过上下文传递)',+ '系统消息,可选分割线变体用于日期分隔',+ '自由子元素 — 并非所有内容都需要气泡包裹',+ '时间戳显示:悬停或标题',+ '消息状态指示器(sending、sent、delivered、read、error)',+ 'role="log" 配合 aria-live="polite" 实现无障碍访问',+ '编写器布局外壳,具有命名语义插槽',+ 'ContentEditable 输入框,支持 @ 提及和 / 命令触发菜单',+ 'XDSSearchSource 集成 — 复用 Typeahead 搜索源',+ '同心圆角 — 内部元素跟随外部外壳曲率',+ '通过 --composer-radius 和 --composer-padding CSS 变量实现主题化',+ ],+ components: [+ {+ name: 'XDSChatMessageList',+ description: '可滚动的消息容器,支持自动滚动和无限滚动。',+ propDescriptions: {+ children: '消息元素,通常是 XDSChatMessage 或 XDSChatSystemMessage。',+ hasAutoScroll: '在接近底部时,新内容触发自动滚动到底部。',+ scrollThreshold: '距底部的距离(像素),在此范围内新内容触发自动滚动。',+ emptyState: '列表无消息时显示的内容。',+ onScrollToTopAction: '用户滚动到顶部时触发的异步操作。用于加载更早的消息。',+ density: '视觉密度,通过上下文传递给子消息。',+ },+ },+ {+ name: 'XDSChatMessage',+ description: '发送者上下文包装器,根据发送者角色处理头像、名称和对齐方式。',+ propDescriptions: {+ sender: '消息发送者,控制对齐和布局。',+ children: '自由内容:气泡、资源列表、工具调用、图片。',+ avatar: '消息旁边渲染的头像元素。通常是 XDSAvatar。',+ name: '内容上方显示的发送者名称。',+ density: '视觉密度。未设置时从列表上下文继承。',+ },+ },+ {+ name: 'XDSChatMessageBubble',+ description: '样式化的气泡容器,从父上下文读取发送者信息进行自动样式化。',+ propDescriptions: {+ children: '气泡内容:文本、XDSMarkdown 或任何 ReactNode。',+ timestamp: '气泡的时间戳。Date 类型自动格式化。',+ timestampDisplay: '时间戳的显示方式。',+ footer: '气泡下方的页脚,用于反应、操作、已读回执。',+ status: '消息状态指示器。仅对用户消息渲染。',+ },+ },+ {+ name: 'XDSChatSystemMessage',+ description: '居中的系统/通知消息,用于日期分隔、状态更新和非发送者内容。',+ propDescriptions: {+ children: '系统消息内容。',+ variant: '视觉变体。divider 在两侧添加水平线。',+ icon: '文本前渲染的图标。',+ timestamp: '文本后显示的时间戳。',+ },+ },+ {+ name: 'XDSChatComposer',+ description: '聊天编写器布局外壳。排列命名插槽(附件、工具栏、输入、页脚、发送),带有页面圆角容器和同心内圆角。',+ propDescriptions: {+ onSubmit: '用户提交消息时调用。',+ onStop: '用户请求停止生成时调用。',+ isStreaming: '助手是否正在流式输出。',+ value: '受控输入值。',+ onChange: '受控模式的变更处理器。',+ placeholder: '占位文本。',+ isDisabled: '禁用编写器。',+ density: '视觉密度。',+ attachments: '插槽:输入上方的附件标签。使用 XDSChatComposerAttachments。',+ contextToolbar: '插槽:附件和输入之间的工具栏。使用 XDSToolbar。',+ input: '插槽:自定义输入元素。替换默认文本区域。使用 XDSChatComposerInput 实现触发菜单。',+ footerActions: '插槽:左对齐的页脚操作(模型选择器等)。',+ sendActions: '插槽:发送按钮左侧的操作。',+ sendButton: '插槽:自定义发送按钮。替换默认的发送/停止按钮。',+ status: '编写器下方(或上方)的状态消息。',+ statusPosition: '状态渲染位置。',+ },+ },+ {+ name: 'XDSChatComposerInput',+ description: '基于 ContentEditable 的富文本输入,支持触发菜单(@ 提及、/ 命令)、内联标记、序列化、消息历史和粘贴/拖放文件处理。',+ propDescriptions: {+ ref: '根元素的引用。',+ value: '受控值。',+ onChange: '变更处理器。',+ placeholder: '占位文本。',+ maxRows: '滚动前的最大行数。',+ triggers: '菜单的触发定义。每个触发器有 character、searchSource 和 onSelect。',+ debounceMs: '异步搜索源的去抖动延迟。',+ hasHistory: '启用 ArrowUp/Down 消息回溯。',+ label: '无障碍标签。',+ isDisabled: '禁用状态。',+ onPaste: '粘贴处理器。',+ onFiles: '文件拖放/粘贴处理器。',+ onSubmit: '提交处理器(不按 Shift 的 Enter)。',+ },+ },+ {+ name: 'XDSChatComposerAttachments',+ description: '编写器内附件项目的弹性换行容器。',+ propDescriptions: {+ children: '要渲染的附件项目。',+ count: '附件总数。超过可见子元素时显示折叠/展开切换。',+ },+ },+ ],+};++/** @type {import('../docs-types').TranslationDoc} */+export const docsDense = {+ description: 'AI chat components. Layout (MessageList>Message>Bubble+SystemMessage) + Composer (shell w/ slots, ContentEditable input w/ trigger menus, attachments)',+ features: [+ 'composition: MessageList > Message > Bubble',+ 'sender-aware styling (user/assistant/system) via context',+ 'auto-scroll w/ "New messages" indicator',+ 'infinite scroll via onScrollToTopAction w/ useTransition',+ 'density: compact/balanced/spacious (flows via context)',+ 'system msgs w/ optional divider variant for date separators',+ 'free-form children; not all content needs bubble',+ 'timestamp: hover or header display',+ 'msg status indicators (sending/sent/delivered/read/error)',+ 'role="log" + aria-live="polite" for a11y',+ 'composer layout shell w/ named semantic slots',+ 'ContentEditable input w/ @ mention + / command trigger menus',+ 'XDSSearchSource integration; reuses Typeahead search sources',+ 'concentric radius; inner elements follow outer shell curvature',+ 'themeable via --composer-radius + --composer-padding CSS vars',+ ],+ components: [+ {+ name: 'XDSChatMessageList',+ description: 'scrollable msg container w/ auto-scroll + infinite scroll',+ propDescriptions: {+ children: 'msg elements (XDSChatMessage or XDSChatSystemMessage)',+ hasAutoScroll: 'auto-scroll to bottom on new content near bottom',+ scrollThreshold: 'px from bottom to trigger auto-scroll',+ emptyState: 'content when no msgs',+ onScrollToTopAction: 'async action at scroll top; load older msgs',+ density: 'visual density; flows to children via context',+ },+ },+ {+ name: 'XDSChatMessage',+ description: 'sender context wrapper; handles avatar+name+alignment by sender role',+ propDescriptions: {+ sender: 'who sent; controls alignment+layout',+ children: 'free-form: bubbles, assets, tool calls, images',+ avatar: 'avatar element beside msg; typically XDSAvatar',+ name: 'sender name above content',+ density: 'visual density; inherited from list context if unset',+ },+ },+ {+ name: 'XDSChatMessageBubble',+ description: 'styled bubble container; reads sender from context for auto-styling',+ propDescriptions: {+ children: 'bubble content: text, XDSMarkdown, any ReactNode',+ timestamp: 'bubble timestamp; Date auto-formatted',+ timestampDisplay: 'timestamp display mode',+ footer: 'footer below bubble for reactions+actions+read receipts',+ status: 'msg status indicator; only for user msgs',+ },+ },+ {+ name: 'XDSChatSystemMessage',+ description: 'centered system/notice msg for date separators+status updates',+ propDescriptions: {+ children: 'system msg content',+ variant: 'visual variant; divider adds horizontal lines',+ icon: 'icon before text',+ timestamp: 'timestamp after text',+ },+ },+ {+ name: 'XDSChatComposer',+ description: 'composer layout shell; named slots (attachments/toolbar/input/footer/send) w/ page-radius + concentric inner radius',+ propDescriptions: {+ onSubmit: 'submit msg handler',+ onStop: 'stop generation handler',+ isStreaming: 'assistant streaming state',+ value: 'controlled input value',+ onChange: 'controlled change handler',+ placeholder: 'placeholder text',+ isDisabled: 'disabled state',+ density: 'visual density',+ attachments: 'slot: attachment chips above input; use XDSChatComposerAttachments',+ contextToolbar: 'slot: toolbar between attachments+input; use XDSToolbar',+ input: 'slot: custom input; replaces default textarea; use XDSChatComposerInput for triggers',+ footerActions: 'slot: left footer actions (model selector etc)',+ sendActions: 'slot: actions left of send btn',+ sendButton: 'slot: custom send btn; replaces default',+ status: 'status msg below/above composer',+ statusPosition: 'status render position',+ },+ },+ {+ name: 'XDSChatComposerInput',+ description: 'ContentEditable rich input w/ trigger menus (@/commands), inline tokens, serialization, msg history, paste/drop files',+ propDescriptions: {+ ref: 'root element ref',+ value: 'controlled value',+ onChange: 'change handler',+ placeholder: 'placeholder text',+ maxRows: 'max rows before scrolling',+ triggers: 'trigger defs for menus; each has character+searchSource+onSelect',+ debounceMs: 'debounce for async search sources',+ hasHistory: 'ArrowUp/Down msg recall',+ label: 'a11y label',+ isDisabled: 'disabled state',+ onPaste: 'paste handler',+ onFiles: 'file drop/paste handler',+ onSubmit: 'submit handler (Enter w/o Shift)',+ },+ },+ {+ name: 'XDSChatComposerAttachments',+ description: 'flex-wrap container for attachment items in composer',+ propDescriptions: {+ children: 'attachment items to render',+ count: 'total count; shows collapse/expand when exceeds visible',+ },+ },+ ],+};diff --git a/packages/core/src/Chat/XDSChatComposerInput.tsx b/packages/core/src/Chat/XDSChatComposerInput.tsxindex 5aa6321237..3ea3a4a887 100644--- a/packages/core/src/Chat/XDSChatComposerInput.tsx+++ b/packages/core/src/Chat/XDSChatComposerInput.tsx@@ -89,7 +89,6 @@ export type XDSChatComposerTrigger = {* @example* ```* import {createStaticSource} from '@xds/core/Typeahead';- ** const mentionTrigger = {* character: '@',* searchSource: createStaticSource(users),@@ -196,14 +195,12 @@ const styles = stylex.create({opacity: 0.5,pointerEvents: 'none' as const,},-});// =============================================================================// Helpers// =============================================================================-/** Type guard: does this token use the custom render path? */function isCustomToken(token: XDSChatComposerToken,diff --git a/packages/core/src/ToggleButton/ToggleButton.doc.mjs b/packages/core/src/ToggleButton/ToggleButton.doc.mjsnew file mode 100644index 0000000000..fb47f8514f--- /dev/null+++ b/packages/core/src/ToggleButton/ToggleButton.doc.mjs@@ -0,0 +1,242 @@+/** @type {import('../docs-types').ComponentDoc} */++export const docs = {+ name: 'ToggleButton',+ description:+ 'A button that toggles between pressed and unpressed states, with optional icon swap and group integration for single or multi-select behavior.',+ keywords: ["toggle","togglebutton","pressed","toolbar","formatting","segmented","button-group","exclusive","multi-select"],+ features: [+ 'Controlled toggle via isPressed/onPressedChange',+ 'Icon swap between pressed and unpressed states via pressedIcon',+ 'Font weight emphasis on press with width reservation to prevent layout shift',+ 'Async action support via onPressedChangeAction with loading spinner',+ 'Group integration via XDSToggleButtonGroup for single or multi-select',+ 'Discriminated union on type: single (string | null) or multiple (string[])',+ 'Horizontal and vertical group orientation',+ 'Built on XDSButton with all its size, disabled, and tooltip support',+ ],+ theming: {+ targets: [+ {className: 'xds-toggle-button-group'},+ ],+ },+ accessibility: [+ 'Uses aria-pressed on the toggle button for screen reader state announcement.',+ 'Group uses role="group" with aria-label from the label prop.',+ ],+ keyboard: 'Space/Enter toggles pressed state; Tab moves between buttons in a group',+ examples: [+ {+ label: 'Icon-only toggle',+ code: `const [isBold, setIsBold] = useState(false);+<XDSToggleButton+ label="Bold"+ icon={<BoldIcon />}+ isPressed={isBold}+ onPressedChange={setIsBold}+/>`,+ },+ {+ label: 'Icon swap on press',+ code: `<XDSToggleButton+ label="Favorite"+ icon={<StarIcon />}+ pressedIcon={<StarIconSolid />}+ isPressed={isFavorited}+ onPressedChange={setIsFavorited}+/>`,+ },+ {+ label: 'Single-select group',+ code: `const [view, setView] = useState<string | null>('grid');+<XDSToggleButtonGroup value={view} onChange={setView} label="View mode">+ <XDSToggleButton value="list" label="List" icon={<ListIcon />} />+ <XDSToggleButton value="grid" label="Grid" icon={<GridIcon />} />+</XDSToggleButtonGroup>`,+ },+ {+ label: 'Multi-select group',+ code: `const [formats, setFormats] = useState<string[]>([]);+<XDSToggleButtonGroup+ type="multiple"+ value={formats}+ onChange={setFormats}+ label="Formatting">+ <XDSToggleButton value="bold" label="Bold" icon={<BoldIcon />} />+ <XDSToggleButton value="italic" label="Italic" icon={<ItalicIcon />} />+</XDSToggleButtonGroup>`,+ },+ ],+ components: [+ {+ name: 'XDSToggleButton',+ description: 'A button that toggles between pressed and unpressed states. Thin wrapper over XDSButton with controlled toggle pattern, icon swap, and font weight emphasis.',+ props: [+ {name: 'label', type: 'string', description: 'Accessible label for the button. Used as visible text, or as aria-label for icon-only buttons.', required: true},+ {name: 'isPressed', type: 'boolean', description: 'Whether the button is currently pressed. Ignored when inside a group.'},+ {name: 'onPressedChange', type: '(isPressed: boolean) => void', description: 'Called when pressed state should change. Ignored when inside a group.'},+ {name: 'onPressedChangeAction', type: '(isPressed: boolean) => Promise<void>', description: 'Async action handler for API-backed toggles. Shows loading spinner while pending.'},+ {name: 'size', type: "'sm' | 'md' | 'lg'", description: 'Button size. Defaults to group size when inside a group.', default: "'md'"},+ {name: 'isDisabled', type: 'boolean', description: 'Whether the button is disabled.', default: 'false'},+ {name: 'isLoading', type: 'boolean', description: 'Whether the button shows a loading spinner.', default: 'false'},+ {name: 'icon', type: 'ReactNode', description: 'Icon element. When provided without children, button becomes icon-only with tooltip from label.'},+ {name: 'pressedIcon', type: 'ReactNode', description: 'Icon shown when pressed. Falls back to icon if not provided.'},+ {name: 'children', type: 'ReactNode', description: 'Visible content. If omitted with icon, button becomes icon-only.'},+ {name: 'tooltip', type: 'string', description: 'Tooltip text shown on hover.'},+ {name: 'value', type: 'string', description: 'Value identifier when used inside XDSToggleButtonGroup. Required in groups.'},+ {name: 'data-testid', type: 'string', description: 'Test selector for automated testing frameworks.'},+ ],+ examples: [+ {+ label: 'Basic toggle',+ code: `<XDSToggleButton+ label="Bold"+ icon={<BoldIcon />}+ isPressed={isBold}+ onPressedChange={setIsBold}+/>`,+ },+ ],+ },+ {+ name: 'XDSToggleButtonGroup',+ description: 'Groups toggle buttons for exclusive (single) or multi-select behavior. Uses discriminated union on type for type-safe value/onChange.',+ props: [+ {name: 'children', type: 'ReactNode', description: 'XDSToggleButton children.', required: true},+ {name: 'label', type: 'string', description: 'Accessible label for the group (aria-label).', required: true},+ {name: 'type', type: "'single' | 'multiple'", description: 'Selection mode. Single allows one active button, multiple allows many.', default: "'single'"},+ {name: 'value', type: 'string | null | string[]', description: 'Currently selected value(s). Type depends on selection mode.', required: true},+ {name: 'onChange', type: '(value: string | null | string[]) => void', description: 'Called when selection changes.', required: true},+ {name: 'orientation', type: "'horizontal' | 'vertical'", description: 'Layout direction of the button group.', default: "'horizontal'"},+ {name: 'size', type: "'sm' | 'md' | 'lg'", description: 'Default size for buttons in the group. Individual buttons can override.', default: "'md'"},+ {name: 'isDisabled', type: 'boolean', description: 'Whether all buttons in the group are disabled.', default: 'false'},+ {name: 'xstyle', type: 'StyleXStyles', description: 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value.'},+ {name: 'data-testid', type: 'string', description: 'Test selector for automated testing frameworks.'},+ ],+ examples: [+ {+ label: 'Single-select',+ code: `<XDSToggleButtonGroup value={view} onChange={setView} label="View mode">+ <XDSToggleButton value="list" label="List" icon={<ListIcon />} />+ <XDSToggleButton value="grid" label="Grid" icon={<GridIcon />} />+</XDSToggleButtonGroup>`,+ },+ ],+ },+ ],+};++/** @type {import('../docs-types').TranslationDoc} */+export const docsZh = {+ description:+ '在按下和未按下状态之间切换的按钮,支持图标切换和分组集成,用于单选或多选行为。',+ features: [+ '通过 isPressed/onPressedChange 实现受控切换',+ '通过 pressedIcon 在按下和未按下状态之间切换图标',+ '按下时字重加粗,并预留宽度防止布局偏移',+ '通过 onPressedChangeAction 支持异步操作,显示加载动画',+ '通过 XDSToggleButtonGroup 实现分组集成,支持单选或多选',+ 'type 判别联合类型:single (string | null) 或 multiple (string[])',+ '支持水平和垂直方向的分组布局',+ '基于 XDSButton 构建,继承其尺寸、禁用和提示功能',+ ],+ accessibility: [+ '使用 aria-pressed 向屏幕阅读器宣告切换按钮状态。',+ '分组使用 role="group" 并通过 label 属性设置 aria-label。',+ ],+ keyboard: 'Space/Enter 切换按下状态;Tab 在分组中的按钮间移动焦点',+ components: [+ {+ name: 'XDSToggleButton',+ description: '在按下和未按下状态之间切换的按钮。XDSButton 的轻量封装,添加受控切换模式、图标切换和字重加粗。',+ propDescriptions: {+ label: '按钮的无障碍标签。作为可见文本或仅图标按钮的 aria-label。',+ isPressed: '按钮是否处于按下状态。在分组内时被忽略。',+ onPressedChange: '按下状态变更时的回调。在分组内时被忽略。',+ onPressedChangeAction: 'API 调用的异步操作处理器。等待期间显示加载动画。',+ size: '按钮尺寸。在分组内时默认使用分组尺寸。',+ isDisabled: '按钮是否禁用。',+ isLoading: '按钮是否显示加载动画。',+ icon: '图标元素。无 children 时按钮变为仅图标模式。',+ pressedIcon: '按下时显示的图标。未提供时回退到 icon。',+ children: '可见内容。与 icon 同时省略时按钮变为仅图标模式。',+ tooltip: '悬停时显示的提示文本。',+ value: '在 XDSToggleButtonGroup 内使用的值标识符。',+ 'data-testid': '自动化测试的选择器。',+ },+ },+ {+ name: 'XDSToggleButtonGroup',+ description: '将切换按钮分组,支持单选或多选行为。通过 type 判别联合类型实现类型安全。',+ propDescriptions: {+ children: 'XDSToggleButton 子元素。',+ label: '分组的无障碍标签 (aria-label)。',+ type: '选择模式。single 允许单个激活,multiple 允许多个。',+ value: '当前选中的值。类型取决于选择模式。',+ onChange: '选择变更时的回调。',+ orientation: '按钮组的布局方向。',+ size: '分组内按钮的默认尺寸。单个按钮可覆盖。',+ isDisabled: '分组内所有按钮是否禁用。',+ xstyle: 'StyleX 样式,用于布局自定义。必须是 stylex.create() 的值。',+ 'data-testid': '自动化测试的选择器。',+ },+ },+ ],+};++/** @type {import('../docs-types').TranslationDoc} */+export const docsDense = {+ description: 'toggle btn w/ pressed/unpressed states, icon swap, group integration for single/multi-select',+ features: [+ 'controlled toggle via isPressed/onPressedChange',+ 'icon swap pressed/unpressed via pressedIcon',+ 'font weight emphasis on press w/ width reservation (no layout shift)',+ 'async action via onPressedChangeAction w/ loading spinner',+ 'group integration via XDSToggleButtonGroup for single/multi-select',+ 'discriminated union on type: single (string|null) or multiple (string[])',+ 'horizontal+vertical group orientation',+ 'built on XDSButton w/ size, disabled, tooltip support',+ ],+ accessibility: [+ 'aria-pressed on toggle btn for screen reader state',+ 'group uses role="group" w/ aria-label from label prop',+ ],+ keyboard: 'Space/Enter toggles; Tab moves between btns in group',+ components: [+ {+ name: 'XDSToggleButton',+ description: 'toggle btn w/ controlled pattern, icon swap, font weight emphasis; wraps XDSButton',+ propDescriptions: {+ label: 'a11y label; visible text or aria-label for icon-only',+ isPressed: 'pressed state; ignored in group',+ onPressedChange: 'pressed state change cb; ignored in group',+ onPressedChangeAction: 'async toggle handler w/ loading spinner',+ size: 'btn size; defaults to group size in group',+ isDisabled: 'disabled state',+ isLoading: 'shows loading spinner',+ icon: 'icon element; icon-only mode w/o children',+ pressedIcon: 'pressed icon; falls back to icon',+ children: 'visible content; omit w/ icon for icon-only',+ tooltip: 'hover tooltip text',+ value: 'value id for group usage',+ 'data-testid': 'test selector',+ },+ },+ {+ name: 'XDSToggleButtonGroup',+ description: 'groups toggle btns for exclusive/multi-select; discriminated union on type',+ propDescriptions: {+ children: 'XDSToggleButton children',+ label: 'a11y label (aria-label)',+ type: 'selection mode: single or multiple',+ value: 'selected value(s); type depends on mode',+ onChange: 'selection change cb',+ orientation: 'layout direction',+ size: 'default btn size; individual btns override',+ isDisabled: 'all btns disabled',+ xstyle: 'StyleX layout styles; must be stylex.create() value',+ 'data-testid': 'test selector',+ },+ },+ ],+};diff --git a/packages/core/src/ToggleButton/XDSToggleButton.tsx b/packages/core/src/ToggleButton/XDSToggleButton.tsxindex 94d1c473c3..db589afccb 100644--- a/packages/core/src/ToggleButton/XDSToggleButton.tsx+++ b/packages/core/src/ToggleButton/XDSToggleButton.tsx@@ -180,7 +180,6 @@ export interface XDSToggleButtonProps {** @example* ```- * // Icon-only toggle (toolbar)* const [isBold, setIsBold] = useState(false);* <XDSToggleButton* label="Bold"@@ -188,15 +187,6 @@ export interface XDSToggleButtonProps {* isPressed={isBold}* onPressedChange={setIsBold}* />- *- * // Favorite with icon swap- * <XDSToggleButton- * label="Favorite"- * icon={<StarIcon />}- * pressedIcon={<StarIconSolid />}- * isPressed={isFavorited}- * onPressedChange={setIsFavorited}- * />* ```*/export function XDSToggleButton({diff --git a/packages/core/src/ToggleButton/XDSToggleButtonGroup.tsx b/packages/core/src/ToggleButton/XDSToggleButtonGroup.tsxindex dd80009e2b..af6455ca74 100644--- a/packages/core/src/ToggleButton/XDSToggleButtonGroup.tsx+++ b/packages/core/src/ToggleButton/XDSToggleButtonGroup.tsx@@ -161,24 +161,11 @@ export type XDSToggleButtonGroupProps =** @example* ```- * // Exclusive: view mode switcher* const [view, setView] = useState<string | null>('grid');* <XDSToggleButtonGroup value={view} onChange={setView} label="View mode">* <XDSToggleButton value="list" label="List" icon={<ListIcon />} />* <XDSToggleButton value="grid" label="Grid" icon={<GridIcon />} />* </XDSToggleButtonGroup>- *- * // Multi-select: text formatting- * const [formats, setFormats] = useState<string[]>([]);- * <XDSToggleButtonGroup- * type="multiple"- * value={formats}- * onChange={setFormats}- * label="Formatting"- * >- * <XDSToggleButton value="bold" label="Bold" icon={<BoldIcon />} />- * <XDSToggleButton value="italic" label="Italic" icon={<ItalicIcon />} />- * </XDSToggleButtonGroup>* ```*/export function XDSToggleButtonGroup(