@codeleap/mobile 1.3.0 → 1.4.1

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 (206) 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.d.ts +13 -13
  6. package/dist/components/ActivityIndicator.js +50 -48
  7. package/dist/components/ActivityIndicator.js.map +1 -1
  8. package/dist/components/Animated.d.ts +15 -103
  9. package/dist/components/Animated.js +54 -54
  10. package/dist/components/Animated.js.map +1 -1
  11. package/dist/components/Button.d.ts +119 -110
  12. package/dist/components/Button.js +77 -57
  13. package/dist/components/Button.js.map +1 -1
  14. package/dist/components/Checkbox/index.d.ts +14 -14
  15. package/dist/components/Checkbox/index.js +73 -74
  16. package/dist/components/Checkbox/index.js.map +1 -1
  17. package/dist/components/Checkbox/styles.d.ts +52 -48
  18. package/dist/components/Checkbox/styles.js +48 -48
  19. package/dist/components/Checkbox/styles.js.map +1 -1
  20. package/dist/components/ContentView.d.ts +10 -10
  21. package/dist/components/ContentView.js +50 -48
  22. package/dist/components/ContentView.js.map +1 -1
  23. package/dist/components/FileInput.d.ts +26 -19
  24. package/dist/components/FileInput.js +174 -112
  25. package/dist/components/FileInput.js.map +1 -1
  26. package/dist/components/Icon.d.ts +12 -13
  27. package/dist/components/Icon.js +66 -46
  28. package/dist/components/Icon.js.map +1 -1
  29. package/dist/components/Image.d.ts +18 -16
  30. package/dist/components/Image.js +53 -47
  31. package/dist/components/Image.js.map +1 -1
  32. package/dist/components/List.d.ts +11 -0
  33. package/dist/components/List.js +77 -0
  34. package/dist/components/List.js.map +1 -0
  35. package/dist/components/Modal/index.d.ts +25 -24
  36. package/dist/components/Modal/index.js +108 -115
  37. package/dist/components/Modal/index.js.map +1 -1
  38. package/dist/components/Modal/styles.d.ts +66 -62
  39. package/dist/components/Modal/styles.js +64 -61
  40. package/dist/components/Modal/styles.js.map +1 -1
  41. package/dist/components/Navigation/Navigation.d.ts +3 -0
  42. package/dist/components/Navigation/Navigation.js +84 -0
  43. package/dist/components/Navigation/Navigation.js.map +1 -0
  44. package/dist/components/Navigation/constants.d.ts +5 -0
  45. package/dist/components/Navigation/constants.js +11 -0
  46. package/dist/components/Navigation/constants.js.map +1 -0
  47. package/dist/components/Navigation/index.d.ts +3 -0
  48. package/dist/components/Navigation/index.js +16 -0
  49. package/dist/components/Navigation/index.js.map +1 -0
  50. package/dist/components/Navigation/types.d.ts +26 -0
  51. package/dist/components/Navigation/types.js +8 -0
  52. package/dist/components/Navigation/types.js.map +1 -0
  53. package/dist/components/Navigation/utils.d.ts +3 -0
  54. package/dist/components/Navigation/utils.js +70 -0
  55. package/dist/components/Navigation/utils.js.map +1 -0
  56. package/dist/components/Overlay.d.ts +16 -16
  57. package/dist/components/Overlay.js +65 -67
  58. package/dist/components/Overlay.js.map +1 -1
  59. package/dist/components/Pager/index.d.ts +19 -0
  60. package/dist/components/Pager/index.js +164 -0
  61. package/dist/components/Pager/index.js.map +1 -0
  62. package/dist/components/Pager/styles.d.ts +51 -0
  63. package/dist/components/Pager/styles.js +44 -0
  64. package/dist/components/Pager/styles.js.map +1 -0
  65. package/dist/components/RadioInput/index.d.ts +26 -25
  66. package/dist/components/RadioInput/index.js +68 -74
  67. package/dist/components/RadioInput/index.js.map +1 -1
  68. package/dist/components/RadioInput/styles.d.ts +54 -50
  69. package/dist/components/RadioInput/styles.js +44 -44
  70. package/dist/components/RadioInput/styles.js.map +1 -1
  71. package/dist/components/Scroll.d.ts +11 -10
  72. package/dist/components/Scroll.js +75 -72
  73. package/dist/components/Scroll.js.map +1 -1
  74. package/dist/components/Sections.d.ts +11 -0
  75. package/dist/components/Sections.js +77 -0
  76. package/dist/components/Sections.js.map +1 -0
  77. package/dist/components/Select/index.d.ts +5 -2
  78. package/dist/components/Select/index.js +144 -30
  79. package/dist/components/Select/index.js.map +1 -1
  80. package/dist/components/Select/styles.d.ts +9 -0
  81. package/dist/components/Select/styles.js +57 -0
  82. package/dist/components/Select/styles.js.map +1 -0
  83. package/dist/components/Select/types.d.ts +33 -0
  84. package/dist/components/Select/types.js +3 -0
  85. package/dist/components/Select/types.js.map +1 -0
  86. package/dist/components/Slider/Mark.d.ts +3 -0
  87. package/dist/components/Slider/Mark.js +32 -0
  88. package/dist/components/Slider/Mark.js.map +1 -0
  89. package/dist/components/Slider/Thumb.d.ts +7 -0
  90. package/dist/components/Slider/Thumb.js +30 -0
  91. package/dist/components/Slider/Thumb.js.map +1 -0
  92. package/dist/components/Slider/index.d.ts +3 -0
  93. package/dist/components/Slider/index.js +94 -0
  94. package/dist/components/Slider/index.js.map +1 -0
  95. package/dist/components/{Slider.d.ts → Slider/types.d.ts} +25 -20
  96. package/dist/components/Slider/types.js +3 -0
  97. package/dist/components/Slider/types.js.map +1 -0
  98. package/dist/components/Switch.d.ts +13 -13
  99. package/dist/components/Switch.js +71 -72
  100. package/dist/components/Switch.js.map +1 -1
  101. package/dist/components/Text.d.ts +12 -12
  102. package/dist/components/Text.js +48 -48
  103. package/dist/components/Text.js.map +1 -1
  104. package/dist/components/TextInput.d.ts +162 -146
  105. package/dist/components/TextInput.js +149 -146
  106. package/dist/components/TextInput.js.map +1 -1
  107. package/dist/components/Touchable.d.ts +14 -13
  108. package/dist/components/Touchable.js +57 -59
  109. package/dist/components/Touchable.js.map +1 -1
  110. package/dist/components/View.d.ts +114 -192
  111. package/dist/components/View.js +50 -50
  112. package/dist/components/View.js.map +1 -1
  113. package/dist/components/{index.d.ts → components.d.ts} +24 -21
  114. package/dist/components/{index.js → components.js} +37 -34
  115. package/dist/components/components.js.map +1 -0
  116. package/dist/index.d.ts +5 -3
  117. package/dist/index.js +24 -21
  118. package/dist/index.js.map +1 -1
  119. package/dist/modules/documentPicker.d.ts +3 -1
  120. package/dist/modules/documentPicker.js +11 -9
  121. package/dist/modules/documentPicker.js.map +1 -1
  122. package/dist/modules/fastImage.d.ts +1 -1
  123. package/dist/modules/fastImage.js +9 -9
  124. package/dist/modules/fastImage.js.map +1 -1
  125. package/dist/modules/reactNavigation.d.ts +3 -0
  126. package/dist/modules/reactNavigation.js +11 -0
  127. package/dist/modules/reactNavigation.js.map +1 -0
  128. package/dist/modules/types/fileTypes.d.ts +138 -0
  129. package/dist/modules/types/fileTypes.js +3 -0
  130. package/dist/modules/types/fileTypes.js.map +1 -0
  131. package/dist/types/utility.d.ts +2 -2
  132. package/dist/types/utility.js +2 -2
  133. package/dist/types/utility.js.map +0 -0
  134. package/dist/utils/OSAlert.d.ts +31 -31
  135. package/dist/utils/OSAlert.js +141 -88
  136. package/dist/utils/OSAlert.js.map +1 -1
  137. package/dist/utils/misc.d.ts +2 -0
  138. package/dist/utils/misc.js +26 -0
  139. package/dist/utils/misc.js.map +1 -0
  140. package/dist/utils/styles.d.ts +1 -1
  141. package/dist/utils/styles.js +12 -12
  142. package/dist/utils/styles.js.map +1 -1
  143. package/package.json +40 -35
  144. package/src/components/ActivityIndicator.tsx +46 -37
  145. package/src/components/Animated.tsx +34 -31
  146. package/src/components/Button.tsx +95 -62
  147. package/src/components/Checkbox/index.tsx +81 -68
  148. package/src/components/Checkbox/styles.ts +72 -63
  149. package/src/components/ContentView.tsx +58 -52
  150. package/src/components/FileInput.tsx +179 -69
  151. package/src/components/Icon.tsx +58 -35
  152. package/src/components/Image.tsx +59 -43
  153. package/src/components/List.tsx +100 -0
  154. package/src/components/Modal/index.tsx +158 -143
  155. package/src/components/Modal/styles.ts +133 -122
  156. package/src/components/Navigation/Navigation.tsx +58 -0
  157. package/src/components/Navigation/constants.ts +8 -0
  158. package/src/components/Navigation/index.tsx +3 -0
  159. package/src/components/Navigation/types.ts +35 -0
  160. package/src/components/Navigation/utils.tsx +59 -0
  161. package/src/components/Overlay.tsx +77 -72
  162. package/src/components/Pager/index.tsx +240 -0
  163. package/src/components/Pager/styles.ts +51 -0
  164. package/src/components/RadioInput/index.tsx +101 -76
  165. package/src/components/RadioInput/styles.ts +67 -62
  166. package/src/components/Scroll.tsx +98 -87
  167. package/src/components/Sections.tsx +100 -0
  168. package/src/components/Select/index.tsx +184 -8
  169. package/src/components/Select/styles.ts +81 -0
  170. package/src/components/Select/types.ts +41 -0
  171. package/src/components/Slider/Mark.tsx +46 -0
  172. package/src/components/Slider/Thumb.tsx +29 -0
  173. package/src/components/Slider/index.tsx +123 -0
  174. package/src/components/Slider/types.ts +25 -0
  175. package/src/components/Switch.tsx +81 -73
  176. package/src/components/Text.tsx +30 -31
  177. package/src/components/TextInput.tsx +204 -206
  178. package/src/components/Touchable.tsx +65 -51
  179. package/src/components/View.tsx +46 -43
  180. package/src/components/components.ts +26 -0
  181. package/src/index.ts +6 -3
  182. package/src/modules/documentPicker.ts +7 -2
  183. package/src/modules/fastImage.ts +2 -2
  184. package/src/modules/index.d.ts +496 -0
  185. package/src/modules/reactNavigation.ts +4 -0
  186. package/src/modules/types/documentPicker.d.ts +215 -0
  187. package/src/modules/types/fileTypes.ts +138 -0
  188. package/src/types/utility.ts +3 -3
  189. package/src/utils/OSAlert.ts +180 -122
  190. package/src/utils/misc.ts +24 -0
  191. package/src/utils/styles.ts +14 -17
  192. package/dist/components/Drawer.d.ts +0 -23
  193. package/dist/components/Drawer.js +0 -78
  194. package/dist/components/Drawer.js.map +0 -1
  195. package/dist/components/Navigation.d.ts +0 -30
  196. package/dist/components/Navigation.js +0 -126
  197. package/dist/components/Navigation.js.map +0 -1
  198. package/dist/components/Slider.js +0 -130
  199. package/dist/components/Slider.js.map +0 -1
  200. package/dist/components/index.js.map +0 -1
  201. package/dist/modules/cropPicker.d.ts +0 -1
  202. package/dist/modules/cropPicker.js +0 -10
  203. package/dist/modules/cropPicker.js.map +0 -1
  204. package/src/components/Navigation.tsx +0 -125
  205. package/src/components/Slider.tsx +0 -198
  206. package/src/components/index.ts +0 -23
