@codeleap/mobile 2.2.2 → 2.2.5

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 (109) hide show
  1. package/dist/components/ActionIcon/styles.d.ts +11 -10
  2. package/dist/components/ActionIcon/styles.js +5 -1
  3. package/dist/components/ActionIcon/styles.js.map +1 -1
  4. package/dist/components/ActivityIndicator/styles.d.ts +10 -10
  5. package/dist/components/Animated.d.ts +1 -0
  6. package/dist/components/AutoComplete/index.d.ts +3 -3
  7. package/dist/components/AutoComplete/index.js +3 -3
  8. package/dist/components/AutoComplete/index.js.map +1 -1
  9. package/dist/components/AutoComplete/styles.d.ts +10 -10
  10. package/dist/components/AutoComplete/styles.js +1 -3
  11. package/dist/components/AutoComplete/styles.js.map +1 -1
  12. package/dist/components/Backdrop/styles.d.ts +10 -10
  13. package/dist/components/Button/index.d.ts +24 -24
  14. package/dist/components/Button/styles.d.ts +10 -10
  15. package/dist/components/Checkbox/index.d.ts +1 -1
  16. package/dist/components/Checkbox/styles.d.ts +10 -10
  17. package/dist/components/ContentView/styles.d.ts +10 -10
  18. package/dist/components/Drawer/index.js +1 -1
  19. package/dist/components/Drawer/index.js.map +1 -1
  20. package/dist/components/Drawer/styles.d.ts +10 -10
  21. package/dist/components/Drawer/styles.js +6 -2
  22. package/dist/components/Drawer/styles.js.map +1 -1
  23. package/dist/components/EmptyPlaceholder/styles.d.ts +9 -9
  24. package/dist/components/FileInput/styles.d.ts +10 -10
  25. package/dist/components/Icon/index.js +7 -3
  26. package/dist/components/Icon/index.js.map +1 -1
  27. package/dist/components/Icon/styles.d.ts +11 -10
  28. package/dist/components/Icon/styles.js +4 -0
  29. package/dist/components/Icon/styles.js.map +1 -1
  30. package/dist/components/Image/styles.d.ts +10 -10
  31. package/dist/components/List/PaginationIndicator.d.ts +10 -10
  32. package/dist/components/Modal/index.d.ts +2 -0
  33. package/dist/components/Modal/index.js +8 -2
  34. package/dist/components/Modal/index.js.map +1 -1
  35. package/dist/components/Modal/styles.d.ts +10 -10
  36. package/dist/components/Modal/styles.js +9 -5
  37. package/dist/components/Modal/styles.js.map +1 -1
  38. package/dist/components/MultiSelect/styles.d.ts +10 -10
  39. package/dist/components/Pager/styles.d.ts +10 -10
  40. package/dist/components/RadioInput/styles.d.ts +10 -10
  41. package/dist/components/Scroll/index.d.ts +1 -1
  42. package/dist/components/Scroll/index.js +7 -5
  43. package/dist/components/Scroll/index.js.map +1 -1
  44. package/dist/components/Sections/index.d.ts +1 -1
  45. package/dist/components/SegmentedControl/styles.d.ts +10 -10
  46. package/dist/components/Select/index.js +12 -14
  47. package/dist/components/Select/index.js.map +1 -1
  48. package/dist/components/Select/styles.d.ts +10 -10
  49. package/dist/components/Select/styles.js +1 -4
  50. package/dist/components/Select/styles.js.map +1 -1
  51. package/dist/components/Slider/styles.d.ts +10 -10
  52. package/dist/components/Switch/styles.d.ts +10 -10
  53. package/dist/components/Text/styles.d.ts +10 -10
  54. package/dist/components/TextInput/index.d.ts +20 -20
  55. package/dist/components/TextInput/index.js +18 -10
  56. package/dist/components/TextInput/index.js.map +1 -1
  57. package/dist/components/TextInput/styles.d.ts +10 -10
  58. package/dist/components/Touchable/index.d.ts +1 -0
  59. package/dist/components/Touchable/index.js +21 -35
  60. package/dist/components/Touchable/index.js.map +1 -1
  61. package/dist/components/Touchable/styles.d.ts +10 -10
  62. package/dist/components/View/index.d.ts +3 -0
  63. package/dist/components/View/index.js +5 -2
  64. package/dist/components/View/index.js.map +1 -1
  65. package/dist/components/View/styles.d.ts +10 -10
  66. package/dist/components/defaultStyles.d.ts +251 -249
  67. package/dist/components/legacy/Modal/styles.d.ts +10 -10
  68. package/dist/components/legacy/Pager/styles.d.ts +10 -10
  69. package/dist/types/utility.d.ts +6 -0
  70. package/dist/utils/KeyboardAware/context.d.ts +13 -0
  71. package/dist/utils/KeyboardAware/context.js +65 -0
  72. package/dist/utils/KeyboardAware/context.js.map +1 -0
  73. package/dist/utils/KeyboardAware/index.d.ts +1 -0
  74. package/dist/utils/KeyboardAware/index.js +1 -0
  75. package/dist/utils/KeyboardAware/index.js.map +1 -1
  76. package/dist/utils/KeyboardAware/keyboardHooks.d.ts +9 -13
  77. package/dist/utils/KeyboardAware/keyboardHooks.js +17 -40
  78. package/dist/utils/KeyboardAware/keyboardHooks.js.map +1 -1
  79. package/dist/utils/ModalManager/context.js +8 -5
  80. package/dist/utils/ModalManager/context.js.map +1 -1
  81. package/dist/utils/index.d.ts +1 -0
  82. package/dist/utils/index.js +1 -0
  83. package/dist/utils/index.js.map +1 -1
  84. package/dist/utils/theme.d.ts +36 -0
  85. package/dist/utils/theme.js +48 -0
  86. package/dist/utils/theme.js.map +1 -0
  87. package/package.json +1 -1
  88. package/src/components/ActionIcon/styles.ts +5 -0
  89. package/src/components/AutoComplete/index.tsx +10 -5
  90. package/src/components/AutoComplete/styles.ts +2 -6
  91. package/src/components/Drawer/index.tsx +1 -2
  92. package/src/components/Drawer/styles.ts +7 -2
  93. package/src/components/Icon/index.tsx +14 -8
  94. package/src/components/Icon/styles.ts +5 -0
  95. package/src/components/Modal/index.tsx +14 -1
  96. package/src/components/Modal/styles.ts +13 -6
  97. package/src/components/Scroll/index.tsx +7 -2
  98. package/src/components/Select/index.tsx +25 -12
  99. package/src/components/Select/styles.ts +6 -5
  100. package/src/components/TextInput/index.tsx +30 -10
  101. package/src/components/Touchable/index.tsx +22 -39
  102. package/src/components/View/index.tsx +16 -2
  103. package/src/types/utility.ts +6 -0
  104. package/src/utils/KeyboardAware/context.tsx +73 -0
  105. package/src/utils/KeyboardAware/index.ts +1 -0
  106. package/src/utils/KeyboardAware/keyboardHooks.ts +30 -61
  107. package/src/utils/ModalManager/context.tsx +21 -18
  108. package/src/utils/index.ts +1 -0
  109. package/src/utils/theme.ts +50 -0
