fix(ui): add RadioGroup to build and fix TypeScript errors in tests

- Add RadioGroup.tsx to tsup entry points (was missing from build)
- Fix HTMLTextareaElement casing in Textarea tests (should be HTMLTextAreaElement)
- Remove unused variables in test files (user, container)

Fixes CI type-check and build failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-11-27 02:17:51 +10:00
parent e21be425e5
commit 535717e34f
5 changed files with 9 additions and 8 deletions

View file

@ -311,7 +311,6 @@ describe('Checkbox', () => {
});
it('should call onBlur when blurred', async () => {
const user = userEvent.setup();
const handleBlur = vi.fn();
render(<Checkbox onBlur={handleBlur} />);

View file

@ -178,7 +178,7 @@ describe('Radio', () => {
describe('Label Position', () => {
it('should position label on the right by default', () => {
const { container } = render(
render(
<RadioGroup name="test">
<Radio value="option1" label="Right label" />
</RadioGroup>
@ -189,7 +189,7 @@ describe('Radio', () => {
});
it('should position label on the left when specified', () => {
const { container } = render(
render(
<RadioGroup name="test">
<Radio value="option1" label="Left label" labelPosition="left" />
</RadioGroup>

View file

@ -139,7 +139,7 @@ describe('Slider', () => {
{ value: 50, label: 'Mid' },
{ value: 100, label: 'Max' },
];
const { container } = render(<Slider marks={marks} />);
render(<Slider marks={marks} />);
expect(screen.getByText('Min')).toBeInTheDocument();
expect(screen.getByText('Mid')).toBeInTheDocument();
@ -331,7 +331,6 @@ describe('Slider', () => {
describe('Keyboard Navigation', () => {
it('should support arrow key navigation', async () => {
const user = userEvent.setup();
render(<Slider defaultValue={50} min={0} max={100} step={10} />);
const slider = screen.getByRole('slider') as HTMLInputElement;

View file

@ -368,7 +368,7 @@ describe('Textarea', () => {
describe('Ref Forwarding', () => {
it('forwards ref to textarea element', () => {
let ref: HTMLTextareaElement | null = null;
let ref: HTMLTextAreaElement | null = null;
render(
<Textarea
ref={(el) => {
@ -381,7 +381,7 @@ describe('Textarea', () => {
});
it('allows programmatic focus via ref', () => {
let ref: HTMLTextareaElement | null = null;
let ref: HTMLTextAreaElement | null = null;
render(
<Textarea
data-testid="textarea"
@ -398,7 +398,7 @@ describe('Textarea', () => {
});
it('allows reading value via ref', () => {
let ref: HTMLTextareaElement | null = null;
let ref: HTMLTextAreaElement | null = null;
render(
<Textarea
defaultValue="Test value"

View file

@ -30,6 +30,9 @@ const entries = allFiles.filter((file) => {
return folderName === fileName;
});
// Manually add RadioGroup which doesn't match the folder/file naming convention
entries.push('src/Radio/RadioGroup.tsx');
export default defineConfig({
entry: entries,
format: ['esm'],