@@ -1,50 +1,54 @@
1
- declare type RadioParts = 'button' | 'itemWrapper' | 'text' | 'buttonMark';
2
- declare type RadioGroupParts = 'label' | 'wrapper' | 'list';
3
- export declare type MobileRadioInputComposition = `${RadioParts}:checked` | RadioParts | RadioGroupParts;
4
- export declare const MobileRadioInputStyles: {
5
- default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileRadioInputComposition, any>>;
6
- square: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileRadioInputComposition, any>>;
7
- fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
8
- block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
9
- flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
10
- absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
11
- sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
12
- row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
13
- center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
14
- column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
15
- wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
16
- inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
17
- inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
18
- hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
19
- full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
20
- noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
21
- fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
22
- fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
23
- fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
24
- fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
25
- fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
26
- whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
27
- centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
28
- listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
29
- alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
30
- alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
31
- alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
32
- justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
33
- justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
34
- justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
35
- justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
36
- textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
37
- textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
38
- textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
39
- blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
40
- elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
41
- neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
42
- scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
43
- scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
44
- scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
45
- debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
46
- debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
47
- debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
48
- debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
49
- };
50
- export {};
1
+ declare type RadioParts = 'button' | 'itemWrapper' | 'text' | 'buttonMark';
2
+ declare type RadioGroupParts = 'label' | 'wrapper' | 'list';
3
+ export declare type MobileRadioInputComposition = `${RadioParts}:checked` | RadioParts | RadioGroupParts;
4
+ export declare const MobileRadioInputStyles: {
5
+ default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileRadioInputComposition, any>>;
6
+ square: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileRadioInputComposition, any>>;
7
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
8
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
9
+ flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
10
+ absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
11
+ sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
12
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
13
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
14
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
15
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
16
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
17
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
18
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
19
+ full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
20
+ noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
21
+ fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
22
+ fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
23
+ fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
24
+ fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
25
+ fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
26
+ whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
27
+ centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
28
+ listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
29
+ alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
30
+ alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
31
+ alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
32
+ alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
33
+ alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
34
+ alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
35
+ justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
36
+ justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
37
+ justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
38
+ justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
39
+ justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
40
+ textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
41
+ textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
42
+ textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
43
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
44
+ elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
45
+ neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
46
+ scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
47
+ scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
48
+ scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
49
+ debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
50
+ debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
51
+ debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
52
+ debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("@codeleap/common").RadioInputComposition, any>>;
53
+ };
54
+ export {};
@@ -1,45 +1,45 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.MobileRadioInputStyles = void 0;
15
- var common_1 = require("@codeleap/common");
16
- var createRadioStyle = (0, common_1.createDefaultVariantFactory)();
17
- var defaultStyles = common_1.RadioInputStyles.default;
18
- exports.MobileRadioInputStyles = __assign(__assign({}, common_1.RadioInputStyles), { default: createRadioStyle(function (theme) {
19
- var style = defaultStyles(theme);
20
- var itemHeight = theme.typography.baseFontSize * 1.2;
21
- var markHeight = itemHeight / 2;
22
- var translateX = -(markHeight / 2);
23
- var translateY = -(markHeight / 2);
24
- return __assign(__assign({}, style), { itemWrapper: __assign({}, style.itemWrapper), button: __assign(__assign(__assign({ height: itemHeight, width: itemHeight }, theme.border.primary(1)), { borderRadius: theme.borderRadius.large, position: 'relative' }), theme.spacing.marginRight(1)), 'buttonMark': {
25
- backgroundColor: theme.colors.primary,
26
- position: 'absolute',
27
- left: '50%',
28
- top: '50%',
29
- height: markHeight,
30
- width: markHeight,
31
- transform: [{ translateX: translateX }, { translateY: translateY }],
32
- borderRadius: theme.borderRadius.large,
33
- opacity: 0
34
- }, 'buttonMark:checked': {
35
- opacity: 1
36
- } });
37
- }), square: createRadioStyle(function () { return ({
38
- 'buttonMark': {
39
- borderRadius: 0,
40
- },
41
- button: {
42
- borderRadius: 0,
43
- },
44
- }); }) });
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.MobileRadioInputStyles = void 0;
15
+ var common_1 = require("@codeleap/common");
16
+ var createRadioStyle = (0, common_1.createDefaultVariantFactory)();
17
+ var defaultStyles = common_1.RadioInputStyles.default;
18
+ exports.MobileRadioInputStyles = __assign(__assign({}, common_1.RadioInputStyles), { default: createRadioStyle(function (theme) {
19
+ var style = defaultStyles(theme);
20
+ var itemHeight = theme.typography.baseFontSize * 1.2;
21
+ var markHeight = itemHeight / 2;
22
+ var translateX = -(markHeight / 2);
23
+ var translateY = -(markHeight / 2);
24
+ return __assign(__assign({}, style), { itemWrapper: __assign({}, style.itemWrapper), button: __assign(__assign(__assign({ height: itemHeight, width: itemHeight }, theme.border.primary(1)), { borderRadius: theme.borderRadius.large, position: 'relative' }), theme.spacing.marginRight(1)), buttonMark: {
25
+ backgroundColor: theme.colors.primary,
26
+ position: 'absolute',
27
+ left: '50%',
28
+ top: '50%',
29
+ height: markHeight,
30
+ width: markHeight,
31
+ transform: [{ translateX: translateX }, { translateY: translateY }],
32
+ borderRadius: theme.borderRadius.large,
33
+ opacity: 0,
34
+ }, 'buttonMark:checked': {
35
+ opacity: 1,
36
+ } });
37
+ }), square: createRadioStyle(function () { return ({
38
+ buttonMark: {
39
+ borderRadius: 0,
40
+ },
41
+ button: {
42
+ borderRadius: 0,
43
+ },
44
+ }); }) });
45
45
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAkF;AAOlF,IAAM,gBAAgB,GAAG,IAAA,oCAA2B,GAA+B,CAAA;AAEnF,IAAM,aAAa,GAAG,yBAAgB,CAAC,OAAO,CAAA;AAE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YAAA,EAAE,CAAC;gBAC3C,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK;gBACtC,OAAO,EAAE,CAAC;aACX,EACD,oBAAoB,EAAE;gBACpB,OAAO,EAAE,CAAC;aACX,IACF;IACH,CAAC,CAAC,EACF,MAAM,EAAE,gBAAgB,CAAC,cAAM,OAAA,CAAC;QAC9B,UAAU,EAAE;YACV,YAAY,EAAE,CAAC;SAChB;QACD,MAAM,EAAE;YACN,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,EAP6B,CAO7B,CAAC,IACJ"}
@@ -1,10 +1,11 @@
1
- import * as React from 'react';
2
- import { KeyboardAwareScrollViewProps } from 'react-native-keyboard-aware-scroll-view';
3
- import { ScrollView } from 'react-native';
4
- import { ViewProps } from './View';
5
- export declare type ScrollProps = KeyboardAwareScrollViewProps & ViewProps & {
6
- onRefresh?: () => void;
7
- refreshTimeout?: number;
8
- changeData?: any;
9
- };
10
- export declare const Scroll: React.ForwardRefExoticComponent<Pick<ScrollProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "variants" | "responsiveVariants" | "component" | "css" | "is" | "not" | "up" | "down" | "onHover" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "innerRef" | "viewIsInsideTabBar" | "resetScrollToCoords" | "enableResetScrollToCoords" | "enableAutomaticScroll" | "enableOnAndroid" | "extraHeight" | "extraScrollHeight" | "keyboardOpeningTime" | "onKeyboardWillShow" | "onKeyboardDidShow" | "onKeyboardWillHide" | "onKeyboardDidHide" | "onKeyboardWillChangeFrame" | "onKeyboardDidChangeFrame" | "contentContainerStyle" | "decelerationRate" | "horizontal" | "invertStickyHeaders" | "keyboardDismissMode" | "keyboardShouldPersistTaps" | "onScrollBeginDrag" | "onScrollEndDrag" | "onMomentumScrollEnd" | "onMomentumScrollBegin" | "pagingEnabled" | "showsHorizontalScrollIndicator" | "showsVerticalScrollIndicator" | "stickyHeaderHiddenOnScroll" | "refreshControl" | "snapToInterval" | "snapToOffsets" | "snapToStart" | "snapToEnd" | "stickyHeaderIndices" | "disableIntervalMomentum" | "disableScrollViewPanResponder" | "StickyHeaderComponent" | "alwaysBounceHorizontal" | "alwaysBounceVertical" | "automaticallyAdjustContentInsets" | "automaticallyAdjustsScrollIndicatorInsets" | "bounces" | "bouncesZoom" | "canCancelContentTouches" | "centerContent" | "contentInset" | "contentOffset" | "contentInsetAdjustmentBehavior" | "directionalLockEnabled" | "indicatorStyle" | "maintainVisibleContentPosition" | "maximumZoomScale" | "minimumZoomScale" | "onScrollAnimationEnd" | "pinchGestureEnabled" | "scrollEventThrottle" | "scrollIndicatorInsets" | "scrollToOverflowEnabled" | "scrollsToTop" | "snapToAlignment" | "onScrollToTop" | "zoomScale" | "endFillColor" | "scrollPerfTag" | "overScrollMode" | "nestedScrollEnabled" | "fadingEdgeLength" | "persistentScrollbar" | "onRefresh" | "refreshTimeout" | "changeData"> & React.RefAttributes<ScrollView>>;
1
+ import * as React from 'react';
2
+ import { KeyboardAwareScrollViewProps } from 'react-native-keyboard-aware-scroll-view';
3
+ import { ScrollView, ViewStyle } from 'react-native';
4
+ import { ViewProps } from './View';
5
+ export declare type ScrollProps = KeyboardAwareScrollViewProps & ViewProps & {
6
+ onRefresh?: () => void;
7
+ refreshTimeout?: number;
8
+ changeData?: any;
9
+ styles?: ViewStyle;
10
+ };
11
+ export declare const Scroll: React.ForwardRefExoticComponent<Pick<ScrollProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "variants" | "responsiveVariants" | "component" | "css" | "is" | "not" | "up" | "down" | "onHover" | "styles" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "innerRef" | "viewIsInsideTabBar" | "resetScrollToCoords" | "enableResetScrollToCoords" | "enableAutomaticScroll" | "enableOnAndroid" | "extraHeight" | "extraScrollHeight" | "keyboardOpeningTime" | "onKeyboardWillShow" | "onKeyboardDidShow" | "onKeyboardWillHide" | "onKeyboardDidHide" | "onKeyboardWillChangeFrame" | "onKeyboardDidChangeFrame" | "contentContainerStyle" | "decelerationRate" | "horizontal" | "invertStickyHeaders" | "keyboardDismissMode" | "keyboardShouldPersistTaps" | "onScrollBeginDrag" | "onScrollEndDrag" | "onMomentumScrollEnd" | "onMomentumScrollBegin" | "pagingEnabled" | "showsHorizontalScrollIndicator" | "showsVerticalScrollIndicator" | "stickyHeaderHiddenOnScroll" | "refreshControl" | "snapToInterval" | "snapToOffsets" | "snapToStart" | "snapToEnd" | "stickyHeaderIndices" | "disableIntervalMomentum" | "disableScrollViewPanResponder" | "StickyHeaderComponent" | "alwaysBounceHorizontal" | "alwaysBounceVertical" | "automaticallyAdjustContentInsets" | "automaticallyAdjustsScrollIndicatorInsets" | "bounces" | "bouncesZoom" | "canCancelContentTouches" | "centerContent" | "contentInset" | "contentOffset" | "contentInsetAdjustmentBehavior" | "directionalLockEnabled" | "indicatorStyle" | "maintainVisibleContentPosition" | "maximumZoomScale" | "minimumZoomScale" | "onScrollAnimationEnd" | "pinchGestureEnabled" | "scrollEventThrottle" | "scrollIndicatorInsets" | "scrollToOverflowEnabled" | "scrollsToTop" | "snapToAlignment" | "onScrollToTop" | "zoomScale" | "endFillColor" | "scrollPerfTag" | "overScrollMode" | "nestedScrollEnabled" | "fadingEdgeLength" | "persistentScrollbar" | "onRefresh" | "refreshTimeout" | "changeData"> & React.RefAttributes<ScrollView>>;
@@ -1,73 +1,76 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __rest = (this && this.__rest) || function (s, e) {
22
- var t = {};
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
- t[p] = s[p];
25
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
- t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- };
32
- Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.Scroll = void 0;
34
- var React = __importStar(require("react"));
35
- var react_1 = require("react");
36
- var common_1 = require("@codeleap/common");
37
- var react_native_keyboard_aware_scroll_view_1 = require("react-native-keyboard-aware-scroll-view");
38
- var react_native_1 = require("react-native");
39
- var KeyboardAwareScrollView = react_native_keyboard_aware_scroll_view_1.KeyboardAwareScrollView;
40
- exports.Scroll = (0, react_1.forwardRef)(function (scrollProps, ref) {
41
- var _a = scrollProps.variants, variants = _a === void 0 ? [] : _a, style = scrollProps.style, _b = scrollProps.refreshTimeout, refreshTimeout = _b === void 0 ? 3000 : _b, children = scrollProps.children, changeData = scrollProps.changeData, props = __rest(scrollProps, ["variants", "style", "refreshTimeout", "children", "changeData"]);
42
- var hasRefresh = !!props.onRefresh;
43
- var _c = (0, react_1.useState)(false), refreshing = _c[0], setRefreshing = _c[1];
44
- var timer = React.useRef(null);
45
- var previousData = (0, common_1.usePrevious)(changeData);
46
- var onRefresh = function () {
47
- if (timer.current) {
48
- clearTimeout(timer.current);
49
- }
50
- setRefreshing(true);
51
- props.onRefresh();
52
- timer.current = setTimeout(function () {
53
- setRefreshing(false);
54
- }, refreshTimeout);
55
- };
56
- (0, common_1.onUpdate)(function () {
57
- if (refreshing && !(0, common_1.deepEqual)(previousData, changeData)) {
58
- setRefreshing(false);
59
- if (timer.current) {
60
- clearTimeout(timer.current);
61
- }
62
- }
63
- }, [refreshing, changeData]);
64
- var Theme = (0, common_1.useStyle)().Theme;
65
- var variantStyles = (0, common_1.useComponentStyle)('View', {
66
- variants: variants
67
- });
68
- return (<KeyboardAwareScrollView style={[Theme.presets.full, variantStyles.wrapper, style]} ref={ref} {...props} refreshControl={hasRefresh &&
69
- <react_native_1.RefreshControl refreshing={refreshing} onRefresh={onRefresh}/>}>
70
- {children}
71
- </KeyboardAwareScrollView>);
72
- });
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.Scroll = void 0;
34
+ var React = __importStar(require("react"));
35
+ var react_1 = require("react");
36
+ var common_1 = require("@codeleap/common");
37
+ var react_native_keyboard_aware_scroll_view_1 = require("react-native-keyboard-aware-scroll-view");
38
+ var react_native_1 = require("react-native");
39
+ var KeyboardAwareScrollView = react_native_keyboard_aware_scroll_view_1.KeyboardAwareScrollView;
40
+ exports.Scroll = (0, react_1.forwardRef)(function (scrollProps, ref) {
41
+ var _a = scrollProps.variants, variants = _a === void 0 ? [] : _a, style = scrollProps.style, _b = scrollProps.refreshTimeout, refreshTimeout = _b === void 0 ? 3000 : _b, children = scrollProps.children, changeData = scrollProps.changeData, styles = scrollProps.styles, props = __rest(scrollProps, ["variants", "style", "refreshTimeout", "children", "changeData", "styles"]);
42
+ var hasRefresh = !!props.onRefresh;
43
+ var _c = (0, react_1.useState)(false), refreshing = _c[0], setRefreshing = _c[1];
44
+ var timer = React.useRef(null);
45
+ var previousData = (0, common_1.usePrevious)(changeData);
46
+ var onRefresh = function () {
47
+ if (timer.current) {
48
+ clearTimeout(timer.current);
49
+ }
50
+ setRefreshing(true);
51
+ props.onRefresh();
52
+ timer.current = setTimeout(function () {
53
+ setRefreshing(false);
54
+ }, refreshTimeout);
55
+ };
56
+ (0, common_1.onUpdate)(function () {
57
+ if (refreshing && !(0, common_1.deepEqual)(previousData, changeData)) {
58
+ setRefreshing(false);
59
+ if (timer.current) {
60
+ clearTimeout(timer.current);
61
+ }
62
+ }
63
+ }, [refreshing, changeData]);
64
+ var Theme = (0, common_1.useCodeleapContext)().Theme;
65
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('View', {
66
+ variants: variants,
67
+ styles: {
68
+ wrapper: styles,
69
+ },
70
+ rootElement: 'wrapper',
71
+ });
72
+ return (<KeyboardAwareScrollView style={[Theme.presets.full, style]} contentContainerStyle={[variantStyles.wrapper]} ref={ref} {...props} refreshControl={hasRefresh && (<react_native_1.RefreshControl refreshing={refreshing} onRefresh={onRefresh}/>)}>
73
+ {children}
74
+ </KeyboardAwareScrollView>);
75
+ });
73
76
  //# sourceMappingURL=Scroll.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scroll.js","sourceRoot":"","sources":["../../src/components/Scroll.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4C;AAC5C,2CAAgG;AAChG,mGAA0H;AAC1H,6CAAyD;AAUzD,IAAM,uBAAuB,GAAG,iEAO/B,CAAA;AAGY,QAAA,MAAM,GAAG,IAAA,kBAAU,EAA0B,UAAC,WAAW,EAAE,GAAG;IAEvE,IAAA,KAME,WAAW,SANA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAAK,GAKH,WAAW,MALR,EACL,KAIE,WAAW,eAJQ,EAArB,cAAc,mBAAG,IAAI,KAAA,EACrB,QAAQ,GAGN,WAAW,SAHL,EACR,UAAU,GAER,WAAW,WAFH,EACP,KAAK,UACN,WAAW,EAPT,iEAOL,CADS,CACK;IACf,IAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,CAAA;IAC9B,IAAA,KAA8B,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAA5C,UAAU,QAAA,EAAE,aAAa,QAAmB,CAAA;IAEnD,IAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAChC,IAAM,YAAY,GAAG,IAAA,oBAAW,EAAC,UAAU,CAAC,CAAA;IAE5C,IAAM,SAAS,GAAG;QAChB,IAAG,KAAK,CAAC,OAAO,EAAC;YACf,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;SAC5B;QAED,aAAa,CAAC,IAAI,CAAC,CAAA;QAEnB,KAAK,CAA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,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;IACpB,IAAA,KAAK,GAAK,IAAA,2BAAkB,GAAE,MAAzB,CAAyB;IAEtC,IAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,MAAM,EAAE;QACrD,QAAQ,UAAA;QACR,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;SAChB;QACD,WAAW,EAAE,SAAS;KACvB,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,uBAAuB,CACtB,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CACnC,qBAAqB,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAC/C,GAAG,CAAC,CAAC,GAA4B,CAAC,CAClC,IAAI,KAAK,CAAC,CACV,cAAc,CAAC,CACb,UAAU,IAAI,CACZ,CAAC,6BAAc,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,EAAG,CACjE,CACF,CAED;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,uBAAuB,CAAC,CAC3B,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { KeyboardAwareSectionListProps } from 'react-native-keyboard-aware-scroll-view';
