Skip to content

Refactor RLInput and RLDatePicker components to use Shoelace inputs and update event handling#2

Merged
pzocchi merged 1 commit intomainfrom
claude_fix_input
Jan 13, 2026
Merged

Refactor RLInput and RLDatePicker components to use Shoelace inputs and update event handling#2
pzocchi merged 1 commit intomainfrom
claude_fix_input

Conversation

@paolo-projects
Copy link
Contributor

This pull request refactors the RL input components to use Shoelace’s React component wrappers instead of custom JSX element declarations, and updates event handling to use the new Shoelace event names and types. It also improves type safety, adds new props for greater flexibility, and updates Storybook stories for better interactivity and demonstration.

Component refactoring and Shoelace integration:

  • Replaces custom JSX element declarations and direct usage of Shoelace web components with Shoelace React wrappers (SlInput, SlDropdown, SlIconButton) in RLInput, RLNumberInput, and RLDatePicker components, improving type safety and React compatibility. [1] [2] [3]
  • Updates event handlers in all components to use Shoelace’s React event names (e.g., onSlChange, onSlBlur) and CustomEvent types, and ensures validation is triggered on change. [1] [2] [3]

Prop and type improvements:

  • Expands supported props in RLInput and RLNumberInput (e.g., min, max, step, noSpinButtons, className, onClick, more input modes), and updates their TypeScript types for more flexibility and correctness. [1] [2] [3]

Storybook updates:

  • Refactors Storybook stories for RLInput and RLNumberInput to use local state for value management and demonstrate controlled usage, making examples more interactive and realistic. [1] [2] [3] [4]

Code cleanup:

  • Removes unused refs and legacy code related to direct DOM manipulation and custom event typing, simplifying the codebase. [1] [2] [3]

Consistency and usability improvements:

  • Ensures all input components consistently pass props and error states, and updates class name handling for error styling. [1] [2] [3] [4]

@pzocchi pzocchi merged commit 40cea18 into main Jan 13, 2026
2 checks passed
@pzocchi pzocchi deleted the claude_fix_input branch January 13, 2026 11:58
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.

2 participants