@@ -38,93 +38,10 @@ dependencies {
3838
3939[ CHANGELOG] ( https://github.com/davidmigloz/number-keyboard/blob/master/CHANGELOG.md )
4040
41- ## [ 5.0.2]
4241
43- - Fixed ` rawAmount ` having 0 in front.
42+ #### [ 5.0.0 ] - Kotlin Multiplatform Version
4443
45- ### ⚠️ Breaking Changes
4644
47- - Removed ` onAmountChange: (String) -> Unit ` and merge with ` NumberKeyboardListener ` implementation.
48-
49- ** 🧭 Migration Guide**
50-
51- ``` kotlin
52- var amountWithCurrency by remember { mutableStateOf(" $currencySymbol 0" ) }
53- var amount by remember { mutableStateOf(" " ) }
54-
55- NumberKeyboard (
56- amount = amount,
57- listener = object : NumberKeyboardListener {
58- override fun onUpdated (data : NumberKeyboardData ) {
59- amountWithCurrency = data.currency
60- amount = data.rawAmount
61- }
62- }
63- )
64- ```
65-
66- ## [ 5.0.0] - Kotlin Multiplatform Version
67-
68- ### ✨ New Features
69-
70- • Introduced NumberKeyboardFormat enum to control keypad layout:
71-
72- ``` kotlin
73- enum class NumberKeyboardFormat {
74- Normal , // Standard ascending layout (like phone dial pad)
75- Inverted , // Descending layout (like a calculator)
76- Scrambled , // Shuffled once on composition
77- AlwaysScrambled // Re-shuffles every tap (chaos, but secure chaos)
78- }
79- ```
80-
81- ### ⚠️ Breaking Changes
82-
83- - ` isInverted: Boolean ` is now deprecated
84- One flag was never enough. Now you’ve got four layout options to rule them all. Replace
85-
86- ``` kotlin
87- isInverted = true
88- ```
89-
90- with:
91-
92- ``` kotlin
93- format = NumberKeyboardFormat .Inverted
94- ```
95-
96- ** 🧭 Migration Guide**
97-
98- | Before | After |
99- | --------------------| ----------------------------------------|
100- | isInverted = false | format = NumberKeyboardFormat.Normal |
101- | isInverted = true | format = NumberKeyboardFormat.Inverted |
102-
103- - ` NumberKeyboard ` is now a ** stateless composable** .
104- - Removed internal ` remember ` state for the input amount.
105- - You ** must** provide:
106- - ` amount: String `
107- - ` onAmountChange: (String) -> Unit `
108- - Removed ` initialAmount ` attribute.
109- - This enables external state management and improves integration with architectures like MVI,
110- ViewModel, etc.
111-
112- ** Before:**
113-
114- ``` kotlin
115- NumberKeyboard () // internally remembered state
116- ```
117-
118- ** After:**
119-
120- ``` kotlin
121- var amount by remember { mutableStateOf(" " ) }
122-
123- NumberKeyboard (
124- amount = amount,
125- onAmountChange = { amount = it }
126- )
127- ```
12845
12946## [ 4.0.0] - Jetpack Compose Version
13047
0 commit comments