@expo/ui 56.0.1 → 56.0.3
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 +13 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +7 -1
- package/android/src/main/java/expo/modules/ui/MaskView.kt +56 -0
- package/android/src/main/java/expo/modules/ui/TextFieldView.kt +27 -80
- package/android/src/main/java/expo/modules/ui/icon/IconView.kt +6 -1
- package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/community/masked-view/MaskedView.android.d.ts +8 -0
- package/build/community/masked-view/MaskedView.android.d.ts.map +1 -0
- package/build/community/masked-view/MaskedView.d.ts +10 -0
- package/build/community/masked-view/MaskedView.d.ts.map +1 -0
- package/build/community/masked-view/MaskedView.ios.d.ts +8 -0
- package/build/community/masked-view/MaskedView.ios.d.ts.map +1 -0
- package/build/community/masked-view/index.d.ts +4 -0
- package/build/community/masked-view/index.d.ts.map +1 -0
- package/build/community/masked-view/types.d.ts +19 -0
- package/build/community/masked-view/types.d.ts.map +1 -0
- package/build/community/picker/Picker.android.d.ts +10 -2
- package/build/community/picker/Picker.android.d.ts.map +1 -1
- package/build/community/picker/Picker.d.ts +10 -2
- package/build/community/picker/Picker.d.ts.map +1 -1
- package/build/community/picker/Picker.ios.d.ts +10 -2
- package/build/community/picker/Picker.ios.d.ts.map +1 -1
- package/build/community/picker/types.d.ts +12 -10
- package/build/community/picker/types.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +4 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +8 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/HorizontalPager/index.d.ts +2 -1
- package/build/jetpack-compose/HorizontalPager/index.d.ts.map +1 -1
- package/build/jetpack-compose/Icon/index.d.ts +12 -4
- package/build/jetpack-compose/Icon/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/index.d.ts +21 -34
- package/build/jetpack-compose/TextField/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +2 -2
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +1 -1
- package/build/swift-ui/TextField/index.d.ts +1 -0
- package/build/swift-ui/TextField/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +1 -1
- package/build/swift-ui/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/TextFieldView.swift +15 -15
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.1/expo.modules.ui-56.0.1-sources.jar → 56.0.3/expo.modules.ui-56.0.3-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.1/expo.modules.ui-56.0.1.module → 56.0.3/expo.modules.ui-56.0.3.module} +23 -23
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.1/expo.modules.ui-56.0.1.pom → 56.0.3/expo.modules.ui-56.0.3.pom} +2 -2
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.3/expo.modules.ui-56.0.3.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 +18 -14
- package/src/community/bottom-sheet/BottomSheet.android.tsx +3 -2
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +3 -2
- package/src/community/masked-view/MaskedView.android.tsx +40 -0
- package/src/community/masked-view/MaskedView.ios.tsx +32 -0
- package/src/community/masked-view/MaskedView.tsx +34 -0
- package/src/community/masked-view/index.tsx +3 -0
- package/src/community/masked-view/types.ts +19 -0
- package/src/community/picker/Picker.android.tsx +12 -5
- package/src/community/picker/Picker.ios.tsx +9 -6
- package/src/community/picker/Picker.tsx +3 -4
- package/src/community/picker/types.tsx +24 -18
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +4 -6
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +8 -8
- package/src/jetpack-compose/HorizontalPager/index.tsx +3 -1
- package/src/jetpack-compose/Icon/index.tsx +18 -5
- package/src/jetpack-compose/TextField/index.tsx +30 -50
- package/src/jetpack-compose/index.ts +17 -2
- package/src/jetpack-compose/modifiers/index.ts +1 -1
- package/src/swift-ui/TextField/index.tsx +3 -0
- package/src/swift-ui/index.tsx +6 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.1/expo.modules.ui-56.0.1.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.3 — 2026-05-07
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 56.0.2 — 2026-05-06
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fix Compose `TextField` selection state synchronization. ([#45424](https://github.com/expo/expo/pull/45424) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
22
|
+
- Fixed dynamic sizing regression for `@expo/ui/community/bottom-sheet`. ([#45412](https://github.com/expo/expo/pull/45412) by [@kudo](https://github.com/kudo))
|
|
23
|
+
|
|
13
24
|
## 56.0.1 — 2026-05-05
|
|
14
25
|
|
|
15
26
|
_This version does not introduce any user-facing changes._
|
|
@@ -26,11 +37,13 @@ _This version does not introduce any user-facing changes._
|
|
|
26
37
|
|
|
27
38
|
### 🎉 New features
|
|
28
39
|
|
|
40
|
+
- [android] Use `LocalContentColor` when `tint` is omitted ([#45329](https://github.com/expo/expo/pull/45329) by [@Ubax](https://github.com/Ubax))
|
|
29
41
|
- [universal] Added `TextInput` component that mirrors RN's `TextInput` API but routes to SwiftUI on iOS, Compose on Android, and RN's `TextInput` on web. ([#45205](https://github.com/expo/expo/pull/45205) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
30
42
|
- [compose] Exposed extension utilities for third-party modules: `ModifierRegistry.unregister`, and re-exported `createModifier` / `createModifierWithEventListener` / `createViewModifierEventListener` from `@expo/ui/jetpack-compose/modifiers`. Exported `PrimitiveBaseProps` from `@expo/ui/jetpack-compose`. ([#45122](https://github.com/expo/expo/pull/45122) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
31
43
|
- [android] Add `colors` prop to `HorizontalFloatingToolbar` to override the variant's default toolbar and FAB container/content colors. ([#45244](https://github.com/expo/expo/pull/45244) by [@Ubax](https://github.com/Ubax))
|
|
32
44
|
- [android] Added `HorizontalPager` component wrapping Compose's `HorizontalPager`. ([#45163](https://github.com/expo/expo/pull/45163) by [@vonovak](https://github.com/vonovak))
|
|
33
45
|
- [compose] Added worklet and `ObservableState` support to `TextField`. Added `value` prop accepting `ObservableState<string | TextFieldValue>` (create via `useNativeState`). `onValueChange` now supports worklets for synchronous UI-thread updates. Added `TextFieldValue` type with `text` + `selection` for worklet-driven caret control. Replaced `defaultValue`, callers pass state via `useNativeState` or omit for an empty field. ([#45024](https://github.com/expo/expo/pull/45024) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
46
|
+
- Added `@expo/ui/community/masked-view` — a drop-in replacement for `@react-native-masked-view/masked-view`. ([#45488](https://github.com/expo/expo/pull/45488) by [@vonovak](https://github.com/vonovak))
|
|
34
47
|
- [android] Add `WorkletCallback` shared object for synchronous UI thread callbacks. ([#44681](https://github.com/expo/expo/pull/44681) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
35
48
|
- [android] Add `ObservableState` shared object and `useNativeState` hook for controlling native Compose state from JS. ([#44655](https://github.com/expo/expo/pull/44655) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
36
49
|
- [iOS] Added `Mask` component wrapping SwiftUI's `.mask(alignment:_:)` modifier, with a `Mask.Content` slot for the mask element. ([#44934](https://github.com/expo/expo/pull/44934) 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 = '56.0.
|
|
15
|
+
version = '56.0.3'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "56.0.
|
|
21
|
+
versionName "56.0.3"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -603,7 +603,7 @@ class ExpoUIModule : Module() {
|
|
|
603
603
|
|
|
604
604
|
ExpoUIView<TextFieldProps>("TextFieldView") {
|
|
605
605
|
val setText by AsyncFunction<String>()
|
|
606
|
-
val setSelection by AsyncFunction<
|
|
606
|
+
val setSelection by AsyncFunction<Int, Int>()
|
|
607
607
|
val clear by AsyncFunction()
|
|
608
608
|
val focus by AsyncFunction()
|
|
609
609
|
val blur by AsyncFunction()
|
|
@@ -672,6 +672,12 @@ class ExpoUIModule : Module() {
|
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
+
ExpoUIView<MaskViewProps>("MaskView") {
|
|
676
|
+
Content { props ->
|
|
677
|
+
MaskViewContent(props)
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
675
681
|
//endregion Expo UI views
|
|
676
682
|
}
|
|
677
683
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
package expo.modules.ui
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.Box
|
|
4
|
+
import androidx.compose.runtime.Composable
|
|
5
|
+
import androidx.compose.ui.Modifier
|
|
6
|
+
import androidx.compose.ui.draw.drawWithContent
|
|
7
|
+
import androidx.compose.ui.graphics.BlendMode
|
|
8
|
+
import androidx.compose.ui.graphics.CompositingStrategy
|
|
9
|
+
import androidx.compose.ui.graphics.graphicsLayer
|
|
10
|
+
import androidx.compose.ui.graphics.layer.drawLayer
|
|
11
|
+
import androidx.compose.ui.graphics.rememberGraphicsLayer
|
|
12
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
13
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
14
|
+
import expo.modules.kotlin.views.OptimizedComposeProps
|
|
15
|
+
import expo.modules.ui.convertibles.ContentAlignment
|
|
16
|
+
|
|
17
|
+
@OptimizedComposeProps
|
|
18
|
+
data class MaskViewProps(
|
|
19
|
+
val alignment: ContentAlignment = ContentAlignment.CENTER,
|
|
20
|
+
val modifiers: ModifierList = emptyList()
|
|
21
|
+
) : ComposeProps
|
|
22
|
+
|
|
23
|
+
@Composable
|
|
24
|
+
fun FunctionalComposableScope.MaskViewContent(props: MaskViewProps) {
|
|
25
|
+
val maskSlotView = findChildSlotView(view, "content")
|
|
26
|
+
val maskLayer = rememberGraphicsLayer().apply { blendMode = BlendMode.DstIn }
|
|
27
|
+
|
|
28
|
+
Box(
|
|
29
|
+
modifier = ModifierRegistry
|
|
30
|
+
.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
31
|
+
.graphicsLayer { compositingStrategy = CompositingStrategy.Offscreen }
|
|
32
|
+
.drawWithContent {
|
|
33
|
+
drawContent()
|
|
34
|
+
drawLayer(maskLayer)
|
|
35
|
+
}
|
|
36
|
+
) {
|
|
37
|
+
Children(UIComposableScope(), filter = { !isSlotView(it) })
|
|
38
|
+
|
|
39
|
+
if (maskSlotView != null) {
|
|
40
|
+
Box(
|
|
41
|
+
modifier = Modifier
|
|
42
|
+
.matchParentSize()
|
|
43
|
+
.drawWithContent {
|
|
44
|
+
maskLayer.record { this@drawWithContent.drawContent() }
|
|
45
|
+
},
|
|
46
|
+
contentAlignment = props.alignment.toComposeAlignment()
|
|
47
|
+
) {
|
|
48
|
+
with(UIComposableScope()) {
|
|
49
|
+
with(maskSlotView) {
|
|
50
|
+
Content()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -32,6 +32,7 @@ import expo.modules.kotlin.records.Field
|
|
|
32
32
|
import expo.modules.kotlin.records.Record
|
|
33
33
|
import expo.modules.kotlin.types.Enumerable
|
|
34
34
|
import expo.modules.kotlin.views.AsyncFunctionHandle
|
|
35
|
+
import expo.modules.kotlin.views.AsyncFunctionHandle2
|
|
35
36
|
import expo.modules.kotlin.views.ComposeProps
|
|
36
37
|
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
37
38
|
import expo.modules.kotlin.types.OptimizedRecord
|
|
@@ -265,27 +266,10 @@ private fun String?.toImeAction(): ImeAction = when (this) {
|
|
|
265
266
|
|
|
266
267
|
// region Value helpers
|
|
267
268
|
|
|
268
|
-
private fun
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
private fun getSelection(
|
|
275
|
-
raw: Any?,
|
|
276
|
-
isStringMode: Boolean,
|
|
277
|
-
textLength: Int,
|
|
278
|
-
localSelection: TextRange
|
|
279
|
-
): TextRange {
|
|
280
|
-
if (isStringMode) {
|
|
281
|
-
return TextRange(
|
|
282
|
-
localSelection.start.coerceIn(0, textLength),
|
|
283
|
-
localSelection.end.coerceIn(0, textLength)
|
|
284
|
-
)
|
|
285
|
-
}
|
|
286
|
-
val selMap = (raw as? Map<*, *>)?.get("selection") as? Map<*, *>
|
|
287
|
-
val start = (selMap?.get("start") as? Number)?.toInt()?.coerceIn(0, textLength) ?: textLength
|
|
288
|
-
val end = (selMap?.get("end") as? Number)?.toInt()?.coerceIn(0, textLength) ?: textLength
|
|
269
|
+
private fun ObservableState.extractSelection(textLength: Int): TextRange {
|
|
270
|
+
val selMap = value as? Map<*, *>
|
|
271
|
+
val start = (selMap?.get("start") as? Number)?.toInt()?.coerceIn(0, textLength) ?: 0
|
|
272
|
+
val end = (selMap?.get("end") as? Number)?.toInt()?.coerceIn(0, textLength) ?: 0
|
|
289
273
|
return TextRange(start, end)
|
|
290
274
|
}
|
|
291
275
|
|
|
@@ -297,7 +281,7 @@ private fun getSelection(
|
|
|
297
281
|
fun FunctionalComposableScope.TextFieldContent(
|
|
298
282
|
props: TextFieldProps,
|
|
299
283
|
setText: AsyncFunctionHandle<String>,
|
|
300
|
-
setSelection:
|
|
284
|
+
setSelection: AsyncFunctionHandle2<Int, Int>,
|
|
301
285
|
clear: AsyncFunctionHandle<Unit>,
|
|
302
286
|
focus: AsyncFunctionHandle<Unit>,
|
|
303
287
|
blur: AsyncFunctionHandle<Unit>,
|
|
@@ -310,18 +294,10 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
310
294
|
val focusRequester = remember { FocusRequester() }
|
|
311
295
|
val state = props.value
|
|
312
296
|
|
|
313
|
-
val isStringMode = state.value is String
|
|
314
297
|
setText.handle { text ->
|
|
315
|
-
state.value =
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
mapOf(
|
|
319
|
-
"text" to text,
|
|
320
|
-
// on setting text, we set the selection to the end
|
|
321
|
-
// TODO: add a setValue function to allow setting selection and text
|
|
322
|
-
"selection" to mapOf("start" to text.length, "end" to text.length)
|
|
323
|
-
)
|
|
324
|
-
}
|
|
298
|
+
state.value = text
|
|
299
|
+
// setText moves the cursor to the end; use setSelection afterwards to override.
|
|
300
|
+
props.selection.value = mapOf("start" to text.length, "end" to text.length)
|
|
325
301
|
}
|
|
326
302
|
focus.handle {
|
|
327
303
|
focusRequester.requestFocus()
|
|
@@ -329,18 +305,15 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
329
305
|
blur.handle {
|
|
330
306
|
focusManager.clearFocus()
|
|
331
307
|
}
|
|
332
|
-
setSelection.handle {
|
|
333
|
-
val text = state.value
|
|
334
|
-
val clampedStart =
|
|
335
|
-
val clampedEnd =
|
|
308
|
+
setSelection.handle { start, end ->
|
|
309
|
+
val text = state.value as? String ?: ""
|
|
310
|
+
val clampedStart = start.coerceIn(0, text.length)
|
|
311
|
+
val clampedEnd = end.coerceIn(0, text.length)
|
|
336
312
|
props.selection.value = mapOf("start" to clampedStart, "end" to clampedEnd)
|
|
337
313
|
}
|
|
338
314
|
clear.handle {
|
|
339
|
-
state.value =
|
|
340
|
-
|
|
341
|
-
} else {
|
|
342
|
-
mapOf("text" to "", "selection" to mapOf("start" to 0, "end" to 0))
|
|
343
|
-
}
|
|
315
|
+
state.value = ""
|
|
316
|
+
props.selection.value = mapOf("start" to 0, "end" to 0)
|
|
344
317
|
}
|
|
345
318
|
|
|
346
319
|
// Slots
|
|
@@ -360,7 +333,7 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
360
333
|
capitalization = kbOpts?.capitalization.toCapitalization(),
|
|
361
334
|
imeAction = kbOpts?.imeAction.toImeAction()
|
|
362
335
|
)
|
|
363
|
-
val currentText = { state.value
|
|
336
|
+
val currentText = { state.value as? String ?: "" }
|
|
364
337
|
val keyboardActions = KeyboardActions(
|
|
365
338
|
onDone = {
|
|
366
339
|
defaultKeyboardAction(ImeAction.Done)
|
|
@@ -425,30 +398,14 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
425
398
|
}
|
|
426
399
|
} ?: baseColors
|
|
427
400
|
|
|
428
|
-
val
|
|
429
|
-
val
|
|
430
|
-
val text = raw.extractText()
|
|
431
|
-
val selection = getSelection(raw, isStringMode, text.length, localSelection.value)
|
|
401
|
+
val text = state.value as? String ?: ""
|
|
402
|
+
val selection = props.selection.extractSelection(text.length)
|
|
432
403
|
|
|
433
404
|
val localValue = remember { mutableStateOf(TextFieldValue(text, selection)) }
|
|
434
405
|
if (localValue.value.text != text || localValue.value.selection != selection) {
|
|
435
406
|
localValue.value = TextFieldValue(text, selection)
|
|
436
407
|
}
|
|
437
408
|
|
|
438
|
-
props.selection.value?.let { rawSel ->
|
|
439
|
-
val selMap = rawSel as? Map<*, *>
|
|
440
|
-
val externalStart = (selMap?.get("start") as? Number)?.toInt()
|
|
441
|
-
val externalEnd = (selMap?.get("end") as? Number)?.toInt()
|
|
442
|
-
if (externalStart != null && externalEnd != null) {
|
|
443
|
-
val cur = localValue.value
|
|
444
|
-
val clampedStart = externalStart.coerceIn(0, cur.text.length)
|
|
445
|
-
val clampedEnd = externalEnd.coerceIn(0, cur.text.length)
|
|
446
|
-
if (cur.selection.start != clampedStart || cur.selection.end != clampedEnd) {
|
|
447
|
-
localValue.value = cur.copy(selection = TextRange(clampedStart, clampedEnd))
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
|
|
452
409
|
val value = localValue.value
|
|
453
410
|
|
|
454
411
|
val onValueChange: (TextFieldValue) -> Unit = { incoming ->
|
|
@@ -468,25 +425,6 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
468
425
|
} ?: incoming
|
|
469
426
|
val prev = localValue.value
|
|
470
427
|
localValue.value = new
|
|
471
|
-
if (new.text != prev.text || new.selection != prev.selection) {
|
|
472
|
-
val payload = TextFieldValuePayload(
|
|
473
|
-
text = new.text,
|
|
474
|
-
selection = TextFieldSelectionPayload(new.selection.start, new.selection.end)
|
|
475
|
-
)
|
|
476
|
-
if (isStringMode) {
|
|
477
|
-
state.value = new.text
|
|
478
|
-
localSelection.value = new.selection
|
|
479
|
-
onValueChanged(payload)
|
|
480
|
-
props.onValueChangeSync?.invoke(new.text)
|
|
481
|
-
} else {
|
|
482
|
-
state.value = mapOf(
|
|
483
|
-
"text" to new.text,
|
|
484
|
-
"selection" to mapOf("start" to new.selection.start, "end" to new.selection.end)
|
|
485
|
-
)
|
|
486
|
-
onValueChanged(payload)
|
|
487
|
-
props.onValueChangeSync?.invoke(payload)
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
428
|
if (new.selection != prev.selection) {
|
|
491
429
|
val cur = props.selection.value as? Map<*, *>
|
|
492
430
|
val curStart = (cur?.get("start") as? Number)?.toInt()
|
|
@@ -499,6 +437,15 @@ fun FunctionalComposableScope.TextFieldContent(
|
|
|
499
437
|
}
|
|
500
438
|
onSelectionChanged(TextFieldSelectionPayload(new.selection.start, new.selection.end))
|
|
501
439
|
}
|
|
440
|
+
if (new.text != prev.text) {
|
|
441
|
+
state.value = new.text
|
|
442
|
+
val payload = TextFieldValuePayload(
|
|
443
|
+
text = new.text,
|
|
444
|
+
selection = TextFieldSelectionPayload(new.selection.start, new.selection.end)
|
|
445
|
+
)
|
|
446
|
+
onValueChanged(payload)
|
|
447
|
+
props.onValueChangeSync?.invoke(new.text)
|
|
448
|
+
}
|
|
502
449
|
}
|
|
503
450
|
|
|
504
451
|
val context = appContext.reactContext
|
|
@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable
|
|
|
7
7
|
import android.net.Uri
|
|
8
8
|
import androidx.compose.foundation.layout.size
|
|
9
9
|
import androidx.compose.material3.Icon
|
|
10
|
+
import androidx.compose.material3.LocalContentColor
|
|
10
11
|
import androidx.compose.runtime.Composable
|
|
11
12
|
import androidx.compose.runtime.LaunchedEffect
|
|
12
13
|
import androidx.compose.runtime.MutableState
|
|
@@ -50,6 +51,7 @@ data class Source(
|
|
|
50
51
|
data class IconProps(
|
|
51
52
|
val source: MutableState<Source?> = mutableStateOf(null),
|
|
52
53
|
val tint: MutableState<Color?> = mutableStateOf(null),
|
|
54
|
+
val inheritTint: MutableState<Boolean> = mutableStateOf(true),
|
|
53
55
|
val size: MutableState<Int?> = mutableStateOf(null),
|
|
54
56
|
val contentDescription: MutableState<String?> = mutableStateOf(null),
|
|
55
57
|
val modifiers: MutableState<ModifierList> = mutableStateOf(emptyList())
|
|
@@ -73,6 +75,7 @@ class IconView(context: Context, appContext: AppContext) :
|
|
|
73
75
|
override fun ComposableScope.Content() {
|
|
74
76
|
val (source) = props.source
|
|
75
77
|
val (tint) = props.tint
|
|
78
|
+
val (inheritTint) = props.inheritTint
|
|
76
79
|
val (iconSize) = props.size
|
|
77
80
|
val (contentDescription) = props.contentDescription
|
|
78
81
|
val (modifiers) = props.modifiers
|
|
@@ -100,10 +103,12 @@ class IconView(context: Context, appContext: AppContext) :
|
|
|
100
103
|
|
|
101
104
|
// Render icon if painter available
|
|
102
105
|
if (painter != null) {
|
|
106
|
+
val resolvedTint = tint?.compose
|
|
107
|
+
?: if (inheritTint) LocalContentColor.current else androidx.compose.ui.graphics.Color.Unspecified
|
|
103
108
|
Icon(
|
|
104
109
|
painter = painter,
|
|
105
110
|
contentDescription = contentDescription,
|
|
106
|
-
tint =
|
|
111
|
+
tint = resolvedTint,
|
|
107
112
|
modifier = Modifier
|
|
108
113
|
.then(iconSize?.let { Modifier.size(it.dp) } ?: Modifier)
|
|
109
114
|
.then(ModifierRegistry.applyModifiers(modifiers, appContext, this@Content, globalEventDispatcher))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAsKlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.ios.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.ios.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAapE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAiD3C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BottomSheet.ios.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.ios.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAapE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAiD3C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA+LlD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MaskedViewProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Android implementation of `MaskedView`. Bridges arbitrary React Native children
|
|
4
|
+
* (and `maskElement`) into the Compose `MaskView` primitive via `RNHostView`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function MaskedView(props: MaskedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default MaskedView;
|
|
8
|
+
//# sourceMappingURL=MaskedView.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskedView.android.d.ts","sourceRoot":"","sources":["../../../src/community/masked-view/MaskedView.android.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAY/C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAkBhD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MaskedViewProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders `children` with the alpha channel of `maskElement` applied as a mask:
|
|
4
|
+
* opaque pixels of `maskElement` reveal `children`, transparent pixels hide them.
|
|
5
|
+
*
|
|
6
|
+
* API-compatible with `@react-native-masked-view/masked-view`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function MaskedView(props: MaskedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default MaskedView;
|
|
10
|
+
//# sourceMappingURL=MaskedView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskedView.d.ts","sourceRoot":"","sources":["../../../src/community/masked-view/MaskedView.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C;;;;;GAKG;AAGH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAgBhD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MaskedViewProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* iOS implementation of `MaskedView`. Bridges arbitrary React Native children
|
|
4
|
+
* (and `maskElement`) into the SwiftUI `Mask` primitive via `RNHostView`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function MaskedView(props: MaskedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default MaskedView;
|
|
8
|
+
//# sourceMappingURL=MaskedView.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaskedView.ios.d.ts","sourceRoot":"","sources":["../../../src/community/masked-view/MaskedView.ios.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK/C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAkBhD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/community/masked-view/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Drop-in props for `@react-native-masked-view/masked-view`'s `MaskedView`.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/callstack/masked-view
|
|
7
|
+
*/
|
|
8
|
+
export interface MaskedViewProps extends ViewProps {
|
|
9
|
+
/**
|
|
10
|
+
* The element used as the mask. Only opaque pixels of `maskElement` make the
|
|
11
|
+
* masked content visible — transparent pixels hide it.
|
|
12
|
+
*/
|
|
13
|
+
maskElement: ReactElement;
|
|
14
|
+
/**
|
|
15
|
+
* Content rendered behind the mask.
|
|
16
|
+
*/
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/community/masked-view/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD;;;OAGG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PickerItemProps, type PickerItemValue, type PickerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-picker/picker` on Android.
|
|
5
|
+
* Renders a Material 3 `ExposedDropdownMenuBox` wrapped in a Host.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Picker<T extends PickerItemValue>(props: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace Picker {
|
|
9
|
+
var Item: React.ComponentType<PickerItemProps>;
|
|
10
|
+
}
|
|
3
11
|
//# sourceMappingURL=Picker.android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.android.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.android.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Picker.android.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAYjB;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,2CA8CtE;yBA9Ce,MAAM"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PickerItemProps, type PickerItemValue, type PickerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-picker/picker` on web.
|
|
5
|
+
* Renders a native `<select>` element.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Picker<T extends PickerItemValue>(props: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace Picker {
|
|
9
|
+
var Item: React.ComponentType<PickerItemProps>;
|
|
10
|
+
}
|
|
3
11
|
//# sourceMappingURL=Picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,2CAiCtE;yBAjCe,MAAM"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type PickerItemProps, type PickerItemValue, type PickerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A drop-in replacement for `@react-native-picker/picker` on iOS.
|
|
5
|
+
* Renders a SwiftUI wheel picker wrapped in a Host.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Picker<T extends PickerItemValue>(props: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace Picker {
|
|
9
|
+
var Item: React.ComponentType<PickerItemProps>;
|
|
10
|
+
}
|
|
3
11
|
//# sourceMappingURL=Picker.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.ios.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.ios.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Picker.ios.d.ts","sourceRoot":"","sources":["../../../src/community/picker/Picker.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAejB;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,2CA8CtE;yBA9Ce,MAAM"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Ref, type ReactNode, type ReactElement } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
3
|
export type PickerItemValue = string | number | null;
|
|
4
4
|
/**
|
|
5
5
|
* Props for the `Picker.Item` component.
|
|
6
6
|
* Compatible with `@react-native-picker/picker`.
|
|
7
7
|
*/
|
|
8
|
-
export type PickerItemProps<T extends PickerItemValue> = {
|
|
8
|
+
export type PickerItemProps<T extends PickerItemValue = PickerItemValue> = {
|
|
9
9
|
/**
|
|
10
10
|
* Display text for the item.
|
|
11
11
|
*/
|
|
@@ -15,15 +15,19 @@ export type PickerItemProps<T extends PickerItemValue> = {
|
|
|
15
15
|
*/
|
|
16
16
|
value?: T;
|
|
17
17
|
/**
|
|
18
|
-
* Text color for the item.
|
|
19
|
-
* @platform ios
|
|
18
|
+
* Text color for the item. Equivalent to setting `color` in the `style` prop.
|
|
20
19
|
*/
|
|
21
20
|
color?: string;
|
|
22
21
|
/**
|
|
23
|
-
* Custom font family for the item.
|
|
24
|
-
* @platform ios
|
|
22
|
+
* Custom font family for the item. Equivalent to setting `fontFamily` in the `style` prop.
|
|
25
23
|
*/
|
|
26
24
|
fontFamily?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Style applied to the item label. Only the following values take effect:
|
|
27
|
+
* `color`, `backgroundColor`, `fontFamily`, and `fontSize`. When also set
|
|
28
|
+
* via the top-level `color` or `fontFamily` props, values from `style` win.
|
|
29
|
+
*/
|
|
30
|
+
style?: StyleProp<TextStyle>;
|
|
27
31
|
/**
|
|
28
32
|
* Whether the item is enabled.
|
|
29
33
|
* @platform android
|
|
@@ -89,15 +93,13 @@ export type PickerRef = {
|
|
|
89
93
|
*/
|
|
90
94
|
blur: () => void;
|
|
91
95
|
};
|
|
92
|
-
export type PickerWithItems = {
|
|
93
|
-
<T extends PickerItemValue>(props: PickerProps<T>): ReactElement | null;
|
|
94
|
-
Item: typeof PickerItem;
|
|
95
|
-
};
|
|
96
96
|
export type ExtractedPickerItem<T extends PickerItemValue = PickerItemValue> = {
|
|
97
97
|
label: string;
|
|
98
98
|
value: T;
|
|
99
99
|
color?: string;
|
|
100
|
+
backgroundColor?: string;
|
|
100
101
|
fontFamily?: string;
|
|
102
|
+
fontSize?: number;
|
|
101
103
|
enabled?: boolean;
|
|
102
104
|
};
|
|
103
105
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/community/picker/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/community/picker/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC9F,OAAO,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1F,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAI;IACzE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAA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KAAK,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,EAC1D,QAAQ,EAAE,SAAS,GAClB,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAkB1B"}
|
|
@@ -8,6 +8,10 @@ export type DropdownMenuItemElementColors = {
|
|
|
8
8
|
textColor?: ColorValue;
|
|
9
9
|
/** Color of the text when the menu item is disabled. */
|
|
10
10
|
disabledTextColor?: ColorValue;
|
|
11
|
+
leadingIconColor?: ColorValue;
|
|
12
|
+
trailingIconColor?: ColorValue;
|
|
13
|
+
disabledLeadingIconColor?: ColorValue;
|
|
14
|
+
disabledTrailingIconColor?: ColorValue;
|
|
11
15
|
};
|
|
12
16
|
/**
|
|
13
17
|
* Props of the `DropdownMenuItem` component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuItem.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;AAa7D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,mCAAmC;IACnC,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownMenuItem.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EA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
|
8
|
+
/**
|
|
9
|
+
* Color of the toolbar content (icons/text).
|
|
10
|
+
*/
|
|
11
|
+
toolbarContentColor?: ColorValue;
|
|
8
12
|
/**
|
|
9
13
|
* Color of the floating action button container (background).
|
|
10
14
|
*/
|
|
11
15
|
fabContainerColor?: ColorValue;
|
|
16
|
+
/**
|
|
17
|
+
* Color of the floating action button content (icon).
|
|
18
|
+
*/
|
|
19
|
+
fabContentColor?: ColorValue;
|
|
12
20
|
};
|
|
13
21
|
export type HorizontalFloatingToolbarProps = {
|
|
14
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/HorizontalFloatingToolbar/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,qBAAqB,CAAC,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/HorizontalFloatingToolbar/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,qBAAqB,CAAC,EAAE,UAAU,CAAC;IAEnC;;OAEG;IACH,mBAAmB,CAAC,EAAE,UAAU,CAAC;IAEjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAE/B;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,MAAM,CAAC,EAAE,+BAA+B,CAAC;IAEzC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,kDAAkD,GAAG;IAC/D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAmBF;;;GAGG;AACH,wBAAgB,6CAA6C,CAC3D,KAAK,EAAE,kDAAkD,2CAO1D;AAaD;;;GAGG;AACH,iBAAS,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,2CAMvE;kBANQ,yBAAyB;;;AAUlC,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Ref } from 'react';
|
|
2
2
|
import { type ModifierConfig } from '../../types';
|
|
3
|
-
import type
|
|
3
|
+
import { type PaddingValuesRecord } from '../Carousel';
|
|
4
|
+
export type { PaddingValuesRecord };
|
|
4
5
|
export type HorizontalPagerHandle = {
|
|
5
6
|
/**
|
|
6
7
|
* Mirrors Compose's `PagerState.animateScrollToPage`. Resolves when the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/HorizontalPager/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/HorizontalPager/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,cAAc,EAAkB,MA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