@expo/ui 55.0.3 → 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 +11 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +91 -13
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +5 -4
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +39 -15
- 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/ModalBottomSheet/index.d.ts +65 -13
- package/build/jetpack-compose/ModalBottomSheet/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/swift-ui/Link/index.d.ts +36 -0
- package/build/swift-ui/Link/index.d.ts.map +1 -0
- 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 +3 -7
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/widgets.d.ts +14 -0
- package/build/swift-ui/modifiers/widgets.d.ts.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/ExpoUIModule.swift +1 -0
- package/ios/LinkView.swift +29 -0
- package/ios/Modifiers/EnvironmentModifier.swift +14 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/ios/Modifiers/WidgetModifiers.swift +12 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.3/expo.modules.ui-55.0.3-sources.jar → 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.3/expo.modules.ui-55.0.3.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.3/expo.modules.ui-55.0.3.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 +6 -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/ModalBottomSheet/index.tsx +85 -15
- package/src/jetpack-compose/TextInput/index.tsx +10 -0
- package/src/swift-ui/Link/index.tsx +52 -0
- package/src/swift-ui/index.tsx +1 -0
- package/src/swift-ui/modifiers/environment.ts +17 -4
- package/src/swift-ui/modifiers/index.ts +4 -10
- package/src/swift-ui/modifiers/widgets.ts +18 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 55.0.4 — 2026-03-18
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- [iOS] Add `Link` view. ([#43983](https://github.com/expo/expo/pull/43983) by [@jakex7](https://github.com/jakex7))
|
|
18
|
+
- [iOS] Add `widgetURL` modifier. ([#43984](https://github.com/expo/expo/pull/43984) by [@jakex7](https://github.com/jakex7))
|
|
19
|
+
|
|
13
20
|
## 55.0.3 — 2026-03-17
|
|
14
21
|
|
|
15
22
|
### 🛠 Breaking changes
|
|
@@ -30,6 +37,10 @@
|
|
|
30
37
|
|
|
31
38
|
### 🎉 New features
|
|
32
39
|
|
|
40
|
+
- [android] Added `outlined` variant to `TextInput` component. ([#43719](https://github.com/expo/expo/pull/43719) by [@benjaminkomen](https://github.com/benjaminkomen))
|
|
41
|
+
- Added `@expo/ui/datetimepicker` — a cross-platform `DateTimePicker` drop-in replacement for `@react-native-community/datetimepicker`. ([#44014](https://github.com/expo/expo/pull/44014) by [@vonovak](https://github.com/vonovak))
|
|
42
|
+
- [iOS] Added `locale` and `timeZone` support to `modifiers`. ([#44013](https://github.com/expo/expo/pull/44013) by [@vonovak](https://github.com/vonovak))
|
|
43
|
+
- [android] Added `ref.hide()` for animated dismiss and more configurable props (`containerColor`, `contentColor`, `scrimColor`, `showDragHandle`, `sheetGesturesEnabled`, `properties`, `DragHandle` slot) to `BottomSheet`. ([#43972](https://github.com/expo/expo/pull/43972) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
33
44
|
- [iOS] Added `date`, `dateStyle`, `timerInterval`, `countsDown`, and `pauseTime` props to `Text` component for displaying auto-updating dates, timers, and countdowns using SwiftUI's `Text.DateStyle`. ([#43552](https://github.com/expo/expo/pull/43552) by [@LouisRaverdy](https://github.com/LouisRaverdy))
|
|
34
45
|
- [android] Added `Checkbox` and `TriStateCheckbox` components. ([#43887](https://github.com/expo/expo/pull/43887) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
35
46
|
- [Android] Added `DatePickerDialog` and `TimePickerDialog` components, and `selectableDates` prop to `DateTimePicker`. ([#43895](https://github.com/expo/expo/pull/43895) by [@vonovak](https://github.com/vonovak))
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '55.0.
|
|
15
|
+
version = '55.0.4'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "55.0.
|
|
21
|
+
versionName "55.0.4"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -2,28 +2,106 @@
|
|
|
2
2
|
|
|
3
3
|
package expo.modules.ui
|
|
4
4
|
|
|
5
|
+
import android.annotation.SuppressLint
|
|
6
|
+
import android.content.Context
|
|
7
|
+
import android.graphics.Color
|
|
8
|
+
import androidx.compose.material3.BottomSheetDefaults
|
|
5
9
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
6
10
|
import androidx.compose.material3.ModalBottomSheet
|
|
11
|
+
import androidx.compose.material3.ModalBottomSheetProperties
|
|
12
|
+
import androidx.compose.material3.SheetState
|
|
13
|
+
import androidx.compose.material3.contentColorFor
|
|
7
14
|
import androidx.compose.material3.rememberModalBottomSheetState
|
|
8
15
|
import androidx.compose.runtime.Composable
|
|
16
|
+
import androidx.compose.runtime.MutableState
|
|
17
|
+
import androidx.compose.runtime.mutableStateOf
|
|
18
|
+
import androidx.compose.runtime.rememberCoroutineScope
|
|
19
|
+
import kotlin.coroutines.cancellation.CancellationException
|
|
20
|
+
import kotlinx.coroutines.CoroutineScope
|
|
21
|
+
import kotlinx.coroutines.withContext
|
|
22
|
+
import expo.modules.kotlin.AppContext
|
|
23
|
+
import expo.modules.kotlin.records.Field
|
|
24
|
+
import expo.modules.kotlin.records.Record
|
|
25
|
+
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
9
26
|
import expo.modules.kotlin.views.ComposableScope
|
|
10
27
|
import expo.modules.kotlin.views.ComposeProps
|
|
11
|
-
import expo.modules.kotlin.views.
|
|
28
|
+
import expo.modules.kotlin.views.ExpoComposeView
|
|
12
29
|
|
|
13
|
-
data class
|
|
14
|
-
val
|
|
15
|
-
val
|
|
30
|
+
data class ModalBottomSheetPropertiesRecord(
|
|
31
|
+
@Field val shouldDismissOnBackPress: Boolean = true,
|
|
32
|
+
@Field val shouldDismissOnClickOutside: Boolean = true
|
|
33
|
+
) : Record
|
|
34
|
+
|
|
35
|
+
data class ModalBottomSheetViewProps(
|
|
36
|
+
val skipPartiallyExpanded: MutableState<Boolean> = mutableStateOf(false),
|
|
37
|
+
val containerColor: MutableState<Color?> = mutableStateOf(null),
|
|
38
|
+
val contentColor: MutableState<Color?> = mutableStateOf(null),
|
|
39
|
+
val scrimColor: MutableState<Color?> = mutableStateOf(null),
|
|
40
|
+
val showDragHandle: MutableState<Boolean> = mutableStateOf(true),
|
|
41
|
+
val sheetGesturesEnabled: MutableState<Boolean> = mutableStateOf(true),
|
|
42
|
+
val properties: MutableState<ModalBottomSheetPropertiesRecord> = mutableStateOf(ModalBottomSheetPropertiesRecord()),
|
|
43
|
+
val modifiers: MutableState<ModifierList> = mutableStateOf(emptyList())
|
|
16
44
|
) : ComposeProps
|
|
17
45
|
|
|
18
|
-
@
|
|
19
|
-
|
|
20
|
-
|
|
46
|
+
@SuppressLint("ViewConstructor")
|
|
47
|
+
class ModalBottomSheetView(context: Context, appContext: AppContext) :
|
|
48
|
+
ExpoComposeView<ModalBottomSheetViewProps>(context, appContext) {
|
|
49
|
+
override val props = ModalBottomSheetViewProps()
|
|
50
|
+
internal val onDismissRequest by EventDispatcher<Unit>()
|
|
51
|
+
|
|
52
|
+
internal var sheetState: SheetState? = null
|
|
53
|
+
private var composeScope: CoroutineScope? = null
|
|
54
|
+
|
|
55
|
+
suspend fun hide() {
|
|
56
|
+
val scope = composeScope ?: return
|
|
57
|
+
val state = sheetState ?: return
|
|
58
|
+
try {
|
|
59
|
+
withContext(scope.coroutineContext) {
|
|
60
|
+
state.hide()
|
|
61
|
+
}
|
|
62
|
+
} catch (_: CancellationException) {
|
|
63
|
+
// Swipe-dismiss may cancel the coroutine scope while hide() is in-flight.
|
|
64
|
+
// Swallowing the exception avoids an unhandled promise rejection on the JS side.
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@Composable
|
|
69
|
+
override fun ComposableScope.Content() {
|
|
70
|
+
val sheetState = rememberModalBottomSheetState(props.skipPartiallyExpanded.value)
|
|
71
|
+
val scope = rememberCoroutineScope()
|
|
72
|
+
this@ModalBottomSheetView.sheetState = sheetState
|
|
73
|
+
this@ModalBottomSheetView.composeScope = scope
|
|
74
|
+
|
|
75
|
+
val resolvedContainerColor = props.containerColor.value.composeOrNull ?: BottomSheetDefaults.ContainerColor
|
|
76
|
+
val resolvedContentColor = props.contentColor.value.composeOrNull ?: contentColorFor(resolvedContainerColor)
|
|
77
|
+
val resolvedScrimColor = props.scrimColor.value.composeOrNull ?: BottomSheetDefaults.ScrimColor
|
|
78
|
+
val dragHandleSlotView = findChildSlotView(this@ModalBottomSheetView, "dragHandle")
|
|
21
79
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
80
|
+
ModalBottomSheet(
|
|
81
|
+
sheetState = sheetState,
|
|
82
|
+
onDismissRequest = {
|
|
83
|
+
onDismissRequest(Unit)
|
|
84
|
+
},
|
|
85
|
+
containerColor = resolvedContainerColor,
|
|
86
|
+
contentColor = resolvedContentColor,
|
|
87
|
+
scrimColor = resolvedScrimColor,
|
|
88
|
+
sheetGesturesEnabled = props.sheetGesturesEnabled.value,
|
|
89
|
+
dragHandle = when {
|
|
90
|
+
dragHandleSlotView != null -> {
|
|
91
|
+
{ with(ComposableScope()) { with(dragHandleSlotView) { Content() } } }
|
|
92
|
+
}
|
|
93
|
+
props.showDragHandle.value -> {
|
|
94
|
+
{ BottomSheetDefaults.DragHandle() }
|
|
95
|
+
}
|
|
96
|
+
else -> null
|
|
97
|
+
},
|
|
98
|
+
properties = ModalBottomSheetProperties(
|
|
99
|
+
shouldDismissOnBackPress = props.properties.value.shouldDismissOnBackPress,
|
|
100
|
+
shouldDismissOnClickOutside = props.properties.value.shouldDismissOnClickOutside
|
|
101
|
+
),
|
|
102
|
+
modifier = ModifierRegistry.applyModifiers(props.modifiers.value, appContext, this@Content, globalEventDispatcher)
|
|
103
|
+
) {
|
|
104
|
+
Children(ComposableScope(), filter = { !isSlotView(it) })
|
|
105
|
+
}
|
|
28
106
|
}
|
|
29
107
|
}
|
|
@@ -6,6 +6,7 @@ import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
|
|
6
6
|
import androidx.compose.material3.SwitchDefaults
|
|
7
7
|
import androidx.compose.material3.ToggleButtonDefaults
|
|
8
8
|
import androidx.compose.runtime.remember
|
|
9
|
+
import expo.modules.kotlin.functions.Coroutine
|
|
9
10
|
import expo.modules.kotlin.modules.Module
|
|
10
11
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
11
12
|
import expo.modules.kotlin.viewevent.getValue
|
|
@@ -92,11 +93,11 @@ class ExpoUIModule : Module() {
|
|
|
92
93
|
|
|
93
94
|
//region Expo UI views
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
View(ModalBottomSheetView::class) {
|
|
96
97
|
Events("onDismissRequest")
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
AsyncFunction("hide") Coroutine { view: ModalBottomSheetView ->
|
|
99
|
+
view.hide()
|
|
100
|
+
}
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
ExpoUIView("SingleChoiceSegmentedButtonRowView") { props: SingleChoiceSegmentedButtonRowProps ->
|
|
@@ -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
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.android.d.ts","sourceRoot":"","sources":["../../src/datetime-picker/DateTimePicker.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmCjF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BA0FxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../src/datetime-picker/DateTimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoCjF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAyDxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTimePicker.web.d.ts","sourceRoot":"","sources":["../../src/datetime-picker/DateTimePicker.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,QAEzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datetime-picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,cAAc,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated used with the deprecated `onChange` prop
|
|
4
|
+
* */
|
|
5
|
+
export type DateTimePickerEvent = {
|
|
6
|
+
/**
|
|
7
|
+
* `'set'` when the user selects a date. `'dismissed'` when the user cancels
|
|
8
|
+
* an Android dialog picker. iOS never fires `'dismissed'`.
|
|
9
|
+
*/
|
|
10
|
+
type: 'set' | 'dismissed';
|
|
11
|
+
nativeEvent: {
|
|
12
|
+
timestamp: number;
|
|
13
|
+
utcOffset: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type DateTimePickerChangeEvent = {
|
|
17
|
+
nativeEvent: {
|
|
18
|
+
timestamp: number;
|
|
19
|
+
utcOffset: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type DateTimePickerProps = {
|
|
23
|
+
/**
|
|
24
|
+
* The current date value (controlled).
|
|
25
|
+
*/
|
|
26
|
+
value: Date;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `onValueChange` and `onDismiss` instead.
|
|
29
|
+
*
|
|
30
|
+
* Called when the user changes the date/time or dismisses the picker.
|
|
31
|
+
* The event type is encoded in `event.type`.
|
|
32
|
+
* If the new specific listeners are provided, they take precedence.
|
|
33
|
+
*/
|
|
34
|
+
onChange?: (event: DateTimePickerEvent, date?: Date) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Called when the user selects a date or time.
|
|
37
|
+
*/
|
|
38
|
+
onValueChange?: (event: DateTimePickerChangeEvent, date: Date) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Called when the picker is dismissed without selecting a value.
|
|
41
|
+
* @platform android
|
|
42
|
+
*/
|
|
43
|
+
onDismiss?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* The picker mode.
|
|
46
|
+
* @default 'date'
|
|
47
|
+
*/
|
|
48
|
+
mode?: 'date' | 'time' | 'datetime';
|
|
49
|
+
/**
|
|
50
|
+
* The earliest selectable date.
|
|
51
|
+
*/
|
|
52
|
+
minimumDate?: Date;
|
|
53
|
+
/**
|
|
54
|
+
* The latest selectable date.
|
|
55
|
+
*/
|
|
56
|
+
maximumDate?: Date;
|
|
57
|
+
/**
|
|
58
|
+
* A test ID forwarded to the native view.
|
|
59
|
+
* Note: on Android dialog presentation, the test ID is not forwarded.
|
|
60
|
+
*/
|
|
61
|
+
testID?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Display style. Android supports `'default' | 'spinner'` — `'spinner'` shows a text input
|
|
64
|
+
* rather than a scroll wheel (Material 3 does not have a wheel-style picker).
|
|
65
|
+
* iOS supports `'default' | 'spinner' | 'compact' | 'inline'`.
|
|
66
|
+
* @default 'default'
|
|
67
|
+
*/
|
|
68
|
+
display?: 'default' | 'spinner' | 'compact' | 'inline' | 'calendar' | 'clock';
|
|
69
|
+
/**
|
|
70
|
+
* Use 24-hour format.
|
|
71
|
+
* @platform android
|
|
72
|
+
*/
|
|
73
|
+
is24Hour?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Accent/tint color applied to the picker.
|
|
76
|
+
* Maps to `color` on Android and `tint` on iOS.
|
|
77
|
+
*/
|
|
78
|
+
accentColor?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the picker is disabled.
|
|
81
|
+
* @platform ios
|
|
82
|
+
*/
|
|
83
|
+
disabled?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Locale identifier (e.g. 'en_US', 'fr_FR') for the picker display.
|
|
86
|
+
* @platform ios
|
|
87
|
+
*/
|
|
88
|
+
locale?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Force a specific color scheme on the picker.
|
|
91
|
+
* @platform ios
|
|
92
|
+
*/
|
|
93
|
+
themeVariant?: 'dark' | 'light';
|
|
94
|
+
/**
|
|
95
|
+
* IANA time zone name (e.g. 'America/New_York') for the picker display.
|
|
96
|
+
* @platform ios
|
|
97
|
+
*/
|
|
98
|
+
timeZoneName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* How the picker is presented.
|
|
101
|
+
* - `'inline'` renders the picker directly in the view hierarchy.
|
|
102
|
+
* - `'dialog'` shows a modal dialog that opens on mount. Fires `onValueChange` on confirmation, `onDismiss` on cancel. The caller should
|
|
103
|
+
* unmount the component in response.
|
|
104
|
+
*
|
|
105
|
+
* On iOS this prop is accepted but ignored (always inline).
|
|
106
|
+
* On Android the default is `'dialog'`.
|
|
107
|
+
* @default 'dialog'
|
|
108
|
+
* @platform android
|
|
109
|
+
*/
|
|
110
|
+
presentation?: 'inline' | 'dialog';
|
|
111
|
+
/**
|
|
112
|
+
* Set the positive (confirm) button label.
|
|
113
|
+
* @platform android
|
|
114
|
+
*/
|
|
115
|
+
positiveButton?: {
|
|
116
|
+
label?: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Set the negative (cancel) button label.
|
|
120
|
+
* @platform android
|
|
121
|
+
*/
|
|
122
|
+
negativeButton?: {
|
|
123
|
+
label?: string;
|
|
124
|
+
};
|
|
125
|
+
} & Pick<ViewProps, 'style'>;
|
|
126
|
+
export declare function buildEvent(date: Date): DateTimePickerEvent;
|
|
127
|
+
export declare function buildChangeEvent(date: Date): DateTimePickerChangeEvent;
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/datetime-picker/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;;KAEK;AACL,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,IAAI,EAAE,KAAK,GAAG,WAAW,CAAC;IAC1B,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7D;;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|
|
@@ -1,12 +1,38 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
|
+
import { type ColorValue } from 'react-native';
|
|
3
|
+
import { type ModifierConfig } from '../../types';
|
|
4
|
+
export type ModalBottomSheetRef = {
|
|
5
|
+
/**
|
|
6
|
+
* Programmatically hides the bottom sheet with an animation.
|
|
7
|
+
* The returned promise resolves after the dismiss animation completes.
|
|
8
|
+
*/
|
|
9
|
+
hide: () => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export type ModalBottomSheetProperties = {
|
|
12
|
+
/**
|
|
13
|
+
* Whether the bottom sheet can be dismissed by pressing the back button.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
shouldDismissOnBackPress?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the bottom sheet can be dismissed by clicking outside (on the scrim).
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
shouldDismissOnClickOutside?: boolean;
|
|
22
|
+
};
|
|
3
23
|
export type ModalBottomSheetProps = {
|
|
4
24
|
/**
|
|
5
25
|
* The children of the `ModalBottomSheet` component.
|
|
26
|
+
* Can include a `ModalBottomSheet.DragHandle` slot for a custom drag handle.
|
|
6
27
|
*/
|
|
7
28
|
children: React.ReactNode;
|
|
8
29
|
/**
|
|
9
|
-
*
|
|
30
|
+
* Can be used to imperatively hide the bottom sheet with an animation.
|
|
31
|
+
*/
|
|
32
|
+
ref?: Ref<ModalBottomSheetRef>;
|
|
33
|
+
/**
|
|
34
|
+
* Callback function that is called when the user dismisses the bottom sheet
|
|
35
|
+
* (via swipe, back press, or tapping outside the scrim).
|
|
10
36
|
*/
|
|
11
37
|
onDismissRequest: () => void;
|
|
12
38
|
/**
|
|
@@ -14,21 +40,47 @@ export type ModalBottomSheetProps = {
|
|
|
14
40
|
* @default false
|
|
15
41
|
*/
|
|
16
42
|
skipPartiallyExpanded?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The background color of the bottom sheet.
|
|
45
|
+
*/
|
|
46
|
+
containerColor?: ColorValue;
|
|
47
|
+
/**
|
|
48
|
+
* The preferred color of the content inside the bottom sheet.
|
|
49
|
+
*/
|
|
50
|
+
contentColor?: ColorValue;
|
|
51
|
+
/**
|
|
52
|
+
* The color of the scrim overlay behind the bottom sheet.
|
|
53
|
+
*/
|
|
54
|
+
scrimColor?: ColorValue;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show the default drag handle at the top of the bottom sheet.
|
|
57
|
+
* Ignored if a custom `ModalBottomSheet.DragHandle` slot is provided.
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
showDragHandle?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether gestures (swipe to dismiss) are enabled on the bottom sheet.
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
sheetGesturesEnabled?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Properties for the modal window behavior.
|
|
68
|
+
*/
|
|
69
|
+
properties?: ModalBottomSheetProperties;
|
|
17
70
|
/**
|
|
18
71
|
* Modifiers for the component.
|
|
19
72
|
*/
|
|
20
|
-
modifiers?:
|
|
73
|
+
modifiers?: ModifierConfig[];
|
|
21
74
|
};
|
|
22
75
|
/**
|
|
23
76
|
* A Material Design modal bottom sheet.
|
|
24
77
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export type BottomSheetProps = ModalBottomSheetProps;
|
|
78
|
+
declare function ModalBottomSheetComponent(props: ModalBottomSheetProps): React.JSX.Element;
|
|
79
|
+
declare namespace ModalBottomSheetComponent {
|
|
80
|
+
var DragHandle: (props: {
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
}) => React.JSX.Element;
|
|
83
|
+
}
|
|
84
|
+
export declare const ModalBottomSheet: typeof ModalBottomSheetComponent;
|
|
85
|
+
export {};
|
|
34
86
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ModalBottomSheet/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ModalBottomSheet/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAalD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAgCF;;GAEG;AACH,iBAAS,yBAAyB,CAAC,KAAK,EAAE,qBAAqB,qBAE9D;kBAFQ,yBAAyB;4BAPP;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;AAaxD,eAAO,MAAM,gBAAgB,kCAA4B,CAAC"}
|
|
@@ -7,6 +7,7 @@ export type TextInputRole = 'default' | 'cancel' | 'destructive';
|
|
|
7
7
|
export type TextInputRef = {
|
|
8
8
|
setText: (newText: string) => Promise<void>;
|
|
9
9
|
};
|
|
10
|
+
export type TextInputVariant = 'filled' | 'outlined';
|
|
10
11
|
export type TextInputProps = {
|
|
11
12
|
/**
|
|
12
13
|
* Can be used for imperatively setting text on the TextInput component.
|
|
@@ -16,6 +17,14 @@ export type TextInputProps = {
|
|
|
16
17
|
* Initial value that the TextInput displays when being mounted. As the TextInput is an uncontrolled component, change the key prop if you need to change the text value.
|
|
17
18
|
*/
|
|
18
19
|
defaultValue?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The visual style of the text input field.
|
|
22
|
+
* - `filled` - A text field with a filled background (default).
|
|
23
|
+
* - `outlined` - A text field with a transparent background and a border outline.
|
|
24
|
+
* @default filled
|
|
25
|
+
* @platform android
|
|
26
|
+
*/
|
|
27
|
+
variant?: TextInputVariant;
|
|
19
28
|
/**
|
|
20
29
|
* A callback triggered when user types in text into the TextInput.
|
|
21
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGtD;;GAEG;AACH,MAA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,CAAC,KAAK,EAAE,cAAc,+BAE9C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
|
+
export type LinkProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The text label for the Link. Use this for simple text links.
|
|
5
|
+
*/
|
|
6
|
+
label?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The URL for the link.
|
|
9
|
+
*/
|
|
10
|
+
destination: string;
|
|
11
|
+
/**
|
|
12
|
+
* Custom content for the link label. Use this for custom label views.
|
|
13
|
+
* Only nested elements are supported, not plain strings.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
16
|
+
} & CommonViewModifierProps;
|
|
17
|
+
/**
|
|
18
|
+
* Displays a native link component.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { Link } from '@expo/ui/swift-ui';
|
|
23
|
+
* import { foregroundStyle, font } from '@expo/ui/swift-ui/modifiers';
|
|
24
|
+
*
|
|
25
|
+
* <Link
|
|
26
|
+
* label="Open"
|
|
27
|
+
* destination="https://expo.dev"
|
|
28
|
+
* modifiers={[
|
|
29
|
+
* foregroundStyle('red'),
|
|
30
|
+
* font({ size: 24, weight: 'bold' })
|
|
31
|
+
* ]}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function Link(props: LinkProps): import("react").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Link/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAC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