@@ -10,15 +10,20 @@ export declare const MobileModalStyles: {
10
10
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
11
11
  popup: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
12
12
  fullscreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
13
- inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
14
- block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
13
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
14
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
15
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
16
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
15
17
  flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
16
- inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
18
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
19
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
20
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
17
21
  absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
18
22
  relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
19
- fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
23
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
24
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
25
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
20
26
  sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
21
- hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
22
27
  full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
23
28
  noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
24
29
  fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
@@ -28,10 +33,7 @@ export declare const MobileModalStyles: {
28
33
  fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
29
34
  whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
30
35
  centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
31
- row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
32
36
  listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
33
- column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
34
- center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
35
37
  alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
36
38
  alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
37
39
  alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
@@ -48,13 +50,11 @@ export declare const MobileModalStyles: {
48
50
  textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
49
51
  textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
50
52
  textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
51
- blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
52
53
  elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
53
54
  neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
54
55
  scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
55
56
  scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
56
57
  scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
57
- wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
58
58
  debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
59
59
  debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
60
60
  debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileModalComposition, any>>;
@@ -2,15 +2,20 @@ export declare type PagerComposition = 'page' | 'page:transition' | 'page:pose:p
2
2
  export declare const MobilePagerStyles: {
3
3
  default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
4
4
  pageless: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
5
- inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
6
- block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
5
+ fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
6
+ blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
7
+ center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
8
+ hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
7
9
  flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
8
- inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
10
+ row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
11
+ column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
12
+ wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
9
13
  absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
10
14
  relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
11
- fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
15
+ inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
16
+ block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
17
+ inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
12
18
  sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
13
- hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
14
19
  full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
15
20
  noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
16
21
  fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
@@ -20,10 +25,7 @@ export declare const MobilePagerStyles: {
20
25
  fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
21
26
  whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
22
27
  centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
23
- row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
24
28
  listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
25
- column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
26
- center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
27
29
  alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
28
30
  alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
29
31
  alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
@@ -40,13 +42,11 @@ export declare const MobilePagerStyles: {
40
42
  textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
41
43
  textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
42
44
  textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
43
- blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
44
45
  elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
45
46
  neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
46
47
  scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
47
48
  scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
48
49
  scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
49
- wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
50
50
  debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
51
51
  debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
52
52
  debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PagerComposition, any>>;
@@ -1,2 +1,8 @@
1
1
  import { StyleProp } from 'react-native';
2
+ import { EasingFunction } from 'react-native-animatable';
2
3
  export declare type StylesOf<C extends string> = Partial<Record<C, StyleProp<any>>>;
4
+ export declare type TransitionConfig = {
5
+ easing?: EasingFunction;
6
+ type?: 'timing' | 'spring';
7
+ duration?: number;
8
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { KeyboardEvent } from 'react-native';
3
+ declare type TKeyboardCtx = {
4
+ event: KeyboardEvent;
5
+ isVisible: boolean;
6
+ height: number;
7
+ };
8
+ export declare const KeyboardCtx: React.Context<TKeyboardCtx>;
9
+ export declare const KeyboardProvider: ({ children }: {
10
+ children: any;
11
+ }) => JSX.Element;
12
+ export declare const useKeyboard: () => TKeyboardCtx;
13
+ export {};
@@ -0,0 +1,65 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.useKeyboard = exports.KeyboardProvider = exports.KeyboardCtx = void 0;
18
+ var react_1 = __importDefault(require("react"));
19
+ var common_1 = require("@codeleap/common");
20
+ var react_native_1 = require("react-native");
21
+ exports.KeyboardCtx = react_1.default.createContext({});
22
+ var KeyboardProvider = function (_a) {
23
+ var _b, _c;
24
+ var children = _a.children;
25
+ var _d = (0, common_1.useState)(null), keyboardEvent = _d[0], setKeyboardEvent = _d[1];
26
+ var Theme = (0, common_1.useCodeleapContext)().Theme;
27
+ (0, common_1.useEffect)(function () {
28
+ var eventNames = react_native_1.Platform.select({
29
+ ios: {
30
+ show: 'keyboardWillShow',
31
+ hide: 'keyboardWillHide',
32
+ },
33
+ android: {
34
+ show: 'keyboardDidShow',
35
+ hide: 'keyboardDidHide',
36
+ },
37
+ });
38
+ var events = [
39
+ react_native_1.Keyboard.addListener(eventNames.show, function (e) {
40
+ setKeyboardEvent(e);
41
+ }),
42
+ react_native_1.Keyboard.addListener(eventNames.hide, function (e) {
43
+ setKeyboardEvent(e);
44
+ }),
45
+ ];
46
+ return function () {
47
+ events.forEach(function (e) { return e.remove(); });
48
+ };
49
+ }, []);
50
+ var adjustKeyboard = 0;
51
+ if (react_native_1.Platform.OS === 'android') {
52
+ adjustKeyboard = Theme.values.safeAreaTop;
53
+ }
54
+ var height = (_c = (_b = keyboardEvent === null || keyboardEvent === void 0 ? void 0 : keyboardEvent.endCoordinates) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 0;
55
+ var _return = __assign({ event: keyboardEvent, isVisible: height > 0, height: height ? height + adjustKeyboard : 0 }, react_native_1.Keyboard);
56
+ return <exports.KeyboardCtx.Provider value={_return}>
57
+ {children}
58
+ </exports.KeyboardCtx.Provider>;
59
+ };
60
+ exports.KeyboardProvider = KeyboardProvider;
61
+ var useKeyboard = function () {
62
+ return (0, common_1.useContext)(exports.KeyboardCtx);
63
+ };
64
+ exports.useKeyboard = useKeyboard;
65
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/context.tsx"],"names":[],"mappings":";;;;;;;;;;;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Ab,aAAa,uBAAb,aAAa,CAAE,cAAc,0CAAE,MAAM,mCAAI,CAAC,CAAA;IAEzD,IAAM,OAAO,cACX,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,GAAG,CAAC,EACrB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,IACzC,uBAAQ,CACZ,CAAA;IAED,OAAO,CAAC,mBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAC1C;IAAA,CAAC,QAAQ,CACX;EAAA,EAAE,mBAAW,CAAC,QAAQ,CAAE,CAAA;AAE1B,CAAC,CAAA;AAhDY,QAAA,gBAAgB,oBAgD5B;AAEM,IAAM,WAAW,GAAG;IACzB,OAAO,IAAA,mBAAU,EAAC,mBAAW,CAAC,CAAA;AAChC,CAAC,CAAA;AAFY,QAAA,WAAW,eAEvB"}
@@ -3,5 +3,6 @@ import KeyboardAwareScrollView from './lib/KeyboardAwareScrollView';
3
3
  import KeyboardAwareFlatList from './lib/KeyboardAwareFlatList';
4
4
  import KeyboardAwareSectionList from './lib/KeyboardAwareSectionList';
5
5
  export * from './keyboardHooks';
6
+ export * from './context';
6
7
  export { listenToKeyboardEvents, KeyboardAwareFlatList, KeyboardAwareSectionList, KeyboardAwareScrollView, };
7
8
  export * from './types';
@@ -28,5 +28,6 @@ exports.KeyboardAwareFlatList = KeyboardAwareFlatList_1.default;
28
28
  var KeyboardAwareSectionList_1 = __importDefault(require("./lib/KeyboardAwareSectionList"));
29
29
  exports.KeyboardAwareSectionList = KeyboardAwareSectionList_1.default;
30
30
  __exportStar(require("./keyboardHooks"), exports);
31
+ __exportStar(require("./context"), exports);
31
32
  __exportStar(require("./types"), exports);
32
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/index.ts"],"names":[],"mappings":";AAAA,WAAW;;;;;;;;;;;;;;;;;;;;AAEX,4EAA2D;AAOzD,iCAPK,0BAAsB,CAOL;AANxB,0FAAmE;AASjE,kCATK,iCAAuB,CASL;AARzB,sFAA+D;AAM7D,gCANK,+BAAqB,CAML;AALvB,4FAAqE;AAMnE,mCANK,kCAAwB,CAML;AAL1B,kDAA+B;AAS/B,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/index.ts"],"names":[],"mappings":";AAAA,WAAW;;;;;;;;;;;;;;;;;;;;AAEX,4EAA2D;AAQzD,iCARK,0BAAsB,CAQL;AAPxB,0FAAmE;AAUjE,kCAVK,iCAAuB,CAUL;AATzB,sFAA+D;AAO7D,gCAPK,+BAAqB,CAOL;AANvB,4FAAqE;AAOnE,mCAPK,kCAAwB,CAOL;AAN1B,kDAA+B;AAC/B,4CAAyB;AASzB,0CAAuB"}
@@ -1,16 +1,15 @@
1
- import { KeyboardEvent, KeyboardEventName } from 'react-native';
2
- export declare const useKeyboard: () => {
3
- dismiss: () => void;
4
- addListener: (eventType: KeyboardEventName, listener: import("react-native").KeyboardEventListener) => import("react-native").EmitterSubscription;
5
- scheduleLayoutAnimation: (event: KeyboardEvent) => void;
6
- event: KeyboardEvent;
7
- isVisible: boolean;
8
- height: number;
1
+ import { PropsOf } from '@codeleap/common';
2
+ import { ScrollView } from 'react-native';
3
+ import { TransitionConfig } from '../../types';
4
+ declare type ScrollViewProps = Partial<Pick<PropsOf<typeof ScrollView>, 'horizontal' | 'contentContainerStyle' | 'style'>> & {
5
+ transition?: TransitionConfig;
9
6
  };
10
7
  export declare type GetKeyboardAwarePropsOptions = {
11
8
  baseStyleProp?: 'style' | 'contentContainerStyle';
12
9
  adapt?: 'height' | 'maxHeight' | 'paddingBottom' | 'marginBottom' | 'bottom';
13
10
  enabled?: boolean;
11
+ animated?: boolean;
12
+ transition?: TransitionConfig;
14
13
  enableOnAndroid?: boolean;
15
14
  };
16
15
  declare type UseKeyboardAwareViewParams = {
@@ -18,13 +17,10 @@ declare type UseKeyboardAwareViewParams = {
18
17
  };
19
18
  export declare const useKeyboardAwareView: (params?: UseKeyboardAwareViewParams) => {
20
19
  keyboard: {
21
- dismiss: () => void;
22
- addListener: (eventType: KeyboardEventName, listener: import("react-native").KeyboardEventListener) => import("react-native").EmitterSubscription;
23
- scheduleLayoutAnimation: (event: KeyboardEvent) => void;
24
- event: KeyboardEvent;
20
+ event: import("react-native").KeyboardEvent;
25
21
  isVisible: boolean;
26
22
  height: number;
27
23
  };
28
- getKeyboardAwareProps: <T extends Partial<Pick<import("react-native").ScrollViewProps, "style" | "contentContainerStyle" | "horizontal">>>(props?: T, options?: GetKeyboardAwarePropsOptions) => T;
24
+ getKeyboardAwareProps: <T extends ScrollViewProps>(props?: T, options?: GetKeyboardAwarePropsOptions) => T;
29
25
  };
30
26
  export {};
@@ -11,49 +11,20 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.useKeyboardAwareView = exports.useKeyboard = void 0;
14
+ exports.useKeyboardAwareView = void 0;
15
15
  var common_1 = require("@codeleap/common");
16
- var react_1 = require("react");
17
16
  var react_native_1 = require("react-native");
18
- var useKeyboard = function () {
19
- var _a;
20
- var _b = (0, react_1.useState)(null), keyboardEvent = _b[0], setKeyboardEvent = _b[1];
21
- var _c = (0, react_1.useState)(false), keyboardVisible = _c[0], setKeyboardVisible = _c[1];
22
- (0, react_1.useEffect)(function () {
23
- var eventNames = react_native_1.Platform.select({
24
- ios: {
25
- show: 'keyboardWillShow',
26
- hide: 'keyboardWillHide',
27
- },
28
- android: {
29
- show: 'keyboardDidShow',
30
- hide: 'keyboardDidHide',
31
- },
32
- });
33
- var events = [
34
- react_native_1.Keyboard.addListener(eventNames.show, function (e) {
35
- setKeyboardVisible(true);
36
- setKeyboardEvent(e);
37
- }),
38
- react_native_1.Keyboard.addListener(eventNames.hide, function (e) {
39
- setKeyboardVisible(false);
40
- setKeyboardEvent(e);
41
- }),
42
- ];
43
- return function () {
44
- events.forEach(function (e) { return e.remove(); });
45
- };
46
- }, []);
47
- var _return = __assign({ event: keyboardEvent, isVisible: keyboardVisible, height: ((_a = keyboardEvent === null || keyboardEvent === void 0 ? void 0 : keyboardEvent.endCoordinates) === null || _a === void 0 ? void 0 : _a.height) || 0 }, react_native_1.Keyboard);
48
- return _return;
49
- };
50
- exports.useKeyboard = useKeyboard;
17
+ var context_1 = require("./context");
51
18
  var useKeyboardAwareView = function (params) {
52
- var keyboard = (0, exports.useKeyboard)();
19
+ var keyboard = (0, context_1.useKeyboard)();
53
20
  var logger = (0, common_1.useCodeleapContext)().logger;
54
21
  function getKeyboardAwareProps(props, options) {
55
- var _a;
56
- var _options = __assign({ adapt: 'maxHeight', baseStyleProp: 'style', enabled: true, enableOnAndroid: true }, options);
22
+ var _a, _b;
23
+ var _options = __assign(__assign({ adapt: 'maxHeight', baseStyleProp: 'style', enabled: true, enableOnAndroid: false, animated: false }, options), { transition: {
24
+ easing: react_native_1.Easing.linear,
25
+ duration: 200,
26
+ type: 'timing',
27
+ } });
57
28
  if (!_options.enabled || (props === null || props === void 0 ? void 0 : props.horizontal) || (react_native_1.Platform.OS === 'android' && !_options.enableOnAndroid))
58
29
  return props;
59
30
  if (!props) {
@@ -69,7 +40,7 @@ var useKeyboardAwareView = function (params) {
69
40
  logger.warn("".concat(_options.baseStyleProp, ".").concat(_options.adapt, " must be a number or not be set at all"), { props: props, options: _options }, 'useKeyboardAwareView' + debugStr);
70
41
  }
71
42
  };
72
- var newStyleProp = __assign({}, baseStyle);
43
+ var newStyleProp = _options.animated ? {} : __assign({}, baseStyle);
73
44
  switch (_options.adapt) {
74
45
  case 'height':
75
46
  warnOnNotNumber();
@@ -102,7 +73,13 @@ var useKeyboardAwareView = function (params) {
102
73
  }
103
74
  if (!valid)
104
75
  return props;
105
- return __assign(__assign({}, props), (_a = {}, _a[_options.baseStyleProp] = newStyleProp, _a));
76
+ var _return = __assign(__assign({}, props), (_a = {}, _a[(_options === null || _options === void 0 ? void 0 : _options.animated) ? 'animate' : _options.baseStyleProp] = newStyleProp, _a));
77
+ if (_options.animated && !!(_options === null || _options === void 0 ? void 0 : _options.transition)) {
78
+ _return.transition = JSON.parse(JSON.stringify((_b = {},
79
+ _b[_options.adapt] = _options.transition,
80
+ _b)));
81
+ }
82
+ return _return;
106
83
  }
107
84
  return {
108
85
  keyboard: keyboard,
@@ -1 +1 @@
1
- {"version":3,"file":"keyboardHooks.js","sourceRoot":"","sources":["../../../src/utils/KeyboardAware/keyboardHooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA0E;AAC1E,+BAA2C;AAC3C,6CAQqB;AAOd,IAAM,WAAW,GAAG;;IACnB,IAAA,KAAoC,IAAA,gBAAQ,EAAgB,IAAI,CAAC,EAAhE,aAAa,QAAA,EAAE,gBAAgB,QAAiC,CAAA;IACjE,IAAA,KAAwC,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAtD,eAAe,QAAA,EAAE,kBAAkB,QAAmB,CAAA;IAE7D,IAAA,iBAAS,EAAC;QACR,IAAM,UAAU,GAAG,uBAAQ,CAAC,MAAM,CAA2B;YAC3D,GAAG,EAAE;gBACH,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,kBAAkB;aACzB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,iBAAiB;aACxB;SACF,CAAC,CAAA;QACF,IAAM,MAAM,GAAG;YACb,uBAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE,UAAC,CAAC;gBACtC,kBAAkB,CAAC,IAAI,CAAC,CAAA;gBACxB,gBAAgB,CAAC,CAAC,CAAC,CAAA;YACrB,CAAC,CAAC;YACF,uBAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,EAAE,UAAC,CAAC;gBACtC,kBAAkB,CAAC,KAAK,CAAC,CAAA;gBACzB,gBAAgB,CAAC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MACxE,CAAA;QAED,IAAI,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,CAAA,EAAE;YAC/C,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS;gBAC5C,GAAC,QAAQ,CAAC,KAAK,IAAG,QAAQ,CAAC,UAAU;oBACrC,CAAC,CAAA;SACJ;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IACD,OAAO;QACL,QAAQ,UAAA;QACR,qBAAqB,uBAAA;KACtB,CAAA;AACH,CAAC,CAAA;AAnGY,QAAA,oBAAoB,wBAmGhC"}
@@ -38,6 +38,7 @@ exports.useModalSequence = exports.useModalContext = exports.Provider = void 0;
38
38
  var React = __importStar(require("react"));
39
39
  var common_1 = require("@codeleap/common");
40
40
  var portal_1 = require("@gorhom/portal");
41
+ var KeyboardAware_1 = require("../KeyboardAware");
41
42
  var ModalContext = React.createContext({});
42
43
  function Provider(_a) {
43
44
  var _b, _c, _d, _e;
@@ -111,7 +112,8 @@ function Provider(_a) {
111
112
  delete newModals[id];
112
113
  setModals(newModals);
113
114
  }
114
- return <ModalContext.Provider value={{
115
+ return <KeyboardAware_1.KeyboardProvider>
116
+ <ModalContext.Provider value={{
115
117
  state: modals,
116
118
  toggleModal: toggleModal,
117
119
  setModal: setModal,
@@ -122,11 +124,12 @@ function Provider(_a) {
122
124
  transition: transition,
123
125
  transitionDuration: defaultDuration,
124
126
  }}>
125
- <portal_1.PortalProvider>
127
+ <portal_1.PortalProvider>
126
128
 
127
- {children}
128
- </portal_1.PortalProvider>
129
- </ModalContext.Provider>;
129
+ {children}
130
+ </portal_1.PortalProvider>
131
+ </ModalContext.Provider>
132
+ </KeyboardAware_1.KeyboardProvider>;
130
133
  }
131
134
  exports.Provider = Provider;
132
135
  function useModalContext() {
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/Mod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AI,mBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAChC,KAAK,GAAG,OAAO,CAAA;SAEhB;aAAM;YACL,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,CAAA;SACrB;QACD,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE;YACjC,KAAK,OAAA;SACN,CAAC,CAAA;QACF,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;IAC5B,CAAC;IACD,SAAS,KAAK;QACZ,MAAM,CAAC,CAAC,CAAC,CAAA;IACX,CAAC;IAED,kBACE,KAAK,OAAA,EACL,IAAI,MAAA,EACJ,QAAQ,UAAA,EACR,QAAQ,EAAE,MAAM,EAChB,IAAI,MAAA,EACJ,UAAU,EAAE,GAAG,IACZ,KAAK,EAET;AAEH,CAAC;AArFD,4CAqFC"}
@@ -7,3 +7,4 @@ import * as Permissions from './PermissionManager';
7
7
  export { Permissions };
8
8
  export * from './KeyboardAware';
9
9
  export * from './input';
10
+ export * from './theme';
@@ -36,4 +36,5 @@ var Permissions = __importStar(require("./PermissionManager"));
36
36
  exports.Permissions = Permissions;
37
37
  __exportStar(require("./KeyboardAware"), exports);
38
38
  __exportStar(require("./input"), exports);
39
+ __exportStar(require("./theme"), exports);
39
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,kDAA+B;AAC/B,iDAA8B;AAC9B,+DAAkD;AAEzC,kCAAW;AACpB,kDAA+B;AAC/B,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,kDAA+B;AAC/B,iDAA8B;AAC9B,+DAAkD;AAEzC,kCAAW;AACpB,kDAA+B;AAC/B,0CAAuB;AACvB,0CAAuB"}
@@ -0,0 +1,36 @@
1
+ export declare function getMobileThemeValues(initialWindowMetrics: any): {
2
+ readonly pixel: number;
3
+ readonly hasNotch: boolean;
4
+ readonly prefersConstantNavigationBar: boolean;
5
+ readonly safeAreaTop: number;
6
+ readonly safeAreaBottom: 0 | 20;
7
+ readonly keyboardVerticalOffset: 57 | 47;
8
+ readonly headerHeight: number;
9
+ readonly tabBarHeight: any;
10
+ readonly bottomNavHeight: any;
11
+ readonly window: {
12
+ height: number;
13
+ width: number;
14
+ };
15
+ readonly transitions: {
16
+ readonly modal: {
17
+ readonly duration: 100;
18
+ readonly type: "timing";
19
+ };
20
+ };
21
+ readonly buttons: {
22
+ readonly small: {
23
+ readonly height: 40;
24
+ };
25
+ readonly default: {
26
+ readonly height: 50;
27
+ };
28
+ readonly large: {
29
+ readonly height: 60;
30
+ };
31
+ };
32
+ readonly width: number;
33
+ readonly height: number;
34
+ readonly scale: number;
35
+ readonly fontScale: number;
36
+ };
@@ -0,0 +1,48 @@
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.getMobileThemeValues = void 0;
15
+ var react_native_1 = require("react-native");
16
+ function getMobileThemeValues(initialWindowMetrics) {
17
+ var _a, _b;
18
+ var screenDimensions = react_native_1.Dimensions.get('screen');
19
+ var hasNotch = react_native_1.Platform.OS === 'ios' ? (react_native_1.Dimensions.get('window').height >= 812) : (((_a = initialWindowMetrics === null || initialWindowMetrics === void 0 ? void 0 : initialWindowMetrics.insets) === null || _a === void 0 ? void 0 : _a.top) > 24 || react_native_1.StatusBar.currentHeight > 24);
20
+ var bottomNavHeight = react_native_1.Platform.OS === 'android' ? (_b = initialWindowMetrics === null || initialWindowMetrics === void 0 ? void 0 : initialWindowMetrics.insets) === null || _b === void 0 ? void 0 : _b.bottom : 0;
21
+ var prefersConstantNavigationBar = bottomNavHeight > 0;
22
+ var safeAreaTop = react_native_1.Platform.OS === 'ios' ? (hasNotch ? 34 : 20) : react_native_1.StatusBar.currentHeight;
23
+ var safeAreaBottom = (hasNotch && !prefersConstantNavigationBar ? 20 : 0);
24
+ return __assign(__assign({}, screenDimensions), { pixel: react_native_1.StyleSheet.hairlineWidth, hasNotch: hasNotch, prefersConstantNavigationBar: prefersConstantNavigationBar, safeAreaTop: safeAreaTop, safeAreaBottom: safeAreaBottom, keyboardVerticalOffset: react_native_1.Platform.OS === 'ios' ? 57 : 47, get headerHeight() { return 48; },
25
+ get tabBarHeight() { return 63 + (prefersConstantNavigationBar ? 0 : this.safeAreaBottom); }, bottomNavHeight: bottomNavHeight, get window() {
26
+ return {
27
+ height: screenDimensions.height - (bottomNavHeight + safeAreaTop),
28
+ width: screenDimensions.width,
29
+ };
30
+ }, transitions: {
31
+ modal: {
32
+ duration: 100,
33
+ type: 'timing',
34
+ },
35
+ }, buttons: {
36
+ small: {
37
+ height: 40,
38
+ },
39
+ default: {
40
+ height: 50,
41
+ },
42
+ large: {
43
+ height: 60,
44
+ },
45
+ } });
46
+ }
47
+ exports.getMobileThemeValues = getMobileThemeValues;
48
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA0E;AAE1E,SAAgB,oBAAoB,CAAC,oBAAoB;;IACvD,IAAM,gBAAgB,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAEjD,IAA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AAI,CAAC,cAAc,CAAC,CAAA,CAAC,CAAC,EAC3F,eAAe,iBAAA,EACf,IAAI,MAAM;YACR,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,MAAM,GAAG,CAAC,eAAe,GAAG,WAAW,CAAC;gBACjE,KAAK,EAAE,gBAAgB,CAAC,KAAK;aAC9B,CAAA;QACH,CAAC,EACD,WAAW,EAAE;YACX,KAAK,EAAE;gBACL,QAAQ,EAAE,GAAG;gBACb,IAAI,EAAE,QAAQ;aACf;SACF,EACD,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE;aACX;YACD,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE;aACX;YACD,KAAK,EAAE;gBACL,MAAM,EAAE,EAAE;aACX;SACF,GACO,CAAA;AACZ,CAAC;AA/CD,oDA+CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "2.2.2",
3
+ "version": "2.2.5",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -29,6 +29,11 @@ export const ActionIconStyles = {
29
29
 
30
30
  }
31
31
  }),
32
+ originalColor: createActionIconStyle(theme => ({
33
+ icon: {
34
+ color: 'auto',
35
+ },
36
+ })),
32
37
  small: createActionIconStyle((theme) => ({
33
38
  touchableWrapper: {
34
39
  ...theme.sized(3.5),