@expo/ui 55.0.0-preview.6 → 55.0.0
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 +20 -0
- package/android/build.gradle +27 -8
- package/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt +26 -0
- package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +12 -37
- package/android/src/main/java/expo/modules/ui/CardView.kt +72 -0
- package/android/src/main/java/expo/modules/ui/CarouselView.kt +2 -5
- package/android/src/main/java/expo/modules/ui/ComposeViews.kt +91 -130
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +2 -2
- package/android/src/main/java/expo/modules/ui/DividerView.kt +1 -1
- package/android/src/main/java/expo/modules/ui/DockedSearchBarView.kt +53 -0
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +136 -17
- package/android/src/main/java/expo/modules/ui/FilterChipView.kt +59 -0
- package/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt +63 -0
- package/android/src/main/java/expo/modules/ui/LazyColumnView.kt +95 -0
- package/android/src/main/java/expo/modules/ui/ListItemView.kt +89 -0
- package/android/src/main/java/expo/modules/ui/MaterialShapes.kt +77 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +168 -30
- package/android/src/main/java/expo/modules/ui/PickerView.kt +2 -2
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +1 -1
- package/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt +40 -0
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +87 -0
- package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +28 -0
- package/android/src/main/java/expo/modules/ui/SearchBarView.kt +60 -0
- package/android/src/main/java/expo/modules/ui/ShapeView.kt +36 -5
- package/android/src/main/java/expo/modules/ui/SliderView.kt +1 -1
- package/android/src/main/java/expo/modules/ui/SlotView.kt +53 -0
- package/android/src/main/java/expo/modules/ui/SpacerView.kt +15 -0
- package/android/src/main/java/expo/modules/ui/SurfaceView.kt +36 -0
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +24 -4
- package/android/src/main/java/expo/modules/ui/TextButtonView.kt +33 -0
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +1 -2
- package/android/src/main/java/expo/modules/ui/TextView.kt +194 -0
- package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +96 -0
- package/android/src/main/java/expo/modules/ui/Utils.kt +6 -0
- package/android/src/main/java/expo/modules/ui/button/Button.kt +1 -1
- package/android/src/main/java/expo/modules/ui/button/IconButton.kt +2 -6
- package/android/src/main/java/expo/modules/ui/convertibles/Alignment.kt +112 -0
- package/android/src/main/java/expo/modules/ui/convertibles/Arrangement.kt +72 -0
- package/android/src/main/java/expo/modules/ui/icon/IconView.kt +159 -0
- package/android/src/main/java/expo/modules/ui/icon/ResourceIdHelper.kt +47 -0
- package/android/src/main/java/expo/modules/ui/icon/VectorIconLoader.kt +369 -0
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +1 -1
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts +22 -0
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -0
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +40 -0
- package/build/jetpack-compose/Card/index.d.ts.map +1 -0
- package/build/jetpack-compose/Carousel/index.d.ts.map +1 -1
- package/build/jetpack-compose/Chip/index.d.ts +0 -4
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +1 -12
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/Divider/index.d.ts.map +1 -1
- package/build/jetpack-compose/DockedSearchBar/index.d.ts +30 -0
- package/build/jetpack-compose/DockedSearchBar/index.d.ts.map +1 -0
- package/build/jetpack-compose/ExpoUIModule.d.ts +2 -0
- package/build/jetpack-compose/ExpoUIModule.d.ts.map +1 -0
- package/build/jetpack-compose/FilterChip/index.d.ts +49 -0
- package/build/jetpack-compose/FilterChip/index.d.ts.map +1 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +41 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -0
- package/build/jetpack-compose/Icon/index.d.ts +112 -0
- package/build/jetpack-compose/Icon/index.d.ts.map +1 -0
- package/build/jetpack-compose/IconButton/index.d.ts +0 -4
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/LazyColumn/index.d.ts +55 -0
- package/build/jetpack-compose/LazyColumn/index.d.ts.map +1 -0
- package/build/jetpack-compose/ListItem/index.d.ts +81 -0
- package/build/jetpack-compose/ListItem/index.d.ts.map +1 -0
- package/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts +2 -0
- package/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts.map +1 -0
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts +34 -0
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -0
- package/build/jetpack-compose/Picker/index.d.ts +0 -6
- package/build/jetpack-compose/Picker/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts +31 -0
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts.map +1 -0
- package/build/jetpack-compose/RNHostView/index.d.ts +28 -0
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -0
- package/build/jetpack-compose/RadioButton/index.d.ts +20 -0
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/SearchBar/index.d.ts +47 -0
- package/build/jetpack-compose/SearchBar/index.d.ts.map +1 -0
- package/build/jetpack-compose/Shape/index.d.ts +29 -2
- package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
- package/build/jetpack-compose/Slider/index.d.ts +1 -9
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Spacer/index.d.ts +22 -0
- package/build/jetpack-compose/Spacer/index.d.ts.map +1 -0
- package/build/jetpack-compose/Surface/index.d.ts +44 -0
- package/build/jetpack-compose/Surface/index.d.ts.map +1 -0
- package/build/jetpack-compose/Switch/index.d.ts +17 -9
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/Text/index.d.ts +182 -0
- package/build/jetpack-compose/Text/index.d.ts.map +1 -0
- package/build/jetpack-compose/TextButton/index.d.ts +29 -0
- package/build/jetpack-compose/TextButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +54 -0
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/index.d.ts +20 -1
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/layout.d.ts +16 -19
- package/build/jetpack-compose/layout.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/createModifier.d.ts +18 -0
- package/build/jetpack-compose/modifiers/createModifier.d.ts.map +1 -0
- package/build/jetpack-compose/modifiers/index.d.ts +133 -41
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/utils.d.ts +15 -0
- package/build/jetpack-compose/modifiers/utils.d.ts.map +1 -0
- package/build/swift-ui/ConfirmationDialog/index.d.ts +47 -0
- package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -0
- package/build/swift-ui/ScrollView/index.d.ts +16 -0
- package/build/swift-ui/ScrollView/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +2 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +12 -3
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/expo-module.config.json +2 -1
- package/ios/ColorPickerView.swift +2 -2
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +65 -0
- package/ios/ConfirmationDialog/ConfirmationDialogComponents.swift +26 -0
- package/ios/ConfirmationDialog/ConfirmationDialogProps.swift +15 -0
- package/ios/Convertibles/VisibilityOptions.swift +19 -0
- package/ios/ExpoUIModule.swift +5 -0
- package/ios/Modifiers/ForegroundStyleModifier.swift +124 -0
- package/ios/Modifiers/PresentationModifiers.swift +1 -18
- package/ios/Modifiers/ViewModifierRegistry.swift +30 -121
- package/ios/ScrollViewComponent.swift +23 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module → 55.0.0/expo.modules.ui-55.0.0.module} +46 -28
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom → 55.0.0/expo.modules.ui-55.0.0.pom} +36 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.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 +5 -3
- package/src/jetpack-compose/AlertDialog/index.tsx +11 -1
- package/src/jetpack-compose/BasicAlertDialog/index.tsx +51 -0
- package/src/jetpack-compose/Button/index.tsx +13 -1
- package/src/jetpack-compose/Card/index.tsx +62 -0
- package/src/jetpack-compose/Carousel/index.tsx +7 -1
- package/src/jetpack-compose/Chip/index.tsx +14 -7
- package/src/jetpack-compose/ContextMenu/index.tsx +5 -2
- package/src/jetpack-compose/DatePicker/index.tsx +5 -5
- package/src/jetpack-compose/Divider/index.tsx +13 -2
- package/src/jetpack-compose/DockedSearchBar/index.tsx +78 -0
- package/src/jetpack-compose/ExpoUIModule.ts +3 -0
- package/src/jetpack-compose/FilterChip/index.tsx +89 -0
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +90 -0
- package/src/jetpack-compose/Icon/index.tsx +144 -0
- package/src/jetpack-compose/IconButton/index.tsx +5 -5
- package/src/jetpack-compose/LazyColumn/index.tsx +82 -0
- package/src/jetpack-compose/ListItem/index.tsx +129 -0
- package/src/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts +22 -0
- package/src/jetpack-compose/ModalBottomSheet/index.tsx +61 -0
- package/src/jetpack-compose/Picker/index.tsx +6 -5
- package/src/jetpack-compose/Progress/index.tsx +14 -4
- package/src/jetpack-compose/PullToRefreshBox/index.tsx +66 -0
- package/src/jetpack-compose/RNHostView/index.tsx +56 -0
- package/src/jetpack-compose/RadioButton/index.tsx +48 -0
- package/src/jetpack-compose/SearchBar/index.tsx +96 -0
- package/src/jetpack-compose/Shape/index.tsx +65 -22
- package/src/jetpack-compose/Slider/index.tsx +6 -5
- package/src/jetpack-compose/Spacer/index.tsx +43 -0
- package/src/jetpack-compose/Surface/index.tsx +66 -0
- package/src/jetpack-compose/Switch/index.tsx +43 -8
- package/src/jetpack-compose/Text/index.tsx +274 -0
- package/src/jetpack-compose/TextButton/index.tsx +55 -0
- package/src/jetpack-compose/TextInput/index.tsx +5 -4
- package/src/jetpack-compose/ToggleButton/index.tsx +83 -0
- package/src/jetpack-compose/index.ts +21 -1
- package/src/jetpack-compose/layout.tsx +55 -70
- package/src/jetpack-compose/modifiers/createModifier.ts +27 -0
- package/src/jetpack-compose/modifiers/index.ts +204 -83
- package/src/jetpack-compose/modifiers/utils.ts +30 -0
- package/src/swift-ui/ConfirmationDialog/index.tsx +98 -0
- package/src/swift-ui/ScrollView/index.tsx +34 -0
- package/src/swift-ui/index.tsx +2 -0
- package/src/swift-ui/modifiers/index.ts +19 -3
- package/src/ts-declarations/react-native-assets.d.ts +31 -0
- package/build/jetpack-compose/BottomSheet/index.d.ts +0 -21
- package/build/jetpack-compose/BottomSheet/index.d.ts.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha512 +0 -1
- package/src/jetpack-compose/BottomSheet/index.tsx +0 -46
|
@@ -9,16 +9,28 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>55.0.0
|
|
12
|
+
<version>55.0.0</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
16
|
+
<organization>
|
|
17
|
+
<name>650 Industries, Inc. (“Expo”)</name>
|
|
18
|
+
<url>https://expo.dev/home</url>
|
|
19
|
+
</organization>
|
|
16
20
|
<licenses>
|
|
17
21
|
<license>
|
|
18
22
|
<name>MIT License</name>
|
|
19
23
|
<url>https://github.com/expo/expo/blob/main/LICENSE</url>
|
|
24
|
+
<distribution>https://github.com/expo/expo/blob/main/LICENSE</distribution>
|
|
20
25
|
</license>
|
|
21
26
|
</licenses>
|
|
27
|
+
<developers>
|
|
28
|
+
<developer>
|
|
29
|
+
<name>Expo Maintainers</name>
|
|
30
|
+
<email>support@expo.dev</email>
|
|
31
|
+
<url>https://github.com/orgs/expo/people</url>
|
|
32
|
+
</developer>
|
|
33
|
+
</developers>
|
|
22
34
|
<scm>
|
|
23
35
|
<connection>https://github.com/expo/expo.git</connection>
|
|
24
36
|
<developerConnection>https://github.com/expo/expo.git</developerConnection>
|
|
@@ -31,34 +43,39 @@
|
|
|
31
43
|
<version>2.1.20</version>
|
|
32
44
|
<scope>runtime</scope>
|
|
33
45
|
</dependency>
|
|
46
|
+
<dependency>
|
|
47
|
+
<groupId>com.facebook.react</groupId>
|
|
48
|
+
<artifactId>react-android</artifactId>
|
|
49
|
+
<scope>runtime</scope>
|
|
50
|
+
</dependency>
|
|
34
51
|
<dependency>
|
|
35
52
|
<groupId>androidx.compose.foundation</groupId>
|
|
36
53
|
<artifactId>foundation-android</artifactId>
|
|
37
|
-
<version>1.
|
|
54
|
+
<version>1.10.2</version>
|
|
38
55
|
<scope>runtime</scope>
|
|
39
56
|
</dependency>
|
|
40
57
|
<dependency>
|
|
41
58
|
<groupId>androidx.compose.ui</groupId>
|
|
42
59
|
<artifactId>ui-android</artifactId>
|
|
43
|
-
<version>1.
|
|
60
|
+
<version>1.10.2</version>
|
|
44
61
|
<scope>runtime</scope>
|
|
45
62
|
</dependency>
|
|
46
63
|
<dependency>
|
|
47
64
|
<groupId>androidx.compose.material3</groupId>
|
|
48
65
|
<artifactId>material3</artifactId>
|
|
49
|
-
<version>1.5.0-
|
|
66
|
+
<version>1.5.0-alpha13</version>
|
|
50
67
|
<scope>runtime</scope>
|
|
51
68
|
</dependency>
|
|
52
69
|
<dependency>
|
|
53
70
|
<groupId>androidx.compose.material3</groupId>
|
|
54
71
|
<artifactId>material3-android</artifactId>
|
|
55
|
-
<version>1.5.0-
|
|
72
|
+
<version>1.5.0-alpha13</version>
|
|
56
73
|
<scope>runtime</scope>
|
|
57
74
|
</dependency>
|
|
58
75
|
<dependency>
|
|
59
76
|
<groupId>androidx.lifecycle</groupId>
|
|
60
77
|
<artifactId>lifecycle-runtime</artifactId>
|
|
61
|
-
<version>2.
|
|
78
|
+
<version>2.10.0</version>
|
|
62
79
|
<scope>runtime</scope>
|
|
63
80
|
</dependency>
|
|
64
81
|
<dependency>
|
|
@@ -70,7 +87,19 @@
|
|
|
70
87
|
<dependency>
|
|
71
88
|
<groupId>androidx.graphics</groupId>
|
|
72
89
|
<artifactId>graphics-shapes</artifactId>
|
|
73
|
-
<version>1.0
|
|
90
|
+
<version>1.1.0</version>
|
|
91
|
+
<scope>runtime</scope>
|
|
92
|
+
</dependency>
|
|
93
|
+
<dependency>
|
|
94
|
+
<groupId>com.squareup.okhttp3</groupId>
|
|
95
|
+
<artifactId>okhttp</artifactId>
|
|
96
|
+
<version>4.9.2</version>
|
|
97
|
+
<scope>runtime</scope>
|
|
98
|
+
</dependency>
|
|
99
|
+
<dependency>
|
|
100
|
+
<groupId>androidx.core</groupId>
|
|
101
|
+
<artifactId>core-ktx</artifactId>
|
|
102
|
+
<version>1.17.0</version>
|
|
74
103
|
<scope>runtime</scope>
|
|
75
104
|
</dependency>
|
|
76
105
|
</dependencies>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f252338c6e97eeea2181d83d5c5493f2
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a69749732bbb74d9ef23ce0c1508c38bb41707d9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8ef946a320955f52ed239de327c0006d9806229a7c6a2b25f0080634dab7ed82
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b1cbb30b5a78b049422d1589a4285d58c6a56ac85f07689e4a372e11b3bad54efc4482e6f1c2c3b8bace60e9c4fc173cae08ba7b235826b957e28f7f37bdcaad
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>55.0.0
|
|
7
|
-
<release>55.0.0
|
|
6
|
+
<latest>55.0.0</latest>
|
|
7
|
+
<release>55.0.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>55.0.0
|
|
9
|
+
<version>55.0.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260225012649</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
be097b1ca9d6557ce603d9fa8337d298
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ffb870c3e214c6335eda475340ecf91bb97a95e1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9fbe3d7daf56d306b01466ba459a1ca9a073df5d11712ba9746a45f54383c32f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fbfe14ec891c0a4f30a9da397ed8fad0422f6e68ab4d93830c4340800bad782a8fdfc84a5c1fb989966f1a38bcca1136353d0bfae3d9029885f57d663ec0af4a
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "55.0.0
|
|
3
|
+
"version": "55.0.0",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
|
-
"sideEffects":
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"*.fx.js"
|
|
7
|
+
],
|
|
6
8
|
"exports": {
|
|
7
9
|
"./package.json": "./package.json",
|
|
8
10
|
"./swift-ui": {
|
|
@@ -58,5 +60,5 @@
|
|
|
58
60
|
"react": "*",
|
|
59
61
|
"react-native": "*"
|
|
60
62
|
},
|
|
61
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "b183e5cbd95eb6ee54a878291c7077d8d63e4850"
|
|
62
64
|
}
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import { type ColorValue } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { ExpoModifier } from '../../types';
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
6
|
|
|
6
7
|
export type AlertDialogButtonColors = {
|
|
7
8
|
/**
|
|
@@ -67,9 +68,18 @@ const AlertDialogNativeView: React.ComponentType<NativeAlertDialogProps> = requi
|
|
|
67
68
|
'AlertDialogView'
|
|
68
69
|
);
|
|
69
70
|
|
|
71
|
+
function transformProps(props: AlertDialogProps): NativeAlertDialogProps {
|
|
72
|
+
const { modifiers, ...restProps } = props;
|
|
73
|
+
return {
|
|
74
|
+
modifiers,
|
|
75
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
76
|
+
...restProps,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
70
80
|
/**
|
|
71
81
|
* Renders an `AlertDialog` component.
|
|
72
82
|
*/
|
|
73
83
|
export function AlertDialog(props: AlertDialogProps) {
|
|
74
|
-
return <AlertDialogNativeView {...props} />;
|
|
84
|
+
return <AlertDialogNativeView {...transformProps(props)} />;
|
|
75
85
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
|
|
3
|
+
import { type ViewEvent, type ExpoModifier } from '../../types';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
|
|
6
|
+
export type BasicAlertDialogProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The content to display inside the dialog.
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Callback that is called when the user tries to dismiss the dialog
|
|
13
|
+
* (e.g. by tapping outside of it or pressing the back button).
|
|
14
|
+
*/
|
|
15
|
+
onDismissRequest?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Modifiers for the component.
|
|
18
|
+
*/
|
|
19
|
+
modifiers?: ExpoModifier[];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type NativeBasicAlertDialogProps = Omit<BasicAlertDialogProps, 'onDismissRequest'> &
|
|
23
|
+
ViewEvent<
|
|
24
|
+
'onDismissRequest',
|
|
25
|
+
{
|
|
26
|
+
onDismissRequest?: () => void;
|
|
27
|
+
}
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
const BasicAlertDialogNativeView: React.ComponentType<NativeBasicAlertDialogProps> =
|
|
31
|
+
requireNativeView('ExpoUI', 'BasicAlertDialogView');
|
|
32
|
+
|
|
33
|
+
function transformProps(props: BasicAlertDialogProps): NativeBasicAlertDialogProps {
|
|
34
|
+
const { modifiers, onDismissRequest, ...restProps } = props;
|
|
35
|
+
return {
|
|
36
|
+
modifiers,
|
|
37
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
38
|
+
onDismissRequest: () => {
|
|
39
|
+
onDismissRequest?.();
|
|
40
|
+
},
|
|
41
|
+
...restProps,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A basic alert dialog that provides a blank container for custom content.
|
|
47
|
+
* Unlike `AlertDialog`, this component does not have structured title/text/buttons slots.
|
|
48
|
+
*/
|
|
49
|
+
export function BasicAlertDialog(props: BasicAlertDialogProps) {
|
|
50
|
+
return <BasicAlertDialogNativeView {...transformProps(props)} />;
|
|
51
|
+
}
|
|
@@ -5,6 +5,7 @@ import { MaterialIcon } from './types';
|
|
|
5
5
|
import { ExpoModifier, ViewEvent } from '../../types';
|
|
6
6
|
import { getTextFromChildren } from '../../utils';
|
|
7
7
|
import { parseJSXShape, ShapeJSXElement, ShapeRecordProps } from '../Shape';
|
|
8
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* The built-in button styles available on Android.
|
|
@@ -96,12 +97,23 @@ const ButtonNativeView: React.ComponentType<NativeButtonProps> = requireNativeVi
|
|
|
96
97
|
* @hidden
|
|
97
98
|
*/
|
|
98
99
|
export function transformButtonProps(props: ButtonProps): NativeButtonProps {
|
|
99
|
-
const {
|
|
100
|
+
const {
|
|
101
|
+
children,
|
|
102
|
+
onPress,
|
|
103
|
+
leadingIcon,
|
|
104
|
+
trailingIcon,
|
|
105
|
+
systemImage,
|
|
106
|
+
shape,
|
|
107
|
+
modifiers,
|
|
108
|
+
...restProps
|
|
109
|
+
} = props;
|
|
100
110
|
|
|
101
111
|
// Handle backward compatibility: systemImage maps to leadingIcon
|
|
102
112
|
const finalLeadingIcon = leadingIcon ?? systemImage;
|
|
103
113
|
|
|
104
114
|
return {
|
|
115
|
+
modifiers,
|
|
116
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
105
117
|
...restProps,
|
|
106
118
|
text: getTextFromChildren(children) ?? '',
|
|
107
119
|
children: getTextFromChildren(children) !== undefined ? undefined : children,
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type ColorValue } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ExpoModifier } from '../../types';
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Colors for card's core elements.
|
|
9
|
+
*/
|
|
10
|
+
export type CardElementColors = {
|
|
11
|
+
containerColor?: ColorValue;
|
|
12
|
+
contentColor?: ColorValue;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type CardProps = {
|
|
16
|
+
/**
|
|
17
|
+
* The content to display inside the card.
|
|
18
|
+
*/
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The variant of the card.
|
|
22
|
+
* - 'default' - A filled card with no outline.
|
|
23
|
+
* - 'elevated' - A filled card with elevation/shadow.
|
|
24
|
+
* - 'outlined' - A card with an outline border.
|
|
25
|
+
* @default 'default'
|
|
26
|
+
*/
|
|
27
|
+
variant?: 'default' | 'elevated' | 'outlined';
|
|
28
|
+
/**
|
|
29
|
+
* The background color of the card.
|
|
30
|
+
*/
|
|
31
|
+
color?: ColorValue;
|
|
32
|
+
/**
|
|
33
|
+
* Colors for card's core elements.
|
|
34
|
+
*/
|
|
35
|
+
elementColors?: CardElementColors;
|
|
36
|
+
/**
|
|
37
|
+
* Modifiers for the component.
|
|
38
|
+
*/
|
|
39
|
+
modifiers?: ExpoModifier[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type NativeCardProps = CardProps;
|
|
43
|
+
const CardNativeView: React.ComponentType<NativeCardProps> = requireNativeView(
|
|
44
|
+
'ExpoUI',
|
|
45
|
+
'CardView'
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
function transformProps(props: CardProps): NativeCardProps {
|
|
49
|
+
const { modifiers, ...restProps } = props;
|
|
50
|
+
return {
|
|
51
|
+
modifiers,
|
|
52
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
53
|
+
...restProps,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* A card component that provides a surface for content.
|
|
59
|
+
*/
|
|
60
|
+
export function Card(props: CardProps) {
|
|
61
|
+
return <CardNativeView {...transformProps(props)} />;
|
|
62
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
|
|
3
3
|
import { ExpoModifier } from '../../types';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
4
5
|
|
|
5
6
|
export type PaddingValuesRecord = {
|
|
6
7
|
start?: number;
|
|
@@ -45,7 +46,12 @@ const CarouselNativeView: React.ComponentType<NativeCarouselProps> = requireNati
|
|
|
45
46
|
);
|
|
46
47
|
|
|
47
48
|
export function transformCarouselProps(props: CarouselProps): NativeCarouselProps {
|
|
48
|
-
|
|
49
|
+
const { modifiers, ...restProps } = props;
|
|
50
|
+
return {
|
|
51
|
+
modifiers,
|
|
52
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
53
|
+
...restProps,
|
|
54
|
+
};
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
export function Carousel(props: CarouselProps) {
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { ExpoModifier } from '../../types';
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Available text style variants for chip labels.
|
|
@@ -71,14 +72,20 @@ export interface ChipProps {
|
|
|
71
72
|
onDismiss?: () => void;
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
type NativeChipProps = ChipProps;
|
|
74
76
|
// Native component declaration using the same pattern as Button
|
|
75
|
-
const ChipNativeView: React.ComponentType<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
const ChipNativeView: React.ComponentType<NativeChipProps> = requireNativeView(
|
|
78
|
+
'ExpoUI',
|
|
79
|
+
'ChipView'
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
function transformChipProps(props: ChipProps): NativeChipProps {
|
|
83
|
+
const { modifiers, ...restProps } = props;
|
|
84
|
+
return {
|
|
85
|
+
modifiers,
|
|
86
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
87
|
+
...restProps,
|
|
88
|
+
};
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
/**
|
|
@@ -8,6 +8,7 @@ import { ModifierConfig } from '../../types';
|
|
|
8
8
|
import { ButtonProps } from '../Button';
|
|
9
9
|
import { PickerProps } from '../Picker';
|
|
10
10
|
import { SwitchProps } from '../Switch';
|
|
11
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
11
12
|
|
|
12
13
|
const MenuNativeView: React.ComponentType<NativeMenuProps> = requireNativeView(
|
|
13
14
|
'ExpoUI',
|
|
@@ -101,6 +102,7 @@ export function Preview(props: { children: React.ReactNode }) {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
function ContextMenu(props: ContextMenuProps) {
|
|
105
|
+
const { modifiers, ...restProps } = props;
|
|
104
106
|
const eventHandlersMap: EventHandlers = {};
|
|
105
107
|
const initialChildren = Children.map(
|
|
106
108
|
props.children as any,
|
|
@@ -131,8 +133,9 @@ function ContextMenu(props: ContextMenuProps) {
|
|
|
131
133
|
onContextMenuButtonPressed={createEventHandler('onPress')}
|
|
132
134
|
onContextMenuSwitchValueChanged={createEventHandler('onValueChange')}
|
|
133
135
|
onContextMenuPickerOptionSelected={createEventHandler('onOptionSelected')}
|
|
134
|
-
modifiers={
|
|
135
|
-
{...
|
|
136
|
+
modifiers={modifiers}
|
|
137
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
138
|
+
{...restProps}>
|
|
136
139
|
{activationElement}
|
|
137
140
|
</MenuNativeView>
|
|
138
141
|
);
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import { type ColorValue } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { ExpoModifier, ViewEvent } from '../../types';
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
6
|
|
|
6
7
|
export type AndroidVariant = 'picker' | 'input';
|
|
7
8
|
|
|
@@ -57,16 +58,15 @@ type NativeDatePickerProps = Omit<
|
|
|
57
58
|
initialDate?: number | null;
|
|
58
59
|
} & ViewEvent<'onDateSelected', { date: Date }>;
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*/
|
|
63
|
-
export function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps {
|
|
64
|
-
const { variant, initialDate, ...rest } = props;
|
|
61
|
+
function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps {
|
|
62
|
+
const { modifiers, variant, initialDate, ...rest } = props;
|
|
65
63
|
|
|
66
64
|
// Convert ISO string to timestamp for Android
|
|
67
65
|
const initialDateTimestamp = initialDate ? new Date(initialDate).getTime() : null;
|
|
68
66
|
|
|
69
67
|
return {
|
|
68
|
+
modifiers,
|
|
69
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
70
70
|
...rest,
|
|
71
71
|
initialDate: initialDateTimestamp,
|
|
72
72
|
onDateSelected: ({ nativeEvent: { date } }) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
|
|
3
3
|
import { ExpoModifier } from '../../types';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
4
5
|
|
|
5
6
|
export type DividerProps = {
|
|
6
7
|
/**
|
|
@@ -9,14 +10,24 @@ export type DividerProps = {
|
|
|
9
10
|
modifiers?: ExpoModifier[];
|
|
10
11
|
};
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
type NativeDividerProps = DividerProps;
|
|
14
|
+
const DividerNativeView: React.ComponentType<NativeDividerProps> = requireNativeView(
|
|
13
15
|
'ExpoUI',
|
|
14
16
|
'DividerView'
|
|
15
17
|
);
|
|
16
18
|
|
|
19
|
+
function transformProps(props: DividerProps): NativeDividerProps {
|
|
20
|
+
const { modifiers, ...restProps } = props;
|
|
21
|
+
return {
|
|
22
|
+
modifiers,
|
|
23
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
24
|
+
...restProps,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
17
28
|
/**
|
|
18
29
|
* A visual element that can be used to separate other content.
|
|
19
30
|
*/
|
|
20
31
|
export function Divider(props: DividerProps) {
|
|
21
|
-
return <DividerNativeView {...props} />;
|
|
32
|
+
return <DividerNativeView {...transformProps(props)} />;
|
|
22
33
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
|
|
3
|
+
import { type ExpoModifier, type ViewEvent } from '../../types';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
|
|
6
|
+
export type DockedSearchBarProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Callback function that is called when the search query changes.
|
|
9
|
+
*/
|
|
10
|
+
onQueryChange?: (query: string) => void;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Modifiers for the component.
|
|
14
|
+
*/
|
|
15
|
+
modifiers?: ExpoModifier[];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The children of the component.
|
|
19
|
+
*/
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
type PlaceholderProps = {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type LeadingIconProps = {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type NativeDockedSearchBarProps = Omit<DockedSearchBarProps, 'onQueryChange'> &
|
|
32
|
+
ViewEvent<'onQueryChange', { value: string }>;
|
|
33
|
+
|
|
34
|
+
type NativeSlotViewProps = {
|
|
35
|
+
slotName: string;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const DockedSearchBarNativeView: React.ComponentType<NativeDockedSearchBarProps> =
|
|
40
|
+
requireNativeView('ExpoUI', 'DockedSearchBarView');
|
|
41
|
+
|
|
42
|
+
const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
|
|
43
|
+
'ExpoUI',
|
|
44
|
+
'SlotView'
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export function DockedSearchBarPlaceholder(props: PlaceholderProps) {
|
|
48
|
+
return <SlotNativeView slotName="placeholder">{props.children}</SlotNativeView>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function DockedSearchBarLeadingIcon(props: LeadingIconProps) {
|
|
52
|
+
return <SlotNativeView slotName="leadingIcon">{props.children}</SlotNativeView>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function transformDockedSearchBarProps(props: DockedSearchBarProps): NativeDockedSearchBarProps {
|
|
56
|
+
const { modifiers, onQueryChange, ...restProps } = props;
|
|
57
|
+
return {
|
|
58
|
+
modifiers,
|
|
59
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
60
|
+
...restProps,
|
|
61
|
+
onQueryChange: (event) => {
|
|
62
|
+
onQueryChange?.(event.nativeEvent.value);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function DockedSearchBar(props: DockedSearchBarProps) {
|
|
68
|
+
return (
|
|
69
|
+
<DockedSearchBarNativeView {...transformDockedSearchBarProps(props)}>
|
|
70
|
+
{props.children}
|
|
71
|
+
</DockedSearchBarNativeView>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
DockedSearchBar.Placeholder = DockedSearchBarPlaceholder;
|
|
76
|
+
DockedSearchBar.LeadingIcon = DockedSearchBarLeadingIcon;
|
|
77
|
+
|
|
78
|
+
export { DockedSearchBar };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
|
|
3
|
+
import { ExpoModifier } from '../../types';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
|
|
6
|
+
export type FilterChipProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Whether the chip is currently selected.
|
|
9
|
+
*/
|
|
10
|
+
selected: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The text label to display on the chip.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the chip is enabled and can be interacted with.
|
|
17
|
+
*/
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Callback fired when the chip is clicked.
|
|
21
|
+
*/
|
|
22
|
+
onPress?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Modifiers for the component.
|
|
25
|
+
*/
|
|
26
|
+
modifiers?: ExpoModifier[];
|
|
27
|
+
/**
|
|
28
|
+
* Children containing LeadingIcon and TrailingIcon slots.
|
|
29
|
+
*/
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type SlotChildProps = {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type NativeFilterChipProps = FilterChipProps;
|
|
38
|
+
|
|
39
|
+
type NativeSlotViewProps = {
|
|
40
|
+
slotName: string;
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const FilterChipNativeView: React.ComponentType<NativeFilterChipProps> = requireNativeView(
|
|
45
|
+
'ExpoUI',
|
|
46
|
+
'FilterChipView'
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
|
|
50
|
+
'ExpoUI',
|
|
51
|
+
'SlotView'
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Leading icon slot for FilterChip.
|
|
56
|
+
*/
|
|
57
|
+
function FilterChipLeadingIcon(props: SlotChildProps) {
|
|
58
|
+
return <SlotNativeView slotName="leadingIcon">{props.children}</SlotNativeView>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Trailing icon slot for FilterChip.
|
|
63
|
+
*/
|
|
64
|
+
function FilterChipTrailingIcon(props: SlotChildProps) {
|
|
65
|
+
return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* A filter chip component following Material 3 design guidelines.
|
|
70
|
+
* Supports slot-based `LeadingIcon` and `TrailingIcon` children.
|
|
71
|
+
*/
|
|
72
|
+
function FilterChipComponent(props: FilterChipProps) {
|
|
73
|
+
const { children, modifiers, onPress, ...restProps } = props;
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<FilterChipNativeView
|
|
77
|
+
modifiers={modifiers}
|
|
78
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
79
|
+
{...restProps}
|
|
80
|
+
onPress={onPress}>
|
|
81
|
+
{children}
|
|
82
|
+
</FilterChipNativeView>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
FilterChipComponent.LeadingIcon = FilterChipLeadingIcon;
|
|
87
|
+
FilterChipComponent.TrailingIcon = FilterChipTrailingIcon;
|
|
88
|
+
|
|
89
|
+
export { FilterChipComponent as FilterChip };
|