-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2315 from HedvigInsurance/ds/travel-certificate
GEN-2547: travel certificate
- Loading branch information
Showing
34 changed files
with
736 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
app/core/core-ui/src/main/kotlin/com/hedvig/android/core/ui/RoundedCornerCheckBox.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugins { | ||
id("hedvig.gradle.plugin") | ||
id("hedvig.kotlin.library") | ||
} | ||
|
||
dependencies { | ||
implementation(platform(libs.androidx.compose.bom)) | ||
implementation(libs.androidx.compose.runtime) | ||
} |
44 changes: 44 additions & 0 deletions
44
...-api/src/main/kotlin/com/hedvig/android/design/system/hedvig/api/HedvigDatePickerState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.hedvig.android.design.system.hedvig.api | ||
|
||
import androidx.compose.runtime.Immutable | ||
import androidx.compose.runtime.Stable | ||
|
||
@Stable | ||
interface HedvigDatePickerState { | ||
var selectedDateMillis: Long? | ||
var displayedMonthMillis: Long | ||
var displayMode: HedvigDisplayMode | ||
val yearRange: IntRange | ||
val selectableDates: HedvigSelectableDates | ||
} | ||
|
||
@Stable | ||
interface HedvigSelectableDates { | ||
fun isSelectableDate(utcTimeMillis: Long) = true | ||
|
||
fun isSelectableYear(year: Int) = true | ||
} | ||
|
||
@Immutable | ||
@JvmInline | ||
value class HedvigDisplayMode internal constructor(internal val value: Int) { | ||
companion object { | ||
/** Date picker mode */ | ||
val Picker = HedvigDisplayMode(0) | ||
|
||
/** Date text input mode */ | ||
val Input = HedvigDisplayMode(1) | ||
} | ||
|
||
override fun toString() = when (this) { | ||
Picker -> "Picker" | ||
Input -> "Input" | ||
else -> "Unknown" | ||
} | ||
} | ||
|
||
object HedvigDatePickerDefaults { | ||
val displayMode = HedvigDisplayMode.Picker | ||
val YearRange: IntRange = IntRange(1900, 2100) | ||
val AllDates: HedvigSelectableDates = object : HedvigSelectableDates {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...m-hedvig/src/main/kotlin/com/hedvig/android/design/system/hedvig/motion/MotionDefaults.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.hedvig.android.design.system.hedvig.motion | ||
|
||
import androidx.compose.animation.EnterTransition | ||
import androidx.compose.animation.ExitTransition | ||
import androidx.compose.ui.unit.Density | ||
import androidx.compose.ui.unit.dp | ||
|
||
object MotionDefaults { | ||
fun sharedXAxisEnter(density: Density): EnterTransition { | ||
val offsetPixels = with(density) { SharedAxisDefaults.SharedAxisOffset.dp.roundToPx() } | ||
return SharedAxisDefaults.sharedXAxisEnterTransition(offsetPixels) | ||
} | ||
|
||
fun sharedXAxisExit(density: Density): ExitTransition { | ||
val offsetPixels = with(density) { SharedAxisDefaults.SharedAxisOffset.dp.roundToPx() } | ||
return SharedAxisDefaults.sharedXAxisExitTransition(-offsetPixels) | ||
} | ||
|
||
fun sharedXAxisPopEnter(density: Density): EnterTransition { | ||
val offsetPixels = with(density) { SharedAxisDefaults.SharedAxisOffset.dp.roundToPx() } | ||
return SharedAxisDefaults.sharedXAxisEnterTransition(-offsetPixels) | ||
} | ||
|
||
fun sharedXAxisPopExit(density: Density): ExitTransition { | ||
val offsetPixels = with(density) { SharedAxisDefaults.SharedAxisOffset.dp.roundToPx() } | ||
return SharedAxisDefaults.sharedXAxisExitTransition(offsetPixels) | ||
} | ||
|
||
val fadeThroughEnter: EnterTransition = FadeThroughDefaults.fadeThroughEnterTransition | ||
|
||
val fadeThroughExit: ExitTransition = FadeThroughDefaults.fadeThroughExitTransition | ||
} |
Oops, something went wrong.