react-native-acoustic-connect-beta 19.0.26 → 19.0.27

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 (331) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/ConnectConfig.example.json +1 -1
  3. package/android/src/main/assets/ConnectAdvancedConfig.json +1 -1
  4. package/android/src/main/assets/ConnectBasicConfig.properties +1 -1
  5. package/package.json +2 -9
  6. package/Examples/SampleUI/.bundle/config +0 -2
  7. package/Examples/SampleUI/.detoxrc.js +0 -83
  8. package/Examples/SampleUI/.eslintrc.js +0 -4
  9. package/Examples/SampleUI/.prettierrc.js +0 -7
  10. package/Examples/SampleUI/.watchmanconfig +0 -1
  11. package/Examples/SampleUI/App.js +0 -1
  12. package/Examples/SampleUI/ConnectConfig.json +0 -180
  13. package/Examples/SampleUI/Gemfile +0 -10
  14. package/Examples/SampleUI/Gemfile.lock +0 -121
  15. package/Examples/SampleUI/README.md +0 -79
  16. package/Examples/SampleUI/android/app/build.gradle +0 -129
  17. package/Examples/SampleUI/android/app/debug.keystore +0 -0
  18. package/Examples/SampleUI/android/app/proguard-rules.pro +0 -10
  19. package/Examples/SampleUI/android/app/src/debug/AndroidManifest.xml +0 -9
  20. package/Examples/SampleUI/android/app/src/main/AndroidManifest.xml +0 -31
  21. package/Examples/SampleUI/android/app/src/main/java/com/sampleui/MainActivity.kt +0 -30
  22. package/Examples/SampleUI/android/app/src/main/java/com/sampleui/MainApplication.kt +0 -53
  23. package/Examples/SampleUI/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  24. package/Examples/SampleUI/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  25. package/Examples/SampleUI/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  26. package/Examples/SampleUI/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  27. package/Examples/SampleUI/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  28. package/Examples/SampleUI/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  29. package/Examples/SampleUI/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  30. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  31. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  32. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  33. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  34. package/Examples/SampleUI/android/app/src/main/res/values/strings.xml +0 -3
  35. package/Examples/SampleUI/android/app/src/main/res/values/styles.xml +0 -9
  36. package/Examples/SampleUI/android/build.gradle +0 -21
  37. package/Examples/SampleUI/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  38. package/Examples/SampleUI/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  39. package/Examples/SampleUI/android/gradle.properties +0 -39
  40. package/Examples/SampleUI/android/gradlew +0 -252
  41. package/Examples/SampleUI/android/gradlew.bat +0 -94
  42. package/Examples/SampleUI/android/settings.gradle +0 -21
  43. package/Examples/SampleUI/app.json +0 -51
  44. package/Examples/SampleUI/assets/fonts/Abel-Regular.ttf +0 -0
  45. package/Examples/SampleUI/assets/fonts/NotoSans-Regular.ttf +0 -0
  46. package/Examples/SampleUI/assets/images/android-icon.png +0 -0
  47. package/Examples/SampleUI/assets/images/artist-1.jpg +0 -0
  48. package/Examples/SampleUI/assets/images/artist-2.jpg +0 -0
  49. package/Examples/SampleUI/assets/images/avatar.png +0 -0
  50. package/Examples/SampleUI/assets/images/beach.jpg +0 -0
  51. package/Examples/SampleUI/assets/images/bridge.jpg +0 -0
  52. package/Examples/SampleUI/assets/images/chameleon.jpg +0 -0
  53. package/Examples/SampleUI/assets/images/city.jpg +0 -0
  54. package/Examples/SampleUI/assets/images/email-icon.png +0 -0
  55. package/Examples/SampleUI/assets/images/favorite.png +0 -0
  56. package/Examples/SampleUI/assets/images/forest.jpg +0 -0
  57. package/Examples/SampleUI/assets/images/paper-icon.png +0 -0
  58. package/Examples/SampleUI/assets/images/players-2.jpg +0 -0
  59. package/Examples/SampleUI/assets/images/players.jpg +0 -0
  60. package/Examples/SampleUI/assets/images/restaurant-1.jpg +0 -0
  61. package/Examples/SampleUI/assets/images/restaurant-2.jpg +0 -0
  62. package/Examples/SampleUI/assets/images/song-1.jpg +0 -0
  63. package/Examples/SampleUI/assets/images/song-2.jpg +0 -0
  64. package/Examples/SampleUI/assets/images/splash.png +0 -0
  65. package/Examples/SampleUI/assets/images/strawberries.jpg +0 -0
  66. package/Examples/SampleUI/assets/images/wrecked-ship.jpg +0 -0
  67. package/Examples/SampleUI/assets/styles/fonts.css +0 -47
  68. package/Examples/SampleUI/babel.config.js +0 -22
  69. package/Examples/SampleUI/index.js +0 -9
  70. package/Examples/SampleUI/ios/.xcode.env +0 -11
  71. package/Examples/SampleUI/ios/Podfile +0 -71
  72. package/Examples/SampleUI/ios/Podfile.lock +0 -2276
  73. package/Examples/SampleUI/ios/SampleUI/AppDelegate.h +0 -7
  74. package/Examples/SampleUI/ios/SampleUI/AppDelegate.mm +0 -31
  75. package/Examples/SampleUI/ios/SampleUI/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  76. package/Examples/SampleUI/ios/SampleUI/Images.xcassets/Contents.json +0 -6
  77. package/Examples/SampleUI/ios/SampleUI/Info.plist +0 -52
  78. package/Examples/SampleUI/ios/SampleUI/LaunchScreen.storyboard +0 -47
  79. package/Examples/SampleUI/ios/SampleUI/PrivacyInfo.xcprivacy +0 -48
  80. package/Examples/SampleUI/ios/SampleUI/main.m +0 -10
  81. package/Examples/SampleUI/ios/SampleUI.xcodeproj/project.pbxproj +0 -785
  82. package/Examples/SampleUI/ios/SampleUI.xcodeproj/xcshareddata/xcschemes/SampleUI.xcscheme +0 -105
  83. package/Examples/SampleUI/ios/SampleUI.xcworkspace/contents.xcworkspacedata +0 -10
  84. package/Examples/SampleUI/ios/SampleUITests/Info.plist +0 -24
  85. package/Examples/SampleUI/ios/SampleUITests/SampleUITests.m +0 -66
  86. package/Examples/SampleUI/jest.config.js +0 -3
  87. package/Examples/SampleUI/metro.config.js +0 -54
  88. package/Examples/SampleUI/package.json +0 -65
  89. package/Examples/SampleUI/scripts/integration-test-android.sh +0 -292
  90. package/Examples/SampleUI/src/DrawerItems.tsx +0 -322
  91. package/Examples/SampleUI/src/ExampleList.tsx +0 -175
  92. package/Examples/SampleUI/src/Examples/ActivityIndicatorExample.tsx +0 -73
  93. package/Examples/SampleUI/src/Examples/AnimatedFABExample/AnimatedFABExample.tsx +0 -220
  94. package/Examples/SampleUI/src/Examples/AnimatedFABExample/CustomFAB.tsx +0 -70
  95. package/Examples/SampleUI/src/Examples/AnimatedFABExample/CustomFABControls.tsx +0 -146
  96. package/Examples/SampleUI/src/Examples/AnimatedFABExample/index.ts +0 -1
  97. package/Examples/SampleUI/src/Examples/AppbarExample.tsx +0 -263
  98. package/Examples/SampleUI/src/Examples/AvatarExample.tsx +0 -76
  99. package/Examples/SampleUI/src/Examples/BadgeExample.tsx +0 -97
  100. package/Examples/SampleUI/src/Examples/BannerExample.tsx +0 -152
  101. package/Examples/SampleUI/src/Examples/BottomNavigationBarExample.tsx +0 -94
  102. package/Examples/SampleUI/src/Examples/BottomNavigationExample.tsx +0 -205
  103. package/Examples/SampleUI/src/Examples/ButtonExample.tsx +0 -405
  104. package/Examples/SampleUI/src/Examples/CardExample.tsx +0 -245
  105. package/Examples/SampleUI/src/Examples/CheckboxExample.tsx +0 -87
  106. package/Examples/SampleUI/src/Examples/CheckboxItemExample.tsx +0 -72
  107. package/Examples/SampleUI/src/Examples/ChipExample.tsx +0 -432
  108. package/Examples/SampleUI/src/Examples/DataTableExample.tsx +0 -128
  109. package/Examples/SampleUI/src/Examples/DialogExample.tsx +0 -217
  110. package/Examples/SampleUI/src/Examples/Dialogs/DialogTextComponent.tsx +0 -31
  111. package/Examples/SampleUI/src/Examples/Dialogs/DialogTrackingTest.tsx +0 -307
  112. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithCustomColors.tsx +0 -57
  113. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithDismissableBackButton.tsx +0 -38
  114. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithIcon.tsx +0 -42
  115. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithLoadingIndicator.tsx +0 -48
  116. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithLongText.tsx +0 -81
  117. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithRadioBtns.tsx +0 -111
  118. package/Examples/SampleUI/src/Examples/Dialogs/UndismissableDialog.tsx +0 -30
  119. package/Examples/SampleUI/src/Examples/Dialogs/index.tsx +0 -44
  120. package/Examples/SampleUI/src/Examples/DividerExample.tsx +0 -30
  121. package/Examples/SampleUI/src/Examples/FABExample.tsx +0 -226
  122. package/Examples/SampleUI/src/Examples/IconButtonExample.tsx +0 -230
  123. package/Examples/SampleUI/src/Examples/IconExample.tsx +0 -50
  124. package/Examples/SampleUI/src/Examples/ListAccordionExample.tsx +0 -65
  125. package/Examples/SampleUI/src/Examples/ListAccordionGroupExample.tsx +0 -80
  126. package/Examples/SampleUI/src/Examples/ListItemExample.tsx +0 -310
  127. package/Examples/SampleUI/src/Examples/ListSectionExample.tsx +0 -159
  128. package/Examples/SampleUI/src/Examples/MaterialBottomTabNavigatorExample.tsx +0 -87
  129. package/Examples/SampleUI/src/Examples/MenuExample.tsx +0 -211
  130. package/Examples/SampleUI/src/Examples/ProgressBarExample.tsx +0 -142
  131. package/Examples/SampleUI/src/Examples/RadioButtonExample.tsx +0 -104
  132. package/Examples/SampleUI/src/Examples/RadioButtonGroupExample.tsx +0 -67
  133. package/Examples/SampleUI/src/Examples/RadioButtonItemExample.tsx +0 -77
  134. package/Examples/SampleUI/src/Examples/SearchbarExample.tsx +0 -249
  135. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonCustomColorCheck.tsx +0 -93
  136. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonDefault.tsx +0 -49
  137. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonDisabled.tsx +0 -47
  138. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselect.tsx +0 -50
  139. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselectIcons.tsx +0 -49
  140. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselectRealCase.tsx +0 -114
  141. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonOnlyIcons.tsx +0 -40
  142. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonOnlyIconsWithCheck.tsx +0 -43
  143. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonRealCase.tsx +0 -97
  144. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonWithDensity.tsx +0 -47
  145. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonWithSelectedCheck.tsx +0 -52
  146. package/Examples/SampleUI/src/Examples/SegmentedButtons/index.ts +0 -9
  147. package/Examples/SampleUI/src/Examples/SegmentedButtonsExample.tsx +0 -57
  148. package/Examples/SampleUI/src/Examples/SnackbarExample.tsx +0 -141
  149. package/Examples/SampleUI/src/Examples/SurfaceExample.tsx +0 -130
  150. package/Examples/SampleUI/src/Examples/SwitchExample.tsx +0 -105
  151. package/Examples/SampleUI/src/Examples/TeamDetails.tsx +0 -291
  152. package/Examples/SampleUI/src/Examples/TeamsList.tsx +0 -57
  153. package/Examples/SampleUI/src/Examples/TextExample.tsx +0 -132
  154. package/Examples/SampleUI/src/Examples/TextInputExample.tsx +0 -914
  155. package/Examples/SampleUI/src/Examples/ThemeExample.tsx +0 -41
  156. package/Examples/SampleUI/src/Examples/ThemingWithReactNavigation.tsx +0 -75
  157. package/Examples/SampleUI/src/Examples/ToggleButtonExample.tsx +0 -128
  158. package/Examples/SampleUI/src/Examples/TooltipExample.tsx +0 -191
  159. package/Examples/SampleUI/src/Examples/TouchableRippleExample.tsx +0 -37
  160. package/Examples/SampleUI/src/RootNavigator.tsx +0 -95
  161. package/Examples/SampleUI/src/ScreenWrapper.tsx +0 -67
  162. package/Examples/SampleUI/src/components/ActivityIndicator.tsx +0 -254
  163. package/Examples/SampleUI/src/components/Appbar/Appbar.tsx +0 -364
  164. package/Examples/SampleUI/src/components/Appbar/AppbarAction.tsx +0 -132
  165. package/Examples/SampleUI/src/components/Appbar/AppbarBackAction.tsx +0 -77
  166. package/Examples/SampleUI/src/components/Appbar/AppbarBackIcon.tsx +0 -52
  167. package/Examples/SampleUI/src/components/Appbar/AppbarContent.tsx +0 -249
  168. package/Examples/SampleUI/src/components/Appbar/AppbarHeader.tsx +0 -174
  169. package/Examples/SampleUI/src/components/Appbar/index.ts +0 -22
  170. package/Examples/SampleUI/src/components/Appbar/utils.ts +0 -188
  171. package/Examples/SampleUI/src/components/Avatar/Avatar.tsx +0 -8
  172. package/Examples/SampleUI/src/components/Avatar/AvatarIcon.tsx +0 -87
  173. package/Examples/SampleUI/src/components/Avatar/AvatarImage.tsx +0 -128
  174. package/Examples/SampleUI/src/components/Avatar/AvatarText.tsx +0 -127
  175. package/Examples/SampleUI/src/components/Badge.tsx +0 -138
  176. package/Examples/SampleUI/src/components/Banner.tsx +0 -302
  177. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigation.tsx +0 -643
  178. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigationBar.tsx +0 -1039
  179. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigationRouteScreen.tsx +0 -31
  180. package/Examples/SampleUI/src/components/BottomNavigation/utils.ts +0 -70
  181. package/Examples/SampleUI/src/components/Button/Button.tsx +0 -503
  182. package/Examples/SampleUI/src/components/Button/utils.tsx +0 -272
  183. package/Examples/SampleUI/src/components/Card/Card.tsx +0 -373
  184. package/Examples/SampleUI/src/components/Card/CardActions.tsx +0 -74
  185. package/Examples/SampleUI/src/components/Card/CardContent.tsx +0 -99
  186. package/Examples/SampleUI/src/components/Card/CardCover.tsx +0 -96
  187. package/Examples/SampleUI/src/components/Card/CardTitle.tsx +0 -236
  188. package/Examples/SampleUI/src/components/Card/utils.tsx +0 -110
  189. package/Examples/SampleUI/src/components/Checkbox/Checkbox.tsx +0 -78
  190. package/Examples/SampleUI/src/components/Checkbox/CheckboxAndroid.tsx +0 -180
  191. package/Examples/SampleUI/src/components/Checkbox/CheckboxIOS.tsx +0 -104
  192. package/Examples/SampleUI/src/components/Checkbox/CheckboxItem.tsx +0 -236
  193. package/Examples/SampleUI/src/components/Checkbox/index.ts +0 -19
  194. package/Examples/SampleUI/src/components/Checkbox/utils.ts +0 -183
  195. package/Examples/SampleUI/src/components/Chip/Chip.tsx +0 -513
  196. package/Examples/SampleUI/src/components/Chip/helpers.tsx +0 -322
  197. package/Examples/SampleUI/src/components/CrossFadeIcon.tsx +0 -140
  198. package/Examples/SampleUI/src/components/DataTable/DataTable.tsx +0 -138
  199. package/Examples/SampleUI/src/components/DataTable/DataTableCell.tsx +0 -132
  200. package/Examples/SampleUI/src/components/DataTable/DataTableHeader.tsx +0 -82
  201. package/Examples/SampleUI/src/components/DataTable/DataTablePagination.tsx +0 -407
  202. package/Examples/SampleUI/src/components/DataTable/DataTableRow.tsx +0 -107
  203. package/Examples/SampleUI/src/components/DataTable/DataTableTitle.tsx +0 -208
  204. package/Examples/SampleUI/src/components/Dialog/Dialog.tsx +0 -191
  205. package/Examples/SampleUI/src/components/Dialog/DialogActions.tsx +0 -94
  206. package/Examples/SampleUI/src/components/Dialog/DialogContent.tsx +0 -54
  207. package/Examples/SampleUI/src/components/Dialog/DialogIcon.tsx +0 -100
  208. package/Examples/SampleUI/src/components/Dialog/DialogScrollArea.tsx +0 -88
  209. package/Examples/SampleUI/src/components/Dialog/DialogTitle.tsx +0 -94
  210. package/Examples/SampleUI/src/components/Divider.tsx +0 -102
  211. package/Examples/SampleUI/src/components/Drawer/Drawer.tsx +0 -8
  212. package/Examples/SampleUI/src/components/Drawer/DrawerCollapsedItem.tsx +0 -282
  213. package/Examples/SampleUI/src/components/Drawer/DrawerItem.tsx +0 -209
  214. package/Examples/SampleUI/src/components/Drawer/DrawerSection.tsx +0 -138
  215. package/Examples/SampleUI/src/components/FAB/AnimatedFAB.tsx +0 -619
  216. package/Examples/SampleUI/src/components/FAB/FAB.tsx +0 -371
  217. package/Examples/SampleUI/src/components/FAB/FABGroup.tsx +0 -532
  218. package/Examples/SampleUI/src/components/FAB/index.ts +0 -13
  219. package/Examples/SampleUI/src/components/FAB/utils.ts +0 -474
  220. package/Examples/SampleUI/src/components/HelperText/HelperText.tsx +0 -168
  221. package/Examples/SampleUI/src/components/HelperText/utils.ts +0 -30
  222. package/Examples/SampleUI/src/components/Icon.tsx +0 -170
  223. package/Examples/SampleUI/src/components/IconButton/IconButton.tsx +0 -234
  224. package/Examples/SampleUI/src/components/IconButton/utils.ts +0 -190
  225. package/Examples/SampleUI/src/components/List/List.tsx +0 -20
  226. package/Examples/SampleUI/src/components/List/ListAccordion.tsx +0 -391
  227. package/Examples/SampleUI/src/components/List/ListAccordionGroup.tsx +0 -88
  228. package/Examples/SampleUI/src/components/List/ListIcon.tsx +0 -79
  229. package/Examples/SampleUI/src/components/List/ListImage.tsx +0 -89
  230. package/Examples/SampleUI/src/components/List/ListItem.tsx +0 -313
  231. package/Examples/SampleUI/src/components/List/ListSection.tsx +0 -87
  232. package/Examples/SampleUI/src/components/List/ListSubheader.tsx +0 -79
  233. package/Examples/SampleUI/src/components/List/utils.ts +0 -113
  234. package/Examples/SampleUI/src/components/MaterialCommunityIcon.tsx +0 -121
  235. package/Examples/SampleUI/src/components/Menu/Menu.tsx +0 -711
  236. package/Examples/SampleUI/src/components/Menu/MenuItem.tsx +0 -257
  237. package/Examples/SampleUI/src/components/Menu/utils.ts +0 -110
  238. package/Examples/SampleUI/src/components/Modal.tsx +0 -245
  239. package/Examples/SampleUI/src/components/Portal/Portal.tsx +0 -69
  240. package/Examples/SampleUI/src/components/Portal/PortalConsumer.tsx +0 -44
  241. package/Examples/SampleUI/src/components/Portal/PortalHost.tsx +0 -143
  242. package/Examples/SampleUI/src/components/Portal/PortalManager.tsx +0 -54
  243. package/Examples/SampleUI/src/components/ProgressBar.tsx +0 -292
  244. package/Examples/SampleUI/src/components/RadioButton/RadioButton.tsx +0 -86
  245. package/Examples/SampleUI/src/components/RadioButton/RadioButtonAndroid.tsx +0 -202
  246. package/Examples/SampleUI/src/components/RadioButton/RadioButtonGroup.tsx +0 -67
  247. package/Examples/SampleUI/src/components/RadioButton/RadioButtonIOS.tsx +0 -130
  248. package/Examples/SampleUI/src/components/RadioButton/RadioButtonItem.tsx +0 -268
  249. package/Examples/SampleUI/src/components/RadioButton/index.ts +0 -22
  250. package/Examples/SampleUI/src/components/RadioButton/utils.ts +0 -37
  251. package/Examples/SampleUI/src/components/Searchbar.tsx +0 -459
  252. package/Examples/SampleUI/src/components/SegmentedButtons/SegmentedButtonItem.tsx +0 -271
  253. package/Examples/SampleUI/src/components/SegmentedButtons/SegmentedButtons.tsx +0 -197
  254. package/Examples/SampleUI/src/components/SegmentedButtons/utils.ts +0 -179
  255. package/Examples/SampleUI/src/components/Snackbar.tsx +0 -430
  256. package/Examples/SampleUI/src/components/Surface.tsx +0 -376
  257. package/Examples/SampleUI/src/components/Switch/Switch.tsx +0 -108
  258. package/Examples/SampleUI/src/components/Switch/utils.ts +0 -113
  259. package/Examples/SampleUI/src/components/TextInput/Addons/Outline.tsx +0 -64
  260. package/Examples/SampleUI/src/components/TextInput/Addons/Underline.tsx +0 -78
  261. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputAdornment.tsx +0 -208
  262. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputAffix.tsx +0 -212
  263. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputIcon.tsx +0 -195
  264. package/Examples/SampleUI/src/components/TextInput/Adornment/enums.tsx +0 -12
  265. package/Examples/SampleUI/src/components/TextInput/Adornment/types.tsx +0 -11
  266. package/Examples/SampleUI/src/components/TextInput/Adornment/utils.ts +0 -48
  267. package/Examples/SampleUI/src/components/TextInput/Label/InputLabel.tsx +0 -217
  268. package/Examples/SampleUI/src/components/TextInput/Label/LabelBackground.tsx +0 -100
  269. package/Examples/SampleUI/src/components/TextInput/TextInput.tsx +0 -572
  270. package/Examples/SampleUI/src/components/TextInput/TextInputFlat.tsx +0 -475
  271. package/Examples/SampleUI/src/components/TextInput/TextInputOutlined.tsx +0 -450
  272. package/Examples/SampleUI/src/components/TextInput/constants.tsx +0 -48
  273. package/Examples/SampleUI/src/components/TextInput/helpers.tsx +0 -612
  274. package/Examples/SampleUI/src/components/TextInput/types.tsx +0 -155
  275. package/Examples/SampleUI/src/components/ToggleButton/ToggleButton.tsx +0 -187
  276. package/Examples/SampleUI/src/components/ToggleButton/ToggleButtonGroup.tsx +0 -72
  277. package/Examples/SampleUI/src/components/ToggleButton/ToggleButtonRow.tsx +0 -107
  278. package/Examples/SampleUI/src/components/ToggleButton/index.ts +0 -16
  279. package/Examples/SampleUI/src/components/ToggleButton/utils.ts +0 -26
  280. package/Examples/SampleUI/src/components/Tooltip/Tooltip.tsx +0 -249
  281. package/Examples/SampleUI/src/components/Tooltip/utils.ts +0 -129
  282. package/Examples/SampleUI/src/components/TouchableRipple/Pressable.tsx +0 -41
  283. package/Examples/SampleUI/src/components/TouchableRipple/TouchableRipple.native.tsx +0 -145
  284. package/Examples/SampleUI/src/components/TouchableRipple/TouchableRipple.tsx +0 -317
  285. package/Examples/SampleUI/src/components/TouchableRipple/utils.ts +0 -66
  286. package/Examples/SampleUI/src/components/Typography/AnimatedText.tsx +0 -107
  287. package/Examples/SampleUI/src/components/Typography/Text.tsx +0 -184
  288. package/Examples/SampleUI/src/components/Typography/types.tsx +0 -5
  289. package/Examples/SampleUI/src/components/Typography/v2/Caption.tsx +0 -50
  290. package/Examples/SampleUI/src/components/Typography/v2/Headline.tsx +0 -52
  291. package/Examples/SampleUI/src/components/Typography/v2/Paragraph.tsx +0 -49
  292. package/Examples/SampleUI/src/components/Typography/v2/StyledText.tsx +0 -56
  293. package/Examples/SampleUI/src/components/Typography/v2/Subheading.tsx +0 -50
  294. package/Examples/SampleUI/src/components/Typography/v2/Text.tsx +0 -62
  295. package/Examples/SampleUI/src/components/Typography/v2/Title.tsx +0 -49
  296. package/Examples/SampleUI/src/components/Typography/v2/index.ts +0 -5
  297. package/Examples/SampleUI/src/core/PaperProvider.tsx +0 -122
  298. package/Examples/SampleUI/src/core/SafeAreaProviderCompat.tsx +0 -65
  299. package/Examples/SampleUI/src/core/settings.tsx +0 -23
  300. package/Examples/SampleUI/src/core/theming.tsx +0 -170
  301. package/Examples/SampleUI/src/index.native.tsx +0 -285
  302. package/Examples/SampleUI/src/index.tsx +0 -226
  303. package/Examples/SampleUI/src/react-navigation/index.tsx +0 -19
  304. package/Examples/SampleUI/src/react-navigation/navigators/createMaterialBottomTabNavigator.tsx +0 -72
  305. package/Examples/SampleUI/src/react-navigation/types.tsx +0 -126
  306. package/Examples/SampleUI/src/react-navigation/views/MaterialBottomTabView.tsx +0 -140
  307. package/Examples/SampleUI/src/styles/fonts.tsx +0 -143
  308. package/Examples/SampleUI/src/styles/overlay.tsx +0 -70
  309. package/Examples/SampleUI/src/styles/shadow.tsx +0 -109
  310. package/Examples/SampleUI/src/styles/themes/index.ts +0 -4
  311. package/Examples/SampleUI/src/styles/themes/v2/DarkTheme.tsx +0 -30
  312. package/Examples/SampleUI/src/styles/themes/v2/LightTheme.tsx +0 -30
  313. package/Examples/SampleUI/src/styles/themes/v2/colors.tsx +0 -277
  314. package/Examples/SampleUI/src/styles/themes/v3/DarkTheme.tsx +0 -66
  315. package/Examples/SampleUI/src/styles/themes/v3/LightTheme.tsx +0 -69
  316. package/Examples/SampleUI/src/styles/themes/v3/tokens.tsx +0 -230
  317. package/Examples/SampleUI/src/utils/BackHandler/BackHandler.native.tsx +0 -3
  318. package/Examples/SampleUI/src/utils/BackHandler/BackHandler.tsx +0 -11
  319. package/Examples/SampleUI/src/utils/addEventListener.tsx +0 -56
  320. package/Examples/SampleUI/src/utils/forwardRef.tsx +0 -23
  321. package/Examples/SampleUI/src/utils/getContrastingColor.tsx +0 -15
  322. package/Examples/SampleUI/src/utils/hasTouchHandler.tsx +0 -23
  323. package/Examples/SampleUI/src/utils/roundLayoutSize.ts +0 -2
  324. package/Examples/SampleUI/src/utils/splitStyles.ts +0 -60
  325. package/Examples/SampleUI/src/utils/useAnimatedValue.tsx +0 -9
  326. package/Examples/SampleUI/src/utils/useAnimatedValueArray.tsx +0 -13
  327. package/Examples/SampleUI/src/utils/useIsKeyboardShown.tsx +0 -55
  328. package/Examples/SampleUI/src/utils/useLayout.tsx +0 -29
  329. package/Examples/SampleUI/src/utils/useLazyRef.tsx +0 -11
  330. package/Examples/SampleUI/tsconfig.json +0 -3
  331. package/Examples/SampleUI/utils/index.ts +0 -1426
