@codeleap/mobile 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +3 -0
  3. package/.vscode/settings.json +11 -0
  4. package/CodeLeap-Mobile-Packages.code-workspace +8 -0
  5. package/dist/components/ActivityIndicator.js +9 -6
  6. package/dist/components/ActivityIndicator.js.map +1 -1
  7. package/dist/components/Animated.d.ts +1 -89
  8. package/dist/components/Animated.js +2 -2
  9. package/dist/components/Animated.js.map +1 -1
  10. package/dist/components/Button.d.ts +107 -98
  11. package/dist/components/Button.js +29 -9
  12. package/dist/components/Button.js.map +1 -1
  13. package/dist/components/Checkbox/index.d.ts +1 -1
  14. package/dist/components/Checkbox/index.js +7 -8
  15. package/dist/components/Checkbox/index.js.map +1 -1
  16. package/dist/components/Checkbox/styles.d.ts +47 -43
  17. package/dist/components/Checkbox/styles.js +8 -8
  18. package/dist/components/Checkbox/styles.js.map +1 -1
  19. package/dist/components/ContentView.js +4 -2
  20. package/dist/components/ContentView.js.map +1 -1
  21. package/dist/components/FileInput.d.ts +10 -3
  22. package/dist/components/FileInput.js +94 -32
  23. package/dist/components/FileInput.js.map +1 -1
  24. package/dist/components/Icon.d.ts +4 -6
  25. package/dist/components/Icon.js +25 -11
  26. package/dist/components/Icon.js.map +1 -1
  27. package/dist/components/Image.d.ts +7 -6
  28. package/dist/components/Image.js +4 -4
  29. package/dist/components/Image.js.map +1 -1
  30. package/dist/components/List.d.ts +11 -0
  31. package/dist/components/List.js +77 -0
  32. package/dist/components/List.js.map +1 -0
  33. package/dist/components/Modal/index.d.ts +2 -1
  34. package/dist/components/Modal/index.js +23 -30
  35. package/dist/components/Modal/index.js.map +1 -1
  36. package/dist/components/Modal/styles.d.ts +51 -47
  37. package/dist/components/Modal/styles.js +13 -18
  38. package/dist/components/Modal/styles.js.map +1 -1
  39. package/dist/components/Navigation/Navigation.d.ts +3 -0
  40. package/dist/components/Navigation/Navigation.js +76 -0
  41. package/dist/components/Navigation/Navigation.js.map +1 -0
  42. package/dist/components/Navigation/constants.d.ts +5 -0
  43. package/dist/components/Navigation/constants.js +11 -0
  44. package/dist/components/Navigation/constants.js.map +1 -0
  45. package/dist/components/Navigation/index.d.ts +3 -0
  46. package/dist/components/Navigation/index.js +16 -0
  47. package/dist/components/Navigation/index.js.map +1 -0
  48. package/dist/components/Navigation/types.d.ts +26 -0
  49. package/dist/components/Navigation/types.js +8 -0
  50. package/dist/components/Navigation/types.js.map +1 -0
  51. package/dist/components/Navigation/utils.d.ts +3 -0
  52. package/dist/components/Navigation/utils.js +67 -0
  53. package/dist/components/Navigation/utils.js.map +1 -0
  54. package/dist/components/Overlay.d.ts +5 -5
  55. package/dist/components/Overlay.js +13 -15
  56. package/dist/components/Overlay.js.map +1 -1
  57. package/dist/components/Pager/index.d.ts +19 -0
  58. package/dist/components/Pager/index.js +164 -0
  59. package/dist/components/Pager/index.js.map +1 -0
  60. package/dist/components/Pager/styles.d.ts +51 -0
  61. package/dist/components/Pager/styles.js +44 -0
  62. package/dist/components/Pager/styles.js.map +1 -0
  63. package/dist/components/RadioInput/index.d.ts +1 -0
  64. package/dist/components/RadioInput/index.js +13 -19
  65. package/dist/components/RadioInput/index.js.map +1 -1
  66. package/dist/components/RadioInput/styles.d.ts +48 -44
  67. package/dist/components/RadioInput/styles.js +4 -4
  68. package/dist/components/RadioInput/styles.js.map +1 -1
  69. package/dist/components/Scroll.d.ts +3 -2
  70. package/dist/components/Scroll.js +11 -8
  71. package/dist/components/Scroll.js.map +1 -1
  72. package/dist/components/Sections.d.ts +11 -0
  73. package/dist/components/Sections.js +77 -0
  74. package/dist/components/Sections.js.map +1 -0
  75. package/dist/components/Select/index.d.ts +5 -2
  76. package/dist/components/Select/index.js +118 -5
  77. package/dist/components/Select/index.js.map +1 -1
  78. package/dist/components/Select/styles.d.ts +9 -0
  79. package/dist/components/Select/styles.js +57 -0
  80. package/dist/components/Select/styles.js.map +1 -0
  81. package/dist/components/Select/types.d.ts +33 -0
  82. package/dist/components/Select/types.js +3 -0
  83. package/dist/components/Select/types.js.map +1 -0
  84. package/dist/components/Slider/Mark.d.ts +3 -0
  85. package/dist/components/Slider/Mark.js +32 -0
  86. package/dist/components/Slider/Mark.js.map +1 -0
  87. package/dist/components/Slider/Thumb.d.ts +7 -0
  88. package/dist/components/Slider/Thumb.js +30 -0
  89. package/dist/components/Slider/Thumb.js.map +1 -0
  90. package/dist/components/Slider/index.d.ts +3 -0
  91. package/dist/components/Slider/index.js +94 -0
  92. package/dist/components/Slider/index.js.map +1 -0
  93. package/dist/components/{Slider.d.ts → Slider/types.d.ts} +12 -7
  94. package/dist/components/Slider/types.js +3 -0
  95. package/dist/components/Slider/types.js.map +1 -0
  96. package/dist/components/Switch.d.ts +2 -2
  97. package/dist/components/Switch.js +6 -7
  98. package/dist/components/Switch.js.map +1 -1
  99. package/dist/components/Text.js +5 -5
  100. package/dist/components/Text.js.map +1 -1
  101. package/dist/components/TextInput.d.ts +108 -94
  102. package/dist/components/TextInput.js +28 -25
  103. package/dist/components/TextInput.js.map +1 -1
  104. package/dist/components/Touchable.d.ts +1 -0
  105. package/dist/components/Touchable.js +9 -11
  106. package/dist/components/Touchable.js.map +1 -1
  107. package/dist/components/View.d.ts +97 -175
  108. package/dist/components/View.js +4 -4
  109. package/dist/components/View.js.map +1 -1
  110. package/dist/components/{index.d.ts → components.d.ts} +3 -0
  111. package/dist/components/{index.js → components.js} +4 -1
  112. package/dist/components/components.js.map +1 -0
  113. package/dist/index.d.ts +3 -1
  114. package/dist/index.js +5 -2
  115. package/dist/index.js.map +1 -1
  116. package/dist/modules/documentPicker.d.ts +3 -1
  117. package/dist/modules/documentPicker.js +6 -4
  118. package/dist/modules/documentPicker.js.map +1 -1
  119. package/dist/modules/fastImage.js +1 -1
  120. package/dist/modules/fastImage.js.map +1 -1
  121. package/dist/modules/reactNavigation.d.ts +3 -0
  122. package/dist/modules/reactNavigation.js +11 -0
  123. package/dist/modules/reactNavigation.js.map +1 -0
  124. package/dist/modules/types/fileTypes.d.ts +138 -0
  125. package/dist/modules/types/fileTypes.js +3 -0
  126. package/dist/modules/types/fileTypes.js.map +1 -0
  127. package/dist/types/utility.d.ts +1 -1
  128. package/dist/utils/OSAlert.d.ts +3 -3
  129. package/dist/utils/OSAlert.js.map +1 -1
  130. package/dist/utils/misc.d.ts +2 -0
  131. package/dist/utils/misc.js +26 -0
  132. package/dist/utils/misc.js.map +1 -0
  133. package/dist/utils/styles.js +1 -1
  134. package/dist/utils/styles.js.map +1 -1
  135. package/package.json +6 -3
  136. package/src/components/ActivityIndicator.tsx +38 -28
  137. package/src/components/Animated.tsx +22 -19
  138. package/src/components/Button.tsx +67 -34
  139. package/src/components/Checkbox/index.tsx +60 -48
  140. package/src/components/Checkbox/styles.ts +39 -30
  141. package/src/components/ContentView.tsx +24 -18
  142. package/src/components/FileInput.tsx +161 -52
  143. package/src/components/Icon.tsx +36 -23
  144. package/src/components/Image.tsx +42 -36
  145. package/src/components/List.tsx +100 -0
  146. package/src/components/Modal/index.tsx +109 -94
  147. package/src/components/Modal/styles.ts +62 -66
  148. package/src/components/Navigation/Navigation.tsx +51 -0
  149. package/src/components/Navigation/constants.ts +8 -0
  150. package/src/components/Navigation/index.tsx +3 -0
  151. package/src/components/Navigation/types.ts +37 -0
  152. package/src/components/Navigation/utils.tsx +54 -0
  153. package/src/components/Overlay.tsx +68 -64
  154. package/src/components/Pager/index.tsx +241 -0
  155. package/src/components/Pager/styles.ts +51 -0
  156. package/src/components/RadioInput/index.tsx +76 -52
  157. package/src/components/RadioInput/styles.ts +23 -18
  158. package/src/components/Scroll.tsx +84 -73
  159. package/src/components/Select/index.tsx +179 -6
  160. package/src/components/Select/styles.ts +81 -0
  161. package/src/components/Select/types.ts +41 -0
  162. package/src/components/Slider/Mark.tsx +46 -0
  163. package/src/components/Slider/Thumb.tsx +29 -0
  164. package/src/components/Slider/index.tsx +123 -0
  165. package/src/components/Slider/types.ts +25 -0
  166. package/src/components/Switch.tsx +63 -54
  167. package/src/components/Text.tsx +22 -23
  168. package/src/components/TextInput.tsx +195 -198
  169. package/src/components/Touchable.tsx +43 -30
  170. package/src/components/View.tsx +32 -29
  171. package/src/components/components.ts +26 -0
  172. package/src/index.ts +6 -3
  173. package/src/modules/documentPicker.ts +8 -2
  174. package/src/modules/fastImage.ts +2 -2
  175. package/src/modules/index.d.ts +496 -0
  176. package/src/modules/reactNavigation.ts +4 -0
  177. package/src/modules/types/documentPicker.d.ts +215 -0
  178. package/src/modules/types/fileTypes.ts +138 -0
  179. package/src/types/utility.ts +2 -2
  180. package/src/utils/OSAlert.ts +35 -33
  181. package/src/utils/misc.ts +24 -0
  182. package/src/utils/styles.ts +14 -17
  183. package/dist/components/Drawer.d.ts +0 -23
  184. package/dist/components/Drawer.js +0 -78
  185. package/dist/components/Drawer.js.map +0 -1
  186. package/dist/components/Navigation.d.ts +0 -30
  187. package/dist/components/Navigation.js +0 -126
  188. package/dist/components/Navigation.js.map +0 -1
  189. package/dist/components/Slider.js +0 -130
  190. package/dist/components/Slider.js.map +0 -1
  191. package/dist/components/index.js.map +0 -1
  192. package/dist/modules/cropPicker.d.ts +0 -1
  193. package/dist/modules/cropPicker.js +0 -10
  194. package/dist/modules/cropPicker.js.map +0 -1
  195. package/src/components/Navigation.tsx +0 -125
  196. package/src/components/Slider.tsx +0 -198
  197. package/src/components/index.ts +0 -23
