Project: ui-shell · Branch: fhir-2072-nhr-document-list-ui-shell · Mode: · Model: claude-haiku-4-5-20251001
Stats: 1 user messages, 35 tool calls, tools used: Bash, Read, Glob.
Conversation
Turn 1 — User
In the Oxygen design system repo at /Users/USER/workspace/doctolib/oxygen, find:
1. The replacement for the deprecated Text component — look for what component is recommended instead (likely Paragraph, Heading, Label, or similar)
2. The replacement for the deprecated Button component — check if there's a v2 or new Button
Look in:
- /Users/USER/workspace/doctolib/oxygen/packages/ for component packages
- Any MIGRATION or CHANGELOG files mentioning Text or Button deprecation
- The index exports to understand what's available
Return the exact import paths for the replacement components.
Turn 1 — Assistant
I'll help you find the replacements for the deprecated Text and Button components in the Oxygen design system. Let me search the repository systematically.
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen -type f -name "CHANGELOG" -o -name "MIGRATION" -o -name "README" | head -20
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/README.md
/Users/USER/workspace/doctolib/oxygen/packages/illustrative-icons/CHANGELOG.md
/Users/USER/workspace/doctolib/oxygen/packages/illustrative-icons/README.md
/Users/USER/workspace/doctolib/oxygen/packages/core/CHANGELOG.md
/Users/USER/workspace/doctolib/oxygen/packages/core/README.md
/Users/USER/workspace/doctolib/oxygen/packages/core/public/emoji_picker_data/README.md
/Users/USER/workspace/doctolib/oxygen/packages/core/src/README.mdx
/Users/USER/work
…(truncated, 820 more chars)
Let me search for component packages and check the CHANGELOG files for deprecation information:
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/CHANGELOG.md
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/ | head -30
Tool results:
→ result (ERROR): File content (41274 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.
Tools used:
- Glob: /Users/USER/workspace/doctolib/oxygen/packages//src/index.{ts,tsx}
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 384 B Wed Feb 25 13:12:45 2026 .
drwxr-xr-x clertonra staff 1.3 KB Fri Mar 13 11:56:52 2026 ..
drwxr-xr-x clertonra staff 608 B Fri Mar 13 11:56:52 2026 b2b
drwxr-xr-x clertonra staff 576 B Fri Mar 13 11:56:52 2026 b2c
drwxr-xr-x clertonra staff 448 B Wed Feb 25 13:12:44 2026 codemods
drwxr-xr-x clertonra staff 832 B Fri Mar 13 11:56:52 2026 core
drwxr-xr-x clertonra staff 544 B Fri Mar 13 11:56:52 2026 icons
drwxr-xr-x clertonra staff 480 B Fri Mar 13 11:56:52
…(truncated, 303 more chars)
Tool results:
→ result (ok): No files found
Let me search for the index files and component directories:
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src -type f -name ".ts" -o -name ".tsx" | grep -i "index" | head -10
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src -type d -name "Text" -o -type d -name "Button"
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/tokens/index.ts
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/InputText
/Users/USER/workspace/doctolib/oxygen/packages/core/src/forms/Textarea
/Users/USER/workspace/doctolib/oxygen/packages/core/src/navigation/LinkWithButtonStyle
/Users/USER/workspace/doctolib/oxygen/packages/core/src/navigation/LinkWithIconButtonStyle
/Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text
/Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/PillIconButton
/Users/USER/worksp
…(truncated, 290 more chars)
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 1.1 KB Wed Feb 25 13:12:44 2026 .
drwxr-xr-x clertonra staff 832 B Fri Mar 13 11:56:52 2026 ..
drwxr-xr-x clertonra staff 224 B Wed Feb 25 13:12:44 2026 a11y
drwxr-xr-x clertonra staff 256 B Wed Feb 25 13:12:44 2026 actions
drwxr-xr-x clertonra staff 96 B Wed Feb 25 13:12:44 2026 collection
drwxr-xr-x clertonra staff 256 B Wed Feb 25 13:12:44 2026 common
.rw-r--r-- clertonra staff 45 B Wed Feb 25 13:12:44 2026 constants.ts
drwxr-xr-x clertonra staff 832 B Wed
…(truncated, 1872 more chars)
Now let me check the CHANGELOG for deprecation information and look at the Text component:
Tools used:
- Bash: grep -A 5 -B 5 "Text.deprecat\|Button.deprecat" /Users/USER/workspace/doctolib/oxygen/packages/core/CHANGELOG.md | head -100
Tool results:
→ result (ok): ### Features
CFS-725: ButtonV2 - New property formId available to set the form attribute (#1073) (bfcd640)
COREFRONT-983: Button - Component v1 is deprecated (#1071) (a596cd2)
Bug Fixes
CFS-704:
…(truncated, 204 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text
Tool results:
→ result (ERROR): EISDIR: illegal operation on a directory, read '/Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text'
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button
Tool results:
→ result (ERROR): EISDIR: illegal operation on a directory, read '/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button'
Let me look inside these directories:
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 224 B Wed Feb 25 13:12:44 2026 .
drwxr-xr-x clertonra staff 544 B Wed Feb 25 13:12:44 2026 ..
.rw-r--r-- clertonra staff 4.0 KB Wed Feb 25 13:12:44 2026 migration.ts
.rw-r--r-- clertonra staff 7.2 KB Wed Feb 25 13:12:44 2026 Text.scss
.rw-r--r-- clertonra staff 2.1 KB Wed Feb 25 13:12:44 2026 Text.stories.tsx
.rw-r--r-- clertonra staff 205 B Wed Feb 25 13:12:44 2026 Text.test-helpers.ts
.rw-r--r-- clertonra staff 4.2 KB Wed Feb 25 13:12:44 2026 Text.tsx
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 288 B Fri Mar 13 11:56:52 2026 .
drwxr-xr-x clertonra staff 256 B Wed Feb 25 13:12:44 2026 ..
.rw-r--r-- clertonra staff 22 KB Wed Feb 25 13:12:44 2026 Button.scss
.rw-r--r-- clertonra staff 10 KB Wed Feb 25 13:12:44 2026 Button.stories.tsx
.rw-r--r-- clertonra staff 318 B Wed Feb 25 13:12:44 2026 Button.test-helpers.ts
.rw-r--r-- clertonra staff 4.0 KB Wed Feb 25 13:12:44 2026 Button.test.tsx
.rw-r--r-- clertonra staff 5.9 KB Wed Feb 25 13:12:44 2026 Button.tsx
.
…(truncated, 132 more chars)
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 832 B Wed Feb 25 13:12:44 2026 .
drwxr-xr-x clertonra staff 1.1 KB Wed Feb 25 13:12:44 2026 ..
drwxr-xr-x clertonra staff 192 B Wed Feb 25 13:12:44 2026 Accordion
drwxr-xr-x clertonra staff 192 B Wed Feb 25 13:12:44 2026 Avatar
drwxr-xr-x clertonra staff 160 B Wed Feb 25 13:12:44 2026 AvatarGroup
drwxr-xr-x clertonra staff 160 B Wed Feb 25 13:12:44 2026 Badge
drwxr-xr-x clertonra staff 288 B Fri Mar 13 11:56:52 2026 Card
drwxr-xr-x clertonra staff 160 B Wed Feb
…(truncated, 1311 more chars)
Great! I can see there's a v2 directory for Button and a text directory. Let me check those:
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/v2/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 320 B Fri Mar 13 11:56:52 2026 .
drwxr-xr-x clertonra staff 288 B Fri Mar 13 11:56:52 2026 ..
.rw-r--r-- clertonra staff 19 KB Fri Mar 13 11:56:52 2026 button-migration.md
.rw-r--r-- clertonra staff 3.5 KB Fri Mar 13 11:56:52 2026 Button.a11y.interactions.stories.tsx
.rw-r--r-- clertonra staff 112 B Wed Feb 25 13:12:44 2026 Button.a11y.mdx
.rw-r--r-- clertonra staff 3.5 KB Wed Feb 25 13:12:44 2026 Button.figma.tsx
.rw-r--r-- clertonra staff 4.4 KB Fri Mar 13 11:56:
…(truncated, 265 more chars)
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/
Tool results:
→ result (ok): drwxr-xr-x clertonra staff 544 B Wed Feb 25 13:12:44 2026 .
drwxr-xr-x clertonra staff 832 B Wed Feb 25 13:12:44 2026 ..
.rw-r--r-- clertonra staff 610 B Wed Feb 25 13:12:44 2026 Heading.figma.tsx
.rw-r--r-- clertonra staff 1.8 KB Wed Feb 25 13:12:44 2026 Heading.interactions.stories.tsx
.rw-r--r-- clertonra staff 2.8 KB Wed Feb 25 13:12:44 2026 Heading.stories.tsx
.rw-r--r-- clertonra staff 708 B Wed Feb 25 13:12:44 2026 Heading.test-helpers.ts
.rw-r--r-- clertonra staff 2.2 KB Wed Feb 25 1
…(truncated, 773 more chars)
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text/Text.tsx
Tool results:
→ result (ok): 1→import './Text.scss'
2→
3→import classNames from 'classnames'
4→import { type ElementType, forwardRef, type ReactNode } from 'react'
5→
6→export type TextColor =
7→ | 'error-090'
8→ | 'error-110'
9→ | 'neutral-030'
10→ | 'neutral-040'
11→ | 'neutral-090'
12→ | 'neutral-110'
13→ | 'neutral-130'
14→ | 'neutral-150'
15→ | 'primary-110'
16→ | 'primary-130'
17→ | 'primary-150'
18→ | 'primary-160'
19→ | 'suc
…(truncated, 5306 more chars)
Perfect! Now let me check the Button.tsx and also look at the index exports:
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/Button.tsx
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/v2/Button.tsx
Tool results:
→ result (ok): 1→import './Button.scss'
2→
3→import classNames from 'classnames'
4→import {
5→ type ComponentPropsWithoutRef,
6→ type ComponentType,
7→ forwardRef,
8→ type MouseEventHandler,
9→ type TouchEventHandler,
10→} from 'react'
11→import type { DesignSystemIconComponent } from '@doctolib/design-system-icons'
12→import { Link } from 'react-router-dom'
13→
14→import { getIconByNameOrComponent } from '../../helpers/icons'
15→import type
…(truncated, 7303 more chars)
Tool results:
→ result (ok): 1→import classNames from 'classnames'
2→import {
3→ type ComponentProps,
4→ forwardRef,
5→ type MouseEventHandler,
6→ useEffect,
7→ useImperativeHandle,
8→ useState,
9→} from 'react'
10→import type { DesignSystemIconComponent } from '@doctolib/design-system-icons'
11→import { useContext } from 'react'
12→
13→import buttonStyles from './Button.module.scss'
14→import { type DataAttribute, filterDataAttributes } from '../../../common
…(truncated, 11630 more chars)
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src -name "index.ts" -o -name "index.tsx" | xargs grep -l "export.Button\|export.Text" 2>/dev/null | head -5
Tool results:
→ result (ok): (Bash completed with no output)
Now let me find the main index file and the migration guide:
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src -maxdepth 1 -name "index.ts" -o -name "index.tsx"
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
- Bash: cat /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/v2/button-migration.md
Tool results:
→ result (ok): ---
description: Migrate deprecated Oxygen Button components to Button/v2, IconButton/v2, or LinkWithButtonStyle
argument-hint: '[directory-or-file-path]'
---
Button Component Migration Assistant
You are a senior React developer specializing in component migrations and refactoring. Help developers migrate deprecated Button components to the new v2 version.
Context
OLD Component (@doctolib/design-system-{b2b/b2c}/Button):
- Props: uiStyle, size, block, circle, square,
…(truncated, 18582 more chars)
Tools used:
- Bash: cat /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text/migration.ts
Tool results:
→ result (ok): /
This file has been auto-generated.
Please do not edit it or your changes maybe overwritten.
@generated 2024-08-26T09:27:37.775Z
/
// Type definitions
type ValueMapping = {
from: string
to: string
}
type UpdatedProps = {
currentProp: string
newProp?: string
keepNameIfUnknownValue?: boolean
deletePropValue?: boolean
values?: ValueMapping[]
details?: string[]
commentValue?: string
}
type RemovedProps = {
currentProp: string
details?: string[]
}
type Forb
…(truncated, 3600 more chars)
Perfect! Now let me check the package exports to get the exact import paths:
Tools used:
- Bash: ls -la /Users/USER/workspace/doctolib/oxygen/packages/b2b/src/index.ts /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/index.ts 2>&1 | head -5
Tool results:
→ result (ok): lsd: /Users/USER/workspace/doctolib/oxygen/packages/b2b/src/index.ts: No such file or directory (os error 2).
lsd: /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/index.ts: No such file or directory (os error 2).
Tools used:
- Bash: grep -n "export.Button\|export.Heading\|export.Paragraph" /Users/USER/workspace/doctolib/oxygen/packages/b2b/src/index.ts | head -20
Tool results:
→ result (ok): grep: /Users/USER/workspace/doctolib/oxygen/packages/b2b/src/index.ts: No such file or directory
Tools used:
- Bash: grep -n "export.Button\|export.Heading\|export.Paragraph" /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/index.ts | head -20
Tool results:
→ result (ok): grep: /Users/USER/workspace/doctolib/oxygen/packages/b2c/src/index.ts: No such file or directory
Let me check the package structure more carefully:
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/b2b -name "index" -type f | head -10
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/b2c -name "index" -type f | head -10
Tools used:
- Bash: cat /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/migration.ts
Tool results:
→ result (ok): (Bash completed with no output)
Tool results:
→ result (ok): export const UPDATED_PROPS = [
{
currentProp: 'disabled',
newProp: 'isDisabled',
},
{
currentProp: 'loadable',
newProp: 'isLoading',
details: ['You also have a new loadingLabel prop.'],
},
{
currentProp: 'size',
newProp: '',
details: ['DEPRECATED_big, DEPRECATED_relative, DEPRECATED_auto are removed.'],
},
{
currentProp: 'uiStyle',
newProp: 'uiStyle & variant',
details: 'All combinations of variant + uiStyle are not allowed (eg. solid +
…(truncated, 1930 more chars)
Excellent! Now let me get the final import paths by checking the package.json files:
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages -maxdepth 2 -name "package.json" -exec grep -l "name.design-system" {} \;
Tools used:
- Bash: grep '"name"' /Users/USER/workspace/doctolib/oxygen/packages/b2b/package.json /Users/USER/workspace/doctolib/oxygen/packages/b2c/package.json /Users/USER/workspace/doctolib/oxygen/packa
…(truncated, 33 more chars)
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/illustrative-icons/package.json
/Users/USER/workspace/doctolib/oxygen/packages/core/package.json
/Users/USER/workspace/doctolib/oxygen/packages/b2b/package.json
/Users/USER/workspace/doctolib/oxygen/packages/b2c/package.json
/Users/USER/workspace/doctolib/oxygen/packages/icons/package.json
/Users/USER/workspace/doctolib/oxygen/packages/tokens/package.json
/Users/USER/workspace/doctolib/oxygen/packages/codemods/package.json
Tool results:
→ result (ok): /Users/USER/workspace/doctolib/oxygen/packages/b2b/package.json: "name": "@doctolib/design-system-b2b",
/Users/USER/workspace/doctolib/oxygen/packages/b2c/package.json: "name": "@doctolib/design-system-b2c",
/Users/USER/workspace/doctolib/oxygen/packages/core/package.json: "name": "@doctolib/design-system",
Perfect! Now let me verify the exact export paths for the replacement components:
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text -name "index.ts"
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
- Bash: find /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions -path "/Button/v2/index.ts" -o -path "/Button/index.ts"
Tool results:
→ result (ok): (Bash completed with no output)
Tools used:
- Bash: ls /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/
Tool results:
→ result (ok): Heading.figma.tsx
Heading.interactions.stories.tsx
Heading.stories.tsx
Heading.test-helpers.ts
Heading.tsx
Paragraph.figma.tsx
Paragraph.stories.tsx
Paragraph.tsx
private
Span.interactions.stories.tsx
Span.stories.tsx
Span.tsx
Text
TextColorBadge.tsx
Typography.mdx
Now let me check the CHANGELOG to confirm the deprecation status:
Tools used:
- Bash: grep -A 10 -B 2 "Text.deprecat\|deprecated.Text" /Users/USER/workspace/doctolib/oxygen/packages/core/CHANGELOG.md | head -50
Tool results:
→ result (ok): - COREFRONT-233: RadioGroup - Minor styling updates ([#572) (5fc98c3)
- OXYGEN-3612: storybook - fix theme (#555) (45e37a0)
- OXYGEN-3626: SidebarMenu - Remove deprecated Text (#560
Tools used:
- Read: /Users/USER/workspace/doctolib/oxygen/packages/core/CHANGELOG.md (1–101)
Tool results:
→ result (ok): 1→## 2.21.0 (2025-11-18)
2→
3→
4→### Features
5→
6→ COREFRONT-391: Popover - add new optional prop label (#991) (d64a9d2)
7→* COREFRONT-579: Add support for React 19 (#863) ([549d2
…(truncated, 7339 more chars)
Perfect! I have all the information I need. Let me compile the findings:
Summary
I've found the replacements for the deprecated Text and Button components in the Oxygen design system. Here are the exact import paths and component recommendations:
1. Replacement for deprecated Text component
Deprecation Statement (line 110 of Text.tsx):
@deprecated use , or other HTML semantic elements instead
Replacement Components:
- Paragraph - for body text content
- Import: @doctolib/design-system/Paragraph
- Location: /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Paragraph.tsx
- Heading - for heading/title content
- Import: @doctolib/design-system/Heading
- Location: /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Heading.tsx
- Span - for inline text content
- Import: @doctolib/design-system/Span
- Location: /Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Span.tsx
Migration Props:
The migration file (/Users/USER/workspace/doctolib/oxygen/packages/core/src/dataDisplay/text/Text/migration.ts) documents:
- uiStyle → font (with specific value mappings like body-s-bold → Body/S/Bold)
- id → _id
- color → uses new color tokens (e.g., neutral-090 → shared/text/minorText/weak)
- colorInherit → color="inherit"
- className → customStyle (Tailwind CSS classes only)
---
2. Replacement for deprecated Button component
Deprecation Statement (line 105 of Button.tsx):
@deprecated Use the @doctolib/design-system/Button/v2 component instead.
New Button Component:
- Button/v2 - the new standardized button component
- Import: @doctolib/design-system/Button/v2
- Location: /Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/v2/Button.tsx
Migration Props (/Users/USER/workspace/doctolib/oxygen/packages/core/src/actions/Button/migration.ts):
- disabled → isDisabled
- loadable={{ loading }} → isLoading (+ new loadingLabel prop for accessibility)
- uiStyle → variant + uiStyle (e.g., primary becomes variant="solid" + uiStyle="brand")
- size → size (but only small or medium supported; DEPRECATED_big/relative/auto removed)
- leftIcon → icon (must be an icon component, not a string name)
- onClick → onClick (now required unless type="submit")
Removed Props in v2:
- block, circle, square, component, to, href, floating, labelClassName, rightIcon, onTap, preventDefault, DEPRECATED_outline
Related Components for Edge Cases:
- IconButton/v2 - for icon-only buttons (replaces circle/square)
- Import: @doctolib/design-system/IconButton/v2
- LinkWithButtonStyle - for navigation links styled as buttons (replaces buttons with to/href)
- Import: @doctolib/design-system/LinkWithButtonStyle
---
Package Structure
The Oxygen design system has multiple packages:
- @doctolib/design-system (core) - base components
- @doctolib/design-system-b2b - B2B specific variants
- @doctolib/design-system-b2c - B2C specific variants
All imports shown above work with all three packages by replacing @doctolib/design-system with the appropriate package name.