Skip to content

Commit 940303e

Browse files
committed
library: Add missing annotations
1 parent 48917e4 commit 940303e

File tree

8 files changed

+19
-1
lines changed

8 files changed

+19
-1
lines changed

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/Component.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import top.yukonga.miuix.kmp.utils.createRipple
2828
* @param title The title of the [BasicComponent].
2929
* @param titleColor The color of the title.
3030
* @param summary The summary of the [BasicComponent].
31+
* @param summaryColor The color of the summary.
3132
* @param leftAction The [Composable] content that on the left side of the [BasicComponent].
3233
* @param rightActions The [Composable] content on the right side of the [BasicComponent].
3334
* @param onClick The callback when the [BasicComponent] is clicked.

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/SearchBar.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ fun SearchBar(
103103
* @param enabled the enabled state of this input field. When `false`, this component will not
104104
* respond to user input, and it will appear visually disabled and disabled to accessibility
105105
* services.
106+
* @param insideMargin the margin inside the [InputField].
106107
* @param leadingIcon the leading icon to be displayed at the start of the input field.
107108
* @param trailingIcon the trailing icon to be displayed at the end of the input field.
108109
* @param interactionSource an optional hoisted [MutableInteractionSource] for observing and

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/SmallTitle.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.padding
44
import androidx.compose.runtime.Composable
55
import androidx.compose.runtime.remember
66
import androidx.compose.ui.Modifier
7+
import androidx.compose.ui.graphics.Color
78
import androidx.compose.ui.text.font.FontWeight
89
import androidx.compose.ui.unit.DpSize
910
import androidx.compose.ui.unit.dp
@@ -14,12 +15,14 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
1415
* A title component with Miuix style.
1516
*
1617
* @param text The text to be displayed in the title.
18+
* @param textColor The color of the [SmallTitle].
1719
* @param modifier The modifier to be applied to the [SmallTitle].
1820
* @param insideMargin The margin inside the [SmallTitle].
1921
*/
2022
@Composable
2123
fun SmallTitle(
2224
text: String,
25+
textColor: Color = MiuixTheme.colorScheme.onBackgroundVariant,
2326
modifier: Modifier = Modifier,
2427
insideMargin: DpSize = DpSize(28.dp, 8.dp),
2528
) {
@@ -31,6 +34,6 @@ fun SmallTitle(
3134
text = text,
3235
fontSize = 14.sp,
3336
fontWeight = FontWeight.Medium,
34-
color = MiuixTheme.colorScheme.onBackgroundVariant
37+
color = textColor
3538
)
3639
}

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperArrow.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
2727
* @param title The title of the [SuperArrow].
2828
* @param titleColor The color of the title.
2929
* @param summary The summary of the [SuperArrow].
30+
* @param summaryColor The color of the summary.
3031
* @param leftAction The [Composable] content that on the left side of the [SuperArrow].
3132
* @param rightText The text on the right side of the [SuperArrow].
3233
* @param onClick The callback when the [SuperArrow] is clicked.
@@ -38,6 +39,7 @@ fun SuperArrow(
3839
title: String,
3940
titleColor: Color = MiuixTheme.colorScheme.onSurface,
4041
summary: String? = null,
42+
summaryColor: Color = MiuixTheme.colorScheme.onSurfaceVariantSummary,
4143
leftAction: @Composable (() -> Unit)? = null,
4244
rightText: String? = null,
4345
onClick: (() -> Unit)? = null,
@@ -50,6 +52,7 @@ fun SuperArrow(
5052
title = title,
5153
titleColor = titleColor,
5254
summary = summary,
55+
summaryColor = summaryColor,
5356
leftAction = leftAction,
5457
rightActions = { createRightActions(rightText) },
5558
onClick = updatedOnClick

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperCheckbox.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
2121
* @param title The title of the [SuperCheckbox].
2222
* @param titleColor The color of the title.
2323
* @param summary The summary of the [SuperCheckbox].
24+
* @param summaryColor The color of the summary.
2425
* @param rightActions The [Composable] content that on the right side of the [SuperCheckbox].
2526
* @param checked The checked state of the [SuperCheckbox].
2627
* @param onCheckedChange The callback when the checked state of the [SuperCheckbox] is changed.
@@ -33,6 +34,7 @@ fun SuperCheckbox(
3334
title: String,
3435
titleColor: Color = MiuixTheme.colorScheme.onSurface,
3536
summary: String? = null,
37+
summaryColor: Color = MiuixTheme.colorScheme.onSurfaceVariantSummary,
3638
rightActions: @Composable RowScope.() -> Unit = {},
3739
checked: Boolean,
3840
checkboxLocation: CheckboxLocation = CheckboxLocation.Left,
@@ -54,6 +56,7 @@ fun SuperCheckbox(
5456
title = title,
5557
titleColor = titleColor,
5658
summary = summary,
59+
summaryColor = summaryColor,
5760
leftAction = if (checkboxLocation == CheckboxLocation.Left) {
5861
{
5962
Checkbox(

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDialog.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import top.yukonga.miuix.kmp.utils.squircleshape.SquircleShape
3939
* @param title The title of the [SuperDialog].
4040
* @param titleColor The color of the title.
4141
* @param summary The summary of the [SuperDialog].
42+
* @param summaryColor The color of the summary.
4243
* @param show The state of the [SuperDialog].
4344
* @param onDismissRequest The callback when the [SuperDialog] is dismissed.
4445
* @param insideMargin The margin inside the [SuperDialog].

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ expect fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>
7878
* @param title The title of the [SuperDropdown].
7979
* @param titleColor The color of the title.
8080
* @param summary The summary of the [SuperDropdown].
81+
* @param summaryColor The color of the summary.
8182
* @param modifier The modifier to be applied to the [SuperDropdown].
8283
* @param items The options of the [SuperDropdown].
8384
* @param alwaysRight Whether the popup is always show on the right side.
@@ -90,6 +91,7 @@ fun SuperDropdown(
9091
title: String,
9192
titleColor: Color = MiuixTheme.colorScheme.onSurface,
9293
summary: String? = null,
94+
summaryColor: Color = MiuixTheme.colorScheme.onSurfaceVariantSummary,
9395
modifier: Modifier = Modifier,
9496
items: List<String>,
9597
alwaysRight: Boolean = false,
@@ -163,6 +165,7 @@ fun SuperDropdown(
163165
title = title,
164166
titleColor = titleColor,
165167
summary = summary,
168+
summaryColor = summaryColor,
166169
rightActions = {
167170
Text(
168171
modifier = Modifier.padding(end = 6.dp),

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperSwitch.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
2121
* @param title The title of the [SuperSwitch].
2222
* @param titleColor The color of the title.
2323
* @param summary The summary of the [SuperSwitch].
24+
* @param summaryColor The color of the summary.
2425
* @param leftAction The [Composable] content that on the left side of the [SuperSwitch].
2526
* @param rightActions The [Composable] content on the right side of the [SuperSwitch].
2627
* @param checked The checked state of the [SuperSwitch].
@@ -34,6 +35,7 @@ fun SuperSwitch(
3435
title: String,
3536
titleColor: Color = MiuixTheme.colorScheme.onSurface,
3637
summary: String? = null,
38+
summaryColor: Color = MiuixTheme.colorScheme.onSurfaceVariantSummary,
3739
leftAction: @Composable (() -> Unit)? = null,
3840
rightActions: @Composable RowScope.() -> Unit = {},
3941
checked: Boolean,
@@ -55,6 +57,7 @@ fun SuperSwitch(
5557
title = title,
5658
titleColor = titleColor,
5759
summary = summary,
60+
summaryColor = summaryColor,
5861
leftAction = leftAction,
5962
rightActions = {
6063
rightActions()

0 commit comments

Comments
 (0)