@@ -1,8 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentVariants, FormTypes, IconPlaceholder, TextInputComposition, TextInputStyles } from '@codeleap/common';
3
3
  import { ComponentPropsWithoutRef } from 'react';
4
+ import { ViewProps } from './View';
4
5
  import { StylesOf } from '../types/utility';
5
6
  import { TextInput as NativeTextInput } from 'react-native';
7
+ import { TouchableProps } from './Touchable';
6
8
  declare type IconProp = {
7
9
  name: IconPlaceholder;
8
10
  action?: () => void;
@@ -18,105 +20,115 @@ export declare type TextInputProps = ComponentVariants<typeof TextInputStyles> &
18
20
  leftIcon?: IconProp;
19
21
  rightIcon?: IconProp;
20
22
  styles?: StylesOf<TextInputComposition>;
21
- validate?: FormTypes.ValidatorFunction | string;
23
+ validate?: FormTypes.ValidatorFunctionWithoutForm | string;
22
24
  value?: string;
23
25
  password?: boolean;
24
26
  visibilityToggle?: boolean;
27
+ touchableWrapper?: boolean;
28
+ innerWrapperProps?: TouchableProps | ViewProps;
25
29
  };
26
30
  export declare const TextInput: React.ForwardRefExoticComponent<ComponentVariants<{
27
- default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
28
- line: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
29
- box: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
30
- pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
31
- fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
32
- block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
33
- flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
34
- absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
35
- sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
36
- row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
37
- center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
38
- column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
39
- wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
40
- inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
41
- inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
42
- hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
43
- full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
44
- noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
45
- fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
46
- fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
47
- fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
48
- fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
49
- fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
50
- whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
51
- centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
52
- listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
53
- alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
54
- alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
55
- alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
56
- justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
57
- justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
58
- justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
59
- justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
60
- textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
61
- textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
62
- textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
63
- blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
64
- elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
65
- neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
66
- scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
67
- scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
68
- scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
69
- debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
70
- debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
71
- debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
72
- debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
31
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
32
+ line: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
33
+ box: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
34
+ pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
35
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
36
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
37
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
38
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
39
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
40
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
41
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
42
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
43
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
44
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
45
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
46
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
47
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
48
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
49
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
50
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
51
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
52
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
53
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
54
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
55
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
56
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
57
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
58
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
59
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
60
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
61
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
62
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
63
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
64
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
65
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
66
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
67
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
68
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
69
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
70
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
71
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
72
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
73
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
74
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
75
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
76
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
77
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
78
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
79
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
80
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
73
81
  }, import("@codeleap/common").EnhancedTheme<any>, import("@codeleap/common").VariantProp<{
74
- default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
75
- line: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
76
- box: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
77
- pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
78
- fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
79
- block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
80
- flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
81
- absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
82
- sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
83
- row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
84
- center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
85
- column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
86
- wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
87
- inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
88
- inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
89
- hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
90
- full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
91
- noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
92
- fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
93
- fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
94
- fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
95
- fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
96
- fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
97
- whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
98
- centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
99
- listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
100
- alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
101
- alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
102
- alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
103
- justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
104
- justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
105
- justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
106
- justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
107
- textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
108
- textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
109
- textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
110
- blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
111
- elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
112
- neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
113
- scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
114
- scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
115
- scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
116
- debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
117
- debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
118
- debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
119
- debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
82
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
83
+ line: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
84
+ box: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
85
+ pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
86
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
87
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
88
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
89
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
90
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
91
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
92
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
93
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
94
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
95
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
96
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
97
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
98
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
99
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
100
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
101
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
102
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
103
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
104
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
105
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
106
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
107
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
108
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
109
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
110
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
111
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
112
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
113
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
114
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
115
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
116
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
117
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
118
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
119
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
120
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
121
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
122
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
123
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
124
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
125
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
126
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
127
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
128
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
129
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
130
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
131
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
120
132
  }>> & Omit<import("react-native").TextInputProps, "value"> & {
121
133
  multiline?: boolean;
122
134
  onChangeText?: (text: string) => void;
@@ -127,10 +139,12 @@ export declare const TextInput: React.ForwardRefExoticComponent<ComponentVariant
127
139
  leftIcon?: IconProp;
128
140
  rightIcon?: IconProp;
129
141
  styles?: StylesOf<TextInputComposition>;
130
- validate?: FormTypes.ValidatorFunction | string;
142
+ validate?: FormTypes.ValidatorFunctionWithoutForm | string;
131
143
  value?: string;
132
144
  password?: boolean;
133
145
  visibilityToggle?: boolean;
146
+ touchableWrapper?: boolean;
147
+ innerWrapperProps?: TouchableProps | ViewProps;
134
148
  } & React.RefAttributes<NativeTextInput>>;