3
+ import { SectionList } from 'react-native';
4
+ import { ViewProps } from './View';
5
+ export declare type SectionListProps = KeyboardAwareSectionListProps<any> & ViewProps & {
6
+ onRefresh?: () => void;
7
+ refreshTimeout?: number;
8
+ changeData?: any;
9
+ separators?: boolean;
10
+ };
11
+ export declare const Sections: React.ForwardRefExoticComponent<Pick<SectionListProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "data" | "variants" | "responsiveVariants" | "component" | "css" | "is" | "not" | "up" | "down" | "onHover" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "innerRef" | "viewIsInsideTabBar" | "resetScrollToCoords" | "enableResetScrollToCoords" | "enableAutomaticScroll" | "enableOnAndroid" | "extraHeight" | "extraScrollHeight" | "keyboardOpeningTime" | "onKeyboardWillShow" | "onKeyboardDidShow" | "onKeyboardWillHide" | "onKeyboardDidHide" | "onKeyboardWillChangeFrame" | "onKeyboardDidChangeFrame" | "contentContainerStyle" | "decelerationRate" | "horizontal" | "invertStickyHeaders" | "keyboardDismissMode" | "keyboardShouldPersistTaps" | "onScrollBeginDrag" | "onScrollEndDrag" | "onMomentumScrollEnd" | "onMomentumScrollBegin" | "pagingEnabled" | "showsHorizontalScrollIndicator" | "showsVerticalScrollIndicator" | "stickyHeaderHiddenOnScroll" | "refreshControl" | "snapToInterval" | "snapToOffsets" | "snapToStart" | "snapToEnd" | "stickyHeaderIndices" | "disableIntervalMomentum" | "disableScrollViewPanResponder" | "StickyHeaderComponent" | "alwaysBounceHorizontal" | "alwaysBounceVertical" | "automaticallyAdjustContentInsets" | "automaticallyAdjustsScrollIndicatorInsets" | "bounces" | "bouncesZoom" | "canCancelContentTouches" | "centerContent" | "contentInset" | "contentOffset" | "contentInsetAdjustmentBehavior" | "directionalLockEnabled" | "indicatorStyle" | "maintainVisibleContentPosition" | "maximumZoomScale" | "minimumZoomScale" | "onScrollAnimationEnd" | "pinchGestureEnabled" | "scrollEventThrottle" | "scrollIndicatorInsets" | "scrollToOverflowEnabled" | "scrollsToTop" | "snapToAlignment" | "onScrollToTop" | "zoomScale" | "endFillColor" | "scrollPerfTag" | "overScrollMode" | "nestedScrollEnabled" | "fadingEdgeLength" | "persistentScrollbar" | "onRefresh" | "refreshTimeout" | "changeData" | "refreshing" | "progressViewOffset" | "renderItem" | "ItemSeparatorComponent" | "ListEmptyComponent" | "ListFooterComponent" | "ListFooterComponentStyle" | "ListHeaderComponent" | "ListHeaderComponentStyle" | "extraData" | "getItemLayout" | "initialNumToRender" | "initialScrollIndex" | "keyExtractor" | "legacyImplementation" | "onEndReached" | "onEndReachedThreshold" | "onViewableItemsChanged" | "viewabilityConfig" | "debug" | "disableVirtualization" | "getItem" | "getItemCount" | "inverted" | "listKey" | "maxToRenderPerBatch" | "onScrollToIndexFailed" | "renderScrollComponent" | "updateCellsBatchingPeriod" | "viewabilityConfigCallbackPairs" | "windowSize" | "CellRendererComponent" | "separators" | "SectionSeparatorComponent" | "renderSectionHeader" | "renderSectionFooter" | "sections" | "stickySectionHeadersEnabled"> & React.RefAttributes<SectionList<any, import("react-native").DefaultSectionT>>>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __rest = (this && this.__rest) || function (s, e) {
22
+ var t = {};
23
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
+ t[p] = s[p];
25
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
+ t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.Sections = void 0;
34
+ var React = __importStar(require("react"));
35
+ var react_1 = require("react");
36
+ var common_1 = require("@codeleap/common");
37
+ var react_native_keyboard_aware_scroll_view_1 = require("react-native-keyboard-aware-scroll-view");
38
+ var react_native_1 = require("react-native");
39
+ var View_1 = require("./View");
40
+ var KeyboardAwareSectionList = react_native_keyboard_aware_scroll_view_1.KeyboardAwareSectionList;
41
+ exports.Sections = (0, react_1.forwardRef)(function (flatListProps, ref) {
42
+ var _a = flatListProps.variants, variants = _a === void 0 ? [] : _a, style = flatListProps.style, _b = flatListProps.refreshTimeout, refreshTimeout = _b === void 0 ? 3000 : _b, changeData = flatListProps.changeData, props = __rest(flatListProps, ["variants", "style", "refreshTimeout", "changeData"]);
43
+ var hasRefresh = !!props.onRefresh;
44
+ var _c = (0, react_1.useState)(false), refreshing = _c[0], setRefreshing = _c[1];
45
+ var timer = React.useRef(null);
46
+ var previousData = (0, common_1.usePrevious)(changeData);
47
+ var onRefresh = function () {
48
+ if (timer.current) {
49
+ clearTimeout(timer.current);
50
+ }
51
+ setRefreshing(true);
52
+ props.onRefresh();
53
+ timer.current = setTimeout(function () {
54
+ setRefreshing(false);
55
+ }, refreshTimeout);
56
+ };
57
+ (0, common_1.onUpdate)(function () {
58
+ if (refreshing && !(0, common_1.deepEqual)(previousData, changeData)) {
59
+ setRefreshing(false);
60
+ if (timer.current) {
61
+ clearTimeout(timer.current);
62
+ }
63
+ }
64
+ }, [refreshing, changeData]);
65
+ var Theme = (0, common_1.useCodeleapContext)().Theme;
66
+ var variantStyles = (0, common_1.useDefaultComponentStyle)('View', {
67
+ variants: variants,
68
+ });
69
+ var renderSeparator = function () {
70
+ return (<View_1.View variants={['separator']}></View_1.View>);
71
+ };
72
+ var separatorProp = props.separators;
73
+ var isEmpty = !props.data || !props.data.length;
74
+ var separator = !isEmpty && separatorProp == true && renderSeparator;
75
+ return (<KeyboardAwareSectionList style={[Theme.presets.full, style]} contentContainerStyle={[variantStyles.wrapper]} ref={ref} ItemSeparatorComponent={separator} {...props} refreshControl={hasRefresh && (<react_native_1.RefreshControl refreshing={refreshing} onRefresh={onRefresh}/>)}/>);
76
+ });
77
+ //# sourceMappingURL=Sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sections.js","sourceRoot":"","sources":["../../src/components/Sections.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4C;AAC5C,2CAMyB;AACzB,mGAGgD;AAChD,6CAA0D;AAC1D,+BAAwC;AAUxC,IAAM,wBAAwB,GAC5B,kEAKC,CAAA;AAEU,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAChC,UAAC,aAAa,EAAE,GAAG;IAEf,IAAA,KAKE,aAAa,SALF,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAAK,GAIH,aAAa,MAJV,EACL,KAGE,aAAa,eAHM,EAArB,cAAc,mBAAG,IAAI,KAAA,EACrB,UAAU,GAER,a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AAC,CACvC,CAAA;IACH,CAAC,CAAA;IAED,IAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,IAAM,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAA;IACjD,IAAM,SAAS,GAAG,CAAC,OAAO,IAAI,aAAa,IAAI,IAAI,IAAI,eAAe,CAAA;IAEtE,OAAO,CACL,CAAC,wBAAwB,CACvB,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CACnC,qBAAqB,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAC/C,GAAG,CAAC,CAAC,GAA6B,CAAC,CACnC,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAClC,IAAI,KAAK,CAAC,CACV,cAAc,CAAC,CACb,UAAU,IAAI,CACZ,CAAC,6BAAc,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,EAAG,CACjE,CACF,EACD,CACH,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -1,2 +1,5 @@
1
- import * as React from 'react';
2
- export declare const Select: React.FC;
1
+ /// <reference types="react" />
2
+ import { CustomSelectProps } from './types';
3
+ export declare const Select: <T extends string | number = string>(selectProps: CustomSelectProps<T>) => JSX.Element;
4
+ export * from './styles';
5
+ export * from './types';