An open source design system that's fully customizable and agent ready
TypeScript
feat: graduate XDSCodeBlock + XDSCode to core (#1122)
Cindy Zhang5431c4579d76
diff --git a/apps/storybook/stories/Code.stories.tsx b/apps/storybook/stories/Code.stories.tsxnew file mode 100644index 0000000000..f1e8e8ef3f--- /dev/null+++ b/apps/storybook/stories/Code.stories.tsx@@ -0,0 +1,113 @@+import type {Meta, StoryObj} from '@storybook/react';+import {XDSCode} from '@xds/core/CodeBlock';+import {XDSText} from '@xds/core/Text';+import {XDSStack} from '@xds/core/Stack';+import {XDSLink} from '@xds/core/Link';++const meta: Meta<typeof XDSCode> = {+ title: 'Components/XDSCode',+ component: XDSCode,+ tags: ['autodocs'],+ argTypes: {+ children: {+ control: 'text',+ description: 'Code content',+ },+ },+};++export default meta;+type Story = StoryObj<typeof XDSCode>;++export const Default: Story = {+ args: {+ children: 'const x = 1',+ },+};++export const InParagraph: Story = {+ name: 'Inline in paragraph',+ render: () => (+ <XDSText type="body">+ Use <XDSCode>useState</XDSCode> for local state and{' '}+ <XDSCode>useEffect</XDSCode> for side effects. If you need shared state+ across components, consider <XDSCode>useContext</XDSCode> or a state+ management library.+ </XDSText>+ ),+};++export const InstructionalParagraph: Story = {+ name: 'Instructional text',+ render: () => (+ <XDSStack gap="md">+ <XDSText type="body">+ Install the package with <XDSCode>npm install @xds/core</XDSCode>, then+ import the component:+ </XDSText>+ <XDSText type="body">+ Add <XDSCode>{'<XDSButton label="Save">Save</XDSButton>'}</XDSCode> to+ your JSX. The <XDSCode>label</XDSCode> prop is required for+ accessibility.+ </XDSText>+ </XDSStack>+ ),+};++export const MixedInline: Story = {+ name: 'Mixed with links and emphasis',+ render: () => (+ <XDSText type="body">+ The <XDSCode>XDSThemeProvider</XDSCode> component wraps your app and+ supplies design tokens. See the{' '}+ <XDSLink label="theme docs" href="/docs/theme" isExternalLink={false}>+ theme docs+ </XDSLink>{' '}+ for setup. Set <XDSCode>colorScheme="dark"</XDSCode> to enable+ dark mode.+ </XDSText>+ ),+};++export const VariousContent: Story = {+ name: 'Various code content',+ render: () => (+ <XDSStack gap="sm">+ <XDSText type="body">+ Variable: <XDSCode>const count = 0</XDSCode>+ </XDSText>+ <XDSText type="body">+ Terminal: <XDSCode>yarn build --watch</XDSCode>+ </XDSText>+ <XDSText type="body">+ CSS property: <XDSCode>border-radius: 8px</XDSCode>+ </XDSText>+ <XDSText type="body">+ File path: <XDSCode>packages/core/src/CodeBlock/XDSCode.tsx</XDSCode>+ </XDSText>+ <XDSText type="body">+ Keyboard shortcut: <XDSCode>Ctrl+Shift+P</XDSCode>+ </XDSText>+ </XDSStack>+ ),+};++export const TextSizes: Story = {+ name: 'Across text sizes',+ render: () => (+ <XDSStack gap="sm">+ <XDSText type="heading3">+ Heading with <XDSCode>inline code</XDSCode>+ </XDSText>+ <XDSText type="body">+ Body text with <XDSCode>inline code</XDSCode>+ </XDSText>+ <XDSText type="detail">+ Detail text with <XDSCode>inline code</XDSCode>+ </XDSText>+ <XDSText type="label">+ Label text with <XDSCode>inline code</XDSCode>+ </XDSText>+ </XDSStack>+ ),+};diff --git a/apps/storybook/stories/CodeBlock.stories.tsx b/apps/storybook/stories/CodeBlock.stories.tsxindex 19cc9f5cff..d55291bebb 100644--- a/apps/storybook/stories/CodeBlock.stories.tsx+++ b/apps/storybook/stories/CodeBlock.stories.tsx@@ -1,8 +1,8 @@import type {Meta, StoryObj} from '@storybook/react';-import {XDSCodeBlock} from '@xds/lab';+import {XDSCodeBlock} from '@xds/core/CodeBlock';const meta: Meta<typeof XDSCodeBlock> = {- title: 'Lab/XDSCodeBlock',+ title: 'Components/XDSCodeBlock',component: XDSCodeBlock,tags: ['autodocs'],argTypes: {diff --git a/packages/core/package.json b/packages/core/package.jsonindex f7a40e5a7b..9e7f1adfb0 100644--- a/packages/core/package.json+++ b/packages/core/package.json@@ -94,6 +94,12 @@"import": "./dist/CheckboxInput/index.mjs","require": "./dist/CheckboxInput/index.js"},+ "./CodeBlock": {+ "source": "./src/CodeBlock/index.ts",+ "types": "./dist/CodeBlock/index.d.ts",+ "import": "./dist/CodeBlock/index.mjs",+ "require": "./dist/CodeBlock/index.js"+ },"./Collapsible": {"source": "./src/Collapsible/index.ts","types": "./dist/Collapsible/index.d.ts",diff --git a/packages/core/src/CodeBlock/XDSCode.tsx b/packages/core/src/CodeBlock/XDSCode.tsxnew file mode 100644index 0000000000..80e35a9e0c--- /dev/null+++ b/packages/core/src/CodeBlock/XDSCode.tsx@@ -0,0 +1,91 @@+'use client';++/**+ * @file XDSCode.tsx+ * @input Uses React, StyleX, theme tokens+ * @output Exports XDSCode component for inline code styling+ * @position Core implementation; inline code display+ *+ * SYNC: When modified, update:+ * - /packages/core/src/CodeBlock/index.ts (exports if types change)+ */++import {type ReactNode} from 'react';+import * as stylex from '@stylexjs/stylex';+import type {StyleXStyles} from '@stylexjs/stylex';+import {+ colorVars,+ spacingVars,+ radiusVars,+ typographyVars,+ typeScaleVars,+} from '../theme/tokens.stylex';+import {xdsClassName, mergeProps} from '../utils';++const styles = stylex.create({+ base: {+ fontFamily: typographyVars['--font-family-code'],+ fontSize: typeScaleVars['--text-code-size'],+ lineHeight: 'inherit',+ backgroundColor: colorVars['--color-background-muted'],+ paddingInline: spacingVars['--spacing-1'],+ paddingBlock: spacingVars['--spacing-0'],+ borderRadius: radiusVars['--radius-inner'],+ // Prevent code from breaking parent layout+ overflowWrap: 'break-word',+ wordBreak: 'break-word',+ },+});++export interface XDSCodeProps {+ /** Ref forwarded to the root element */+ ref?: React.Ref<HTMLElement>;+ /** Code content */+ children: ReactNode;+ /** StyleX override styles */+ xstyle?: StyleXStyles;+ /** CSS class name(s) */+ className?: string;+ /** Inline styles */+ style?: React.CSSProperties;+ 'data-testid'?: string;+}++/**+ * Inline code element. Renders a styled `<code>` with monospace font,+ * muted background, and design-system-consistent sizing.+ *+ * For fenced code blocks with syntax highlighting, use `XDSCodeBlock`.+ *+ * @example+ * ```+ * <XDSText type="body">+ * Use <XDSCode>const x = 1</XDSCode> to declare a variable.+ * </XDSText>+ * ```+ */+export function XDSCode({+ children,+ xstyle,+ className,+ style,+ ref,+ ...props+}: XDSCodeProps) {+ return (+ <code+ ref={ref}+ {...mergeProps(+ xdsClassName('code'),+ stylex.props(styles.base, xstyle),+ className,+ style,+ )}+ data-testid={props['data-testid']}+ >+ {children}+ </code>+ );+}++XDSCode.displayName = 'XDSCode';diff --git a/packages/lab/src/CodeBlock/XDSCodeBlock.tsx b/packages/core/src/CodeBlock/XDSCodeBlock.tsxsimilarity index 90%rename from packages/lab/src/CodeBlock/XDSCodeBlock.tsxrename to packages/core/src/CodeBlock/XDSCodeBlock.tsxindex 7dc5744dad..5421a51c7d 100644--- a/packages/lab/src/CodeBlock/XDSCodeBlock.tsx+++ b/packages/core/src/CodeBlock/XDSCodeBlock.tsx@@ -5,9 +5,9 @@* @position Core implementation; read-only syntax-highlighted code display** SYNC: When modified, update:- * - /packages/lab/src/CodeBlock/index.ts (exports if types change)- * - /packages/lab/src/CodeBlock/tokenizer.ts (shared tokenizer)- * - /packages/lab/src/CodeBlock/highlightStyles.ts (::highlight rules)+ * - /packages/core/src/CodeBlock/index.ts (exports if types change)+ * - /packages/core/src/CodeBlock/tokenizer.ts (shared tokenizer)+ * - /packages/core/src/CodeBlock/highlightStyles.ts (::highlight rules)*/'use client';@@ -15,12 +15,13 @@import {useLayoutEffect,useEffect,+ useId,useRef,useState,useCallback,useMemo,} from 'react';-import type {XDSBaseProps} from '@xds/core/XDSBaseProps';+import type {XDSBaseProps} from '../XDSBaseProps';import * as stylex from '@stylexjs/stylex';import {colorVars,@@ -31,8 +32,8 @@ import {fontWeightVars,typeScaleVars,borderVars,-} from '@xds/core/theme/tokens.stylex';-import {xdsClassName, mergeProps} from '@xds/core/utils';+} from '../theme/tokens.stylex';+import {xdsClassName, mergeProps} from '../utils';import {tokenize, tokenizeAsync, SYNC_TOKENIZE_THRESHOLD} from './tokenizer';import type {Token} from './tokenizer';import {ensureHighlightStyles, TOKEN_TYPES} from './highlightStyles';@@ -116,7 +117,6 @@ const styles = stylex.create({backgroundColor: colorVars['--color-accent-muted'],marginInline: `calc(-1 * ${spacingVars['--spacing-4']})`,paddingInline: spacingVars['--spacing-4'],- borderLeft: `2px solid ${colorVars['--color-accent']}`,},sizeSm: {fontSize: textSizeVars['--font-size-sm'],@@ -137,13 +137,13 @@ const styles = stylex.create({padding: spacingVars['--spacing-1'],border: 'none',borderRadius: radiusVars['--radius-inner'],- backgroundColor: 'transparent',+ backgroundColor: {+ default: 'transparent',+ ':hover': colorVars['--color-overlay-hover'],+ },color: colorVars['--color-text-secondary'],cursor: 'pointer',- fontFamily: typographyVars['--font-family-code'],- fontSize: textSizeVars['--font-size-sm'],- lineHeight: '1',- transition: 'background-color 0.15s ease, color 0.15s ease',+ lineHeight: 0,},copyButtonAbsolute: {position: 'absolute',@@ -165,6 +165,11 @@ export interface XDSCodeBlockProps extends XDSBaseProps<HTMLPreElement> {language?: string;/** Filename/label in header bar */title?: string;+ /**+ * Show the language name in the header bar.+ * @default true+ */+ hasLanguageLabel?: boolean;/** Show line number gutter. @default false */hasLineNumbers?: boolean;/** 1-indexed lines to highlight. */@@ -184,14 +189,6 @@ export interface XDSCodeBlockProps extends XDSBaseProps<HTMLPreElement> {code: string,language: string,) => Array<{type: string; start: number; end: number}>;- /**- * How to apply syntax highlighting.- * - 'css-highlight': Uses CSS Custom Highlight API (zero DOM overhead).- * Falls back to 'spans' if the API is not available.- * - 'spans': Renders `<span>` elements with CSS classes per token.- * @default 'css-highlight'- */- highlightMode?: 'css-highlight' | 'spans';}// ---------------------------------------------------------------------------@@ -209,12 +206,6 @@ function hasHighlightAPI(): boolean {);}-/**- * Unique instance counter to namespace highlights when multiple- * code blocks are on the same page.- */-let instanceCounter = 0;-/*** Build span-based highlighted line content from tokens.*@@ -295,6 +286,7 @@ export function XDSCodeBlock({code,language = 'plaintext',title,+ hasLanguageLabel = true,hasLineNumbers = false,highlightLines,hasCopyButton = true,@@ -303,7 +295,6 @@ export function XDSCodeBlock({maxHeight,size = 'md',tokenizer: customTokenizer,- highlightMode: highlightModeProp = 'css-highlight',xstyle,className,style,@@ -311,11 +302,11 @@ export function XDSCodeBlock({...props}: XDSCodeBlockProps) {const codeRef = useRef<HTMLElement>(null);- const [instanceId] = useState(() => ++instanceCounter);+ const instanceId = useId();const [copied, setCopied] = useState(false);- // Resolve effective highlight mode — fall back to spans if API unavailable- const useSpans = highlightModeProp === 'spans' || !hasHighlightAPI();+ // Auto-detect: use CSS Custom Highlight API when available, fall back to spans+ const useSpans = !hasHighlightAPI();// For span mode: we need tokens to render. Small code is tokenized sync,// large code is tokenized async.@@ -419,12 +410,19 @@ export function XDSCodeBlock({const sizeStyle = size === 'sm' ? styles.sizeSm : styles.sizeMd;const gutterSizeStyle = size === 'sm' ? styles.gutterSm : styles.gutterMd;- const showHeader = title != null;+ const languageLabel = hasLanguageLabel && language !== 'plaintext' ? language : null;+ const showHeader = title != null || languageLabel != null;const scrollStyle: React.CSSProperties | undefined = maxHeight? {maxHeight: typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight}: undefined;+ const copyIcon = copied ? (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"><path d="M5 13l4 4L19 7" /></svg>+ ) : (+ <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"><path d="M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z" /><path d="M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2" /></svg>+ );+const copyButtonEl = hasCopyButton ? (<buttontype="button"@@ -434,7 +432,7 @@ export function XDSCodeBlock({styles.copyButton,!showHeader && styles.copyButtonAbsolute,)}>- {copied ? '\u2713' : '\u2398'}+ {copyIcon}</button>) : null;@@ -465,7 +463,11 @@ export function XDSCodeBlock({{...props}>{showHeader && (<div {...stylex.props(styles.header)}>- <span {...stylex.props(styles.headerTitle)}>{title}</span>+ <span {...stylex.props(styles.headerTitle)}>+ {languageLabel}+ {languageLabel && title ? ' — ' : ''}+ {title}+ </span>{copyButtonEl}</div>)}diff --git a/packages/lab/src/CodeBlock/highlightStyles.ts b/packages/core/src/CodeBlock/highlightStyles.tssimilarity index 98%rename from packages/lab/src/CodeBlock/highlightStyles.tsrename to packages/core/src/CodeBlock/highlightStyles.tsindex d255b3d41d..bab9c5b552 100644--- a/packages/lab/src/CodeBlock/highlightStyles.ts+++ b/packages/core/src/CodeBlock/highlightStyles.ts@@ -8,7 +8,7 @@* - /packages/core/src/theme/domainTokens.ts (syntax color token names/defaults)*/-import {syntaxTokenDefaults} from '@xds/core/theme';+import {syntaxTokenDefaults} from '../theme';/*** Build the fallback CSS custom properties from the syntax token defaults.diff --git a/packages/core/src/CodeBlock/index.ts b/packages/core/src/CodeBlock/index.tsnew file mode 100644index 0000000000..94d9332176--- /dev/null+++ b/packages/core/src/CodeBlock/index.ts@@ -0,0 +1,18 @@+'use client';++/**+ * @file index.ts+ * @output Exports CodeBlock and Code components, tokenizer, and types+ * @position Component entry point; re-exported by /packages/core/src/index.ts+ */++export {XDSCodeBlock} from './XDSCodeBlock';+export type {XDSCodeBlockProps} from './XDSCodeBlock';++export {XDSCode} from './XDSCode';+export type {XDSCodeProps} from './XDSCode';++export {tokenize, tokenizeAsync, SYNC_TOKENIZE_THRESHOLD} from './tokenizer';+export type {Token} from './tokenizer';++export {ensureHighlightStyles, TOKEN_TYPES} from './highlightStyles';diff --git a/packages/lab/src/CodeBlock/tokenizer.test.ts b/packages/core/src/CodeBlock/tokenizer.test.tssimilarity index 100%rename from packages/lab/src/CodeBlock/tokenizer.test.tsrename to packages/core/src/CodeBlock/tokenizer.test.tsdiff --git a/packages/lab/src/CodeBlock/tokenizer.ts b/packages/core/src/CodeBlock/tokenizer.tssimilarity index 98%rename from packages/lab/src/CodeBlock/tokenizer.tsrename to packages/core/src/CodeBlock/tokenizer.tsindex 3e65043ad5..a24188f232 100644--- a/packages/lab/src/CodeBlock/tokenizer.ts+++ b/packages/core/src/CodeBlock/tokenizer.ts@@ -9,6 +9,12 @@* - /packages/lab/src/CodeEditor/XDSCodeEditor.tsx*/+/**+ * The Scheduling API (scheduler.yield()) is not yet in TypeScript's DOM lib.+ * Declare the global to avoid TS2304 while keeping the runtime feature detection.+ */+declare const scheduler: {yield?: () => Promise<void>} | undefined;+export type Token = {type: string; start: number; end: number};// ---------------------------------------------------------------------------@@ -300,11 +306,9 @@ const ASYNC_CHUNK_SIZE = 5000;function yieldToMain(): Promise<void> {if (typeof scheduler !== 'undefined' &&- // eslint-disable-next-line @typescript-eslint/no-explicit-any- typeof (scheduler as any).yield === 'function'+ typeof scheduler.yield === 'function') {- // eslint-disable-next-line @typescript-eslint/no-explicit-any- return (scheduler as any).yield();+ return scheduler.yield();}return new Promise(resolve => setTimeout(resolve, 0));}diff --git a/packages/core/src/Icon/defaultIcons.tsx b/packages/core/src/Icon/defaultIcons.tsxindex 0e4e829bf4..3fa7e2e6a2 100644--- a/packages/core/src/Icon/defaultIcons.tsx+++ b/packages/core/src/Icon/defaultIcons.tsx@@ -219,4 +219,12 @@ export const defaultIcons: XDSIconRegistry = {<path d="M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z" /></svg>),++ /** clipboard — copy to clipboard */+ copy: (+ <svg {...svgProps}>+ <path d="M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z" />+ <path d="M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2" />+ </svg>+ ),};diff --git a/packages/core/src/Icon/globalIconRegistry.tsx b/packages/core/src/Icon/globalIconRegistry.tsxindex 8766e58f7f..8863f7eb0a 100644--- a/packages/core/src/Icon/globalIconRegistry.tsx+++ b/packages/core/src/Icon/globalIconRegistry.tsx@@ -42,7 +42,8 @@ export type XDSIconName =| 'arrowsUpDown'| 'funnel'| 'eyeSlash'- | 'viewColumns';+ | 'viewColumns'+ | 'copy';/*** Icon registry mapping semantic names to React nodes.diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex af1ee11a66..6037ac9568 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -23,6 +23,7 @@ export * from './Button';export * from './Card';export * from './Calendar';export * from './Center';+export * from './CodeBlock';export * from './CheckboxInput';export * from './Collapsible';export * from './RadioList';diff --git a/packages/lab/src/CodeBlock/index.ts b/packages/lab/src/CodeBlock/index.tsindex 16d0672eb8..e2f0172778 100644--- a/packages/lab/src/CodeBlock/index.ts+++ b/packages/lab/src/CodeBlock/index.ts@@ -1,6 +1,8 @@/*** @file CodeBlock component barrel export+ * @deprecated Import from '@xds/core/CodeBlock' instead.+ * This re-export exists for backwards compatibility.*/-export {XDSCodeBlock} from './XDSCodeBlock';-export type {XDSCodeBlockProps} from './XDSCodeBlock';+export {XDSCodeBlock} from '@xds/core/CodeBlock';+export type {XDSCodeBlockProps} from '@xds/core/CodeBlock';diff --git a/packages/lab/src/CodeEditor/XDSCodeEditor.tsx b/packages/lab/src/CodeEditor/XDSCodeEditor.tsxindex 47c8c80456..deddc9ff68 100644--- a/packages/lab/src/CodeEditor/XDSCodeEditor.tsx+++ b/packages/lab/src/CodeEditor/XDSCodeEditor.tsx@@ -36,9 +36,9 @@ import {tokenize,tokenizeAsync,SYNC_TOKENIZE_THRESHOLD,-} from '../CodeBlock/tokenizer';-import type {Token} from '../CodeBlock/tokenizer';-import {ensureHighlightStyles, TOKEN_TYPES} from '../CodeBlock/highlightStyles';+} from '@xds/core/CodeBlock';+import type {Token} from '@xds/core/CodeBlock';+import {ensureHighlightStyles, TOKEN_TYPES} from '@xds/core/CodeBlock';// ---------------------------------------------------------------------------// Stylesdiff --git a/packages/lab/src/index.ts b/packages/lab/src/index.tsindex a4e30663b6..caf886bbce 100644--- a/packages/lab/src/index.ts+++ b/packages/lab/src/index.ts@@ -35,4 +35,4 @@ export {tokenizeAsync,SYNC_TOKENIZE_THRESHOLD,type Token,-} from './CodeBlock/tokenizer';+} from '@xds/core/CodeBlock';diff --git a/packages/themes/default/src/icons.tsx b/packages/themes/default/src/icons.tsxindex 85beaa650d..d0083c87f2 100644--- a/packages/themes/default/src/icons.tsx+++ b/packages/themes/default/src/icons.tsx@@ -29,6 +29,7 @@ import {FunnelIcon,EyeSlashIcon,ViewColumnsIcon,+ ClipboardDocumentIcon,} from '@heroicons/react/24/outline';import {@@ -66,4 +67,5 @@ export const defaultIconRegistry: XDSIconRegistry = {funnel: <FunnelIcon {...iconProps} />,eyeSlash: <EyeSlashIcon {...iconProps} />,viewColumns: <ViewColumnsIcon {...iconProps} />,+ copy: <ClipboardDocumentIcon {...iconProps} />,};diff --git a/packages/themes/meta/src/icons.tsx b/packages/themes/meta/src/icons.tsxindex 4dc0552610..3cf51fa901 100644--- a/packages/themes/meta/src/icons.tsx+++ b/packages/themes/meta/src/icons.tsx@@ -30,6 +30,7 @@ import {FunnelIcon,EyeSlashIcon,ViewColumnsIcon,+ ClipboardDocumentIcon,} from '@heroicons/react/24/outline';import {@@ -67,4 +68,5 @@ export const metaIconRegistry: XDSIconRegistry = {funnel: <FunnelIcon {...iconProps} />,eyeSlash: <EyeSlashIcon {...iconProps} />,viewColumns: <ViewColumnsIcon {...iconProps} />,+ copy: <ClipboardDocumentIcon {...iconProps} />,};diff --git a/packages/themes/neutral/src/icons.tsx b/packages/themes/neutral/src/icons.tsxindex 77d73602eb..435b6fd165 100644--- a/packages/themes/neutral/src/icons.tsx+++ b/packages/themes/neutral/src/icons.tsx@@ -33,6 +33,7 @@ import {Filter,EyeOff,Columns,+ Copy,} from 'lucide-react';const iconProps = {@@ -62,4 +63,5 @@ export const neutralIconRegistry: XDSIconRegistry = {funnel: <Filter {...iconProps} />,eyeSlash: <EyeOff {...iconProps} />,viewColumns: <Columns {...iconProps} />,+ copy: <Copy {...iconProps} />,};diff --git a/packages/themes/whatsapp/src/icons.tsx b/packages/themes/whatsapp/src/icons.tsxindex cda9d1c682..4d5bfc025a 100644--- a/packages/themes/whatsapp/src/icons.tsx+++ b/packages/themes/whatsapp/src/icons.tsx@@ -27,6 +27,7 @@ import {FunnelIcon,EyeSlashIcon,ViewColumnsIcon,+ ClipboardDocumentIcon,} from '@heroicons/react/24/outline';import {@@ -64,4 +65,5 @@ export const whatsappIconRegistry: XDSIconRegistry = {funnel: <FunnelIcon {...iconProps} />,eyeSlash: <EyeSlashIcon {...iconProps} />,viewColumns: <ViewColumnsIcon {...iconProps} />,+ copy: <ClipboardDocumentIcon {...iconProps} />,};