@expo/ui 55.0.2 → 55.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
- package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +91 -13
- package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
- package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
- package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +258 -70
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +209 -61
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +44 -1
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
- package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
- package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
- package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
- package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +53 -161
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +39 -15
- package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
- package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
- package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
- package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -86
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
- package/build/datetime-picker/DateTimePicker.android.d.ts +3 -0
- package/build/datetime-picker/DateTimePicker.android.d.ts.map +1 -0
- package/build/datetime-picker/DateTimePicker.d.ts +3 -0
- package/build/datetime-picker/DateTimePicker.d.ts.map +1 -0
- package/build/datetime-picker/DateTimePicker.web.d.ts +3 -0
- package/build/datetime-picker/DateTimePicker.web.d.ts.map +1 -0
- package/build/datetime-picker/index.d.ts +5 -0
- package/build/datetime-picker/index.d.ts.map +1 -0
- package/build/datetime-picker/types.d.ts +128 -0
- package/build/datetime-picker/types.d.ts.map +1 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
- package/build/jetpack-compose/Button/index.d.ts +65 -51
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +72 -14
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
- package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
- package/build/jetpack-compose/Chip/index.d.ts +247 -27
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +38 -3
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/IconButton/index.d.ts +45 -29
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts +65 -13
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Progress/index.d.ts +78 -35
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
- package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Slider/index.d.ts +34 -10
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +10 -50
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextInput/index.d.ts +9 -0
- package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +5 -4
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +18 -1
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/Link/index.d.ts +36 -0
- package/build/swift-ui/Link/index.d.ts.map +1 -0
- package/build/swift-ui/ProgressView/index.d.ts +1 -5
- package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
- package/build/swift-ui/Stepper/index.d.ts +3 -3
- package/build/swift-ui/Stepper/index.d.ts.map +1 -1
- package/build/swift-ui/Text/index.d.ts +33 -1
- package/build/swift-ui/Text/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +1 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/environment.d.ts +16 -1
- package/build/swift-ui/modifiers/environment.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +24 -7
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
- package/build/swift-ui/modifiers/widgets.d.ts +14 -0
- package/build/swift-ui/modifiers/widgets.d.ts.map +1 -0
- package/build/swift-ui/types.d.ts +7 -0
- package/build/swift-ui/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +1 -6
- package/ios/ClosedRangeDateRecord.swift +10 -0
- package/ios/ColorPickerView.swift +9 -8
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +4 -6
- package/ios/DatePickerView.swift +7 -5
- package/ios/DisclosureGroupView.swift +5 -7
- package/ios/ExpoUIModule.swift +1 -0
- package/ios/LinkView.swift +29 -0
- package/ios/ListView.swift +6 -14
- package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
- package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
- package/ios/Modifiers/EnvironmentModifier.swift +14 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +12 -0
- package/ios/Modifiers/WidgetModifiers.swift +12 -0
- package/ios/Picker/PickerView.swift +6 -10
- package/ios/Popover/PopoverView.swift +3 -5
- package/ios/ProgressView.swift +0 -5
- package/ios/SectionView.swift +3 -5
- package/ios/SliderView.swift +8 -6
- package/ios/StepperView.swift +12 -16
- package/ios/TextView.swift +37 -1
- package/ios/Toggle/ToggleView.swift +5 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.module → 55.0.4/expo.modules.ui-55.0.4.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.pom → 55.0.4/expo.modules.ui-55.0.4.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +9 -2
- package/src/datetime-picker/DateTimePicker.android.tsx +126 -0
- package/src/datetime-picker/DateTimePicker.tsx +94 -0
- package/src/datetime-picker/DateTimePicker.web.tsx +5 -0
- package/src/datetime-picker/index.tsx +11 -0
- package/src/datetime-picker/types.tsx +147 -0
- package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
- package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
- package/src/jetpack-compose/Button/index.tsx +69 -92
- package/src/jetpack-compose/Card/index.tsx +105 -29
- package/src/jetpack-compose/Checkbox/index.tsx +126 -0
- package/src/jetpack-compose/Chip/index.tsx +391 -51
- package/src/jetpack-compose/DatePicker/index.tsx +112 -7
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
- package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
- package/src/jetpack-compose/IconButton/index.tsx +49 -56
- package/src/jetpack-compose/ModalBottomSheet/index.tsx +85 -15
- package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Progress/index.tsx +120 -62
- package/src/jetpack-compose/RadioButton/index.tsx +8 -9
- package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
- package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Slider/index.tsx +76 -29
- package/src/jetpack-compose/Switch/index.tsx +17 -87
- package/src/jetpack-compose/TextInput/index.tsx +10 -0
- package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
- package/src/jetpack-compose/index.ts +5 -4
- package/src/jetpack-compose/modifiers/index.ts +26 -2
- package/src/swift-ui/Link/index.tsx +52 -0
- package/src/swift-ui/ProgressView/index.tsx +1 -3
- package/src/swift-ui/Stepper/index.tsx +7 -7
- package/src/swift-ui/Text/index.tsx +66 -2
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/modifiers/environment.ts +17 -4
- package/src/swift-ui/modifiers/index.ts +44 -10
- package/src/swift-ui/modifiers/widgets.ts +18 -0
- package/src/swift-ui/types.ts +5 -0
- package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
- package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
- package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
- package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
- package/build/jetpack-compose/Button/types.d.ts +0 -5
- package/build/jetpack-compose/Button/types.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
- package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
- package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
- package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
- package/build/jetpack-compose/Picker/index.d.ts +0 -62
- package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
- package/build/jetpack-compose/TextButton/index.d.ts +0 -29
- package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha512 +0 -1
- package/src/jetpack-compose/Button/types.ts +0 -57
- package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
- package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
- package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
- package/src/jetpack-compose/FilterChip/index.tsx +0 -89
- package/src/jetpack-compose/Picker/index.tsx +0 -90
- package/src/jetpack-compose/TextButton/index.tsx +0 -55
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
package expo.modules.ui
|
|
2
2
|
|
|
3
3
|
import android.graphics.Color
|
|
4
|
-
import androidx.compose.material3.Checkbox
|
|
5
|
-
import androidx.compose.material3.CheckboxDefaults
|
|
6
4
|
import androidx.compose.material3.Switch
|
|
7
5
|
import androidx.compose.material3.SwitchDefaults
|
|
8
6
|
import androidx.compose.runtime.Composable
|
|
9
|
-
import androidx.compose.ui.Modifier
|
|
10
7
|
import expo.modules.kotlin.records.Field
|
|
11
8
|
import expo.modules.kotlin.records.Record
|
|
12
9
|
import expo.modules.kotlin.views.ComposableScope
|
|
@@ -14,195 +11,90 @@ import expo.modules.kotlin.views.ComposeProps
|
|
|
14
11
|
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
15
12
|
import java.io.Serializable
|
|
16
13
|
|
|
17
|
-
open class
|
|
14
|
+
open class CheckedChangeEvent(
|
|
18
15
|
@Field open val value: Boolean = false
|
|
19
16
|
) : Record, Serializable
|
|
20
17
|
|
|
21
|
-
class SwitchColors
|
|
22
|
-
@Field
|
|
23
|
-
val
|
|
24
|
-
|
|
25
|
-
@Field
|
|
26
|
-
val
|
|
27
|
-
|
|
28
|
-
@Field
|
|
29
|
-
val
|
|
30
|
-
|
|
31
|
-
@Field
|
|
32
|
-
val
|
|
33
|
-
|
|
34
|
-
@Field
|
|
35
|
-
val
|
|
36
|
-
|
|
37
|
-
@Field
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@Field
|
|
41
|
-
val uncheckedBorderColor: Color? = null
|
|
42
|
-
|
|
43
|
-
@Field
|
|
44
|
-
val uncheckedIconColor: Color? = null
|
|
45
|
-
|
|
46
|
-
@Field
|
|
47
|
-
val disabledCheckedThumbColor: Color? = null
|
|
48
|
-
|
|
49
|
-
@Field
|
|
50
|
-
val disabledCheckedTrackColor: Color? = null
|
|
51
|
-
|
|
52
|
-
@Field
|
|
53
|
-
val disabledCheckedBorderColor: Color? = null
|
|
54
|
-
|
|
55
|
-
@Field
|
|
56
|
-
val disabledCheckedIconColor: Color? = null
|
|
57
|
-
|
|
58
|
-
@Field
|
|
59
|
-
val disabledUncheckedThumbColor: Color? = null
|
|
60
|
-
|
|
61
|
-
@Field
|
|
62
|
-
val disabledUncheckedTrackColor: Color? = null
|
|
63
|
-
|
|
64
|
-
@Field
|
|
65
|
-
val disabledUncheckedBorderColor: Color? = null
|
|
66
|
-
|
|
67
|
-
@Field
|
|
68
|
-
val disabledUncheckedIconColor: Color? = null
|
|
69
|
-
|
|
70
|
-
@Field
|
|
71
|
-
val checkedColor: Color? = null
|
|
72
|
-
|
|
73
|
-
@Field
|
|
74
|
-
val disabledCheckedColor: Color? = null
|
|
75
|
-
|
|
76
|
-
@Field
|
|
77
|
-
val uncheckedColor: Color? = null
|
|
78
|
-
|
|
79
|
-
@Field
|
|
80
|
-
val disabledUncheckedColor: Color? = null
|
|
81
|
-
|
|
82
|
-
@Field
|
|
83
|
-
val checkmarkColor: Color? = null
|
|
84
|
-
|
|
85
|
-
@Field
|
|
86
|
-
val disabledIndeterminateColor: Color? = null
|
|
87
|
-
}
|
|
18
|
+
data class SwitchColors(
|
|
19
|
+
@Field val checkedThumbColor: Color? = null,
|
|
20
|
+
@Field val checkedTrackColor: Color? = null,
|
|
21
|
+
@Field val checkedBorderColor: Color? = null,
|
|
22
|
+
@Field val checkedIconColor: Color? = null,
|
|
23
|
+
@Field val uncheckedThumbColor: Color? = null,
|
|
24
|
+
@Field val uncheckedTrackColor: Color? = null,
|
|
25
|
+
@Field val uncheckedBorderColor: Color? = null,
|
|
26
|
+
@Field val uncheckedIconColor: Color? = null,
|
|
27
|
+
@Field val disabledCheckedThumbColor: Color? = null,
|
|
28
|
+
@Field val disabledCheckedTrackColor: Color? = null,
|
|
29
|
+
@Field val disabledCheckedBorderColor: Color? = null,
|
|
30
|
+
@Field val disabledCheckedIconColor: Color? = null,
|
|
31
|
+
@Field val disabledUncheckedThumbColor: Color? = null,
|
|
32
|
+
@Field val disabledUncheckedTrackColor: Color? = null,
|
|
33
|
+
@Field val disabledUncheckedBorderColor: Color? = null,
|
|
34
|
+
@Field val disabledUncheckedIconColor: Color? = null
|
|
35
|
+
) : Record
|
|
88
36
|
|
|
89
37
|
data class SwitchProps(
|
|
90
38
|
val value: Boolean = false,
|
|
91
39
|
val enabled: Boolean = true,
|
|
92
|
-
val
|
|
93
|
-
val elementColors: SwitchColors = SwitchColors(),
|
|
40
|
+
val colors: SwitchColors = SwitchColors(),
|
|
94
41
|
val modifiers: ModifierList = emptyList()
|
|
95
42
|
) : ComposeProps
|
|
96
43
|
|
|
97
44
|
@Composable
|
|
98
|
-
fun
|
|
99
|
-
|
|
100
|
-
onCheckedChange: (
|
|
101
|
-
colors: SwitchColors,
|
|
102
|
-
modifier: Modifier = Modifier,
|
|
103
|
-
enabled: Boolean = true,
|
|
104
|
-
thumbContent: (@Composable () -> Unit)? = null
|
|
45
|
+
fun FunctionalComposableScope.SwitchContent(
|
|
46
|
+
props: SwitchProps,
|
|
47
|
+
onCheckedChange: (Boolean) -> Unit
|
|
105
48
|
) {
|
|
49
|
+
val thumbContentSlotView = findChildSlotView(view, "thumbContent")
|
|
50
|
+
|
|
106
51
|
Switch(
|
|
107
|
-
checked =
|
|
52
|
+
checked = props.value,
|
|
108
53
|
onCheckedChange = onCheckedChange,
|
|
109
|
-
modifier =
|
|
110
|
-
enabled = enabled,
|
|
111
|
-
thumbContent =
|
|
54
|
+
modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
|
|
55
|
+
enabled = props.enabled,
|
|
56
|
+
thumbContent = thumbContentSlotView?.let {
|
|
57
|
+
{
|
|
58
|
+
with(ComposableScope()) {
|
|
59
|
+
with(it) {
|
|
60
|
+
Content()
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
112
65
|
colors = SwitchDefaults.colors(
|
|
113
|
-
|
|
114
|
-
checkedThumbColor = colors.checkedThumbColor.composeOrNull
|
|
66
|
+
checkedThumbColor = props.colors.checkedThumbColor.composeOrNull
|
|
115
67
|
?: SwitchDefaults.colors().checkedThumbColor,
|
|
116
|
-
checkedTrackColor = colors.checkedTrackColor.composeOrNull
|
|
68
|
+
checkedTrackColor = props.colors.checkedTrackColor.composeOrNull
|
|
117
69
|
?: SwitchDefaults.colors().checkedTrackColor,
|
|
118
|
-
checkedBorderColor = colors.checkedBorderColor.composeOrNull
|
|
70
|
+
checkedBorderColor = props.colors.checkedBorderColor.composeOrNull
|
|
119
71
|
?: SwitchDefaults.colors().checkedBorderColor,
|
|
120
|
-
checkedIconColor = colors.checkedIconColor.composeOrNull
|
|
72
|
+
checkedIconColor = props.colors.checkedIconColor.composeOrNull
|
|
121
73
|
?: SwitchDefaults.colors().checkedIconColor,
|
|
122
|
-
uncheckedThumbColor = colors.uncheckedThumbColor.composeOrNull
|
|
74
|
+
uncheckedThumbColor = props.colors.uncheckedThumbColor.composeOrNull
|
|
123
75
|
?: SwitchDefaults.colors().uncheckedThumbColor,
|
|
124
|
-
uncheckedTrackColor = colors.uncheckedTrackColor.composeOrNull
|
|
76
|
+
uncheckedTrackColor = props.colors.uncheckedTrackColor.composeOrNull
|
|
125
77
|
?: SwitchDefaults.colors().uncheckedTrackColor,
|
|
126
|
-
uncheckedBorderColor = colors.uncheckedBorderColor.composeOrNull
|
|
78
|
+
uncheckedBorderColor = props.colors.uncheckedBorderColor.composeOrNull
|
|
127
79
|
?: SwitchDefaults.colors().uncheckedBorderColor,
|
|
128
|
-
uncheckedIconColor = colors.uncheckedIconColor.composeOrNull
|
|
80
|
+
uncheckedIconColor = props.colors.uncheckedIconColor.composeOrNull
|
|
129
81
|
?: SwitchDefaults.colors().uncheckedIconColor,
|
|
130
|
-
disabledCheckedBorderColor = colors.disabledCheckedBorderColor.composeOrNull
|
|
82
|
+
disabledCheckedBorderColor = props.colors.disabledCheckedBorderColor.composeOrNull
|
|
131
83
|
?: SwitchDefaults.colors().disabledCheckedBorderColor,
|
|
132
|
-
disabledCheckedThumbColor = colors.disabledCheckedThumbColor.composeOrNull
|
|
84
|
+
disabledCheckedThumbColor = props.colors.disabledCheckedThumbColor.composeOrNull
|
|
133
85
|
?: SwitchDefaults.colors().disabledCheckedThumbColor,
|
|
134
|
-
disabledCheckedTrackColor = colors.disabledCheckedTrackColor.composeOrNull
|
|
86
|
+
disabledCheckedTrackColor = props.colors.disabledCheckedTrackColor.composeOrNull
|
|
135
87
|
?: SwitchDefaults.colors().disabledCheckedTrackColor,
|
|
136
|
-
disabledCheckedIconColor = colors.disabledCheckedIconColor.composeOrNull
|
|
88
|
+
disabledCheckedIconColor = props.colors.disabledCheckedIconColor.composeOrNull
|
|
137
89
|
?: SwitchDefaults.colors().disabledCheckedIconColor,
|
|
138
|
-
disabledUncheckedBorderColor = colors.disabledUncheckedBorderColor.composeOrNull
|
|
90
|
+
disabledUncheckedBorderColor = props.colors.disabledUncheckedBorderColor.composeOrNull
|
|
139
91
|
?: SwitchDefaults.colors().disabledUncheckedBorderColor,
|
|
140
|
-
disabledUncheckedThumbColor = colors.disabledUncheckedThumbColor.composeOrNull
|
|
92
|
+
disabledUncheckedThumbColor = props.colors.disabledUncheckedThumbColor.composeOrNull
|
|
141
93
|
?: SwitchDefaults.colors().disabledUncheckedThumbColor,
|
|
142
|
-
disabledUncheckedTrackColor = colors.disabledUncheckedTrackColor.composeOrNull
|
|
94
|
+
disabledUncheckedTrackColor = props.colors.disabledUncheckedTrackColor.composeOrNull
|
|
143
95
|
?: SwitchDefaults.colors().disabledUncheckedTrackColor,
|
|
144
|
-
disabledUncheckedIconColor = colors.disabledUncheckedIconColor.composeOrNull
|
|
96
|
+
disabledUncheckedIconColor = props.colors.disabledUncheckedIconColor.composeOrNull
|
|
145
97
|
?: SwitchDefaults.colors().disabledUncheckedIconColor
|
|
146
98
|
)
|
|
147
99
|
)
|
|
148
100
|
}
|
|
149
|
-
|
|
150
|
-
@Composable
|
|
151
|
-
fun CheckboxComposable(checked: Boolean, onCheckedChange: ((Boolean) -> Unit)?, colors: SwitchColors, modifier: Modifier, enabled: Boolean = true) {
|
|
152
|
-
Checkbox(
|
|
153
|
-
checked = checked,
|
|
154
|
-
onCheckedChange = onCheckedChange,
|
|
155
|
-
modifier = modifier,
|
|
156
|
-
enabled = enabled,
|
|
157
|
-
colors = CheckboxDefaults.colors(
|
|
158
|
-
checkedColor = colors.checkedColor.compose,
|
|
159
|
-
disabledCheckedColor = colors.disabledCheckedColor.compose,
|
|
160
|
-
uncheckedColor = colors.uncheckedColor.compose,
|
|
161
|
-
disabledUncheckedColor = colors.disabledUncheckedColor.compose,
|
|
162
|
-
checkmarkColor = colors.checkmarkColor.compose,
|
|
163
|
-
disabledIndeterminateColor = colors.disabledIndeterminateColor.compose
|
|
164
|
-
)
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@Composable
|
|
169
|
-
fun ThemedHybridSwitch(
|
|
170
|
-
variant: String,
|
|
171
|
-
checked: Boolean,
|
|
172
|
-
onCheckedChange: ((Boolean) -> Unit)?,
|
|
173
|
-
colors: SwitchColors,
|
|
174
|
-
modifier: Modifier = Modifier,
|
|
175
|
-
enabled: Boolean = true,
|
|
176
|
-
thumbContent: (@Composable () -> Unit)? = null
|
|
177
|
-
) {
|
|
178
|
-
when (variant) {
|
|
179
|
-
"switch" -> SwitchComposable(checked, onCheckedChange, colors, modifier, enabled, thumbContent)
|
|
180
|
-
else -> CheckboxComposable(checked, onCheckedChange, colors, modifier, enabled)
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
@Composable
|
|
185
|
-
fun FunctionalComposableScope.SwitchContent(
|
|
186
|
-
props: SwitchProps,
|
|
187
|
-
onValueChange: (ValueChangeEvent) -> Unit
|
|
188
|
-
) {
|
|
189
|
-
val thumbContentSlotView = findChildSlotView(view, "thumbContent")
|
|
190
|
-
|
|
191
|
-
ThemedHybridSwitch(
|
|
192
|
-
props.variant,
|
|
193
|
-
props.value,
|
|
194
|
-
{ newChecked -> onValueChange(ValueChangeEvent(newChecked)) },
|
|
195
|
-
props.elementColors,
|
|
196
|
-
ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
|
|
197
|
-
props.enabled,
|
|
198
|
-
thumbContent = thumbContentSlotView?.let {
|
|
199
|
-
{
|
|
200
|
-
with(ComposableScope()) {
|
|
201
|
-
with(it) {
|
|
202
|
-
Content()
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
)
|
|
208
|
-
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
package expo.modules.ui
|
|
2
2
|
|
|
3
|
+
import android.annotation.SuppressLint
|
|
3
4
|
import android.content.Context
|
|
4
5
|
import androidx.compose.foundation.text.KeyboardOptions
|
|
6
|
+
import androidx.compose.material3.OutlinedTextField
|
|
5
7
|
import androidx.compose.material3.Text
|
|
6
8
|
import androidx.compose.material3.TextField
|
|
7
9
|
import androidx.compose.runtime.Composable
|
|
@@ -18,6 +20,7 @@ import expo.modules.kotlin.views.ExpoComposeView
|
|
|
18
20
|
data class TextInputProps(
|
|
19
21
|
val defaultValue: MutableState<String> = mutableStateOf(""),
|
|
20
22
|
val placeholder: MutableState<String> = mutableStateOf(""),
|
|
23
|
+
val variant: MutableState<String> = mutableStateOf("filled"),
|
|
21
24
|
val multiline: MutableState<Boolean> = mutableStateOf(false),
|
|
22
25
|
val numberOfLines: MutableState<Int?> = mutableStateOf(null),
|
|
23
26
|
val keyboardType: MutableState<String> = mutableStateOf("default"),
|
|
@@ -52,6 +55,7 @@ private fun String.autoCapitalize(): KeyboardCapitalization {
|
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
@SuppressLint("ViewConstructor")
|
|
55
59
|
class TextInputView(context: Context, appContext: AppContext) :
|
|
56
60
|
ExpoComposeView<TextInputProps>(context, appContext) {
|
|
57
61
|
override val props = TextInputProps()
|
|
@@ -68,21 +72,41 @@ class TextInputView(context: Context, appContext: AppContext) :
|
|
|
68
72
|
|
|
69
73
|
@Composable
|
|
70
74
|
override fun ComposableScope.Content() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
capitalization = props.autoCapitalize.value.autoCapitalize()
|
|
84
|
-
),
|
|
85
|
-
modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content, globalEventDispatcher)
|
|
75
|
+
val value = textState.value ?: props.defaultValue.value
|
|
76
|
+
val onValueChange: (String) -> Unit = {
|
|
77
|
+
textState.value = it
|
|
78
|
+
onValueChanged(mapOf("value" to it))
|
|
79
|
+
}
|
|
80
|
+
val placeholder: @Composable () -> Unit = { Text(props.placeholder.value) }
|
|
81
|
+
val maxLines = if (props.multiline.value) props.numberOfLines.value ?: Int.MAX_VALUE else 1
|
|
82
|
+
val singleLine = !props.multiline.value
|
|
83
|
+
val keyboardOptions = KeyboardOptions.Default.copy(
|
|
84
|
+
keyboardType = props.keyboardType.value.keyboardType(),
|
|
85
|
+
autoCorrectEnabled = props.autocorrection.value,
|
|
86
|
+
capitalization = props.autoCapitalize.value.autoCapitalize()
|
|
86
87
|
)
|
|
88
|
+
val modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content, globalEventDispatcher)
|
|
89
|
+
|
|
90
|
+
if (props.variant.value == "outlined") {
|
|
91
|
+
OutlinedTextField(
|
|
92
|
+
value = value,
|
|
93
|
+
onValueChange = onValueChange,
|
|
94
|
+
placeholder = placeholder,
|
|
95
|
+
maxLines = maxLines,
|
|
96
|
+
singleLine = singleLine,
|
|
97
|
+
keyboardOptions = keyboardOptions,
|
|
98
|
+
modifier = modifier
|
|
99
|
+
)
|
|
100
|
+
} else {
|
|
101
|
+
TextField(
|
|
102
|
+
value = value,
|
|
103
|
+
onValueChange = onValueChange,
|
|
104
|
+
placeholder = placeholder,
|
|
105
|
+
maxLines = maxLines,
|
|
106
|
+
singleLine = singleLine,
|
|
107
|
+
keyboardOptions = keyboardOptions,
|
|
108
|
+
modifier = modifier
|
|
109
|
+
)
|
|
110
|
+
}
|
|
87
111
|
}
|
|
88
112
|
}
|
|
@@ -3,26 +3,33 @@
|
|
|
3
3
|
package expo.modules.ui
|
|
4
4
|
|
|
5
5
|
import android.graphics.Color
|
|
6
|
-
import androidx.compose.foundation.layout.RowScope
|
|
7
6
|
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
|
8
7
|
import androidx.compose.material3.FilledIconToggleButton
|
|
8
|
+
import androidx.compose.material3.IconButtonDefaults
|
|
9
9
|
import androidx.compose.material3.IconToggleButton
|
|
10
10
|
import androidx.compose.material3.OutlinedIconToggleButton
|
|
11
|
-
import androidx.compose.material3.Text
|
|
12
11
|
import androidx.compose.material3.ToggleButton
|
|
13
12
|
import androidx.compose.material3.ToggleButtonDefaults
|
|
14
13
|
import androidx.compose.runtime.Composable
|
|
15
14
|
import expo.modules.kotlin.records.Field
|
|
16
15
|
import expo.modules.kotlin.records.Record
|
|
16
|
+
import expo.modules.kotlin.views.ComposableScope
|
|
17
17
|
import expo.modules.kotlin.views.ComposeProps
|
|
18
18
|
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
19
19
|
|
|
20
|
+
data class ToggleButtonColors(
|
|
21
|
+
@Field val containerColor: Color? = null,
|
|
22
|
+
@Field val contentColor: Color? = null,
|
|
23
|
+
@Field val checkedContainerColor: Color? = null,
|
|
24
|
+
@Field val checkedContentColor: Color? = null,
|
|
25
|
+
@Field val disabledContainerColor: Color? = null,
|
|
26
|
+
@Field val disabledContentColor: Color? = null
|
|
27
|
+
) : Record
|
|
28
|
+
|
|
20
29
|
data class ToggleButtonProps(
|
|
21
30
|
val checked: Boolean = false,
|
|
22
|
-
val
|
|
23
|
-
val
|
|
24
|
-
val color: Color? = null,
|
|
25
|
-
val disabled: Boolean = false,
|
|
31
|
+
val enabled: Boolean = true,
|
|
32
|
+
val colors: ToggleButtonColors = ToggleButtonColors(),
|
|
26
33
|
val modifiers: ModifierList = emptyList()
|
|
27
34
|
) : ComposeProps
|
|
28
35
|
|
|
@@ -36,61 +43,92 @@ fun FunctionalComposableScope.ToggleButtonContent(
|
|
|
36
43
|
onCheckedChange: (ToggleButtonValueChangeEvent) -> Unit
|
|
37
44
|
) {
|
|
38
45
|
val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
46
|
+
ToggleButton(
|
|
47
|
+
checked = props.checked,
|
|
48
|
+
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
49
|
+
enabled = props.enabled,
|
|
50
|
+
modifier = modifier,
|
|
51
|
+
colors = ToggleButtonDefaults.toggleButtonColors(
|
|
52
|
+
checkedContainerColor = props.colors.checkedContainerColor.compose,
|
|
53
|
+
checkedContentColor = props.colors.checkedContentColor.compose,
|
|
54
|
+
containerColor = props.colors.containerColor.compose,
|
|
55
|
+
contentColor = props.colors.contentColor.compose,
|
|
56
|
+
disabledContainerColor = props.colors.disabledContainerColor.compose,
|
|
57
|
+
disabledContentColor = props.colors.disabledContentColor.compose
|
|
58
|
+
)
|
|
59
|
+
) {
|
|
60
|
+
Children(ComposableScope(rowScope = this))
|
|
61
|
+
}
|
|
62
|
+
}
|
|
39
63
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
64
|
+
@Composable
|
|
65
|
+
fun FunctionalComposableScope.IconToggleButtonContent(
|
|
66
|
+
props: ToggleButtonProps,
|
|
67
|
+
onCheckedChange: (ToggleButtonValueChangeEvent) -> Unit
|
|
68
|
+
) {
|
|
69
|
+
val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
70
|
+
IconToggleButton(
|
|
71
|
+
checked = props.checked,
|
|
72
|
+
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
73
|
+
enabled = props.enabled,
|
|
74
|
+
modifier = modifier,
|
|
75
|
+
colors = IconButtonDefaults.iconToggleButtonColors(
|
|
76
|
+
containerColor = props.colors.containerColor.compose,
|
|
77
|
+
contentColor = props.colors.contentColor.compose,
|
|
78
|
+
checkedContainerColor = props.colors.checkedContainerColor.compose,
|
|
79
|
+
checkedContentColor = props.colors.checkedContentColor.compose,
|
|
80
|
+
disabledContainerColor = props.colors.disabledContainerColor.compose,
|
|
81
|
+
disabledContentColor = props.colors.disabledContentColor.compose
|
|
82
|
+
)
|
|
83
|
+
) {
|
|
84
|
+
Children(ComposableScope())
|
|
47
85
|
}
|
|
86
|
+
}
|
|
48
87
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
88
|
+
@Composable
|
|
89
|
+
fun FunctionalComposableScope.FilledIconToggleButtonContent(
|
|
90
|
+
props: ToggleButtonProps,
|
|
91
|
+
onCheckedChange: (ToggleButtonValueChangeEvent) -> Unit
|
|
92
|
+
) {
|
|
93
|
+
val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
94
|
+
FilledIconToggleButton(
|
|
95
|
+
checked = props.checked,
|
|
96
|
+
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
97
|
+
enabled = props.enabled,
|
|
98
|
+
modifier = modifier,
|
|
99
|
+
colors = IconButtonDefaults.filledIconToggleButtonColors(
|
|
100
|
+
containerColor = props.colors.containerColor.compose,
|
|
101
|
+
contentColor = props.colors.contentColor.compose,
|
|
102
|
+
checkedContainerColor = props.colors.checkedContainerColor.compose,
|
|
103
|
+
checkedContentColor = props.colors.checkedContentColor.compose,
|
|
104
|
+
disabledContainerColor = props.colors.disabledContainerColor.compose,
|
|
105
|
+
disabledContentColor = props.colors.disabledContentColor.compose
|
|
106
|
+
)
|
|
107
|
+
) {
|
|
108
|
+
Children(ComposableScope())
|
|
55
109
|
}
|
|
110
|
+
}
|
|
56
111
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
checked = props.checked,
|
|
79
|
-
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
80
|
-
enabled = !props.disabled,
|
|
81
|
-
modifier = modifier,
|
|
82
|
-
content = content
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
else -> {
|
|
86
|
-
ToggleButton(
|
|
87
|
-
checked = props.checked,
|
|
88
|
-
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
89
|
-
enabled = !props.disabled,
|
|
90
|
-
modifier = modifier,
|
|
91
|
-
colors = ToggleButtonDefaults.toggleButtonColors(),
|
|
92
|
-
content = rowContent
|
|
93
|
-
)
|
|
94
|
-
}
|
|
112
|
+
@Composable
|
|
113
|
+
fun FunctionalComposableScope.OutlinedIconToggleButtonContent(
|
|
114
|
+
props: ToggleButtonProps,
|
|
115
|
+
onCheckedChange: (ToggleButtonValueChangeEvent) -> Unit
|
|
116
|
+
) {
|
|
117
|
+
val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
118
|
+
OutlinedIconToggleButton(
|
|
119
|
+
checked = props.checked,
|
|
120
|
+
onCheckedChange = { onCheckedChange(ToggleButtonValueChangeEvent(it)) },
|
|
121
|
+
enabled = props.enabled,
|
|
122
|
+
modifier = modifier,
|
|
123
|
+
colors = IconButtonDefaults.outlinedIconToggleButtonColors(
|
|
124
|
+
containerColor = props.colors.containerColor.compose,
|
|
125
|
+
contentColor = props.colors.contentColor.compose,
|
|
126
|
+
checkedContainerColor = props.colors.checkedContainerColor.compose,
|
|
127
|
+
checkedContentColor = props.colors.checkedContentColor.compose,
|
|
128
|
+
disabledContainerColor = props.colors.disabledContainerColor.compose,
|
|
129
|
+
disabledContentColor = props.colors.disabledContentColor.compose
|
|
130
|
+
)
|
|
131
|
+
) {
|
|
132
|
+
Children(ComposableScope())
|
|
95
133
|
}
|
|
96
134
|
}
|