135
149
  export declare const FormError: ({ message, ...props }: {
136
150
  [x: string]: any;
@@ -50,15 +50,16 @@ var View_1 = require("./View");
50
50
  var Button_1 = require("./Button");
51
51
  var Icon_1 = require("./Icon");
52
52
  var react_native_1 = require("react-native");
53
+ var Touchable_1 = require("./Touchable");
53
54
  exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
54
- var onChange = rawprops.onChange, type = rawprops.type, value = rawprops.value, onChangeText = rawprops.onChangeText, disabled = rawprops.disabled, edited = rawprops.edited, onFocus = rawprops.onFocus, onBlur = rawprops.onBlur, multiline = rawprops.multiline, responsiveVariants = rawprops.responsiveVariants, variants = rawprops.variants, label = rawprops.label, leftIcon = rawprops.leftIcon, rightIcon = rawprops.rightIcon, styles = rawprops.styles, validate = rawprops.validate, password = rawprops.password, visibilityToggle = rawprops.visibilityToggle, props = __rest(rawprops, ["onChange", "type", "value", "onChangeText", "disabled", "edited", "onFocus", "onBlur", "multiline", "responsiveVariants", "variants", "label", "leftIcon", "rightIcon", "styles", "validate", "password", "visibilityToggle"]);
55
- var _a = (0, react_1.useState)(false), _ig = _a[0], setFocus = _a[1];
56
- var _b = (0, react_1.useState)(edited), editedState = _b[0], setEdited = _b[1];
55
+ var _a;
56
+ var onChange = rawprops.onChange, type = rawprops.type, value = rawprops.value, onChangeText = rawprops.onChangeText, disabled = rawprops.disabled, edited = rawprops.edited, onFocus = rawprops.onFocus, onBlur = rawprops.onBlur, multiline = rawprops.multiline, variants = rawprops.variants, label = rawprops.label, leftIcon = rawprops.leftIcon, rightIcon = rawprops.rightIcon, styles = rawprops.styles, validate = rawprops.validate, password = rawprops.password, visibilityToggle = rawprops.visibilityToggle, touchableWrapper = rawprops.touchableWrapper, innerWrapperProps = rawprops.innerWrapperProps, props = __rest(rawprops, ["onChange", "type", "value", "onChangeText", "disabled", "edited", "onFocus", "onBlur", "multiline", "variants", "label", "leftIcon", "rightIcon", "styles", "validate", "password", "visibilityToggle", "touchableWrapper", "innerWrapperProps"]);
57
+ var _b = (0, react_1.useState)(false), isFocused = _b[0], setFocus = _b[1];
58
+ var _c = (0, react_1.useState)(edited), editedState = _c[0], setEdited = _c[1];
57
59
  var input = (0, react_1.useRef)(null);
58
- var _c = (0, common_1.useBooleanToggle)(false), textIsVisible = _c[0], setTextVisible = _c[1];
59
- var variantStyles = (0, common_1.useComponentStyle)('TextInput', {
60
+ var _d = (0, common_1.useBooleanToggle)(false), textIsVisible = _d[0], setTextVisible = _d[1];
61
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('TextInput', {
60
62
  variants: variants,
61
- responsiveVariants: responsiveVariants,
62
63
  styles: styles,
63
64
  });
64
65
  var InputElement = react_native_1.TextInput;
@@ -83,32 +84,34 @@ exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
83
84
  if (onChangeText)
84
85
  onChangeText(text);
85
86
  };
86
- (0, react_1.useImperativeHandle)(inputRef, function () { return input.current; });
87
- var _d = (0, common_1.useValidate)(value, validate), showError = _d.showError, error = _d.error;
88
- var leftIconStyle = __assign(__assign(__assign(__assign({}, variantStyles.icon), (showError ? variantStyles['icon:error'] : {})), variantStyles.leftIcon), (showError ? variantStyles['leftIcon:error'] : {}));
89
- var rightIconStyle = __assign(__assign(__assign(__assign({}, variantStyles.icon), (showError ? variantStyles['icon:error'] : {})), variantStyles.rightIcon), (showError ? variantStyles['rightIcon:error'] : {}));
87
+ (0, react_1.useImperativeHandle)(inputRef, function () { return (__assign(__assign({}, input.current), { focus: function () {
88
+ var _a, _b;
89
+ (_b = (_a = input.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
90
+ }, isTextInput: true })); });
91
+ var _e = (0, common_1.useValidate)(value, validate), showError = _e.showError, error = _e.error;
92
+ var leftIconStyle = __assign(__assign(__assign(__assign(__assign(__assign({}, variantStyles.icon), (isFocused ? variantStyles['icon:focus'] : {})), (showError ? variantStyles['icon:error'] : {})), variantStyles.leftIcon), (isFocused ? variantStyles['leftIcon:focus'] : {})), (showError ? variantStyles['leftIcon:error'] : {}));
93
+ var rightIconStyle = __assign(__assign(__assign(__assign(__assign(__assign({}, variantStyles.icon), (isFocused ? variantStyles['icon:focus'] : {})), (showError ? variantStyles['icon:error'] : {})), variantStyles.rightIcon), (isFocused ? variantStyles['rightIcon:focus'] : {})), (showError ? variantStyles['rightIcon:error'] : {}));
90
94
  function getStyles(key) {
91
- var requestedStyles = [variantStyles[key], showError ? variantStyles[key + ':error'] : {}];
95
+ var requestedStyles = [
96
+ variantStyles[key],
97
+ isFocused ? variantStyles[key + ':focus'] : {},
98
+ showError ? variantStyles[key + ':error'] : {},
99
+ ];
92
100
  return requestedStyles;
93
101
  }
102
+ var InnerWrapper = touchableWrapper ? Touchable_1.Touchable : View_1.View;
94
103
  return (<View_1.View style={getStyles('wrapper')}>
95
- <exports.InputLabel label={label} style={getStyles('label')}/>
96
-
97
- <View_1.View style={getStyles('innerWrapper')}>
98
-
99
-
100
- <exports.InputIcon {...leftIcon} style={leftIconStyle}/>
101
- <InputElement ref={input} secureTextEntry={password && !textIsVisible} onChange={handleChange} value={value} editable={disabled} onFocus={handleFocus} onBlur={handleBlur} {...props} style={getStyles('textField')}/>
102
- {visibilityToggle ?
104
+ <exports.InputLabel label={label} style={getStyles('label')}/>
105
+ <InnerWrapper style={getStyles('innerWrapper')} {...innerWrapperProps}>
106
+ <exports.InputIcon {...leftIcon} style={leftIconStyle}/>
107
+ <InputElement ref={input} secureTextEntry={password && !textIsVisible} onChange={handleChange} value={value} editable={disabled} onFocus={handleFocus} onBlur={handleBlur} placeholderTextColor={(_a = react_native_1.StyleSheet.flatten(getStyles('placeholder'))) === null || _a === void 0 ? void 0 : _a.color} {...props} style={getStyles('textField')}/>
108
+ {visibilityToggle ?
103
109
  <exports.InputIcon name={(textIsVisible ? 'input-visiblity:visible' : 'input-visiblity:hidden')} action={function () { return setTextVisible(); }} style={rightIconStyle}/>
104
110
  :
105
111
  <exports.InputIcon {...rightIcon} style={rightIconStyle}/>}
106
- </View_1.View>
107
-
108
- <exports.FormError message={error.message} style={__assign({}, variantStyles.error)}/>
109
-
110
-
111
- </View_1.View>);
112
+ </InnerWrapper>
113
+ <exports.FormError message={error.message} style={__assign({}, variantStyles.error)}/>
114
+ </View_1.View>);
112
115
  });
113
116
  var FormError = function (_a) {
114
117
  var message = _a.message, props = __rest(_a, ["message"]);
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAS0B;AACxB,+BAAoG;AACpG,+BAA8B;AAC9B,+BAA+B;AAC/B,mCAAkC;AAElC,+BAA8B;AAC9B,6CAAyG;AA0B5F,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAkC,UAAC,QAAQ,EAAE,QAAQ;IAEpF,IAAA,QAAQ,GAoBN,QAAQ,SApBF,EACR,IAAI,GAmBF,QAAQ,KAnBN,EACJ,KAAK,GAkBH,QAAQ,MAlBL,EACL,YAAY,GAiBV,QAAQ,aAjBE,EACZ,QAAQ,GAgBN,QAAQ,SAhBF,EACR,MAAM,GAeJ,QAAQ,OAfJ,EACN,OAAO,GAcL,QAAQ,QAdH,EACP,MAAM,GAaJ,QAAQ,OAbJ,EACN,SAAS,GAYP,QAAQ,UAZD,EACT,kBAAkB,GAWhB,QAAQ,mBAXQ,EAClB,QAAQ,GAUN,QAAQ,SAVF,EACR,KAAK,GASH,QAAQ,MATL,EACL,QAAQ,GAQN,QAAQ,SARF,EACR,SAAS,GAOP,QAAQ,UAPD,EACT,MAAM,GAMJ,QAAQ,OANJ,EACN,QAAQ,GAKN,QAAQ,SALF,EACR,QAAQ,GAIN,QAAQ,SAJF,EACR,gBAAgB,GAGd,QAAQ,iBAHM,EAEb,KAAK,UACN,QAAQ,EArBN,+NAqBL,CADS,CACE;IAEN,IAAA,KAAkB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAhC,GAAG,QAAA,EAAE,QAAQ,QAAmB,CAAA;IACjC,IAAA,KAA2B,IAAA,gBAAQ,EAAC,MAAM,CAAC,EAA1C,WAAW,QAAA,EAAE,SAAS,QAAo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AAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAG,CAAA;QAC5C,KAAK,QAAQ;YACX,OAAO,KAAK,CAAA;QACd;YACE,OAAO,IAAI,CAAA;KACd;AACH,CAAC,CAAA;AAXY,QAAA,UAAU,cAWtB"}
@@ -7,6 +7,7 @@ export declare type TouchableProps = Omit<ComponentPropsWithoutRef<typeof Native
7
7
  component?: any;
8
8
  ref?: React.Ref<NativeTouchable>;
9
9
  debugName?: string;
10
+ debugComponent?: string;
10
11
  onPress?: AnyFunction;
11
12
  } & BaseViewProps;
12
13
  export declare const Touchable: React.FC<TouchableProps>;
@@ -37,24 +37,22 @@ var common_1 = require("@codeleap/common");
37
37
  var react_native_1 = require("react-native");
38
38
  var react_native_animatable_1 = require("react-native-animatable");
39
39
  exports.Touchable = (0, react_1.forwardRef)(function (touchableProps, ref) {
40
- var _a = touchableProps.variants, variants = _a === void 0 ? [] : _a, children = touchableProps.children, onPress = touchableProps.onPress, style = touchableProps.style, debugName = touchableProps.debugName, props = __rest(touchableProps, ["variants", "children", "onPress", "style", "debugName"]);
41
- var variantStyles = (0, common_1.useComponentStyle)('View', {
40
+ var _a = touchableProps.variants, variants = _a === void 0 ? [] : _a, children = touchableProps.children, onPress = touchableProps.onPress, style = touchableProps.style, debugName = touchableProps.debugName, debugComponent = touchableProps.debugComponent, props = __rest(touchableProps, ["variants", "children", "onPress", "style", "debugName", "debugComponent"]);
41
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('View', {
42
42
  variants: variants,
43
43
  });
44
- var logger = (0, common_1.useStyle)().logger;
44
+ var logger = (0, common_1.useCodeleapContext)().logger;
45
45
  var press = function () {
46
- if (!onPress)
46
+ if (!onPress) {
47
47
  throw { message: 'No onPress passed to touchable', touchableProps: touchableProps };
48
- logger.log("".concat(debugName || '<Touchable/>', " pressed"), { style: style, variants: variants }, 'Component');
48
+ }
49
+ logger.log("<".concat(debugComponent || 'Touchable', "/> pressed"), { debugName: debugName, style: style, variants: variants }, 'User interaction');
49
50
  onPress && onPress();
50
51
  };
51
52
  var styles = [variantStyles.wrapper, style];
52
- return <react_native_1.TouchableOpacity onPress={press} style={styles} {...props} ref={ref}>
53
-
54
-
55
- {children}
56
-
57
- </react_native_1.TouchableOpacity>;
53
+ return (<react_native_1.TouchableOpacity onPress={press} style={styles} {...props} ref={ref}>
54
+ {children}
55
+ </react_native_1.TouchableOpacity>);
58
56
  });
59
57
  exports.AnimatedTouchable = (0, react_native_animatable_1.createAnimatableComponent)(exports.Touchable);
60
58
  //# sourceMappingURL=Touchable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Touchable.js","sourceRoot":"","sources":["../../src/components/Touchable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,2CAAyH;AAEzH,6CAAkE;AAElE,mEAAmE;AAWtD,QAAA,SAAS,GAA4B,IAAA,kBAAU,EAAkC,UAAC,cAAc,EAAE,GAAG;IAE9G,IAAA,KAOE,cAAc,SAPH,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,QAAQ,GAMN,cAAc,SANR,EACR,OAAO,GAKL,cAAc,QALT,EACP,KAAK,GAIH,cAAc,MAJX,EACL,SAAS,GAGP,cAAc,UAHP,EAEN,KAAK,UACN,cAAc,EARZ,yDAQL,CADS,CACQ;IAElB,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,MAAM,EAAE;QAC9C,QAAQ,UAAA;KACT,CAAC,CAAA;IAEK,IAAA,MAAM,GAAI,IAAA,iBAAQ,GAAE,OAAd,CAAc;IAC3B,IAAM,KAAK,GAAG;QACZ,IAAG,CAAC,OAAO;YAAE,MAAM,EAAC,OAAO,EAAE,gCAAgC,EAAE,cAAc,gBAAA,EAAC,CAAA;QAC9E,MAAM,CAAC,GAAG,CAAC,UAAG,SAAS,IAAI,cAAc,cAAW,EAAE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,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