@expo/ui 55.0.2 → 55.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
  4. package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +91 -13
  5. package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
  6. package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
  7. package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
  8. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +258 -70
  9. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +209 -61
  10. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +44 -1
  11. package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
  12. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
  13. package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
  14. package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
  15. package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
  16. package/android/src/main/java/expo/modules/ui/SwitchView.kt +53 -161
  17. package/android/src/main/java/expo/modules/ui/TextInputView.kt +39 -15
  18. package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
  19. package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
  20. package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
  21. package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -86
  22. package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
  23. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
  24. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
  25. package/build/datetime-picker/DateTimePicker.android.d.ts +3 -0
  26. package/build/datetime-picker/DateTimePicker.android.d.ts.map +1 -0
  27. package/build/datetime-picker/DateTimePicker.d.ts +3 -0
  28. package/build/datetime-picker/DateTimePicker.d.ts.map +1 -0
  29. package/build/datetime-picker/DateTimePicker.web.d.ts +3 -0
  30. package/build/datetime-picker/DateTimePicker.web.d.ts.map +1 -0
  31. package/build/datetime-picker/index.d.ts +5 -0
  32. package/build/datetime-picker/index.d.ts.map +1 -0
  33. package/build/datetime-picker/types.d.ts +128 -0
  34. package/build/datetime-picker/types.d.ts.map +1 -0
  35. package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
  36. package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
  37. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
  38. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
  39. package/build/jetpack-compose/Button/index.d.ts +65 -51
  40. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  41. package/build/jetpack-compose/Card/index.d.ts +72 -14
  42. package/build/jetpack-compose/Card/index.d.ts.map +1 -1
  43. package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
  44. package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
  45. package/build/jetpack-compose/Chip/index.d.ts +247 -27
  46. package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
  47. package/build/jetpack-compose/DatePicker/index.d.ts +38 -3
  48. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  49. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
  50. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
  51. package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
  52. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
  53. package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
  54. package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
  55. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
  56. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
  57. package/build/jetpack-compose/IconButton/index.d.ts +45 -29
  58. package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
  59. package/build/jetpack-compose/ModalBottomSheet/index.d.ts +65 -13
  60. package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
  61. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
  62. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  63. package/build/jetpack-compose/Progress/index.d.ts +78 -35
  64. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  65. package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
  66. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  67. package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
  68. package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
  69. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
  70. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  71. package/build/jetpack-compose/Slider/index.d.ts +34 -10
  72. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  73. package/build/jetpack-compose/Switch/index.d.ts +10 -50
  74. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  75. package/build/jetpack-compose/TextInput/index.d.ts +9 -0
  76. package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
  77. package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
  78. package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
  79. package/build/jetpack-compose/index.d.ts +5 -4
  80. package/build/jetpack-compose/index.d.ts.map +1 -1
  81. package/build/jetpack-compose/modifiers/index.d.ts +18 -1
  82. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  83. package/build/swift-ui/Link/index.d.ts +36 -0
  84. package/build/swift-ui/Link/index.d.ts.map +1 -0
  85. package/build/swift-ui/ProgressView/index.d.ts +1 -5
  86. package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
  87. package/build/swift-ui/Stepper/index.d.ts +3 -3
  88. package/build/swift-ui/Stepper/index.d.ts.map +1 -1
  89. package/build/swift-ui/Text/index.d.ts +33 -1
  90. package/build/swift-ui/Text/index.d.ts.map +1 -1
  91. package/build/swift-ui/index.d.ts +1 -0
  92. package/build/swift-ui/index.d.ts.map +1 -1
  93. package/build/swift-ui/modifiers/environment.d.ts +16 -1
  94. package/build/swift-ui/modifiers/environment.d.ts.map +1 -1
  95. package/build/swift-ui/modifiers/index.d.ts +24 -7
  96. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  97. package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
  98. package/build/swift-ui/modifiers/widgets.d.ts +14 -0
  99. package/build/swift-ui/modifiers/widgets.d.ts.map +1 -0
  100. package/build/swift-ui/types.d.ts +7 -0
  101. package/build/swift-ui/types.d.ts.map +1 -1
  102. package/expo-module.config.json +1 -1
  103. package/ios/BottomSheetView.swift +1 -6
  104. package/ios/ClosedRangeDateRecord.swift +10 -0
  105. package/ios/ColorPickerView.swift +9 -8
  106. package/ios/ConfirmationDialog/ConfirmationDialog.swift +4 -6
  107. package/ios/DatePickerView.swift +7 -5
  108. package/ios/DisclosureGroupView.swift +5 -7
  109. package/ios/ExpoUIModule.swift +1 -0
  110. package/ios/LinkView.swift +29 -0
  111. package/ios/ListView.swift +6 -14
  112. package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
  113. package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
  114. package/ios/Modifiers/EnvironmentModifier.swift +14 -0
  115. package/ios/Modifiers/ViewModifierRegistry.swift +12 -0
  116. package/ios/Modifiers/WidgetModifiers.swift +12 -0
  117. package/ios/Picker/PickerView.swift +6 -10
  118. package/ios/Popover/PopoverView.swift +3 -5
  119. package/ios/ProgressView.swift +0 -5
  120. package/ios/SectionView.swift +3 -5
  121. package/ios/SliderView.swift +8 -6
  122. package/ios/StepperView.swift +12 -16
  123. package/ios/TextView.swift +37 -1
  124. package/ios/Toggle/ToggleView.swift +5 -7
  125. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar +0 -0
  126. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.md5 +1 -0
  127. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha1 +1 -0
  128. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha256 +1 -0
  129. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4-sources.jar.sha512 +1 -0
  130. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar +0 -0
  131. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.md5 +1 -0
  132. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha1 +1 -0
  133. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha256 +1 -0
  134. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.aar.sha512 +1 -0
  135. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.module → 55.0.4/expo.modules.ui-55.0.4.module} +22 -22
  136. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.md5 +1 -0
  137. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha1 +1 -0
  138. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha256 +1 -0
  139. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.module.sha512 +1 -0
  140. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.pom → 55.0.4/expo.modules.ui-55.0.4.pom} +1 -1
  141. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.md5 +1 -0
  142. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha1 +1 -0
  143. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha256 +1 -0
  144. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.4/expo.modules.ui-55.0.4.pom.sha512 +1 -0
  145. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  146. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  147. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  148. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  149. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  150. package/package.json +9 -2
  151. package/src/datetime-picker/DateTimePicker.android.tsx +126 -0
  152. package/src/datetime-picker/DateTimePicker.tsx +94 -0
  153. package/src/datetime-picker/DateTimePicker.web.tsx +5 -0
  154. package/src/datetime-picker/index.tsx +11 -0
  155. package/src/datetime-picker/types.tsx +147 -0
  156. package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
  157. package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
  158. package/src/jetpack-compose/Button/index.tsx +69 -92
  159. package/src/jetpack-compose/Card/index.tsx +105 -29
  160. package/src/jetpack-compose/Checkbox/index.tsx +126 -0
  161. package/src/jetpack-compose/Chip/index.tsx +391 -51
  162. package/src/jetpack-compose/DatePicker/index.tsx +112 -7
  163. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
  164. package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
  165. package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
  166. package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
  167. package/src/jetpack-compose/IconButton/index.tsx +49 -56
  168. package/src/jetpack-compose/ModalBottomSheet/index.tsx +85 -15
  169. package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
  170. package/src/jetpack-compose/Progress/index.tsx +120 -62
  171. package/src/jetpack-compose/RadioButton/index.tsx +8 -9
  172. package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
  173. package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
  174. package/src/jetpack-compose/Slider/index.tsx +76 -29
  175. package/src/jetpack-compose/Switch/index.tsx +17 -87
  176. package/src/jetpack-compose/TextInput/index.tsx +10 -0
  177. package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
  178. package/src/jetpack-compose/index.ts +5 -4
  179. package/src/jetpack-compose/modifiers/index.ts +26 -2
  180. package/src/swift-ui/Link/index.tsx +52 -0
  181. package/src/swift-ui/ProgressView/index.tsx +1 -3
  182. package/src/swift-ui/Stepper/index.tsx +7 -7
  183. package/src/swift-ui/Text/index.tsx +66 -2
  184. package/src/swift-ui/index.tsx +1 -0
  185. package/src/swift-ui/modifiers/environment.ts +17 -4
  186. package/src/swift-ui/modifiers/index.ts +44 -10
  187. package/src/swift-ui/modifiers/widgets.ts +18 -0
  188. package/src/swift-ui/types.ts +5 -0
  189. package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
  190. package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
  191. package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
  192. package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
  193. package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
  194. package/build/jetpack-compose/Button/types.d.ts +0 -5
  195. package/build/jetpack-compose/Button/types.d.ts.map +0 -1
  196. package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
  197. package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
  198. package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
  199. package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
  200. package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
  201. package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
  202. package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
  203. package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
  204. package/build/jetpack-compose/Picker/index.d.ts +0 -62
  205. package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
  206. package/build/jetpack-compose/TextButton/index.d.ts +0 -29
  207. package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
  208. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar +0 -0
  209. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.md5 +0 -1
  210. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha1 +0 -1
  211. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha256 +0 -1
  212. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha512 +0 -1
  213. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar +0 -0
  214. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.md5 +0 -1
  215. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha1 +0 -1
  216. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha256 +0 -1
  217. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha512 +0 -1
  218. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.md5 +0 -1
  219. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha1 +0 -1
  220. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha256 +0 -1
  221. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha512 +0 -1
  222. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.md5 +0 -1
  223. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha1 +0 -1
  224. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha256 +0 -1
  225. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha512 +0 -1
  226. package/src/jetpack-compose/Button/types.ts +0 -57
  227. package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
  228. package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
  229. package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
  230. package/src/jetpack-compose/FilterChip/index.tsx +0 -89
  231. package/src/jetpack-compose/Picker/index.tsx +0 -90
  232. package/src/jetpack-compose/TextButton/index.tsx +0 -55
