diff --git a/.storybook/main.ts b/.storybook/main.ts
index 30bbe9f..d23026d 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -20,6 +20,11 @@ const config: StorybookConfig = {
if (process.env.STORYBOOK_BASE_HREF) {
cfg.base = process.env.STORYBOOK_BASE_HREF
}
+ // Allow all hosts for tunneling (localtunnel, cloudflared, ngrok, etc.)
+ cfg.server = {
+ ...(cfg.server || {}),
+ allowedHosts: true,
+ }
return cfg
},
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b73f47f..503fd37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,197 @@
# Changelog
-All notable changes to this project will be documented in this file.
+## [1.3.0] - 2025-10-11
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+### Added
+
+**🌈 Gradient Support for InputColorPicker**
+
+- **Full gradient support** for `InputColorPicker` component
+ - Linear gradients with multiple color stops
+ - Automatic gradient detection and UI switching
+ - Click gradient text to copy CSS to clipboard
+ - Opacity control applies to all gradient colors
+
+- **Gradient Input Features**
+ - Displays gradient as "Linear" text with copy functionality
+ - Customizable width via `classNameGradientInput` prop
+ - Automatic mode switching between solid color and gradient
+ - Preserves gradient format during opacity changes
+
+- **Opacity Management**
+ - Opacity applies to all rgba colors in gradients
+ - Smooth drag control without value jumps
+ - Separate opacity state for gradients vs solid colors
+ - Real-time preview updates
+
+- **New Props**
+ - `classNameGradientInput?: string` - Custom classes for gradient input
+ - `showGradient?: boolean` - Enable gradient mode in ColorPicker popup
+ - Enhanced `onChange` callback with gradient support
+
+### Changed
+
+- **InputColorPicker Component**
+ - Refactored to support both solid colors and gradients
+ - Improved state management with `colorType` detection
+ - Enhanced `useColorPickerState` hook with gradient logic
+ - Better synchronization between gradient and opacity
+
+- **Opacity Control**
+ - Modified to apply opacity to all rgba colors in gradients
+ - Fixed drag behavior to prevent value resets
+ - Improved `useEffect` dependencies for gradient handling
+
+### Fixed
+
+- 🐛 Fixed opacity jumping between current value and 100% during drag for gradients
+- 🐛 Fixed gradient input width inconsistency with solid color input
+- 🐛 Fixed initial colorType not detecting gradients on mount
+- 🐛 Fixed opacity not applying to all colors in gradient string
+- 🐛 Improved gradient CSS parsing and manipulation
+
+### Documentation
+
+- Updated README.md with comprehensive InputColorPicker documentation
+- Added gradient examples and usage patterns
+- Enhanced Storybook with 7 interactive examples:
+ - Default, BackgroundColor, TextColor
+ - GradientBackground, MultipleColors
+ - CardDesign, OpacityControl
+- Added API reference for all InputColorPicker props
+
+### Technical Improvements
+
+- **TypeScript**
+ - Added `classNameGradientInput` to InputColorPickerProps interface
+ - Better type safety for gradient detection
+ - Improved prop type definitions
+
+- **Code Quality**
+ - Modular gradient handling utilities
+ - Consistent code formatting
+ - Better error handling for clipboard operations
+
+- **Bundle Size**
+ - No significant increase in bundle size
+ - Tree-shakeable as before
+ - Optimized gradient regex operations
+
+### Breaking Changes
+
+**None** — This release is fully backward compatible.
+
+- Components without gradient support work exactly as before
+- All existing solid color functionality preserved
+- New gradient features are opt-in via `showGradient` prop
+
+## [1.2.0] - 2025-10-10
+
+### Added
+
+**🎨 Alpha Channel Support for HEX Inputs**
+
+- **`showAlpha` prop** for `InputHex` and `InputHexWithPreview` components
+ - Enable 8-symbol HEX input (RRGGBBAA format)
+ - Supports alpha values from 00 (transparent) to FF (opaque)
+ - Backward compatible — defaults to 6-symbol input
+
+- **Automatic Preview Transparency**
+ - `InputHexWithPreview` now displays alpha channel in preview
+ - Preview shows real transparency on checkerboard background
+ - Alpha affects preview color automatically
+
+- **Smart Drag Behavior**
+ - Drag changes only base color (first 6 symbols)
+ - Alpha channel is preserved during drag operations
+ - No conflicts between drag and alpha input
+
+- **Uppercase Formatting**
+ - All HEX values automatically converted to uppercase
+ - Consistent formatting across all inputs
+ - Applied to both manual input and drag operations
+
+### Changed
+
+- **InputHex Component**
+ - Refactored state management (`disable` → `isEditing`)
+ - Improved local state handling (`newHex` → `localHex`)
+ - Enhanced input validation and filtering
+ - Better synchronization with parent component
+
+- **InputHexWithPreview Component**
+ - Removed `opacity` prop (replaced by alpha channel in hex value)
+ - Preview now uses alpha from hex color directly
+ - Simplified API — one source of truth for transparency
+
+### Fixed
+
+- 🐛 Fixed bug where drag would reset to previous value when alpha present
+- 🐛 Fixed race condition in state synchronization after drag
+- 🐛 Fixed alpha preservation during drag operations
+- 🐛 Improved `useEffect` dependencies for better state management
+
+### Documentation
+
+- Updated README.md with alpha channel examples
+- Added comprehensive API reference for `showAlpha` prop
+- Enhanced Storybook examples with alpha demonstrations
+- Improved component descriptions and feature lists
+- Added migration notes for `opacity` prop removal
+
+### Technical Improvements
+
+- **TypeScript**
+ - Updated interfaces with `showAlpha?: boolean`
+ - Better type safety for hex color validation
+ - Improved prop type definitions
+
+- **Code Quality**
+ - Consistent code formatting across components
+ - Better error handling for edge cases
+ - Improved component architecture
+
+- **Bundle Size**
+ - No increase in bundle size
+ - Tree-shakeable as before
+ - Optimized imports
+
+### Breaking Changes
+
+**None** — This release is fully backward compatible.
+
+- Components without `showAlpha` prop work exactly as before (6 symbols)
+- Removed `opacity` prop from `InputHexWithPreview` (use alpha in hex value instead)
+- All existing code continues to work without modifications
+
+### Migration Guide
+
+#### Using Alpha Channel (Optional)
+
+```tsx
+// Before (v1.1.0)
+
Current color: {valueToHex()}
-Previous colors: {previousColors.length}
-