@expo/ui 55.0.2 → 55.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 +31 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
- package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
- package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
- package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +258 -70
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +44 -1
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
- package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
- package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
- package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
- package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +53 -161
- package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
- package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
- package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
- package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -86
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
- package/build/jetpack-compose/Button/index.d.ts +65 -51
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +72 -14
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
- package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
- package/build/jetpack-compose/Chip/index.d.ts +247 -27
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +38 -3
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/IconButton/index.d.ts +45 -29
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Progress/index.d.ts +78 -35
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
- package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Slider/index.d.ts +34 -10
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +10 -50
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +5 -4
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +18 -1
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/ProgressView/index.d.ts +1 -5
- package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
- package/build/swift-ui/Stepper/index.d.ts +3 -3
- package/build/swift-ui/Stepper/index.d.ts.map +1 -1
- package/build/swift-ui/Text/index.d.ts +33 -1
- package/build/swift-ui/Text/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +22 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
- package/build/swift-ui/types.d.ts +7 -0
- package/build/swift-ui/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +1 -6
- package/ios/ClosedRangeDateRecord.swift +10 -0
- package/ios/ColorPickerView.swift +9 -8
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +4 -6
- package/ios/DatePickerView.swift +7 -5
- package/ios/DisclosureGroupView.swift +5 -7
- package/ios/ListView.swift +6 -14
- package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
- package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
- package/ios/Picker/PickerView.swift +6 -10
- package/ios/Popover/PopoverView.swift +3 -5
- package/ios/ProgressView.swift +0 -5
- package/ios/SectionView.swift +3 -5
- package/ios/SliderView.swift +8 -6
- package/ios/StepperView.swift +12 -16
- package/ios/TextView.swift +37 -1
- package/ios/Toggle/ToggleView.swift +5 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +1 -0
- 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 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.module → 55.0.3/expo.modules.ui-55.0.3.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.pom → 55.0.3/expo.modules.ui-55.0.3.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.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 +5 -2
- package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
- package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
- package/src/jetpack-compose/Button/index.tsx +69 -92
- package/src/jetpack-compose/Card/index.tsx +105 -29
- package/src/jetpack-compose/Checkbox/index.tsx +126 -0
- package/src/jetpack-compose/Chip/index.tsx +391 -51
- package/src/jetpack-compose/DatePicker/index.tsx +112 -7
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
- package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
- package/src/jetpack-compose/IconButton/index.tsx +49 -56
- package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Progress/index.tsx +120 -62
- package/src/jetpack-compose/RadioButton/index.tsx +8 -9
- package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
- package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Slider/index.tsx +76 -29
- package/src/jetpack-compose/Switch/index.tsx +17 -87
- package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
- package/src/jetpack-compose/index.ts +5 -4
- package/src/jetpack-compose/modifiers/index.ts +26 -2
- package/src/swift-ui/ProgressView/index.tsx +1 -3
- package/src/swift-ui/Stepper/index.tsx +7 -7
- package/src/swift-ui/Text/index.tsx +66 -2
- package/src/swift-ui/modifiers/index.ts +40 -0
- package/src/swift-ui/types.ts +5 -0
- package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
- package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
- package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
- package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
- package/build/jetpack-compose/Button/types.d.ts +0 -5
- package/build/jetpack-compose/Button/types.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
- package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
- package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
- package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
- package/build/jetpack-compose/Picker/index.d.ts +0 -62
- package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
- package/build/jetpack-compose/TextButton/index.d.ts +0 -29
- package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha512 +0 -1
- package/src/jetpack-compose/Button/types.ts +0 -57
- package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
- package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
- package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
- package/src/jetpack-compose/FilterChip/index.tsx +0 -89
- package/src/jetpack-compose/Picker/index.tsx +0 -90
- package/src/jetpack-compose/TextButton/index.tsx +0 -55
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "55.0.
|
|
6
|
+
"version": "55.0.3",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-55.0.
|
|
28
|
-
"url": "expo.modules.ui-55.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-55.0.3.aar",
|
|
28
|
+
"url": "expo.modules.ui-55.0.3.aar",
|
|
29
|
+
"size": 926327,
|
|
30
|
+
"sha512": "1cadb83d41093807cf37e093484e7f8206f11e856e6eebb3d77c679800b75b9ad8dbfa074cc2f4ff75c60b9de7cba4099d76c37c11158a7551fb827b4808e615",
|
|
31
|
+
"sha256": "b28fefc8ae185432f8d8988a2701d0f38bab89a15eebeb60a3e27462ad814be6",
|
|
32
|
+
"sha1": "cfdba1b98a6054184b39f6b71d33c18f385c26d2",
|
|
33
|
+
"md5": "e71e2dd13981dbfb7885feb0b0bfe390"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -120,13 +120,13 @@
|
|
|
120
120
|
],
|
|
121
121
|
"files": [
|
|
122
122
|
{
|
|
123
|
-
"name": "expo.modules.ui-55.0.
|
|
124
|
-
"url": "expo.modules.ui-55.0.
|
|
125
|
-
"size":
|
|
126
|
-
"sha512": "
|
|
127
|
-
"sha256": "
|
|
128
|
-
"sha1": "
|
|
129
|
-
"md5": "
|
|
123
|
+
"name": "expo.modules.ui-55.0.3.aar",
|
|
124
|
+
"url": "expo.modules.ui-55.0.3.aar",
|
|
125
|
+
"size": 926327,
|
|
126
|
+
"sha512": "1cadb83d41093807cf37e093484e7f8206f11e856e6eebb3d77c679800b75b9ad8dbfa074cc2f4ff75c60b9de7cba4099d76c37c11158a7551fb827b4808e615",
|
|
127
|
+
"sha256": "b28fefc8ae185432f8d8988a2701d0f38bab89a15eebeb60a3e27462ad814be6",
|
|
128
|
+
"sha1": "cfdba1b98a6054184b39f6b71d33c18f385c26d2",
|
|
129
|
+
"md5": "e71e2dd13981dbfb7885feb0b0bfe390"
|
|
130
130
|
}
|
|
131
131
|
]
|
|
132
132
|
},
|
|
@@ -140,13 +140,13 @@
|
|
|
140
140
|
},
|
|
141
141
|
"files": [
|
|
142
142
|
{
|
|
143
|
-
"name": "expo.modules.ui-55.0.
|
|
144
|
-
"url": "expo.modules.ui-55.0.
|
|
145
|
-
"size":
|
|
146
|
-
"sha512": "
|
|
147
|
-
"sha256": "
|
|
148
|
-
"sha1": "
|
|
149
|
-
"md5": "
|
|
143
|
+
"name": "expo.modules.ui-55.0.3-sources.jar",
|
|
144
|
+
"url": "expo.modules.ui-55.0.3-sources.jar",
|
|
145
|
+
"size": 59533,
|
|
146
|
+
"sha512": "17c66704e0a4a36020c483c7fa57c36e3a00859c0ec6a021f4c05d265d211fc861c7181e5ae44d2982418c3e463da8b3bec84ecd26da1361513712e77b5ba479",
|
|
147
|
+
"sha256": "c57afb701286b9952b45654e012a91a385a29294de33d0513f8d198f304e2469",
|
|
148
|
+
"sha1": "946e37bf3649dc1cd162039cb8a8f09dda746589",
|
|
149
|
+
"md5": "0a032184d0eac4ef04d3f10fe2ee4bbd"
|
|
150
150
|
}
|
|
151
151
|
]
|
|
152
152
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fc4fc4dd0ecfb0dc5b0541f32d7c4219
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4d309366193fb9e93dfc2f528d842ef199d9356f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8538fc44dce117d85e63175555983fbe9c41be3e21c0c1a38bd8284538348cfb
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9b945333e9fabb773714dc66ccfd5556156ad6804aa63126a4d8db3351df53287def6a225bda7c5822ed780b7aaddbd36cac41fd31094df091b99b2c4cc75780
|
|
@@ -9,7 +9,7 @@
|
|
|
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.
|
|
12
|
+
<version>55.0.3</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a3df23f7e9d010b71fdfe87e96789d6d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3296958fe9f35c69d8d5c4b2557dc5a71c45935f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7c81267db605b109cc861c92c6c76b415dd5c7387766652b399877e6cd485481
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20a8aefc780090feeeffd634b020ce55a5288bd2c12ba66ef0c19e81b78633cb13916d8dd5fea9b4cf1b3a07c00dbeb0599c4f283800bfe7bf44c90570841e07
|
|
@@ -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.
|
|
7
|
-
<release>55.0.
|
|
6
|
+
<latest>55.0.3</latest>
|
|
7
|
+
<release>55.0.3</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>55.0.
|
|
9
|
+
<version>55.0.3</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260317165330</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ba5645a93d7825372e7e0f45563e1cfd
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4f2050a563003a387527564b35508ee311916fae
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0ea5ca4c5502f8f61efb4a7c56f5bd0f744abef7ed58d4388d54bab48fc602df
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f9f75a9f46b1a6ac2ebe41af9e8973f7fb40aa23ed7861b2ffc6a025b80dd888c25d8be8d8748473ec14243a753892d9865db99c8304416d0e63610f50f7d8ff
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.3",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js"
|
|
@@ -55,10 +55,13 @@
|
|
|
55
55
|
"@types/react": "~19.2.0",
|
|
56
56
|
"expo-module-scripts": "^55.0.2"
|
|
57
57
|
},
|
|
58
|
+
"jest": {
|
|
59
|
+
"preset": "expo-module-scripts"
|
|
60
|
+
},
|
|
58
61
|
"peerDependencies": {
|
|
59
62
|
"expo": "*",
|
|
60
63
|
"react": "*",
|
|
61
64
|
"react-native": "*"
|
|
62
65
|
},
|
|
63
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "9260ae10a08271027d85792b7128e0d4883dca4d"
|
|
64
67
|
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimatedVisibility — a React wrapper around Jetpack Compose's AnimatedVisibility.
|
|
3
|
+
*
|
|
4
|
+
* Architecture overview:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Public API** — `EnterTransition` / `ExitTransition` factory objects produce
|
|
7
|
+
* chainable transition descriptors via `.plus()`, mirroring Compose's `+` operator.
|
|
8
|
+
*
|
|
9
|
+
* 2. **Internal records** — Each factory call creates an `EnterTransitionRecord` or
|
|
10
|
+
* `ExitTransitionRecord`, a plain JSON object with a `type` discriminator and optional
|
|
11
|
+
* parameters. These records are the format passed to the native Android view.
|
|
12
|
+
*
|
|
13
|
+
* 3. **Symbol-based encapsulation** — The record arrays are stored behind unique Symbols
|
|
14
|
+
* (`ENTER_TRANSITION_SYMBOL` / `EXIT_TRANSITION_SYMBOL`). This prevents consumers from
|
|
15
|
+
* accessing or constructing raw records directly, ensuring transitions are only built
|
|
16
|
+
* through the factory API.
|
|
17
|
+
*
|
|
18
|
+
* 4. **Chaining** — `.plus(other)` concatenates the current record array with `other`'s
|
|
19
|
+
* records into a new transition object. The result is a flat list, not a tree.
|
|
20
|
+
* e.g. `fadeIn().plus(expandIn())` → `[{ type: 'fadeIn' }, { type: 'expandIn' }]`
|
|
21
|
+
*
|
|
22
|
+
* 5. **Component** — `<AnimatedVisibility>` extracts the record arrays from the chainable
|
|
23
|
+
* types via their Symbols and passes them as plain JSON arrays to the native view.
|
|
24
|
+
*/
|
|
25
|
+
import { requireNativeView } from 'expo';
|
|
26
|
+
|
|
27
|
+
import { PrimitiveBaseProps, transformProps } from '../layout-types';
|
|
28
|
+
import { ENTER_TRANSITION_SYMBOL, EXIT_TRANSITION_SYMBOL } from './symbols';
|
|
29
|
+
|
|
30
|
+
type EnterTransitionRecord = {
|
|
31
|
+
type:
|
|
32
|
+
| 'fadeIn'
|
|
33
|
+
| 'slideInHorizontally'
|
|
34
|
+
| 'slideInVertically'
|
|
35
|
+
| 'expandIn'
|
|
36
|
+
| 'expandHorizontally'
|
|
37
|
+
| 'expandVertically'
|
|
38
|
+
| 'scaleIn';
|
|
39
|
+
initialAlpha?: number;
|
|
40
|
+
/** Fraction of width: -1.0 = full width left, 1.0 = full width right */
|
|
41
|
+
initialOffsetX?: number;
|
|
42
|
+
/** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
|
|
43
|
+
initialOffsetY?: number;
|
|
44
|
+
initialScale?: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
type ExitTransitionRecord = {
|
|
48
|
+
type:
|
|
49
|
+
| 'fadeOut'
|
|
50
|
+
| 'slideOutHorizontally'
|
|
51
|
+
| 'slideOutVertically'
|
|
52
|
+
| 'shrinkOut'
|
|
53
|
+
| 'shrinkHorizontally'
|
|
54
|
+
| 'shrinkVertically'
|
|
55
|
+
| 'scaleOut';
|
|
56
|
+
targetAlpha?: number;
|
|
57
|
+
/** Fraction of width: -1.0 = full width left, 1.0 = full width right */
|
|
58
|
+
targetOffsetX?: number;
|
|
59
|
+
/** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
|
|
60
|
+
targetOffsetY?: number;
|
|
61
|
+
targetScale?: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents an enter transition that can be combined with other enter transitions using `.plus()`.
|
|
66
|
+
*/
|
|
67
|
+
export type EnterTransitionType = {
|
|
68
|
+
/** Combines this transition with another enter transition (mirrors Compose's `+` operator). */
|
|
69
|
+
plus: (other: EnterTransitionType) => EnterTransitionType;
|
|
70
|
+
[ENTER_TRANSITION_SYMBOL]: () => EnterTransitionRecord[];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Represents an exit transition that can be combined with other exit transitions using `.plus()`.
|
|
75
|
+
*/
|
|
76
|
+
export type ExitTransitionType = {
|
|
77
|
+
/** Combines this transition with another exit transition (mirrors Compose's `+` operator). */
|
|
78
|
+
plus: (other: ExitTransitionType) => ExitTransitionType;
|
|
79
|
+
[EXIT_TRANSITION_SYMBOL]: () => ExitTransitionRecord[];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
function createEnterTransition(records: EnterTransitionRecord[]): EnterTransitionType {
|
|
83
|
+
return {
|
|
84
|
+
plus: (other) => createEnterTransition([...records, ...other[ENTER_TRANSITION_SYMBOL]()]),
|
|
85
|
+
[ENTER_TRANSITION_SYMBOL]: () => records,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function createExitTransition(records: ExitTransitionRecord[]): ExitTransitionType {
|
|
90
|
+
return {
|
|
91
|
+
plus: (other) => createExitTransition([...records, ...other[EXIT_TRANSITION_SYMBOL]()]),
|
|
92
|
+
[EXIT_TRANSITION_SYMBOL]: () => records,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Factory for enter transitions used with `AnimatedVisibility`.
|
|
98
|
+
* Transitions can be combined using `.plus()`.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* // Single transition
|
|
103
|
+
* EnterTransition.fadeIn()
|
|
104
|
+
*
|
|
105
|
+
* // Combined transitions
|
|
106
|
+
* EnterTransition.fadeIn({ initialAlpha: 0.3 })
|
|
107
|
+
* .plus(EnterTransition.slideInHorizontally({ initialOffsetX: 1.0 }))
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export const EnterTransition = {
|
|
111
|
+
/** Fades the content in. */
|
|
112
|
+
fadeIn: (params?: { initialAlpha?: number }) =>
|
|
113
|
+
createEnterTransition([{ type: 'fadeIn', ...params }]),
|
|
114
|
+
/** Slides the content in horizontally. */
|
|
115
|
+
slideInHorizontally: (params?: { initialOffsetX?: number }) =>
|
|
116
|
+
createEnterTransition([{ type: 'slideInHorizontally', ...params }]),
|
|
117
|
+
/** Slides the content in vertically. */
|
|
118
|
+
slideInVertically: (params?: { initialOffsetY?: number }) =>
|
|
119
|
+
createEnterTransition([{ type: 'slideInVertically', ...params }]),
|
|
120
|
+
/** Expands the content from the center. */
|
|
121
|
+
expandIn: () => createEnterTransition([{ type: 'expandIn' }]),
|
|
122
|
+
/** Expands the content horizontally from the center. */
|
|
123
|
+
expandHorizontally: () => createEnterTransition([{ type: 'expandHorizontally' }]),
|
|
124
|
+
/** Expands the content vertically from the center. */
|
|
125
|
+
expandVertically: () => createEnterTransition([{ type: 'expandVertically' }]),
|
|
126
|
+
/** Scales the content in from a smaller size. */
|
|
127
|
+
scaleIn: (params?: { initialScale?: number }) =>
|
|
128
|
+
createEnterTransition([{ type: 'scaleIn', ...params }]),
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Factory for exit transitions used with `AnimatedVisibility`.
|
|
133
|
+
* Transitions can be combined using `.plus()`.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* // Single transition
|
|
138
|
+
* ExitTransition.fadeOut()
|
|
139
|
+
*
|
|
140
|
+
* // Combined transitions
|
|
141
|
+
* ExitTransition.fadeOut()
|
|
142
|
+
* .plus(ExitTransition.slideOutHorizontally({ targetOffsetX: 1.0 }))
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
export const ExitTransition = {
|
|
146
|
+
/** Fades the content out. */
|
|
147
|
+
fadeOut: (params?: { targetAlpha?: number }) =>
|
|
148
|
+
createExitTransition([{ type: 'fadeOut', ...params }]),
|
|
149
|
+
/** Slides the content out horizontally. */
|
|
150
|
+
slideOutHorizontally: (params?: { targetOffsetX?: number }) =>
|
|
151
|
+
createExitTransition([{ type: 'slideOutHorizontally', ...params }]),
|
|
152
|
+
/** Slides the content out vertically. */
|
|
153
|
+
slideOutVertically: (params?: { targetOffsetY?: number }) =>
|
|
154
|
+
createExitTransition([{ type: 'slideOutVertically', ...params }]),
|
|
155
|
+
/** Shrinks the content towards the center. */
|
|
156
|
+
shrinkOut: () => createExitTransition([{ type: 'shrinkOut' }]),
|
|
157
|
+
/** Shrinks the content horizontally towards the center. */
|
|
158
|
+
shrinkHorizontally: () => createExitTransition([{ type: 'shrinkHorizontally' }]),
|
|
159
|
+
/** Shrinks the content vertically towards the center. */
|
|
160
|
+
shrinkVertically: () => createExitTransition([{ type: 'shrinkVertically' }]),
|
|
161
|
+
/** Scales the content out to a smaller size. */
|
|
162
|
+
scaleOut: (params?: { targetScale?: number }) =>
|
|
163
|
+
createExitTransition([{ type: 'scaleOut', ...params }]),
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export type AnimatedVisibilityProps = {
|
|
167
|
+
children?: React.ReactNode;
|
|
168
|
+
/**
|
|
169
|
+
* Whether the content is visible. When changed, the content will animate in or out.
|
|
170
|
+
*/
|
|
171
|
+
visible: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* The enter transition to use when `visible` changes to `true`.
|
|
174
|
+
* Use `EnterTransition` factory methods and combine with `.plus()`.
|
|
175
|
+
* Defaults to Compose's `fadeIn + expandIn` when not specified.
|
|
176
|
+
*/
|
|
177
|
+
enterTransition?: EnterTransitionType;
|
|
178
|
+
/**
|
|
179
|
+
* The exit transition to use when `visible` changes to `false`.
|
|
180
|
+
* Use `ExitTransition` factory methods and combine with `.plus()`.
|
|
181
|
+
* Defaults to Compose's `fadeOut + shrinkOut` when not specified.
|
|
182
|
+
*/
|
|
183
|
+
exitTransition?: ExitTransitionType;
|
|
184
|
+
} & PrimitiveBaseProps;
|
|
185
|
+
|
|
186
|
+
type AnimatedVisibilityNativeProps = Omit<
|
|
187
|
+
AnimatedVisibilityProps,
|
|
188
|
+
'enterTransition' | 'exitTransition'
|
|
189
|
+
> & {
|
|
190
|
+
enterTransition?: EnterTransitionRecord[];
|
|
191
|
+
exitTransition?: ExitTransitionRecord[];
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const AnimatedVisibilityNativeView: React.ComponentType<AnimatedVisibilityNativeProps> =
|
|
195
|
+
requireNativeView('ExpoUI', 'AnimatedVisibilityView');
|
|
196
|
+
|
|
197
|
+
export function AnimatedVisibility(props: AnimatedVisibilityProps) {
|
|
198
|
+
const { enterTransition, exitTransition, ...rest } = props;
|
|
199
|
+
return (
|
|
200
|
+
<AnimatedVisibilityNativeView
|
|
201
|
+
{...transformProps(rest)}
|
|
202
|
+
enterTransition={enterTransition?.[ENTER_TRANSITION_SYMBOL]()}
|
|
203
|
+
exitTransition={exitTransition?.[EXIT_TRANSITION_SYMBOL]()}
|
|
204
|
+
/>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Unique Symbols used as private keys on transition objects. They act as a sealed accessor:
|
|
2
|
+
// only this module and the component can read the underlying record arrays from an
|
|
3
|
+
// EnterTransitionType or ExitTransitionType, preventing consumers from bypassing the factory API.
|
|
4
|
+
//
|
|
5
|
+
// Exported from this file for internal use (component + tests), but NOT re-exported from
|
|
6
|
+
// the package's public index.
|
|
7
|
+
export const ENTER_TRANSITION_SYMBOL = Symbol('enterTransition');
|
|
8
|
+
export const EXIT_TRANSITION_SYMBOL = Symbol('exitTransition');
|
|
@@ -1,139 +1,116 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
import { type ColorValue } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getTextFromChildren } from '../../utils';
|
|
7
|
-
import { parseJSXShape, ShapeJSXElement, ShapeRecordProps } from '../Shape';
|
|
4
|
+
import type { ModifierConfig, ViewEvent } from '../../types';
|
|
5
|
+
import { ShapeJSXElement, ShapeRecordProps, parseJSXShape } from '../Shape';
|
|
8
6
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
* - `outlined` - A button with an outline.
|
|
13
|
-
* - `elevated` - A filled button with a shadow.
|
|
9
|
+
* Colors for button elements.
|
|
14
10
|
*/
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Colors for button's core elements.
|
|
19
|
-
*/
|
|
20
|
-
export type ButtonElementColors = {
|
|
11
|
+
export type ButtonColors = {
|
|
21
12
|
containerColor?: ColorValue;
|
|
22
13
|
contentColor?: ColorValue;
|
|
23
14
|
disabledContainerColor?: ColorValue;
|
|
24
15
|
disabledContentColor?: ColorValue;
|
|
25
16
|
};
|
|
26
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Content padding for the button's inner content.
|
|
20
|
+
* All values are in density-independent pixels (dp).
|
|
21
|
+
*/
|
|
22
|
+
export type ButtonContentPadding = {
|
|
23
|
+
start?: number;
|
|
24
|
+
top?: number;
|
|
25
|
+
end?: number;
|
|
26
|
+
bottom?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
27
29
|
export type ButtonProps = {
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
onPress?: () => void;
|
|
32
|
-
/**
|
|
33
|
-
* A string describing the leading icon to display in the button.
|
|
34
|
-
* Uses Material Icons on Android.
|
|
35
|
-
*/
|
|
36
|
-
leadingIcon?: MaterialIcon;
|
|
37
|
-
/**
|
|
38
|
-
* A string describing the trailing icon to display in the button.
|
|
39
|
-
* Uses Material Icons on Android.
|
|
40
|
-
*/
|
|
41
|
-
trailingIcon?: MaterialIcon;
|
|
42
|
-
/**
|
|
43
|
-
* A string describing the system image to display in the button.
|
|
44
|
-
* Uses Material Icons on Android.
|
|
45
|
-
* @deprecated Use `leadingIcon` instead.
|
|
31
|
+
* Callback that is called when the button is clicked.
|
|
46
32
|
*/
|
|
47
|
-
|
|
33
|
+
onClick?: () => void;
|
|
48
34
|
/**
|
|
49
|
-
*
|
|
35
|
+
* Whether the button is enabled for user interaction.
|
|
36
|
+
* @default true
|
|
50
37
|
*/
|
|
51
|
-
|
|
38
|
+
enabled?: boolean;
|
|
52
39
|
/**
|
|
53
|
-
*
|
|
40
|
+
* Colors for button elements.
|
|
54
41
|
*/
|
|
55
|
-
|
|
42
|
+
colors?: ButtonColors;
|
|
56
43
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
44
|
+
* The padding between the button container and its content.
|
|
45
|
+
* Use this to adjust internal spacing, for example when adding a leading icon
|
|
59
46
|
*/
|
|
60
|
-
|
|
47
|
+
contentPadding?: ButtonContentPadding;
|
|
61
48
|
/**
|
|
62
|
-
*
|
|
49
|
+
* The shape of the button.
|
|
63
50
|
*/
|
|
64
|
-
color?: ColorValue;
|
|
65
51
|
shape?: ShapeJSXElement;
|
|
66
52
|
/**
|
|
67
|
-
*
|
|
53
|
+
* Modifiers for the component.
|
|
68
54
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
55
|
+
modifiers?: ModifierConfig[];
|
|
71
56
|
/**
|
|
72
|
-
*
|
|
57
|
+
* Content to display inside the button.
|
|
73
58
|
*/
|
|
74
|
-
|
|
59
|
+
children: React.ReactNode;
|
|
75
60
|
};
|
|
76
61
|
|
|
77
|
-
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
export type NativeButtonProps = Omit<
|
|
81
|
-
ButtonProps,
|
|
82
|
-
'role' | 'onPress' | 'leadingIcon' | 'trailingIcon' | 'systemImage' | 'shape'
|
|
83
|
-
> & {
|
|
84
|
-
text: string;
|
|
85
|
-
leadingIcon?: string;
|
|
86
|
-
trailingIcon?: string;
|
|
62
|
+
type NativeButtonProps = Omit<ButtonProps, 'onClick' | 'shape' | 'children'> & {
|
|
87
63
|
shape?: ShapeRecordProps;
|
|
64
|
+
children?: React.ReactNode;
|
|
88
65
|
} & ViewEvent<'onButtonPressed', void>;
|
|
89
66
|
|
|
90
|
-
// We have to work around the `role` and `onPress` props being reserved by React Native.
|
|
91
|
-
const ButtonNativeView: React.ComponentType<NativeButtonProps> = requireNativeView(
|
|
92
|
-
'ExpoUI',
|
|
93
|
-
'Button'
|
|
94
|
-
);
|
|
95
|
-
|
|
96
67
|
/**
|
|
97
68
|
* @hidden
|
|
98
69
|
*/
|
|
99
|
-
export function transformButtonProps(props: ButtonProps): NativeButtonProps {
|
|
100
|
-
const {
|
|
101
|
-
children,
|
|
102
|
-
onPress,
|
|
103
|
-
leadingIcon,
|
|
104
|
-
trailingIcon,
|
|
105
|
-
systemImage,
|
|
106
|
-
shape,
|
|
107
|
-
modifiers,
|
|
108
|
-
...restProps
|
|
109
|
-
} = props;
|
|
110
|
-
|
|
111
|
-
// Handle backward compatibility: systemImage maps to leadingIcon
|
|
112
|
-
const finalLeadingIcon = leadingIcon ?? systemImage;
|
|
113
|
-
|
|
70
|
+
export function transformButtonProps(props: Omit<ButtonProps, 'children'>): NativeButtonProps {
|
|
71
|
+
const { onClick, shape, modifiers, ...restProps } = props;
|
|
114
72
|
return {
|
|
115
73
|
modifiers,
|
|
116
74
|
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
117
75
|
...restProps,
|
|
118
|
-
|
|
119
|
-
children: getTextFromChildren(children) !== undefined ? undefined : children,
|
|
120
|
-
leadingIcon: finalLeadingIcon,
|
|
76
|
+
enabled: props.enabled ?? true,
|
|
121
77
|
shape: parseJSXShape(shape),
|
|
122
|
-
|
|
123
|
-
onButtonPressed: onPress,
|
|
124
|
-
elementColors: props.elementColors
|
|
125
|
-
? props.elementColors
|
|
126
|
-
: props.color
|
|
127
|
-
? {
|
|
128
|
-
containerColor: props.color,
|
|
129
|
-
}
|
|
130
|
-
: undefined,
|
|
78
|
+
onButtonPressed: onClick ? () => onClick() : undefined,
|
|
131
79
|
};
|
|
132
80
|
}
|
|
133
81
|
|
|
82
|
+
function createButtonComponent(name: string) {
|
|
83
|
+
const NativeView: React.ComponentType<NativeButtonProps> = requireNativeView('ExpoUI', name);
|
|
84
|
+
|
|
85
|
+
function Component(props: ButtonProps) {
|
|
86
|
+
const { children, ...restProps } = props;
|
|
87
|
+
return <NativeView {...transformButtonProps(restProps)}>{children}</NativeView>;
|
|
88
|
+
}
|
|
89
|
+
Component.displayName = name;
|
|
90
|
+
return Component;
|
|
91
|
+
}
|
|
92
|
+
|
|
134
93
|
/**
|
|
135
|
-
*
|
|
94
|
+
* A filled button component.
|
|
136
95
|
*/
|
|
137
|
-
export
|
|
138
|
-
|
|
139
|
-
|
|
96
|
+
export const Button = createButtonComponent('Button');
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* A filled tonal button component.
|
|
100
|
+
*/
|
|
101
|
+
export const FilledTonalButton = createButtonComponent('FilledTonalButton');
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* An outlined button component.
|
|
105
|
+
*/
|
|
106
|
+
export const OutlinedButton = createButtonComponent('OutlinedButton');
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* An elevated button component.
|
|
110
|
+
*/
|
|
111
|
+
export const ElevatedButton = createButtonComponent('ElevatedButton');
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A text button component.
|
|
115
|
+
*/
|
|
116
|
+
export const TextButton = createButtonComponent('TextButton');
|