mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 09:00:16 +00:00
Add Storybook stories for WidgetInputText and WidgetTextarea, aligned with the Figma Design System spec. Task: COM-15821 ## Summary Add comprehensive Storybook stories for text widget components and implement missing Figma design system variants for WidgetInputText. ## Changes - **WidgetInputText component enhancements**: - Add `size` prop (`medium` | `large`) matching Figma size variants (32px / 40px) - Add `invalid` prop with destructive border style per Figma Invalid state - Add `loading` prop showing spinning loader icon per Figma Status state - Add hover background (`bg-component-node-widget-background-hovered`) - Fix `readonly` not being applied from `widget.options.read_only` - **WidgetTextarea component fixes**: - Show copy button on hover for all states (not just read-only) - Apply `text-component-node-foreground` token to copy icon - Add hover background to wrapper - **Storybook stories**: - WidgetInputText: Default, Disabled, Invalid, Status, WithPlaceholder, WithLabel stories - WidgetTextarea: Default, Disabled, HiddenLabel, WithPlaceholder stories - Interactive controls for size, readOnly, disabled, invalid, loading ## Review Focus - Figma alignment: size/invalid/loading/status variants for WidgetInputText - Copy icon color token (`text-component-node-foreground`) for light/dark theme support - `layoutWidget` computed pattern to merge `borderStyle` with invalid state ## Screenshots (if applicable) <!-- Add screenshots or video recording to help explain your changes --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>