@@ -1,64 +0,0 @@
1
- package expo.modules.ui.menu
2
-
3
- import android.graphics.Color
4
- import expo.modules.kotlin.records.Field
5
- import expo.modules.kotlin.records.Record
6
- import expo.modules.kotlin.types.Enumerable
7
- import expo.modules.kotlin.views.ComposeProps
8
- import expo.modules.ui.ModifierList
9
- import expo.modules.ui.SwitchColors
10
- import expo.modules.ui.ValueChangeEvent
11
- import expo.modules.ui.button.ButtonColors
12
- import expo.modules.ui.button.ButtonPressedEvent
13
- import expo.modules.ui.button.ButtonVariant
14
- import java.io.Serializable
15
-
16
- enum class ActivationMethod(val value: String) : Enumerable {
17
- SINGLE_PRESS("singlePress"),
18
- LONG_PRESS("longPress")
19
- }
20
-
21
- data class Submenu(
22
- @Field val elements: Array<ContextMenuElement> = emptyArray(),
23
- @Field val button: ContextMenuButtonProps
24
- ) : Record, Serializable
25
-
26
- data class ContextMenuElement(
27
- @Field var button: ContextMenuButtonProps? = null,
28
- @Field var switch: ContextMenuSwitchProps? = null,
29
- @Field var submenu: Submenu? = null,
30
- @Field var contextMenuElementID: String
31
- ) : Record, Serializable
32
-
33
- data class ContextMenuProps(
34
- val text: String = "",
35
- val elements: Array<ContextMenuElement> = emptyArray(),
36
- val activationMethod: ActivationMethod = ActivationMethod.SINGLE_PRESS,
37
- val color: Color? = null,
38
- val modifiers: ModifierList = emptyList()
39
- ) : ComposeProps
40
-
41
- class ContextMenuButtonProps(
42
- @Field val text: String = "",
43
- @Field val variant: ButtonVariant? = ButtonVariant.DEFAULT,
44
- @Field val elementColors: ButtonColors = ButtonColors(),
45
- @Field val leadingIcon: String? = null,
46
- @Field val trailingIcon: String? = null,
47
- @Field val disabled: Boolean = false
48
- ) : Record, Serializable
49
-
50
- class ContextMenuSwitchProps(
51
- @Field val value: Boolean = false,
52
- @Field val label: String = "",
53
- @Field var variant: String = "",
54
- @Field var elementColors: SwitchColors = SwitchColors()
55
- ) : Record, Serializable
56
-
57
- open class ContextMenuButtonPressedEvent(
58
- @Field val contextMenuElementID: String
59
- ) : ButtonPressedEvent()
60
-
61
- class ContextMenuSwitchValueChangeEvent(
62
- @Field override val value: Boolean = false,
63
- @Field val contextMenuElementID: String
64
- ) : ValueChangeEvent()
@@ -1,5 +0,0 @@
1
- type Variant = 'rounded' | 'twotone' | 'outlined' | 'filled' | 'sharp';
2
- type Icon = 'AccountBox' | 'AccountCircle' | 'Add' | 'AddCircle' | 'ArrowBack' | 'ArrowDropDown' | 'ArrowForward' | 'Build' | 'Call' | 'Check' | 'CheckCircle' | 'Clear' | 'Close' | 'Contrast' | 'Create' | 'DarkMode' | 'DateRange' | 'Delete' | 'Done' | 'Edit' | 'Email' | 'ExitToApp' | 'Face' | 'Favorite' | 'FavoriteBorder' | 'Home' | 'Info' | 'KeyboardArrowDown' | 'KeyboardArrowLeft' | 'KeyboardArrowRight' | 'KeyboardArrowUp' | 'LightMode' | 'List' | 'LocationOn' | 'Lock' | 'MailOutline' | 'Menu' | 'MoreVert' | 'Notifications' | 'Person' | 'Phone' | 'Place' | 'PlayArrow' | 'Refresh' | 'Search' | 'Send' | 'Settings' | 'Share' | 'ShoppingCart' | 'Star' | 'ThumbUp' | 'Warning';
3
- export type MaterialIcon = `${Variant}.${Icon}`;
4
- export {};
5
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Button/types.ts"],"names":[],"mappings":"AAAA,KAAK,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvE,KAAK,IAAI,GACL,YAAY,GACZ,eAAe,GACf,KAAK,GACL,WAAW,GACX,WAAW,GACX,eAAe,GACf,cAAc,GACd,OAAO,GACP,MAAM,GACN,OAAO,GACP,aAAa,GACb,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,WAAW,GACX,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,WAAW,GACX,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,WAAW,GACX,MAAM,GACN,YAAY,GACZ,MAAM,GACN,aAAa,GACb,MAAM,GACN,UAAU,GACV,eAAe,GACf,QAAQ,GACR,OAAO,GACP,OAAO,GACP,WAAW,GACX,SAAS,GACT,QAAQ,GACR,MAAM,GACN,UAAU,GACV,OAAO,GACP,cAAc,GACd,MAAM,GACN,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,YAAY,GAAG,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- import { ButtonProps } from '../Button';
3
- /**
4
- * Props of the `Submenu` component.
5
- */
6
- export type SubmenuProps = {
7
- /**
8
- * The button that will be used to expand the submenu. On Android the `text` prop of the `Button` will be used as a section title.
9
- */
10
- button: ReactElement<ButtonProps>;
11
- /**
12
- * Children of the submenu. Only `Button`, `Switch`, `Picker` and `Submenu` elements should be used.
13
- */
14
- children: ReactNode;
15
- };
16
- export declare function Submenu(props: SubmenuProps): import("react").JSX.Element;
17
- //# sourceMappingURL=Submenu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Submenu.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/Submenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAClC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAE1C"}
@@ -1,65 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- import { NativeSyntheticEvent, StyleProp, ViewStyle, type ColorValue } from 'react-native';
3
- import { SubmenuProps } from './Submenu';
4
- import { ModifierConfig } from '../../types';
5
- import { ButtonProps } from '../Button';
6
- import { PickerProps } from '../Picker';
7
- import { SwitchProps } from '../Switch';
8
- type SubmenuElement = ReactElement<ButtonProps> | ReactElement<SwitchProps> | ReactElement<PickerProps> | ReactElement<SubmenuProps>;
9
- export type ContextMenuContentProps = {
10
- children: SubmenuElement | SubmenuElement[];
11
- };
12
- /**
13
- * @hidden
14
- */
15
- export type EventHandlers = Record<string, Record<string, (event: NativeSyntheticEvent<any>) => void>>;
16
- /**
17
- * @hidden
18
- */
19
- export type ContextMenuElementBase = {
20
- contextMenuElementID: string;
21
- };
22
- /**
23
- * Props of the `ContextMenu` component.
24
- */
25
- export type ContextMenuProps = {
26
- /**
27
- * The contents of the submenu are used as an anchor for the context menu.
28
- * The children will be wrapped in a pressable element, which triggers opening of the context menu.
29
- */
30
- children: ReactNode;
31
- /**
32
- * The color of the container holding the context menu items.
33
- */
34
- color?: ColorValue;
35
- /**
36
- * Optional styles to apply to the `ContextMenu`.
37
- */
38
- style?: StyleProp<ViewStyle>;
39
- /**
40
- * Modifiers for the component.
41
- */
42
- modifiers?: ModifierConfig[];
43
- };
44
- export declare function Items(props: ContextMenuContentProps): import("react").JSX.Element;
45
- export declare namespace Items {
46
- var tag: string;
47
- }
48
- export declare function Trigger(props: {
49
- children: React.ReactNode;
50
- }): import("react").JSX.Element;
51
- export declare namespace Trigger {
52
- var tag: string;
53
- }
54
- export declare function Preview(props: {
55
- children: React.ReactNode;
56
- }): import("react").JSX.Element;
57
- declare function ContextMenu(props: ContextMenuProps): import("react").JSX.Element;
58
- declare namespace ContextMenu {
59
- var Trigger: typeof import(".").Trigger;
60
- var Preview: typeof import(".").Preview;
61
- var Items: typeof import(".").Items;
62
- }
63
- export { ContextMenu };
64
- export { Submenu } from './Submenu';
65
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,YAAY,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAQxC,KAAK,cAAc,GACf,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,WAAW,CAAC,GACzB,YAAY,CAAC,YAAY,CAAC,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAC3D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAyBF,wBAAgB,KAAK,CAAC,KAAK,EAAE,uBAAuB,+BAEnD;yBAFe,KAAK;;;AAKrB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;yBAFe,OAAO;;;AAKvB,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAE3D;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAsC3C;kBAtCQ,WAAW;;;;;AA4CpB,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,24 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ContextMenuElementBase, EventHandlers } from './index';
3
- import { NativeButtonProps } from '../Button';
4
- import { PickerProps } from '../Picker';
5
- import { SwitchProps } from '../Switch';
6
- type ButtonMenuElement = {
7
- button: NativeButtonProps;
8
- } & ContextMenuElementBase;
9
- type SwitchMenuElement = {
10
- switch: SwitchProps;
11
- } & ContextMenuElementBase;
12
- type PickerMenuElement = {
13
- picker: PickerProps;
14
- } & ContextMenuElementBase;
15
- type SubmenuElement = {
16
- submenu: {
17
- elements: MenuElement[];
18
- button: NativeButtonProps;
19
- };
20
- } & ContextMenuElementBase;
21
- export type MenuElement = ButtonMenuElement | SwitchMenuElement | PickerMenuElement | SubmenuElement;
22
- export declare function transformChildrenToElementArray(children: ReactNode, eventHandlersMap: EventHandlers): MenuElement[];
23
- export {};
24
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAuB,iBAAiB,EAAwB,MAAM,WAAW,CAAC;AACzF,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAGhD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,iBAAiB,CAAC;CAC3B,GAAG,sBAAsB,CAAC;AAE3B,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,sBAAsB,CAAC;AAE3B,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,sBAAsB,CAAC;AAE3B,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE;QACP,QAAQ,EAAE,WAAW,EAAE,CAAC;QACxB,MAAM,EAAE,iBAAiB,CAAC;KAC3B,CAAC;CACH,GAAG,sBAAsB,CAAC;AAE3B,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,CAAC;AAInB,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,SAAS,EACnB,gBAAgB,EAAE,aAAa,GAC9B,WAAW,EAAE,CAIf"}
@@ -1,49 +0,0 @@
1
- import { ExpoModifier } from '../../types';
2
- export type FilterChipProps = {
3
- /**
4
- * Whether the chip is currently selected.
5
- */
6
- selected: boolean;
7
- /**
8
- * The text label to display on the chip.
9
- */
10
- label: string;
11
- /**
12
- * Whether the chip is enabled and can be interacted with.
13
- */
14
- enabled?: boolean;
15
- /**
16
- * Callback fired when the chip is clicked.
17
- */
18
- onPress?: () => void;
19
- /**
20
- * Modifiers for the component.
21
- */
22
- modifiers?: ExpoModifier[];
23
- /**
24
- * Children containing LeadingIcon and TrailingIcon slots.
25
- */
26
- children?: React.ReactNode;
27
- };
28
- type SlotChildProps = {
29
- children: React.ReactNode;
30
- };
31
- /**
32
- * Leading icon slot for FilterChip.
33
- */
34
- declare function FilterChipLeadingIcon(props: SlotChildProps): import("react").JSX.Element;
35
- /**
36
- * Trailing icon slot for FilterChip.
37
- */
38
- declare function FilterChipTrailingIcon(props: SlotChildProps): import("react").JSX.Element;
39
- /**
40
- * A filter chip component following Material 3 design guidelines.
41
- * Supports slot-based `LeadingIcon` and `TrailingIcon` children.
42
- */
43
- declare function FilterChipComponent(props: FilterChipProps): import("react").JSX.Element;
44
- declare namespace FilterChipComponent {
45
- var LeadingIcon: typeof FilterChipLeadingIcon;
46
- var TrailingIcon: typeof FilterChipTrailingIcon;
47
- }
48
- export { FilterChipComponent as FilterChip };
49
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/FilterChip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAmBF;;GAEG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,cAAc,+BAEnD;AAED;;GAEG;AACH,iBAAS,sBAAsB,CAAC,KAAK,EAAE,cAAc,+BAEpD;AAED;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,KAAK,EAAE,eAAe,+BAYlD;kBAZQ,mBAAmB;;;;AAiB5B,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"}
@@ -1,62 +0,0 @@
1
- import { type ColorValue } from 'react-native';
2
- import { ExpoModifier } from '../../types';
3
- /**
4
- * Colors for picker's core elements.
5
- */
6
- export type PickerElementColors = {
7
- activeBorderColor?: ColorValue;
8
- activeContentColor?: ColorValue;
9
- inactiveBorderColor?: ColorValue;
10
- inactiveContentColor?: ColorValue;
11
- disabledActiveBorderColor?: ColorValue;
12
- disabledActiveContentColor?: ColorValue;
13
- disabledInactiveBorderColor?: ColorValue;
14
- disabledInactiveContentColor?: ColorValue;
15
- activeContainerColor?: ColorValue;
16
- inactiveContainerColor?: ColorValue;
17
- disabledActiveContainerColor?: ColorValue;
18
- disabledInactiveContainerColor?: ColorValue;
19
- };
20
- export type PickerProps = {
21
- /**
22
- * An array of options to be displayed in the picker.
23
- */
24
- options: string[];
25
- /**
26
- * The index of the currently selected option.
27
- */
28
- selectedIndex: number | null;
29
- /**
30
- * Callback function that is called when an option is selected.
31
- */
32
- onOptionSelected?: (event: {
33
- nativeEvent: {
34
- index: number;
35
- label: string;
36
- };
37
- }) => void;
38
- /**
39
- * The variant of the picker, which determines its appearance and behavior.
40
- * @default 'segmented'
41
- */
42
- variant?: 'segmented' | 'radio';
43
- /**
44
- * Colors for picker's core elements.
45
- */
46
- elementColors?: PickerElementColors;
47
- /**
48
- * Picker color.
49
- */
50
- color?: ColorValue;
51
- /**
52
- * Modifiers for the component.
53
- */
54
- modifiers?: ExpoModifier[];
55
- /** Modifiers for the individual buttons */
56
- buttonModifiers?: ExpoModifier[];
57
- };
58
- /**
59
- * Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button.
60
- */
61
- export declare function Picker(props: PickerProps): import("react").JSX.Element;
62
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Picker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC,0BAA0B,CAAC,EAAE,UAAU,CAAC;IACxC,2BAA2B,CAAC,EAAE,UAAU,CAAC;IACzC,4BAA4B,CAAC,EAAE,UAAU,CAAC;IAC1C,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,4BAA4B,CAAC,EAAE,UAAU,CAAC;IAC1C,8BAA8B,CAAC,EAAE,UAAU,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC,CAAC;AA2BF;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
@@ -1,29 +0,0 @@
1
- import { type ColorValue } from 'react-native';
2
- import { ExpoModifier } from '../../types';
3
- export type TextButtonProps = {
4
- /**
5
- * The text content to display in the button.
6
- */
7
- children?: string | string[] | React.JSX.Element;
8
- /**
9
- * The color of the button text.
10
- */
11
- color?: ColorValue;
12
- /**
13
- * Whether the button is disabled.
14
- */
15
- disabled?: boolean;
16
- /**
17
- * Callback that is called when the button is pressed.
18
- */
19
- onPress?: () => void;
20
- /**
21
- * Modifiers for the component.
22
- */
23
- modifiers?: ExpoModifier[];
24
- };
25
- /**
26
- * A text button component that displays a clickable text label.
27
- */
28
- export declare function TextButton(props: TextButtonProps): import("react").JSX.Element;
29
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAa,MAAM,aAAa,CAAC;AAItD,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAqBF;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAEhD"}
@@ -1 +0,0 @@
1
- a34da0ffd5b373d346c39f45a5a61ec09f5c1b7b
@@ -1 +0,0 @@
1
- 2b50088dab0279da8a113fe0396237a4525f8a9fb130d4b1cd15b5072f866a53
@@ -1 +0,0 @@
1
- 588744d4be57b3e7ed22bcccd40222dcb365367cd3bb72fd0aeb4c0f1925229f986b58712f477a0eebdeb0e8d887b09e0aab21764dc372a5755e622118d88d7b
@@ -1 +0,0 @@
1
- c2ddc40af222d8ef304b15d13a112399
@@ -1 +0,0 @@
1
- d9837c255bb0284a69d6b234195055a11d9bd98f
@@ -1 +0,0 @@
1
- 9a82f1f77a7ee3f302982361eb41e2bb8b86cbd430061a07cce8c4511b40cbf4
@@ -1 +0,0 @@
1
- 8a56aa5f1a198809e7bd3601605ec9e5ae7414b7834d6d6a44c024991f27de1cd744ed4b575b23b6b537e3e759c39309b220ca9fe57ec76c42b4130326c331fb
@@ -1 +0,0 @@
1
- 30dbf6a3d9ec32bd3d35dcaa054f871c6aef4572
@@ -1 +0,0 @@
1
- 776b37606fc84b29d80f4fad1667670284ba5424ef5463d07ddf9349a91092aa
@@ -1 +0,0 @@
1
- 4ea7791e17643fc75674cebb245364eb7da0375f5f07bcba12d71021fbd53524280e0e41ab6aada44304126083e1ae4bdb554b0b5cbc81f8141e32200f8aea51
@@ -1 +0,0 @@
1
- 98b60e39733fa3716c6c6f1716b17c9e
@@ -1 +0,0 @@
1
- 785a21c06743ebd45e830929302eacfed1a02577
@@ -1 +0,0 @@
1
- eb010d0e31664cc2341979943ef6419479f3fa3a34db9596c4662860ad70ba79
@@ -1 +0,0 @@
1
- af7c2dbb1d6562a281f052003f7040abe11d3675d03857f5c7d3519b28a1a8be54a73ccc7f2fab909b7edbfd864d888936d71a737737fac71ff13783d969229d
@@ -1,57 +0,0 @@
1
- type Variant = 'rounded' | 'twotone' | 'outlined' | 'filled' | 'sharp';
2
-
3
- type Icon =
4
- | 'AccountBox'
5
- | 'AccountCircle'
6
- | 'Add'
7
- | 'AddCircle'
8
- | 'ArrowBack'
9
- | 'ArrowDropDown'
10
- | 'ArrowForward'
11
- | 'Build'
12
- | 'Call'
13
- | 'Check'
14
- | 'CheckCircle'
15
- | 'Clear'
16
- | 'Close'
17
- | 'Contrast'
18
- | 'Create'
19
- | 'DarkMode'
20
- | 'DateRange'
21
- | 'Delete'
22
- | 'Done'
23
- | 'Edit'
24
- | 'Email'
25
- | 'ExitToApp'
26
- | 'Face'
27
- | 'Favorite'
28
- | 'FavoriteBorder'
29
- | 'Home'
30
- | 'Info'
31
- | 'KeyboardArrowDown'
32
- | 'KeyboardArrowLeft'
33
- | 'KeyboardArrowRight'
34
- | 'KeyboardArrowUp'
35
- | 'LightMode'
36
- | 'List'
37
- | 'LocationOn'
38
- | 'Lock'
39
- | 'MailOutline'
40
- | 'Menu'
41
- | 'MoreVert'
42
- | 'Notifications'
43
- | 'Person'
44
- | 'Phone'
45
- | 'Place'
46
- | 'PlayArrow'
47
- | 'Refresh'
48
- | 'Search'
49
- | 'Send'
50
- | 'Settings'
51
- | 'Share'
52
- | 'ShoppingCart'
53
- | 'Star'
54
- | 'ThumbUp'
55
- | 'Warning';
56
-
57
- export type MaterialIcon = `${Variant}.${Icon}`;
@@ -1,21 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
-
3
- import { ButtonProps } from '../Button';
4
-
5
- /**
6
- * Props of the `Submenu` component.
7
- */
8
- export type SubmenuProps = {
9
- /**
10
- * The button that will be used to expand the submenu. On Android the `text` prop of the `Button` will be used as a section title.
11
- */
12
- button: ReactElement<ButtonProps>;
13
- /**
14
- * Children of the submenu. Only `Button`, `Switch`, `Picker` and `Submenu` elements should be used.
15
- */
16
- children: ReactNode;
17
- };
18
-
19
- export function Submenu(props: SubmenuProps) {
20
- return <></>;
21
- }
@@ -1,149 +0,0 @@
1
- import { requireNativeView } from 'expo';
2
- import { Children, ReactElement, ReactNode, useMemo } from 'react';
3
- import { NativeSyntheticEvent, StyleProp, ViewStyle, type ColorValue } from 'react-native';
4
-
5
- import { SubmenuProps } from './Submenu';
6
- import { MenuElement, transformChildrenToElementArray } from './utils';
7
- import { ModifierConfig } from '../../types';
8
- import { ButtonProps } from '../Button';
9
- import { PickerProps } from '../Picker';
10
- import { SwitchProps } from '../Switch';
11
- import { createViewModifierEventListener } from '../modifiers/utils';
12
-
13
- const MenuNativeView: React.ComponentType<NativeMenuProps> = requireNativeView(
14
- 'ExpoUI',
15
- 'ContextMenuView'
16
- );
17
-
18
- type SubmenuElement =
19
- | ReactElement<ButtonProps>
20
- | ReactElement<SwitchProps>
21
- | ReactElement<PickerProps>
22
- | ReactElement<SubmenuProps>;
23
-
24
- export type ContextMenuContentProps = {
25
- children: SubmenuElement | SubmenuElement[];
26
- };
27
-
28
- /**
29
- * @hidden
30
- */
31
- export type EventHandlers = Record<
32
- string,
33
- Record<string, (event: NativeSyntheticEvent<any>) => void>
34
- >;
35
-
36
- /**
37
- * @hidden
38
- */
39
- export type ContextMenuElementBase = { contextMenuElementID: string };
40
-
41
- /**
42
- * Props of the `ContextMenu` component.
43
- */
44
- export type ContextMenuProps = {
45
- /**
46
- * The contents of the submenu are used as an anchor for the context menu.
47
- * The children will be wrapped in a pressable element, which triggers opening of the context menu.
48
- */
49
- children: ReactNode;
50
-
51
- /**
52
- * The color of the container holding the context menu items.
53
- */
54
- color?: ColorValue;
55
-
56
- /**
57
- * Optional styles to apply to the `ContextMenu`.
58
- */
59
- style?: StyleProp<ViewStyle>;
60
-
61
- /**
62
- * Modifiers for the component.
63
- */
64
- modifiers?: ModifierConfig[];
65
- };
66
-
67
- /**
68
- * @hidden
69
- */
70
- type NativeMenuProps = ContextMenuProps & {
71
- elements: MenuElement[];
72
- onContextMenuButtonPressed: (
73
- event: NativeSyntheticEvent<{ contextMenuElementID: string }>
74
- ) => void;
75
- onContextMenuSwitchValueChanged: (
76
- event: NativeSyntheticEvent<{
77
- contextMenuElementID: string;
78
- value: boolean;
79
- }>
80
- ) => void;
81
- onContextMenuPickerOptionSelected: (
82
- event: NativeSyntheticEvent<{
83
- index: number;
84
- label: string;
85
- contextMenuElementID: string;
86
- }>
87
- ) => void;
88
- };
89
-
90
- export function Items(props: ContextMenuContentProps) {
91
- return <></>;
92
- }
93
- Items.tag = 'Items';
94
-
95
- export function Trigger(props: { children: React.ReactNode }) {
96
- return <></>;
97
- }
98
- Trigger.tag = 'Trigger';
99
-
100
- export function Preview(props: { children: React.ReactNode }) {
101
- return <></>;
102
- }
103
-
104
- function ContextMenu(props: ContextMenuProps) {
105
- const { modifiers, ...restProps } = props;
106
- const eventHandlersMap: EventHandlers = {};
107
- const initialChildren = Children.map(
108
- props.children as any,
109
- (c: { type: { tag: string }; props: { children: React.ReactNode } }) =>
110
- c.type.tag === Items.tag ? c.props.children : null
111
- );
112
- const processedElements = useMemo(
113
- () => transformChildrenToElementArray(initialChildren, eventHandlersMap),
114
- [initialChildren]
115
- );
116
-
117
- const activationElement = Children.map(
118
- props.children as any,
119
- (c: { type: { tag: string }; props: { children: React.ReactNode } }) =>
120
- c.type.tag === Trigger.tag ? c.props.children : null
121
- );
122
-
123
- const createEventHandler =
124
- (handlerType: string) => (e: NativeSyntheticEvent<{ contextMenuElementID: string }>) => {
125
- const handler = eventHandlersMap[e.nativeEvent.contextMenuElementID]?.[handlerType];
126
- handler?.(e);
127
- };
128
-
129
- return (
130
- <MenuNativeView
131
- style={props.style}
132
- elements={processedElements}
133
- onContextMenuButtonPressed={createEventHandler('onPress')}
134
- onContextMenuSwitchValueChanged={createEventHandler('onValueChange')}
135
- onContextMenuPickerOptionSelected={createEventHandler('onOptionSelected')}
136
- modifiers={modifiers}
137
- {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
138
- {...restProps}>
139
- {activationElement}
140
- </MenuNativeView>
141
- );
142
- }
143
-
144
- ContextMenu.Trigger = Trigger;
145
- ContextMenu.Preview = Preview;
146
- ContextMenu.Items = Items;
147
-
148
- export { ContextMenu };
149
- export { Submenu } from './Submenu';