Skip to content

Commit 79957cb

Browse files
Merge pull request #151 from vanpra/0.7.2
Library version 0.7.2
2 parents 71903f9 + 78694e6 commit 79957cb

File tree

7 files changed

+36
-28
lines changed

7 files changed

+36
-28
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 0.7.2 - 2022-05-25
4+
5+
- Fix input import and documentation ([#148](https://github.com/vanpra/compose-material-dialogs/pull/148))
6+
37
### 0.7.1 - 2022-05-16
48

59
- Internationalise start day of week in date picker ([#146](https://github.com/vanpra/compose-material-dialogs/issues/146) and [#54](https://github.com/vanpra/compose-material-dialogs/issues/54))

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae8d455118164f43a24732761a970cc8)](https://www.codacy.com/gh/vanpra/compose-material-dialogs/dashboard?utm_source=github.com&utm_medium=referral&utm_content=vanpra/compose-material-dialogs&utm_campaign=Badge_Grade)![Build & Test](https://github.com/vanpra/compose-material-dialogs/actions/workflows/main.yml/badge.svg)
66

7-
**Current Library Compose Version: 1.1.1**
7+
**Latest Stable Library Version: 0.7.2 (Supports Compose 1.1.1)**
88

99
### [See Releases and Changelog](https://github.com/vanpra/compose-material-dialogs/blob/main/CHANGELOG.md)
1010

@@ -19,7 +19,7 @@
1919
```gradle
2020
dependencies {
2121
...
22-
implementation "io.github.vanpra.compose-material-dialogs:core:0.7.1"
22+
implementation "io.github.vanpra.compose-material-dialogs:core:${version}"
2323
...
2424
}
2525
```
@@ -35,7 +35,7 @@ dependencies {
3535
```gradle
3636
dependencies {
3737
...
38-
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.7.1"
38+
implementation "io.github.vanpra.compose-material-dialogs:datetime:${version}"
3939
...
4040
}
4141
```
@@ -51,7 +51,7 @@ dependencies {
5151
```gradle
5252
dependencies {
5353
...
54-
implementation "io.github.vanpra.compose-material-dialogs:color:0.7.1"
54+
implementation "io.github.vanpra.compose-material-dialogs:color:${version}"
5555
...
5656
}
5757
```

app/src/main/java/com/vanpra/composematerialdialogdemos/demos/BasicDialog.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ import androidx.compose.ui.graphics.ColorFilter
1515
import androidx.compose.ui.text.input.ImeAction
1616
import com.vanpra.composematerialdialogdemos.DialogAndShowButton
1717
import com.vanpra.composematerialdialogdemos.R
18+
import com.vanpra.composematerialdialogs.TextFieldStyle
1819
import com.vanpra.composematerialdialogs.iconTitle
20+
import com.vanpra.composematerialdialogs.input
1921
import com.vanpra.composematerialdialogs.message
2022
import com.vanpra.composematerialdialogs.title
21-
import input
2223

2324
/**
2425
* @brief Basic Dialog Demos

core/src/androidTest/java/com/vanpra/composematerialdialogs/test/functional/InputDialogTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.ui.test.performTextClearance
1212
import androidx.compose.ui.test.performTextInput
1313
import androidx.test.ext.junit.runners.AndroidJUnit4
1414
import com.vanpra.composematerialdialogs.MaterialDialogScope
15+
import com.vanpra.composematerialdialogs.input
1516
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
1617
import com.vanpra.composematerialdialogs.test.R
1718
import com.vanpra.composematerialdialogs.test.utils.DialogWithContent
@@ -20,7 +21,6 @@ import com.vanpra.composematerialdialogs.test.utils.extensions.onDialogInput
2021
import com.vanpra.composematerialdialogs.test.utils.extensions.onDialogInputError
2122
import com.vanpra.composematerialdialogs.test.utils.extensions.onPositiveButton
2223
import com.vanpra.composematerialdialogs.title
23-
import input
2424
import org.junit.Assert.assertEquals
2525
import org.junit.Rule
2626
import org.junit.Test

core/src/androidTest/java/com/vanpra/composematerialdialogs/test/screenshot/InputDialogTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package com.vanpra.composematerialdialogs.test.screenshot
33
import androidx.compose.ui.test.junit4.createComposeRule
44
import androidx.test.ext.junit.runners.AndroidJUnit4
55
import com.karumi.shot.ScreenshotTest
6+
import com.vanpra.composematerialdialogs.TextFieldStyle
7+
import com.vanpra.composematerialdialogs.input
68
import com.vanpra.composematerialdialogs.test.R
79
import com.vanpra.composematerialdialogs.test.utils.DialogWithContent
810
import com.vanpra.composematerialdialogs.test.utils.extensions.onDialog
911
import com.vanpra.composematerialdialogs.test.utils.extensions.setContentAndWaitForIdle
1012
import com.vanpra.composematerialdialogs.title
11-
import input
1213
import org.junit.Rule
1314
import org.junit.Test
1415
import org.junit.runner.RunWith

core/src/main/java/com/vanpra/composematerialdialogs/MaterialDialogInput.kt

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package com.vanpra.composematerialdialogs
2+
13
import androidx.compose.foundation.interaction.MutableInteractionSource
24
import androidx.compose.foundation.layout.Column
35
import androidx.compose.foundation.layout.fillMaxWidth
@@ -26,31 +28,31 @@ import androidx.compose.ui.text.TextStyle
2628
import androidx.compose.ui.text.input.VisualTransformation
2729
import androidx.compose.ui.unit.dp
2830
import androidx.compose.ui.unit.sp
29-
import com.vanpra.composematerialdialogs.MaterialDialogScope
3031

3132
enum class TextFieldStyle {
3233
Filled,
33-
Outlined/**
34-
* Adds an input field with the given parameters to the dialog
35-
* @param label string to be shown in the input field before selection eg. Username
36-
* @param hint hint to be shown in the input field when it is selected but empty eg. Joe
37-
* @param prefill string to be input into the text field by default
38-
* @param waitForPositiveButton if true the [onInput] callback will only be called when the
39-
* positive button is pressed, otherwise it will be called when the input value is changed
40-
* @param visualTransformation a visual transformation of the content of the text field
41-
* @param keyboardOptions software keyboard options which can be used to customize parts
42-
* of the keyboard
43-
* @param errorMessage a message to be shown to the user when the input is not valid
44-
* @param focusRequester a [FocusRequester] which can be used to control the focus state of the
45-
* text field
46-
* @param focusOnShow if set to true this will auto focus the text field when the input
47-
* field is shown
48-
* @param isTextValid a function which is called to check if the user input is valid
49-
* @param onInput a function which is called with the user input. The timing of this call is
50-
* dictated by [waitForPositiveButton]
51-
*/
34+
Outlined
5235
}
5336

37+
/**
38+
* Adds an input field with the given parameters to the dialog
39+
* @param label string to be shown in the input field before selection eg. Username
40+
* @param placeholder hint to be shown in the input field when it is selected but empty eg. Joe
41+
* @param prefill string to be input into the text field by default
42+
* @param waitForPositiveButton if true the [onInput] callback will only be called when the
43+
* positive button is pressed, otherwise it will be called when the input value is changed
44+
* @param visualTransformation a visual transformation of the content of the text field
45+
* @param keyboardOptions software keyboard options which can be used to customize parts
46+
* of the keyboard
47+
* @param errorMessage a message to be shown to the user when the input is not valid
48+
* @param focusRequester a [FocusRequester] which can be used to control the focus state of the
49+
* text field
50+
* @param focusOnShow if set to true this will auto focus the text field when the input
51+
* field is shown
52+
* @param isTextValid a function which is called to check if the user input is valid
53+
* @param onInput a function which is called with the user input. The timing of this call is
54+
* dictated by [waitForPositiveButton]
55+
*/
5456
@Composable
5557
fun MaterialDialogScope.input(
5658
modifier: Modifier = Modifier,

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android.enableJetifier=false
1010
kotlin.code.style=official
1111

1212
GROUP=io.github.vanpra.compose-material-dialogs
13-
VERSION_NAME=0.6.3
13+
VERSION_NAME=0.7.2
1414

1515
POM_DESCRIPTION=A Material Dialog Builder for Jetpack Compose
1616
POM_INCEPTION_YEAR=2020

0 commit comments

Comments
 (0)