Skip to content

Commit

Permalink
Merge pull request #151 from vanpra/0.7.2
Browse files Browse the repository at this point in the history
Library version 0.7.2
  • Loading branch information
PranavMaganti authored May 24, 2022
2 parents 71903f9 + 78694e6 commit 79957cb
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 0.7.2 - 2022-05-25

- Fix input import and documentation ([#148](https://github.com/vanpra/compose-material-dialogs/pull/148))

### 0.7.1 - 2022-05-16

- 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))
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![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)

**Current Library Compose Version: 1.1.1**
**Latest Stable Library Version: 0.7.2 (Supports Compose 1.1.1)**

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

Expand All @@ -19,7 +19,7 @@
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:core:0.7.1"
implementation "io.github.vanpra.compose-material-dialogs:core:${version}"
...
}
```
Expand All @@ -35,7 +35,7 @@ dependencies {
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.7.1"
implementation "io.github.vanpra.compose-material-dialogs:datetime:${version}"
...
}
```
Expand All @@ -51,7 +51,7 @@ dependencies {
```gradle
dependencies {
...
implementation "io.github.vanpra.compose-material-dialogs:color:0.7.1"
implementation "io.github.vanpra.compose-material-dialogs:color:${version}"
...
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.text.input.ImeAction
import com.vanpra.composematerialdialogdemos.DialogAndShowButton
import com.vanpra.composematerialdialogdemos.R
import com.vanpra.composematerialdialogs.TextFieldStyle
import com.vanpra.composematerialdialogs.iconTitle
import com.vanpra.composematerialdialogs.input
import com.vanpra.composematerialdialogs.message
import com.vanpra.composematerialdialogs.title
import input

/**
* @brief Basic Dialog Demos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.test.performTextClearance
import androidx.compose.ui.test.performTextInput
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.vanpra.composematerialdialogs.MaterialDialogScope
import com.vanpra.composematerialdialogs.input
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
import com.vanpra.composematerialdialogs.test.R
import com.vanpra.composematerialdialogs.test.utils.DialogWithContent
Expand All @@ -20,7 +21,6 @@ import com.vanpra.composematerialdialogs.test.utils.extensions.onDialogInput
import com.vanpra.composematerialdialogs.test.utils.extensions.onDialogInputError
import com.vanpra.composematerialdialogs.test.utils.extensions.onPositiveButton
import com.vanpra.composematerialdialogs.title
import input
import org.junit.Assert.assertEquals
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package com.vanpra.composematerialdialogs.test.screenshot
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.karumi.shot.ScreenshotTest
import com.vanpra.composematerialdialogs.TextFieldStyle
import com.vanpra.composematerialdialogs.input
import com.vanpra.composematerialdialogs.test.R
import com.vanpra.composematerialdialogs.test.utils.DialogWithContent
import com.vanpra.composematerialdialogs.test.utils.extensions.onDialog
import com.vanpra.composematerialdialogs.test.utils.extensions.setContentAndWaitForIdle
import com.vanpra.composematerialdialogs.title
import input
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package com.vanpra.composematerialdialogs

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -26,31 +28,31 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.vanpra.composematerialdialogs.MaterialDialogScope

enum class TextFieldStyle {
Filled,
Outlined/**
* Adds an input field with the given parameters to the dialog
* @param label string to be shown in the input field before selection eg. Username
* @param hint hint to be shown in the input field when it is selected but empty eg. Joe
* @param prefill string to be input into the text field by default
* @param waitForPositiveButton if true the [onInput] callback will only be called when the
* positive button is pressed, otherwise it will be called when the input value is changed
* @param visualTransformation a visual transformation of the content of the text field
* @param keyboardOptions software keyboard options which can be used to customize parts
* of the keyboard
* @param errorMessage a message to be shown to the user when the input is not valid
* @param focusRequester a [FocusRequester] which can be used to control the focus state of the
* text field
* @param focusOnShow if set to true this will auto focus the text field when the input
* field is shown
* @param isTextValid a function which is called to check if the user input is valid
* @param onInput a function which is called with the user input. The timing of this call is
* dictated by [waitForPositiveButton]
*/
Outlined
}

/**
* Adds an input field with the given parameters to the dialog
* @param label string to be shown in the input field before selection eg. Username
* @param placeholder hint to be shown in the input field when it is selected but empty eg. Joe
* @param prefill string to be input into the text field by default
* @param waitForPositiveButton if true the [onInput] callback will only be called when the
* positive button is pressed, otherwise it will be called when the input value is changed
* @param visualTransformation a visual transformation of the content of the text field
* @param keyboardOptions software keyboard options which can be used to customize parts
* of the keyboard
* @param errorMessage a message to be shown to the user when the input is not valid
* @param focusRequester a [FocusRequester] which can be used to control the focus state of the
* text field
* @param focusOnShow if set to true this will auto focus the text field when the input
* field is shown
* @param isTextValid a function which is called to check if the user input is valid
* @param onInput a function which is called with the user input. The timing of this call is
* dictated by [waitForPositiveButton]
*/
@Composable
fun MaterialDialogScope.input(
modifier: Modifier = Modifier,
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android.enableJetifier=false
kotlin.code.style=official

GROUP=io.github.vanpra.compose-material-dialogs
VERSION_NAME=0.6.3
VERSION_NAME=0.7.2

POM_DESCRIPTION=A Material Dialog Builder for Jetpack Compose
POM_INCEPTION_YEAR=2020
Expand Down

0 comments on commit 79957cb

Please sign in to comment.