# Changelog

All notable changes to this project will be documented in this file.

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).

## [Unreleased]

## [1.1.0] - 2026-02-23

### Added
- **Default success UI customization** – Style the built-in success screen via `style.successUI` (e.g. `backgroundColor`, `primaryTextColor`, `secondaryTextColor`). Use `dark.successUI` for dark mode overrides.

### Fixed
- **Dynamic height for success UI** – Iframe now reports content height when the success screen is shown, so the SDK container resizes correctly and no longer leaves extra empty space or overflow.

### Deprecated
- **General success styling** – `style.generalSuccess` and `style.dark.generalSuccess` are deprecated and have no effect (general success UI was removed from the iframe). They will be removed in the next major version. Use the default success UI and `style.successUI` instead.

## [0.8.0] - 2026-01-30

### Added
- **Locale support** – UI (disclaimer) can be shown in 8 languages
  - Supported locales: `en`, `de`, `es`, `fr`, `it`, `nl`, `pl`, `pt`
  - Optional `locale` in config; defaults to browser language detection, fallback to English

## [0.7.0] - 2026-01-26

### Removed
- Removed `light` theme property completely from `CSSProperties` interface

### Changed
- Updated documentation to remove all light theme references
- Simplified dark mode documentation to only mention `dark` property usage
- Updated styling examples to show all available properties

## [0.6.0] - 2026-01-26

### Changed
- Deprecated `light` theme property in favor of base styles handling light theme by default
- Updated documentation to remove light theme code examples

## [0.5.0] - 2026-01-22

### Changed
- Updated CDN URLs to use jsDelivr instead of custom CDN
- Improved documentation with correct CDN examples
- Updated all documentation examples to use exact version pinning for production safety

## [0.3.0] - 2026-01-21

### Added
- **Dynamic Height Calculation**: Iframe now automatically adjusts its height based on content using postMessage communication
  - Eliminates unnecessary empty space when no error/success messages are displayed
  - Prevents overflow when messages appear
  - Smooth height transitions with CSS animations
  - Height is calculated and sent from iframe to parent SDK when content changes

## [0.2.0] - 2026-01-21

### Added
- **Skeleton Loader with Shimmer Effect**: Beautiful loading state that matches the SDK structure
  - Shimmer animation effect for better UX
  - Dark mode support with adaptive colors
  - Automatically hides when iframe is ready
- **Initial Height Fix**: Fixed iframe height to prevent overflow and empty space issues
  - Set minimum height to accommodate content

### Fixed
- Fixed iframe visibility issue where loader would show on top of iframe
- Fixed empty space issue when centering SDK in flex containers
- Fixed disclaimer overflow when general error/success messages appear

## [0.1.0] - 2026-01-20

### Added
- **Customization Properties**: Comprehensive styling API for customizing the payment form
  - Input container styling (backgroundColor, borderColor, borderRadius, borderEnabled)
  - Input field styling (textColor, placeholderColor, backgroundColor, borders)
  - Button styling with hover and disabled states
  - General error and success message styling
  - Theme support (light/dark mode overrides)
  - Custom font family selection
  - Custom button text
  - Custom input placeholders
- **Enhanced Type Safety**: Added proper TypeScript types for styling properties
  - `FontWeight` type: Supports numeric (100-900) and keyword values ('normal', 'bold', 'lighter', 'bolder')
  - `Opacity` type: Supports both number (0-1) and string ('0.5', '50%') values

### Changed
- **Button Border Logic**: Fixed inconsistent border behavior
  - Borders now only apply when `borderEnabled: true` is explicitly set
  - Previously, borders would appear if `borderColor` was provided without `borderEnabled`
  - Matches the behavior of `inputContainer` border logic

## [0.0.1] 

### Added
- Initial release of the SDK with iframe-based payment flow
- React and vanilla JavaScript support
- Basic payment processing
- 3D Secure (3DS) support
- TypeScript definitions
- Secure iframe-based card form
- Automatic 3DS handling