@@ -1,914 +0,0 @@
1
- import * as React from 'react';
2
- import {
3
- KeyboardAvoidingView,
4
- Platform,
5
- StyleSheet,
6
- Text,
7
- View,
8
- } from 'react-native';
9
-
10
- import { useFonts } from 'expo-font';
11
- import {
12
- configureFonts,
13
- HelperText,
14
- List,
15
- MD2Colors,
16
- MD3Colors,
17
- TextInput,
18
- } from 'react-native-paper';
19
- import Icon from 'react-native-vector-icons/FontAwesome';
20
-
21
- import { useExampleTheme } from '..';
22
- import { inputReducer, State } from '../../utils';
23
- import ScreenWrapper from '../ScreenWrapper';
24
-
25
- const MAX_LENGTH = 20;
26
-
27
- const initialState: State = {
28
- text: '',
29
- customIconText: '',
30
- name: '',
31
- outlinedText: '',
32
- largeText: '',
33
- flatTextPassword: 'Password',
34
- flatLongText:
35
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae odio quis dolor tempor mattis at non sem. Suspendisse et sem tincidunt, accumsan massa eleifend, euismod dui. Praesent eget urna lectus.',
36
- outlinedLargeText: '',
37
- outlinedCustomLabel: '',
38
- outlinedTextPassword: '',
39
- outlinedLongText:
40
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae odio quis dolor tempor mattis at non sem. Suspendisse et sem tincidunt, accumsan massa eleifend, euismod dui. Praesent eget urna lectus.',
41
- nameNoPadding: '',
42
- customStyleText: '',
43
- nameRequired: '',
44
- flatDenseText: '',
45
- flatDense: '',
46
- outlinedDenseText: '',
47
- outlinedDense: '',
48
- flatMultiline: '',
49
- flatTextArea: '',
50
- flatUnderlineColors: '',
51
- outlinedMultiline: '',
52
- outlinedTextArea: '',
53
- outlinedColors: '',
54
- outlinedLongLabel: '',
55
- maxLengthName: '',
56
- flatTextSecureEntry: true,
57
- outlineTextSecureEntry: true,
58
- iconsColor: {
59
- flatLeftIcon: undefined,
60
- flatRightIcon: undefined,
61
- outlineLeftIcon: undefined,
62
- outlineRightIcon: undefined,
63
- customIcon: undefined,
64
- },
65
- };
66
-
67
- type AvoidingViewProps = {
68
- children: React.ReactNode;
69
- };
70
-
71
- type ExpandedId = string | number | undefined;
72
-
73
- const TextInputAvoidingView = ({ children }: AvoidingViewProps) => {
74
- return Platform.OS === 'ios' ? (
75
- <KeyboardAvoidingView
76
- style={styles.wrapper}
77
- behavior="padding"
78
- keyboardVerticalOffset={80}
79
- >
80
- {children}
81
- </KeyboardAvoidingView>
82
- ) : (
83
- <>{children}</>
84
- );
85
- };
86
-
87
- const TextInputExample = () => {
88
- const [state, dispatch] = React.useReducer(inputReducer, initialState);
89
- const {
90
- text,
91
- customIconText,
92
- name,
93
- outlinedText,
94
- largeText,
95
- flatTextPassword,
96
- flatLongText,
97
- outlinedLargeText,
98
- outlinedCustomLabel,
99
- outlinedTextPassword,
100
- outlinedLongText,
101
- nameNoPadding,
102
- customStyleText,
103
- nameRequired,
104
- flatDenseText,
105
- flatDense,
106
- outlinedDenseText,
107
- outlinedDense,
108
- flatMultiline,
109
- flatTextArea,
110
- flatUnderlineColors,
111
- outlinedMultiline,
112
- outlinedTextArea,
113
- outlinedColors,
114
- maxLengthName,
115
- flatTextSecureEntry,
116
- outlineTextSecureEntry,
117
- iconsColor: {
118
- flatLeftIcon,
119
- flatRightIcon,
120
- outlineLeftIcon,
121
- outlineRightIcon,
122
- customIcon,
123
- },
124
- } = state;
125
-
126
- const _isUsernameValid = (name: string) => /^[a-zA-Z]*$/.test(name);
127
-
128
- const theme = useExampleTheme();
129
-
130
- const inputActionHandler = (type: keyof State, payload: string) =>
131
- dispatch({
132
- type: type,
133
- payload: payload,
134
- });
135
-
136
- const changeIconColor = (name: keyof State['iconsColor']) => {
137
- const color = state.iconsColor[name];
138
-
139
- const newColors = {
140
- ...state.iconsColor,
141
- [name]: !color
142
- ? theme.isV3
143
- ? theme.colors.primary
144
- : theme.colors?.accent
145
- : undefined,
146
- };
147
-
148
- dispatch({
149
- type: 'iconsColor',
150
- payload: newColors,
151
- });
152
- };
153
-
154
- const [fontsLoaded] = useFonts({
155
- Abel: require('../../assets/fonts/Abel-Regular.ttf'),
156
- });
157
-
158
- const [expandedId, setExpandedId] = React.useState<ExpandedId>('flat');
159
-
160
- const onAccordionPress = (id: string | number) =>
161
- setExpandedId(expandedId === id ? undefined : id);
162
-
163
- return (
164
- <TextInputAvoidingView>
165
- <ScreenWrapper
166
- keyboardShouldPersistTaps={'always'}
167
- removeClippedSubviews={false}
168
- >
169
- <List.AccordionGroup
170
- expandedId={expandedId}
171
- onAccordionPress={onAccordionPress}
172
- >
173
- <List.Accordion title="Flat inputs" id="flat">
174
- <TextInput
175
- style={styles.inputContainerStyle}
176
- label="Flat input"
177
- placeholder="Type something"
178
- value={text}
179
- onChangeText={(text) => inputActionHandler('text', text)}
180
- left={
181
- <TextInput.Icon
182
- icon="magnify"
183
- color={flatLeftIcon}
184
- onPress={() => {
185
- changeIconColor('flatLeftIcon');
186
- }}
187
- />
188
- }
189
- maxLength={100}
190
- right={<TextInput.Affix text={`${text.length}/100`} />}
191
- />
192
- <TextInput
193
- style={styles.inputContainerStyle}
194
- label="Flat input with custom icon"
195
- placeholder="Type something"
196
- value={customIconText}
197
- onChangeText={(text) =>
198
- inputActionHandler('customIconText', text)
199
- }
200
- maxLength={100}
201
- right={<TextInput.Affix text={`${customIconText.length}/100`} />}
202
- left={
203
- <TextInput.Icon
204
- icon={() => (
205
- <Icon
206
- name="home"
207
- size={24}
208
- color={customIcon}
209
- onPress={() => {
210
- changeIconColor('customIcon');
211
- }}
212
- />
213
- )}
214
- />
215
- }
216
- />
217
- <TextInput
218
- style={[styles.inputContainerStyle, styles.fontSize]}
219
- label="Flat input large font"
220
- placeholder="Type something"
221
- value={largeText}
222
- onChangeText={(largeText) =>
223
- inputActionHandler('largeText', largeText)
224
- }
225
- left={<TextInput.Affix text="#" />}
226
- right={
227
- <TextInput.Icon
228
- icon="magnify"
229
- color={flatRightIcon}
230
- onPress={() => {
231
- changeIconColor('flatRightIcon');
232
- }}
233
- />
234
- }
235
- />
236
- <TextInput
237
- style={[styles.inputContainerStyle, styles.fontSize]}
238
- label="Flat input large font"
239
- placeholder="Type something"
240
- value={flatTextPassword}
241
- onChangeText={(flatTextPassword) =>
242
- inputActionHandler('flatTextPassword', flatTextPassword)
243
- }
244
- secureTextEntry={flatTextSecureEntry}
245
- right={
246
- <TextInput.Icon
247
- icon={flatTextSecureEntry ? 'eye' : 'eye-off'}
248
- onPress={() =>
249
- dispatch({
250
- type: 'flatTextSecureEntry',
251
- payload: !flatTextSecureEntry,
252
- })
253
- }
254
- forceTextInputFocus={false}
255
- />
256
- }
257
- />
258
- <TextInput
259
- style={[
260
- styles.inputContainerStyle,
261
- styles.fixedHeight,
262
- styles.autoText,
263
- ]}
264
- label="Flat input long text"
265
- placeholder="Type something"
266
- value={flatLongText}
267
- onChangeText={(flatLongText) =>
268
- inputActionHandler('flatLongText', flatLongText)
269
- }
270
- />
271
- </List.Accordion>
272
- <List.Accordion title="Outlined inputs" id="outlined">
273
- <TextInput
274
- mode="outlined"
275
- style={styles.inputContainerStyle}
276
- label="Outlined input"
277
- placeholder="Type something"
278
- value={outlinedText}
279
- onChangeText={(outlinedText) =>
280
- inputActionHandler('outlinedText', outlinedText)
281
- }
282
- left={
283
- <TextInput.Icon
284
- icon="magnify"
285
- color={outlineLeftIcon}
286
- onPress={() => {
287
- changeIconColor('outlineLeftIcon');
288
- }}
289
- />
290
- }
291
- maxLength={100}
292
- right={<TextInput.Affix text={`${outlinedText.length}/100`} />}
293
- />
294
- <TextInput
295
- mode="outlined"
296
- style={[styles.inputContainerStyle, styles.fontSize]}
297
- label="Outlined large font"
298
- placeholder="Type something"
299
- value={outlinedLargeText}
300
- onChangeText={(outlinedLargeText) =>
301
- inputActionHandler('outlinedLargeText', outlinedLargeText)
302
- }
303
- left={<TextInput.Affix text="$" />}
304
- right={
305
- <TextInput.Icon
306
- icon="magnify"
307
- color={outlineRightIcon}
308
- onPress={() => {
309
- changeIconColor('outlineRightIcon');
310
- }}
311
- />
312
- }
313
- />
314
- <TextInput
315
- mode="outlined"
316
- style={[styles.inputContainerStyle, styles.fontSize]}
317
- label={<Text style={styles.inputLabelText}>Custom label</Text>}
318
- placeholder="Type something"
319
- value={outlinedCustomLabel}
320
- onChangeText={(outlinedCustomLabel) =>
321
- inputActionHandler('outlinedCustomLabel', outlinedCustomLabel)
322
- }
323
- />
324
- <TextInput
325
- mode="outlined"
326
- style={[styles.inputContainerStyle, styles.fontSize]}
327
- label="Outlined large font"
328
- placeholder="Type something"
329
- value={outlinedTextPassword}
330
- onChangeText={(outlinedTextPassword) =>
331
- inputActionHandler('outlinedTextPassword', outlinedTextPassword)
332
- }
333
- secureTextEntry={outlineTextSecureEntry}
334
- right={
335
- <TextInput.Icon
336
- icon={outlineTextSecureEntry ? 'eye' : 'eye-off'}
337
- onPress={() =>
338
- dispatch({
339
- type: 'outlineTextSecureEntry',
340
- payload: !outlineTextSecureEntry,
341
- })
342
- }
343
- />
344
- }
345
- />
346
- <TextInput
347
- mode="outlined"
348
- style={[
349
- styles.inputContainerStyle,
350
- styles.fixedHeight,
351
- styles.autoText,
352
- ]}
353
- label="Outlined input long text"
354
- placeholder="Type something"
355
- value={outlinedLongText}
356
- onChangeText={(outlinedLongText) =>
357
- inputActionHandler('outlinedLongText', outlinedLongText)
358
- }
359
- />
360
- </List.Accordion>
361
- <List.Accordion title="Disabled inputs" id="disabled">
362
- <TextInput
363
- disabled
364
- style={styles.inputContainerStyle}
365
- label="Disabled flat input"
366
- />
367
- <TextInput
368
- disabled
369
- style={styles.inputContainerStyle}
370
- label="Disabled flat input with value"
371
- value="Disabled flat input value"
372
- />
373
- <TextInput
374
- style={styles.inputContainerStyle}
375
- label="Flat input"
376
- disabled
377
- value="Disabled flat input with adornments"
378
- left={
379
- <TextInput.Icon
380
- icon="magnify"
381
- color={flatLeftIcon}
382
- onPress={() => {
383
- changeIconColor('flatLeftIcon');
384
- }}
385
- />
386
- }
387
- right={<TextInput.Affix text="/100" />}
388
- />
389
- <TextInput
390
- mode="outlined"
391
- disabled
392
- style={styles.inputContainerStyle}
393
- label="Disabled outlined input"
394
- />
395
- <TextInput
396
- mode="outlined"
397
- disabled
398
- style={styles.inputContainerStyle}
399
- label="Disabled outlined input"
400
- value="Disabled outlined input with value"
401
- />
402
- <TextInput
403
- style={styles.inputContainerStyle}
404
- label="Flat input"
405
- disabled
406
- mode="outlined"
407
- value="Disabled flat input with adornments"
408
- left={
409
- <TextInput.Icon
410
- icon="magnify"
411
- color={flatLeftIcon}
412
- onPress={() => {
413
- changeIconColor('flatLeftIcon');
414
- }}
415
- />
416
- }
417
- right={<TextInput.Affix text="/100" />}
418
- />
419
- </List.Accordion>
420
- <List.Accordion title="Dense inputs" id="dense">
421
- <TextInput
422
- style={styles.inputContainerStyle}
423
- dense
424
- label="Dense flat input"
425
- placeholder="Type something"
426
- value={flatDenseText}
427
- onChangeText={(flatDenseText) =>
428
- inputActionHandler('flatDenseText', flatDenseText)
429
- }
430
- left={<TextInput.Affix text="#" />}
431
- right={
432
- <TextInput.Icon
433
- icon="chevron-up"
434
- color={(focused) =>
435
- focused ? theme.colors?.primary : undefined
436
- }
437
- />
438
- }
439
- />
440
- <TextInput
441
- style={styles.inputContainerStyle}
442
- dense
443
- placeholder="Dense flat input without label"
444
- value={flatDense}
445
- onChangeText={(flatDense) =>
446
- inputActionHandler('flatDense', flatDense)
447
- }
448
- />
449
- <TextInput
450
- mode="outlined"
451
- style={styles.inputContainerStyle}
452
- dense
453
- label="Dense outlined input"
454
- placeholder="Type something"
455
- value={outlinedDenseText}
456
- onChangeText={(outlinedDenseText) =>
457
- inputActionHandler('outlinedDenseText', outlinedDenseText)
458
- }
459
- left={<TextInput.Affix text="$" />}
460
- />
461
- <TextInput
462
- mode="outlined"
463
- style={styles.inputContainerStyle}
464
- dense
465
- placeholder="Dense outlined input without label"
466
- value={outlinedDense}
467
- onChangeText={(outlinedDense) =>
468
- inputActionHandler('outlinedDense', outlinedDense)
469
- }
470
- />
471
- </List.Accordion>
472
- <List.Accordion title="Multiline inputs" id="multiline">
473
- <TextInput
474
- style={styles.inputContainerStyle}
475
- label="Flat input multiline"
476
- multiline
477
- placeholder="Type something"
478
- value={flatMultiline}
479
- onChangeText={(flatMultiline) =>
480
- inputActionHandler('flatMultiline', flatMultiline)
481
- }
482
- />
483
- <TextInput
484
- style={[styles.inputContainerStyle, styles.textArea]}
485
- label="Flat input text area"
486
- multiline
487
- placeholder="Type something"
488
- value={flatTextArea}
489
- onChangeText={(flatTextArea) =>
490
- inputActionHandler('flatTextArea', flatTextArea)
491
- }
492
- />
493
- <View style={styles.inputContainerStyle}>
494
- <TextInput
495
- mode="flat"
496
- label="Flat multiline text input with fixed height"
497
- multiline
498
- style={styles.fixedHeight}
499
- />
500
- </View>
501
- <TextInput
502
- mode="outlined"
503
- style={styles.inputContainerStyle}
504
- label="Outlined input multiline"
505
- multiline
506
- placeholder="Type something"
507
- value={outlinedMultiline}
508
- onChangeText={(outlinedMultiline) =>
509
- inputActionHandler('outlinedMultiline', outlinedMultiline)
510
- }
511
- />
512
- <TextInput
513
- mode="outlined"
514
- style={[styles.inputContainerStyle, styles.textArea]}
515
- label="Outlined input text area"
516
- multiline
517
- placeholder="Type something"
518
- value={outlinedTextArea}
519
- onChangeText={(outlinedTextArea) =>
520
- inputActionHandler('outlinedTextArea', outlinedTextArea)
521
- }
522
- />
523
- <View style={styles.inputContainerStyle}>
524
- <TextInput
525
- mode="outlined"
526
- label="Outlined multiline text input with fixed height"
527
- multiline
528
- style={styles.fixedHeight}
529
- />
530
- </View>
531
- </List.Accordion>
532
- <List.Accordion title="Inputs with helpers" id="withAddons">
533
- <View style={styles.inputContainerStyle}>
534
- <TextInput
535
- label="Input with helper text"
536
- placeholder="Enter username, only letters"
537
- value={name}
538
- error={!_isUsernameValid(name)}
539
- onChangeText={(name) => inputActionHandler('name', name)}
540
- />
541
- <HelperText type="error" visible={!_isUsernameValid(name)}>
542
- Error: Only letters are allowed
543
- </HelperText>
544
- </View>
545
- <View style={styles.inputContainerStyle}>
546
- <TextInput
547
- label="Input with helper text and character counter"
548
- placeholder="Enter username, only letters"
549
- value={maxLengthName}
550
- error={!_isUsernameValid(maxLengthName)}
551
- onChangeText={(maxLengthName) =>
552
- inputActionHandler('maxLengthName', maxLengthName)
553
- }
554
- maxLength={MAX_LENGTH}
555
- />
556
- <View style={styles.helpersWrapper}>
557
- <HelperText
558
- type="error"
559
- visible={!_isUsernameValid(maxLengthName)}
560
- style={styles.helper}
561
- >
562
- Error: Numbers and special characters are not allowed
563
- </HelperText>
564
- <HelperText type="info" visible style={styles.counterHelper}>
565
- {maxLengthName.length} / {MAX_LENGTH}
566
- </HelperText>
567
- </View>
568
- </View>
569
- <View style={styles.inputContainerStyle}>
570
- <TextInput
571
- label={
572
- <Text>
573
- <Text
574
- style={{
575
- color: theme.isV3
576
- ? MD3Colors.error50
577
- : MD2Colors.red500,
578
- }}
579
- >
580
- *
581
- </Text>{' '}
582
- Label as component
583
- </Text>
584
- }
585
- style={styles.noPaddingInput}
586
- placeholder="Enter username, required"
587
- value={nameRequired}
588
- error={!nameRequired}
589
- onChangeText={(nameRequired) =>
590
- inputActionHandler('nameRequired', nameRequired)
591
- }
592
- />
593
- <HelperText type="error" padding="none" visible={!nameRequired}>
594
- Error: Username is required
595
- </HelperText>
596
- </View>
597
- </List.Accordion>
598
- <List.Accordion title="Custom inputs" id="custom">
599
- <TextInput
600
- style={styles.inputContainerStyle}
601
- label="Flat input with custom underline colors"
602
- placeholder="Type something"
603
- value={flatUnderlineColors}
604
- onChangeText={(flatUnderlineColors) =>
605
- inputActionHandler('flatUnderlineColors', flatUnderlineColors)
606
- }
607
- underlineColor={
608
- theme.isV3 ? MD3Colors.primary70 : MD2Colors.pink400
609
- }
610
- activeUnderlineColor={
611
- theme.isV3 ? MD3Colors.tertiary50 : MD2Colors.amber900
612
- }
613
- />
614
- <TextInput
615
- mode="outlined"
616
- style={styles.inputContainerStyle}
617
- label="Outlined input with custom outline colors"
618
- placeholder="Type something"
619
- value={outlinedColors}
620
- onChangeText={(outlinedColors) =>
621
- inputActionHandler('outlinedColors', outlinedColors)
622
- }
623
- outlineColor={
624
- theme.isV3 ? MD3Colors.primary70 : MD2Colors.pink400
625
- }
626
- activeOutlineColor={
627
- theme.isV3 ? MD3Colors.tertiary50 : MD2Colors.amber900
628
- }
629
- />
630
- <TextInput
631
- mode="outlined"
632
- style={styles.inputContainerStyle}
633
- label="Outlined with super long label which is truncating at some point"
634
- placeholder="Type something"
635
- onChangeText={(outlinedLongLabel) =>
636
- inputActionHandler('outlinedLongLabel', outlinedLongLabel)
637
- }
638
- />
639
-
640
- <TextInput
641
- mode="flat"
642
- style={styles.inputContainerStyle}
643
- label="Custom style input"
644
- placeholder="Input with custom style"
645
- value={customStyleText}
646
- onChangeText={(customStyleText) =>
647
- inputActionHandler('customStyleText', customStyleText)
648
- }
649
- contentStyle={styles.inputContentStyle}
650
- />
651
-
652
- <View style={styles.inputContainerStyle}>
653
- <TextInput
654
- label="Input with no padding"
655
- style={styles.noPaddingInput}
656
- placeholder="Enter username, only letters"
657
- value={nameNoPadding}
658
- error={!_isUsernameValid(nameNoPadding)}
659
- onChangeText={(nameNoPadding) =>
660
- inputActionHandler('nameNoPadding', nameNoPadding)
661
- }
662
- />
663
- <HelperText
664
- type="error"
665
- padding="none"
666
- visible={!_isUsernameValid(nameNoPadding)}
667
- >
668
- Error: Only letters are allowed
669
- </HelperText>
670
- </View>
671
-
672
- <View style={styles.inputContainerStyle}>
673
- <TextInput
674
- label="Input with text align center"
675
- style={styles.centeredText}
676
- activeUnderlineColor="transparent"
677
- />
678
- </View>
679
- <View style={styles.inputContainerStyle}>
680
- <TextInput
681
- mode="outlined"
682
- label="Outlined input with text align center"
683
- style={styles.centeredText}
684
- />
685
- </View>
686
- <View style={styles.inputContainerStyle}>
687
- <TextInput
688
- mode="outlined"
689
- theme={{
690
- roundness: 25,
691
- }}
692
- label="Outlined text input with custom roundness"
693
- />
694
- </View>
695
- <View style={styles.inputContainerStyle}>
696
- <TextInput
697
- mode="outlined"
698
- label="Outlined text input without roundness"
699
- theme={{ roundness: 0 }}
700
- />
701
- </View>
702
- <View style={styles.inputContainerStyle}>
703
- <TextInput
704
- mode="outlined"
705
- label="Outlined text input with error"
706
- error
707
- />
708
- </View>
709
- <View style={styles.inputContainerStyle}>
710
- <TextInput mode="outlined" placeholder="Outlined without label" />
711
- </View>
712
- <View style={styles.inputContainerStyle}>
713
- <TextInput
714
- mode="outlined"
715
- label="Outlined input with custom cursor and selection colors"
716
- selectionColor={'rgba(0,255,1,0.5)'}
717
- cursorColor={'rgba(255,1,1,1)'}
718
- placeholderTextColor={'rgba(255,0,125,1)'}
719
- placeholder="Custom colors"
720
- />
721
- </View>
722
- <View style={styles.inputContainerStyle}>
723
- <TextInput
724
- label="Flat input with custom cursor and selection colors"
725
- selectionColor={'rgba(0,255,1,0.5)'}
726
- cursorColor={'rgba(255,1,1,1)'}
727
- placeholderTextColor={'rgba(255,0,125,1)'}
728
- placeholder="Custom colors"
729
- />
730
- </View>
731
- {fontsLoaded && theme.isV3 ? (
732
- <View style={styles.inputContainerStyle}>
733
- <TextInput
734
- mode="outlined"
735
- label="Text input with custom font"
736
- placeholder="Custom font"
737
- style={styles.fontSize}
738
- theme={{
739
- fonts: configureFonts({
740
- config: {
741
- fontFamily: 'Abel',
742
- },
743
- }),
744
- }}
745
- />
746
- </View>
747
- ) : null}
748
- <View style={styles.row}>
749
- <TextInput
750
- mode="outlined"
751
- label="CVV"
752
- placeholder="CVV"
753
- keyboardType="phone-pad"
754
- maxLength={3}
755
- />
756
- </View>
757
- <View style={styles.row}>
758
- <TextInput
759
- mode="flat"
760
- label="CVV"
761
- placeholder="CVV"
762
- keyboardType="phone-pad"
763
- maxLength={3}
764
- />
765
- </View>
766
- <View style={styles.row}>
767
- <TextInput
768
- mode="outlined"
769
- label="Code"
770
- placeholder="Code"
771
- keyboardType="phone-pad"
772
- maxLength={4}
773
- />
774
- </View>
775
- <View style={styles.row}>
776
- <TextInput
777
- mode="flat"
778
- label="Code"
779
- placeholder="Code"
780
- keyboardType="phone-pad"
781
- maxLength={4}
782
- />
783
- </View>
784
- <View style={styles.row}>
785
- <TextInput
786
- mode="flat"
787
- label="Month"
788
- placeholder="Month"
789
- style={styles.month}
790
- />
791
- <TextInput
792
- mode="flat"
793
- label="Year"
794
- placeholder="Year"
795
- keyboardType="phone-pad"
796
- style={styles.year}
797
- />
798
- </View>
799
- <View style={styles.row}>
800
- <View style={styles.left}>
801
- <TextInput
802
- mode="flat"
803
- label="Month of the car registration (optional)"
804
- placeholder="Month"
805
- style={styles.month}
806
- />
807
- </View>
808
- <View style={styles.right}>
809
- <TextInput
810
- mode="flat"
811
- label="Year of the car registration (optional)"
812
- placeholder="Year"
813
- keyboardType="phone-pad"
814
- style={styles.year}
815
- left={<TextInput.Icon icon="calendar" />}
816
- />
817
- </View>
818
- </View>
819
- <View style={styles.row}>
820
- <View style={styles.left}>
821
- <TextInput
822
- mode="outlined"
823
- label="Month of the car registration (optional)"
824
- placeholder="Month"
825
- style={styles.month}
826
- />
827
- </View>
828
- <View style={styles.right}>
829
- <TextInput
830
- mode="outlined"
831
- label="Year of the car registration (optional)"
832
- placeholder="Year"
833
- keyboardType="phone-pad"
834
- style={styles.year}
835
- right={<TextInput.Icon icon="calendar" />}
836
- />
837
- </View>
838
- </View>
839
- </List.Accordion>
840
- </List.AccordionGroup>
841
- </ScreenWrapper>
842
- </TextInputAvoidingView>
843
- );
844
- };
845
-
846
- TextInputExample.title = 'TextInput';
847
-
848
- const styles = StyleSheet.create({
849
- helpersWrapper: {
850
- flexDirection: 'row',
851
- justifyContent: 'space-between',
852
- },
853
- wrapper: {
854
- flex: 1,
855
- },
856
- helper: {
857
- flexShrink: 1,
858
- },
859
- counterHelper: {
860
- textAlign: 'right',
861
- },
862
- inputContainerStyle: {
863
- margin: 8,
864
- },
865
- inputContentStyle: {
866
- paddingLeft: 50,
867
- fontWeight: 'bold',
868
- fontStyle: 'italic',
869
- },
870
- fontSize: {
871
- fontSize: 32,
872
- },
873
- textArea: {
874
- height: 80,
875
- },
876
- // eslint-disable-next-line react-native/no-color-literals
877
- noPaddingInput: {
878
- backgroundColor: 'transparent',
879
- paddingHorizontal: 0,
880
- },
881
- centeredText: {
882
- textAlign: 'center',
883
- },
884
- fixedHeight: {
885
- height: 100,
886
- },
887
- row: {
888
- margin: 8,
889
- justifyContent: 'space-between',
890
- flexDirection: 'row',
891
- },
892
- month: {
893
- flex: 1,
894
- marginRight: 4,
895
- },
896
- year: {
897
- flex: 1,
898
- marginLeft: 4,
899
- },
900
- inputLabelText: {
901
- color: MD3Colors.tertiary70,
902
- },
903
- left: {
904
- width: '30%',
905
- },
906
- right: {
907
- width: '70%',
908
- },
909
- autoText: {
910
- textAlign: 'auto',
911
- },
912
- });
913
-
914
- export default TextInputExample;