Skip to content

Conversation

@TrevorBurnham
Copy link
Contributor

Description

This PR refactors the style utilities used by the Input, Textarea, and TextFilter to reduce duplicated logic. This should make maintenance easier while also reducing bundle size: If all three components are used, this cuts down the amount of JS served to the browser by ~10KB.

How has this been tested?

I'm not sure how best to test this change.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@TrevorBurnham TrevorBurnham requested a review from a team as a code owner January 1, 2026 16:01
@TrevorBurnham TrevorBurnham requested review from Who-is-PS and removed request for a team January 1, 2026 16:01
Extract shared getInputStylesCss() utility from input, textarea, and
text-filter components to reduce code duplication and bundle size.

- Create src/internal/utils/input-styles.ts with shared style mapping
- Update input, textarea, and text-filter to use shared utility
- Add comprehensive unit tests for the new utility

Bundle size reduction: ~10.6 KB (58%) when multiple components are used.
@TrevorBurnham TrevorBurnham force-pushed the refactor-style-modules branch from 6721e6c to 7def754 Compare January 2, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant