From d633db0a3f04a25a496f2a9d1b00f819d3715be0 Mon Sep 17 00:00:00 2001 From: nicolashaan Date: Thu, 4 Jan 2024 15:29:55 +0100 Subject: [PATCH] refactor: Set Compose modifier as first optional parameter (#210) For Jetpack Compose components, update parameters order so that mandatory parameters come before modifier parameters. --- CHANGELOG.md | 4 +++ .../compose/api/compose.api | 32 +++++++++---------- .../compose/viewmodel/VMDButton.kt | 2 +- .../compose/viewmodel/VMDCheckbox.kt | 2 +- .../viewmodel/VMDCircularProgressIndicator.kt | 2 +- .../compose/viewmodel/VMDLabeledComponent.kt | 4 +-- .../compose/viewmodel/VMDLazyColumn.kt | 2 +- .../compose/viewmodel/VMDLazyRow.kt | 2 +- .../viewmodel/VMDLinearProgressIndicator.kt | 2 +- .../declarative/compose/viewmodel/VMDList.kt | 2 +- .../compose/viewmodel/VMDSwitch.kt | 2 +- .../declarative/compose/viewmodel/VMDText.kt | 2 +- .../compose/viewmodel/VMDTextField.kt | 2 +- .../material3/VMDCircularProgressIndicator.kt | 2 +- .../material3/VMDLinearProgressIndicator.kt | 2 +- .../compose/viewmodel/material3/VMDSwitch.kt | 2 +- .../compose/viewmodel/material3/VMDText.kt | 2 +- .../viewmodel/material3/VMDTextField.kt | 2 +- 18 files changed, 37 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25fca9b6..55a4b426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Upcoming +### Breaking Changes + +- [VMD] Change parameters order for some Compose components + ### Updates - Gradle to `8.4` diff --git a/trikot-viewmodels-declarative/compose/api/compose.api b/trikot-viewmodels-declarative/compose/api/compose.api index 3f647b19..fa4c3fbb 100644 --- a/trikot-viewmodels-declarative/compose/api/compose.api +++ b/trikot-viewmodels-declarative/compose/api/compose.api @@ -71,16 +71,16 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/Pl } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDButtonKt { - public static final fun VMDButton-TC8WvNY (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDButtonViewModel;Landroidx/compose/ui/Alignment;ZLandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/foundation/Indication;Landroidx/compose/ui/semantics/Role;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDButton-TC8WvNY (Lcom/mirego/trikot/viewmodels/declarative/components/VMDButtonViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;ZLandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/foundation/Indication;Landroidx/compose/ui/semantics/Role;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCheckboxKt { - public static final fun VMDCheckbox (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/CheckboxColors;Landroidx/compose/runtime/Composer;II)V public static final fun VMDCheckbox (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Lkotlin/jvm/functions/Function4;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/CheckboxColors;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDCheckbox (Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/CheckboxColors;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCircularProgressIndicatorKt { - public static final fun VMDCircularProgressIndicator-DUhRLBM (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;JFJILandroidx/compose/runtime/Composer;II)V + public static final fun VMDCircularProgressIndicator-DUhRLBM (Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;Landroidx/compose/ui/Modifier;JFJILandroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDDropDownMenuKt { @@ -101,40 +101,40 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VM } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLabeledComponentKt { - public static final fun VMDLabeledComponent (Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDLabeledComponent (Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyColumnKt { - public static final fun VMDLazyColumn (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDLazyColumn (Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun VMDLazyColumnIndexed (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyRowKt { - public static final fun VMDLazyRow (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Horizontal;Landroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDLazyRow (Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Horizontal;Landroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun VMDLazyRowIndexed (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Horizontal;Landroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function5;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLinearProgressIndicatorKt { - public static final fun VMDLinearProgressIndicator-eaDK9VM (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;JJLandroidx/compose/runtime/Composer;II)V + public static final fun VMDLinearProgressIndicator-eaDK9VM (Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;Landroidx/compose/ui/Modifier;JJLandroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDListKt { - public static final fun VMDList (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDList (Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun VMDSectionedList (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDListViewModel;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDSwitchKt { - public static final fun VMDSwitch (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/SwitchColors;Landroidx/compose/runtime/Composer;II)V public static final fun VMDSwitch (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Lkotlin/jvm/functions/Function4;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/SwitchColors;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDSwitch (Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material/SwitchColors;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextFieldKt { - public static final fun VMDTextField (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/foundation/text/KeyboardActions;ZZIILandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material/TextFieldColors;Landroidx/compose/runtime/Composer;III)V + public static final fun VMDTextField (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/foundation/text/KeyboardActions;ZZIILandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material/TextFieldColors;Landroidx/compose/runtime/Composer;III)V public static final fun buildKeyboardActions (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/foundation/text/KeyboardActions;)Landroidx/compose/foundation/text/KeyboardActions; } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextKt { - public static final fun VMDText--4IGK_g (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextViewModel;JJLandroidx/compose/ui/text/font/FontStyle;Landroidx/compose/ui/text/font/FontWeight;Landroidx/compose/ui/text/font/FontFamily;JLandroidx/compose/ui/text/style/TextDecoration;Landroidx/compose/ui/text/style/TextAlign;JIZIILkotlin/jvm/functions/Function1;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V + public static final fun VMDText--4IGK_g (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextViewModel;Landroidx/compose/ui/Modifier;JJLandroidx/compose/ui/text/font/FontStyle;Landroidx/compose/ui/text/font/FontWeight;Landroidx/compose/ui/text/font/FontFamily;JLandroidx/compose/ui/text/style/TextDecoration;Landroidx/compose/ui/text/style/TextAlign;JIZIILkotlin/jvm/functions/Function1;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/ComposableSingletons$VMDCheckboxKt { @@ -165,7 +165,7 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/ma } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDCircularProgressIndicatorKt { - public static final fun VMDCircularProgressIndicator-DUhRLBM (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;JFJILandroidx/compose/runtime/Composer;II)V + public static final fun VMDCircularProgressIndicator-DUhRLBM (Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;Landroidx/compose/ui/Modifier;JFJILandroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDDropDownMenuKt { @@ -182,7 +182,7 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/ma } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDLinearProgressIndicatorKt { - public static final fun VMDLinearProgressIndicator-eaDK9VM (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;JJLandroidx/compose/runtime/Composer;II)V + public static final fun VMDLinearProgressIndicator-eaDK9VM (Lcom/mirego/trikot/viewmodels/declarative/components/VMDProgressViewModel;Landroidx/compose/ui/Modifier;JJLandroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDOutlinedButtonKt { @@ -190,8 +190,8 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/ma } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDSwitchKt { - public static final fun VMDSwitch (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material3/SwitchColors;Landroidx/compose/runtime/Composer;II)V public static final fun VMDSwitch (Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Lkotlin/jvm/functions/Function4;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material3/SwitchColors;Landroidx/compose/runtime/Composer;II)V + public static final fun VMDSwitch (Lcom/mirego/trikot/viewmodels/declarative/components/VMDToggleViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/material3/SwitchColors;Landroidx/compose/runtime/Composer;II)V } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextButtonKt { @@ -199,11 +199,11 @@ public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/ma } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextFieldKt { - public static final fun VMDTextField (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/foundation/text/KeyboardActions;ZZIILandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material3/TextFieldColors;Landroidx/compose/runtime/Composer;III)V + public static final fun VMDTextField (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Landroidx/compose/foundation/text/KeyboardActions;ZZIILandroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/ui/graphics/Shape;Landroidx/compose/material3/TextFieldColors;Landroidx/compose/runtime/Composer;III)V public static final fun buildKeyboardActions (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextFieldViewModel;Landroidx/compose/foundation/text/KeyboardActions;)Landroidx/compose/foundation/text/KeyboardActions; } public final class com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextKt { - public static final fun VMDText--4IGK_g (Landroidx/compose/ui/Modifier;Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextViewModel;JJLandroidx/compose/ui/text/font/FontStyle;Landroidx/compose/ui/text/font/FontWeight;Landroidx/compose/ui/text/font/FontFamily;JLandroidx/compose/ui/text/style/TextDecoration;Landroidx/compose/ui/text/style/TextAlign;JIZIILkotlin/jvm/functions/Function1;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V + public static final fun VMDText--4IGK_g (Lcom/mirego/trikot/viewmodels/declarative/components/VMDTextViewModel;Landroidx/compose/ui/Modifier;JJLandroidx/compose/ui/text/font/FontStyle;Landroidx/compose/ui/text/font/FontWeight;Landroidx/compose/ui/text/font/FontFamily;JLandroidx/compose/ui/text/style/TextDecoration;Landroidx/compose/ui/text/style/TextAlign;JIZIILkotlin/jvm/functions/Function1;Landroidx/compose/ui/text/TextStyle;Landroidx/compose/runtime/Composer;III)V } diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDButton.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDButton.kt index b4604e25..841bab82 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDButton.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDButton.kt @@ -20,8 +20,8 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDContent @Composable fun VMDButton( - modifier: Modifier = Modifier, viewModel: VMDButtonViewModel, + modifier: Modifier = Modifier, contentAlignment: Alignment = Alignment.Center, propagateMinConstraints: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCheckbox.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCheckbox.kt index 831d7b79..5f073e05 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCheckbox.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCheckbox.kt @@ -22,9 +22,9 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDNoContent @Composable fun VMDCheckbox( + viewModel: VMDToggleViewModel, modifier: Modifier = Modifier, componentModifier: Modifier = Modifier, - viewModel: VMDToggleViewModel, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, colors: CheckboxColors = CheckboxDefaults.colors() ) { diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCircularProgressIndicator.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCircularProgressIndicator.kt index c5a40be4..226445ea 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCircularProgressIndicator.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDCircularProgressIndicator.kt @@ -20,8 +20,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDCircularProgressIndicator( - modifier: Modifier = Modifier, viewModel: VMDProgressViewModel, + modifier: Modifier = Modifier, color: Color = MaterialTheme.colors.primary, strokeWidth: Dp = ProgressIndicatorDefaults.StrokeWidth, backgroundColor: Color = Color.Transparent, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLabeledComponent.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLabeledComponent.kt index adb5f979..c680ddda 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLabeledComponent.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLabeledComponent.kt @@ -9,9 +9,9 @@ import androidx.compose.ui.Modifier @Composable fun VMDLabeledComponent( - modifier: Modifier = Modifier, label: @Composable RowScope.() -> Unit, - content: @Composable RowScope.() -> Unit + content: @Composable RowScope.() -> Unit, + modifier: Modifier = Modifier ) { Row( modifier = modifier, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyColumn.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyColumn.kt index 08d3034f..509a9426 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyColumn.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyColumn.kt @@ -21,8 +21,8 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDIdentifiableContent @Composable fun VMDLazyColumn( - modifier: Modifier = Modifier, viewModel: VMDListViewModel, + modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyRow.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyRow.kt index fb64f2e7..00bcbdea 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyRow.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLazyRow.kt @@ -21,8 +21,8 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDIdentifiableContent @Composable fun VMDLazyRow( - modifier: Modifier = Modifier, viewModel: VMDListViewModel, + modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLinearProgressIndicator.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLinearProgressIndicator.kt index a0fd0917..a369150b 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLinearProgressIndicator.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDLinearProgressIndicator.kt @@ -19,8 +19,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDLinearProgressIndicator( - modifier: Modifier = Modifier, viewModel: VMDProgressViewModel, + modifier: Modifier = Modifier, color: Color = MaterialTheme.colors.primary, backgroundColor: Color = color.copy(alpha = ProgressIndicatorDefaults.IndicatorBackgroundOpacity) ) { diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDList.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDList.kt index 51c3c161..8eb29deb 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDList.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDList.kt @@ -24,8 +24,8 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDIdentifiableContent @Deprecated("Use either VMDLazyColumn instead") @Composable fun VMDList( - modifier: Modifier = Modifier, viewModel: VMDListViewModel, + modifier: Modifier = Modifier, state: LazyListState = rememberLazyListState(), contentPadding: PaddingValues = PaddingValues(0.dp), reverseLayout: Boolean = false, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDSwitch.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDSwitch.kt index 09dee81a..9fd0eb41 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDSwitch.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDSwitch.kt @@ -22,9 +22,9 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDNoContent @Composable fun VMDSwitch( + viewModel: VMDToggleViewModel, modifier: Modifier = Modifier, componentModifier: Modifier = Modifier, - viewModel: VMDToggleViewModel, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, colors: SwitchColors = SwitchDefaults.colors() ) { diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDText.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDText.kt index c119dd45..7c1f7bcb 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDText.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDText.kt @@ -22,8 +22,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDText( - modifier: Modifier = Modifier, viewModel: VMDTextViewModel, + modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextField.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextField.kt index b5f8eebd..20b3ccc3 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextField.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/VMDTextField.kt @@ -25,8 +25,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.viewmodel.internal.Forma @Composable fun VMDTextField( - modifier: Modifier = Modifier, viewModel: VMDTextFieldViewModel, + modifier: Modifier = Modifier, textStyle: TextStyle = LocalTextStyle.current, placeHolderStyle: TextStyle = LocalTextStyle.current, label: @Composable (() -> Unit)? = null, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDCircularProgressIndicator.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDCircularProgressIndicator.kt index cc01bcea..064a9215 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDCircularProgressIndicator.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDCircularProgressIndicator.kt @@ -20,8 +20,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDCircularProgressIndicator( - modifier: Modifier = Modifier, viewModel: VMDProgressViewModel, + modifier: Modifier = Modifier, color: Color = MaterialTheme.colorScheme.primary, strokeWidth: Dp = ProgressIndicatorDefaults.CircularStrokeWidth, trackColor: Color = ProgressIndicatorDefaults.circularTrackColor, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDLinearProgressIndicator.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDLinearProgressIndicator.kt index 00ea3612..2a400933 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDLinearProgressIndicator.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDLinearProgressIndicator.kt @@ -18,8 +18,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDLinearProgressIndicator( - modifier: Modifier = Modifier, viewModel: VMDProgressViewModel, + modifier: Modifier = Modifier, color: Color = ProgressIndicatorDefaults.linearColor, trackColor: Color = ProgressIndicatorDefaults.linearTrackColor ) { diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDSwitch.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDSwitch.kt index d464d7dd..3a5f82c4 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDSwitch.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDSwitch.kt @@ -23,9 +23,9 @@ import com.mirego.trikot.viewmodels.declarative.content.VMDNoContent @Composable fun VMDSwitch( + viewModel: VMDToggleViewModel, modifier: Modifier = Modifier, componentModifier: Modifier = Modifier, - viewModel: VMDToggleViewModel, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, colors: SwitchColors = SwitchDefaults.colors() ) { diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDText.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDText.kt index 4394ed5b..b92f2c1f 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDText.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDText.kt @@ -22,8 +22,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.extensions.observeAsStat @Composable fun VMDText( - modifier: Modifier = Modifier, viewModel: VMDTextViewModel, + modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, diff --git a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextField.kt b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextField.kt index 228f4eee..437442f8 100644 --- a/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextField.kt +++ b/trikot-viewmodels-declarative/compose/src/main/kotlin/com/mirego/trikot/viewmodels/declarative/compose/viewmodel/material3/VMDTextField.kt @@ -25,8 +25,8 @@ import com.mirego.trikot.viewmodels.declarative.compose.viewmodel.internal.Forma @Composable fun VMDTextField( - modifier: Modifier = Modifier, viewModel: VMDTextFieldViewModel, + modifier: Modifier = Modifier, textStyle: TextStyle = LocalTextStyle.current, placeHolderStyle: TextStyle = LocalTextStyle.current, label: @Composable (() -> Unit)? = null,