@codeleap/mobile 2.1.8 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/components/AutoComplete/styles.js +1 -2
  2. package/dist/components/AutoComplete/styles.js.map +1 -1
  3. package/dist/components/Drawer/index.js +13 -2
  4. package/dist/components/Drawer/index.js.map +1 -1
  5. package/dist/components/Drawer/styles.js +3 -5
  6. package/dist/components/Drawer/styles.js.map +1 -1
  7. package/dist/components/EmptyPlaceholder/styles.js +1 -1
  8. package/dist/components/EmptyPlaceholder/styles.js.map +1 -1
  9. package/dist/components/Grid/index.d.ts +3 -1
  10. package/dist/components/Grid/index.js +19 -4
  11. package/dist/components/Grid/index.js.map +1 -1
  12. package/dist/components/ImageView/Spotlight.js +1 -2
  13. package/dist/components/ImageView/Spotlight.js.map +1 -1
  14. package/dist/components/List/index.d.ts +2 -1
  15. package/dist/components/List/index.js +19 -5
  16. package/dist/components/List/index.js.map +1 -1
  17. package/dist/components/Modal/index.d.ts +4 -2
  18. package/dist/components/Modal/index.js +11 -3
  19. package/dist/components/Modal/index.js.map +1 -1
  20. package/dist/components/Modal/styles.d.ts +1 -1
  21. package/dist/components/Modal/styles.js +15 -15
  22. package/dist/components/Modal/styles.js.map +1 -1
  23. package/dist/components/MultiSelect/index.js +8 -7
  24. package/dist/components/MultiSelect/index.js.map +1 -1
  25. package/dist/components/MultiSelect/types.d.ts +1 -0
  26. package/dist/components/Pager/styles.js +7 -7
  27. package/dist/components/Pager/styles.js.map +1 -1
  28. package/dist/components/Scroll/index.d.ts +4 -2
  29. package/dist/components/Scroll/index.js +20 -6
  30. package/dist/components/Scroll/index.js.map +1 -1
  31. package/dist/components/SegmentedControl/index.js +1 -1
  32. package/dist/components/SegmentedControl/index.js.map +1 -1
  33. package/dist/components/Select/index.js +20 -6
  34. package/dist/components/Select/index.js.map +1 -1
  35. package/dist/components/Select/styles.js +2 -0
  36. package/dist/components/Select/styles.js.map +1 -1
  37. package/dist/components/Select/types.d.ts +3 -1
  38. package/dist/components/legacy/Modal/index.d.ts +2 -1
  39. package/dist/components/legacy/Modal/index.js +1 -1
  40. package/dist/components/legacy/Modal/index.js.map +1 -1
  41. package/dist/components/legacy/Modal/styles.js +9 -9
  42. package/dist/components/legacy/Modal/styles.js.map +1 -1
  43. package/dist/utils/KeyboardAware/index.d.ts +1 -0
  44. package/dist/utils/KeyboardAware/index.js +1 -0
  45. package/dist/utils/KeyboardAware/index.js.map +1 -1
  46. package/dist/utils/KeyboardAware/keyboardHooks.d.ts +30 -0
  47. package/dist/utils/KeyboardAware/keyboardHooks.js +113 -0
  48. package/dist/utils/KeyboardAware/keyboardHooks.js.map +1 -0
  49. package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.d.ts +1 -1
  50. package/dist/utils/PermissionManager/context.d.ts +2 -2
  51. package/dist/utils/PermissionManager/context.js +25 -29
  52. package/dist/utils/PermissionManager/context.js.map +1 -1
  53. package/dist/utils/hooks.d.ts +1 -0
  54. package/dist/utils/hooks.js +17 -1
  55. package/dist/utils/hooks.js.map +1 -1
  56. package/dist/utils/index.d.ts +1 -0
  57. package/dist/utils/index.js +1 -0
  58. package/dist/utils/index.js.map +1 -1
  59. package/dist/utils/input.d.ts +35 -0
  60. package/dist/utils/input.js +49 -0
  61. package/dist/utils/input.js.map +1 -0
  62. package/package.json +1 -1
  63. package/src/components/AutoComplete/styles.ts +1 -2
  64. package/src/components/Drawer/index.tsx +11 -1
  65. package/src/components/Drawer/styles.ts +4 -4
  66. package/src/components/EmptyPlaceholder/styles.ts +1 -1
  67. package/src/components/Grid/index.tsx +28 -18
  68. package/src/components/ImageView/Spotlight.tsx +0 -1
  69. package/src/components/List/index.tsx +31 -24
  70. package/src/components/Modal/index.tsx +18 -7
  71. package/src/components/Modal/styles.ts +38 -27
  72. package/src/components/MultiSelect/index.tsx +8 -8
  73. package/src/components/MultiSelect/types.ts +1 -0
  74. package/src/components/Pager/styles.ts +7 -7
  75. package/src/components/Scroll/index.tsx +37 -24
  76. package/src/components/SegmentedControl/index.tsx +1 -0
  77. package/src/components/Select/index.tsx +20 -14
  78. package/src/components/Select/styles.ts +2 -0
  79. package/src/components/Select/types.ts +3 -1
  80. package/src/components/legacy/Modal/index.tsx +3 -2
  81. package/src/components/legacy/Modal/styles.ts +17 -17
  82. package/src/utils/KeyboardAware/index.ts +1 -0
  83. package/src/utils/KeyboardAware/keyboardHooks.ts +155 -0
  84. package/src/utils/PermissionManager/context.tsx +31 -22
  85. package/src/utils/hooks.ts +19 -1
  86. package/src/utils/index.ts +1 -0
  87. package/src/utils/input.ts +51 -0
@@ -11,7 +11,9 @@ export type ModalParts =
11
11
  | AnimatableParts
12
12
  | 'wrapper'
13
13
  | 'innerWrapper'
14
- | 'innerWrapperScroll'
14
+
15
+ | 'scrollContent'
16
+ | 'scroll'
15
17
  | 'body'
16
18
  | 'footer'
17
19
  | 'header'
@@ -32,39 +34,41 @@ const presets = includePresets((style) => createModalStyle(() => ({ body: style
32
34
  export const ModalStyles = {
33
35
 
34
36
  ...presets,
35
- default: createModalStyle((Theme) => {
37
+ default: createModalStyle((theme) => {
36
38
  const fullSize = {
37
- ...Theme.presets.whole,
39
+ ...theme.presets.whole,
38
40
  position: 'absolute',
39
- width: Theme?.values?.width,
40
- height: Theme?.values?.height,
41
+ width: '100%',
42
+ height: '100%',
41
43
  }
42
44
 
43
45
  return {
44
46
  wrapper: {
45
47
  zIndex: 1,
46
-
47
- ...fullSize,
48
+ height: theme.values.height,
49
+ width: theme.values.width,
50
+ ...theme.presets.whole,
51
+ position: 'absolute',
48
52
  },
49
53
  'box:transition': {
50
54
  scale: {
51
- duration: Theme.values.transitions.modal.duration,
55
+ duration: theme.values.transitions.modal.duration,
52
56
  type: 'timing',
53
57
  },
54
58
  opacity: {
55
- duration: Theme.values.transitions.modal.duration,
59
+ duration: theme.values.transitions.modal.duration,
56
60
  type: 'timing',
57
61
  },
58
62
  },
59
63
  'backdrop:transition': {
60
64
  opacity: {
61
- duration: Theme.values.transitions.modal.duration,
65
+ duration: theme.values.transitions.modal.duration,
62
66
  type: 'timing',
63
67
  },
64
68
  },
65
69
  backdrop: {
66
70
 
67
- backgroundColor: Theme.colors.black,
71
+ backgroundColor: theme.colors.black,
68
72
  ...fullSize,
69
73
  },
70
74
  backdropTouchable: {
@@ -76,18 +80,25 @@ export const ModalStyles = {
76
80
  'backdrop:hidden': {
77
81
  opacity: 0,
78
82
  },
79
- innerWrapper: {},
80
- innerWrapperScroll: {
81
- display: 'flex',
82
- alignItems: 'center',
83
- ...Theme.presets.justifyCenter,
84
- minHeight: Theme.values.height,
83
+ innerWrapper: {
84
+ ...theme.presets.alignCenter,
85
+ ...theme.presets.justifyCenter,
86
+ ...theme.presets.fullHeight,
87
+ ...theme.presets.fullWidth,
88
+ },
89
+ scroll: {
90
+ ...fullSize,
91
+ },
92
+ scrollContent: {
93
+ ...theme.presets.alignCenter,
94
+ ...theme.presets.justifyCenter,
95
+ ...theme.presets.full,
85
96
  },
86
97
  box: {
87
98
  width: '80%',
88
- backgroundColor: Theme.colors.background,
89
- borderRadius: Theme.borderRadius.medium,
90
- ...Theme.spacing.padding(2),
99
+ backgroundColor: theme.colors.background,
100
+ borderRadius: theme.borderRadius.medium,
101
+ ...theme.spacing.padding(2),
91
102
  },
92
103
 
93
104
  'box:hidden': {
@@ -101,17 +112,17 @@ export const ModalStyles = {
101
112
  },
102
113
  header: {
103
114
  flexDirection: 'row',
104
- ...Theme.presets.justifySpaceBetween,
105
- ...Theme.presets.alignCenter,
115
+ ...theme.presets.justifySpaceBetween,
116
+ ...theme.presets.alignCenter,
106
117
  },
107
118
  closeButtonWrapper: {
108
119
  alignSelf: 'center',
109
- ...Theme.spacing.marginLeft('auto'),
120
+ ...theme.spacing.marginLeft('auto'),
110
121
  },
111
122
  title: {
112
- ...Theme.presets.textCenter,
113
- ...assignTextStyle('h3')(Theme).text,
114
- ...Theme.spacing.paddingBottom(1),
123
+ ...theme.presets.textCenter,
124
+ ...assignTextStyle('h3')(theme).text,
125
+ ...theme.spacing.paddingBottom(1),
115
126
  flex: 1,
116
127
  },
117
128
  }
@@ -128,7 +139,7 @@ export const ModalStyles = {
128
139
  flex: 1,
129
140
  borderRadius: 0,
130
141
  width: theme.values.width,
131
- height: theme.values.height,
142
+ height: theme.values.window.height,
132
143
  ...theme.presets.center,
133
144
  },
134
145
  })),
@@ -30,6 +30,7 @@ export const MultiSelect = <T extends string|number = string>(selectProps:MultiS
30
30
  inputProps = {},
31
31
  clearable = false,
32
32
  clearIconName = 'close',
33
+ validate = null,
33
34
  ...drawerProps
34
35
  } = selectProps
35
36
 
@@ -80,18 +81,16 @@ export const MultiSelect = <T extends string|number = string>(selectProps:MultiS
80
81
  }
81
82
 
82
83
  const isEmpty = value.length === 0
83
-
84
- const inputIcon = clearable ? (
85
- isEmpty ? arrowIconName : clearIconName
86
- ) : arrowIconName
84
+ const showClearIcon = !isEmpty && clearable
85
+ const inputIcon = showClearIcon ? clearIconName : arrowIconName
87
86
 
88
87
  const onPressInputIcon = () => {
89
- if (isEmpty) {
90
- close?.()
91
- }
92
- if (clearable) {
88
+ if (showClearIcon) {
93
89
  onValueChange([])
90
+ } else {
91
+ close?.()
94
92
  }
93
+
95
94
  }
96
95
  return <>
97
96
  {
@@ -114,6 +113,7 @@ export const MultiSelect = <T extends string|number = string>(selectProps:MultiS
114
113
  debugName={'Select input'}
115
114
  styles={inputStyles}
116
115
  style={style}
116
+ validate={validate}
117
117
  {...inputProps}
118
118
  />
119
119
  )
@@ -37,5 +37,6 @@ export type MultiSelectProps<T> = MultiSelectDrawerProps & {
37
37
  listProps?: Partial<FlatListProps>
38
38
  clearable?: boolean
39
39
  clearIconName?: IconPlaceholder
40
+ validate?: TextInputProps['validate']
40
41
  } & ComponentVariants<typeof MultiSelectStyles>
41
42
 
@@ -53,7 +53,7 @@ export const PagerStyles = {
53
53
  ...presets,
54
54
  default: createPagerStyle((theme) => {
55
55
  const width = theme.values.width
56
- const height = theme.values.height * 0.8
56
+ const height = theme.values.window.height * 0.8
57
57
  return {
58
58
  ...pagerAnimation(height, width, 'X'),
59
59
  page: {
@@ -67,15 +67,15 @@ export const PagerStyles = {
67
67
  },
68
68
  }
69
69
  }),
70
- horizontal: createPagerStyle((Theme) => {
70
+ horizontal: createPagerStyle((theme) => {
71
71
 
72
- const width = Theme.values.width
73
- const height = Theme.values.height * 0.8
72
+ const width = theme.values.width
73
+ const height = theme.values.window.height * 0.8
74
74
  return pagerAnimation(height, width, 'X')
75
75
  }),
76
- vertical: createPagerStyle((Theme) => {
77
- const height = Theme.values.height * 0.8
78
- const width = Theme.values.width
76
+ vertical: createPagerStyle((theme) => {
77
+ const height = theme.values.window.height * 0.8
78
+ const width = theme.values.width
79
79
  return pagerAnimation(height, width, 'Y')
80
80
  }),
81
81
  }
@@ -5,7 +5,6 @@ import {
5
5
  onUpdate,
6
6
  useDefaultComponentStyle,
7
7
  usePrevious,
8
- useCodeleapContext,
9
8
  } from '@codeleap/common'
10
9
 
11
10
  import { RefreshControl, RefreshControlProps, ScrollView, StyleSheet } from 'react-native'
@@ -13,7 +12,8 @@ import { ViewProps } from '../View'
13
12
  import { KeyboardAwareScrollViewTypes } from '../../modules'
14
13
  import { StylesOf } from '../../types'
15
14
  import { ScrollComposition, ScrollStyles } from './styles'
16
- import { KeyboardAwareScrollView } from '../../utils'
15
+ import { GetKeyboardAwarePropsOptions, useKeyboardAwareView } from '../../utils'
16
+ // import { KeyboardAwareScrollView } from '../../utils'
17
17
 
18
18
  type KeyboardAwareScrollViewProps = KeyboardAwareScrollViewTypes.KeyboardAwareScrollViewProps
19
19
 
@@ -22,10 +22,11 @@ export type ScrollProps = KeyboardAwareScrollViewProps &
22
22
  onRefresh?: () => void
23
23
  refreshTimeout?: number
24
24
  changeData?: any
25
- keyboardAware?: boolean
25
+ keyboardAware?: GetKeyboardAwarePropsOptions
26
26
  refreshing?: boolean
27
27
  styles?: StylesOf<ScrollComposition>
28
28
  refreshControlProps?: Partial<RefreshControlProps>
29
+ debugName?: string
29
30
  }
30
31
 
31
32
  export const Scroll = forwardRef<ScrollView, ScrollProps>(
@@ -38,7 +39,9 @@ export const Scroll = forwardRef<ScrollView, ScrollProps>(
38
39
  changeData,
39
40
  styles = {},
40
41
  refreshControlProps = {},
41
- keyboardAware = true,
42
+ contentContainerStyle,
43
+ keyboardAware,
44
+ debugName = '',
42
45
  ...props
43
46
  } = scrollProps
44
47
  const hasRefresh = !!props.onRefresh
@@ -69,37 +72,47 @@ export const Scroll = forwardRef<ScrollView, ScrollProps>(
69
72
  }
70
73
  }
71
74
  }, [refreshingDisplay, changeData])
72
- const { Theme } = useCodeleapContext()
73
75
 
74
76
  const variantStyles = useDefaultComponentStyle<'u:Scroll', typeof ScrollStyles>('u:Scroll', {
75
77
  variants,
76
78
  styles,
77
79
  transform: StyleSheet.flatten,
78
- rootElement: 'wrapper',
80
+ rootElement: 'content',
79
81
  })
80
82
 
81
- const Component = keyboardAware ? KeyboardAwareScrollView : ScrollView
82
83
  const refreshStyles = StyleSheet.flatten([variantStyles.refreshControl, styles.refreshControl])
84
+ const _scrollProps = {
85
+ style: [variantStyles.wrapper, style],
86
+ contentContainerStyle: [variantStyles.content, contentContainerStyle],
87
+ ref: ref as unknown as ScrollView,
88
+ refreshControl: hasRefresh && (
89
+ <RefreshControl
90
+ refreshing={refreshingDisplay}
91
+ onRefresh={onRefresh}
92
+ tintColor={refreshStyles?.color}
93
+ colors={[refreshStyles?.color]}
94
+ {...refreshControlProps}
95
+ />
96
+ ),
97
+ ...props,
98
+ }
99
+ const keyboard = useKeyboardAwareView({
100
+ debugName,
101
+ })
102
+
103
+ const rootProps = keyboard.getKeyboardAwareProps(_scrollProps, {
104
+ adapt: 'marginBottom',
105
+ baseStyleProp: 'style',
106
+ ...keyboardAware,
107
+
108
+ })
109
+
83
110
  return (
84
- <Component
85
- style={[Theme.presets.full, style]}
86
- contentContainerStyle={[variantStyles.wrapper]}
87
- ref={ref as unknown as ScrollView}
88
- refreshControl={
89
- hasRefresh && (
90
- <RefreshControl
91
- refreshing={refreshingDisplay}
92
- onRefresh={onRefresh}
93
- tintColor={refreshStyles?.color}
94
- colors={[refreshStyles?.color]}
95
- {...refreshControlProps}
96
- />
97
- )
98
- }
99
- {...props}
111
+ <ScrollView
112
+ {...rootProps}
100
113
  >
101
114
  {children}
102
- </Component>
115
+ </ScrollView>
103
116
  )
104
117
  },
105
118
  )
@@ -131,6 +131,7 @@ const _SegmentedControl = React.forwardRef<SegmentedControlRef, SegmentedControl
131
131
  style={variantStyles.scroll}
132
132
  contentContainerStyle={variantStyles.scrollContent}
133
133
  {...scrollProps}
134
+ keyboardAware={false}
134
135
  ref={scrollRef}
135
136
  >
136
137
  <View style={variantStyles.wrapper}>
@@ -10,7 +10,7 @@ import { TextInput } from '../TextInput'
10
10
  import { Touchable } from '../Touchable'
11
11
  import { SelectStyles } from './styles'
12
12
  import { CustomSelectProps } from './types'
13
- import { ModalManager } from '../../utils'
13
+ import { ModalManager, useKeyboardAwareView } from '../../utils'
14
14
  import { Icon } from '../Icon'
15
15
 
16
16
  export const SelectItem = ({ item, icon = null, isSelected, styles, onPress }) => {
@@ -46,6 +46,7 @@ export const Select = <T extends string|number = string>(selectProps:CustomSelec
46
46
  selectedIcon = 'selectMarker',
47
47
  inputProps = {},
48
48
  hideInput = false,
49
+
49
50
  ...drawerProps
50
51
  } = selectProps
51
52
 
@@ -90,19 +91,28 @@ export const Select = <T extends string|number = string>(selectProps:CustomSelec
90
91
  />
91
92
  }
92
93
  const isEmpty = TypeGuards.isNil(value)
94
+ const showClearIcon = !isEmpty && clearable
93
95
 
94
- const inputIcon = clearable ? (
95
- isEmpty ? arrowIconName : clearIconName
96
- ) : arrowIconName
96
+ const inputIcon = showClearIcon ? clearIconName : arrowIconName
97
97
 
98
98
  const onPressInputIcon = () => {
99
- if (isEmpty) {
100
- close?.()
101
- }
102
- if (clearable) {
99
+ if (showClearIcon) {
103
100
  onValueChange(null)
101
+ } else {
102
+ close?.()
104
103
  }
104
+
105
+ }
106
+
107
+ const baseListProps = {
108
+ data: options,
109
+ style: variantStyles.list,
110
+ contentContainerStyle: variantStyles.listContent,
111
+ keyExtractor: (i) => i.value,
112
+ renderItem: renderListItem,
113
+ ...listProps,
105
114
  }
115
+
106
116
  return <>
107
117
  {
108
118
  !hideInput && (
@@ -112,6 +122,7 @@ export const Select = <T extends string|number = string>(selectProps:CustomSelec
112
122
  rightIcon={{
113
123
  icon: inputIcon as IconPlaceholder,
114
124
  onPress: onPressInputIcon,
125
+ noFeedback: true,
115
126
  }}
116
127
  editable={false}
117
128
  touchableWrapper
@@ -132,12 +143,7 @@ export const Select = <T extends string|number = string>(selectProps:CustomSelec
132
143
 
133
144
  <ModalManager.Drawer scroll={false} title={label} {...drawerProps} styles={variantStyles}>
134
145
  <List<CustomSelectProps<any>['options']>
135
- data={options}
136
- style={variantStyles.list}
137
- contentContainerStyle={variantStyles.listContent}
138
- keyExtractor={(i) => i.value}
139
- renderItem={renderListItem}
140
- {...listProps}
146
+ {...baseListProps}
141
147
  />
142
148
  </ModalManager.Drawer>
143
149
 
@@ -49,6 +49,8 @@ export const SelectStyles = {
49
49
  list: {
50
50
  height: 'auto',
51
51
 
52
+ maxHeight: theme.values.window.height * 0.7,
53
+ // ...theme.presets.safeAreaBottom(),
52
54
  },
53
55
  listContent: {
54
56
  paddingBottom: theme.values.bottomNavHeight + theme.spacing.value(1),
@@ -4,6 +4,7 @@ import {
4
4
  IconPlaceholder,
5
5
  } from '@codeleap/common'
6
6
  import { StylesOf } from '../../types/utility'
7
+ import { GetKeyboardAwarePropsOptions } from '../../utils'
7
8
  import { DrawerProps } from '../Drawer'
8
9
  import { FlatListProps } from '../List'
9
10
  import { TextInputProps } from '../TextInput'
@@ -36,6 +37,7 @@ export type CustomSelectProps<T> = SelectDrawerProps & {
36
37
  inputProps?: Partial<TextInputProps>
37
38
  listProps?: Partial<FlatListProps>
38
39
  clearable?: boolean
39
- clearIconName?: boolean
40
+ clearIconName?: IconPlaceholder
41
+ keyboardAware?: GetKeyboardAwarePropsOptions
40
42
  } & ComponentVariants<typeof SelectStyles>
41
43
 
@@ -19,6 +19,7 @@ import { StylesOf } from '../../../types/utility'
19
19
  import { Touchable } from '../../Touchable'
20
20
  import { Text } from '../../Text'
21
21
  import { Animated } from '../../Animated'
22
+ import { GetKeyboardAwarePropsOptions } from '../../../utils'
22
23
 
23
24
  export * from './styles'
24
25
 
@@ -38,7 +39,7 @@ export type ModalProps = Omit<ViewProps, 'variants' | 'styles'> & {
38
39
  toggle?: () => void
39
40
  zIndex?: number
40
41
  scroll?: boolean
41
- keyboardAware?: boolean
42
+ keyboardAware?: GetKeyboardAwarePropsOptions
42
43
  }
43
44
 
44
45
  export const Modal: React.FC<ModalProps> = (modalProps) => {
@@ -56,7 +57,7 @@ export const Modal: React.FC<ModalProps> = (modalProps) => {
56
57
  closeIconName = 'close',
57
58
  debugName,
58
59
  scroll = true,
59
- keyboardAware = true,
60
+ keyboardAware,
60
61
  zIndex = null,
61
62
  ...props
62
63
  } = modalProps
@@ -39,12 +39,12 @@ const defaultModalStyles = ModalStyles
39
39
  export const MobileModalStyles = {
40
40
  ...defaultModalStyles,
41
41
  ...presets,
42
- default: createModalStyle((Theme) => {
42
+ default: createModalStyle((theme) => {
43
43
  const fullSize = {
44
- ...Theme.presets.whole,
44
+ ...theme.presets.whole,
45
45
  position: 'absolute',
46
- width: Theme?.values?.width,
47
- height: Theme?.values?.height,
46
+ width: theme?.values?.width,
47
+ height: theme?.values?.height,
48
48
  }
49
49
 
50
50
  return {
@@ -57,7 +57,7 @@ export const MobileModalStyles = {
57
57
  overlay: {
58
58
  opacity: 0,
59
59
 
60
- backgroundColor: Theme.colors.black,
60
+ backgroundColor: theme.colors.black,
61
61
  ...fullSize,
62
62
  },
63
63
  'overlay:visible': {
@@ -67,14 +67,14 @@ export const MobileModalStyles = {
67
67
  innerWrapperScroll: {
68
68
  display: 'flex',
69
69
  alignItems: 'center',
70
- ...Theme.presets.justifyCenter,
71
- minHeight: Theme.values.height,
70
+ ...theme.presets.justifyCenter,
71
+ minHeight: theme.values.window.height,
72
72
  },
73
73
  box: {
74
74
  width: '80%',
75
- backgroundColor: Theme.colors.background,
76
- borderRadius: Theme.borderRadius.medium,
77
- ...Theme.spacing.padding(2),
75
+ backgroundColor: theme.colors.background,
76
+ borderRadius: theme.borderRadius.medium,
77
+ ...theme.spacing.padding(2),
78
78
  },
79
79
  touchableBackdrop: {
80
80
  ...fullSize,
@@ -91,17 +91,17 @@ export const MobileModalStyles = {
91
91
  },
92
92
  header: {
93
93
  flexDirection: 'row',
94
- ...Theme.presets.justifySpaceBetween,
95
- ...Theme.presets.alignCenter,
94
+ ...theme.presets.justifySpaceBetween,
95
+ ...theme.presets.alignCenter,
96
96
  },
97
97
  closeButtonWrapper: {
98
98
  alignSelf: 'center',
99
- ...Theme.spacing.marginLeft('auto'),
99
+ ...theme.spacing.marginLeft('auto'),
100
100
  },
101
101
  title: {
102
- ...Theme.presets.textCenter,
103
- ...assignTextStyle('h3')(Theme).text,
104
- ...Theme.spacing.paddingBottom(1),
102
+ ...theme.presets.textCenter,
103
+ ...assignTextStyle('h3')(theme).text,
104
+ ...theme.spacing.paddingBottom(1),
105
105
  flex: 1,
106
106
  },
107
107
  }
@@ -118,7 +118,7 @@ export const MobileModalStyles = {
118
118
  flex: 1,
119
119
  borderRadius: 0,
120
120
  width: theme.values.width,
121
- height: theme.values.height,
121
+ height: theme.values.window.height,
122
122
  ...theme.presets.center,
123
123
  },
124
124
  })),
@@ -4,6 +4,7 @@ import listenToKeyboardEvents from './lib/KeyboardAwareHOC'
4
4
  import KeyboardAwareScrollView from './lib/KeyboardAwareScrollView'
5
5
  import KeyboardAwareFlatList from './lib/KeyboardAwareFlatList'
6
6
  import KeyboardAwareSectionList from './lib/KeyboardAwareSectionList'
7
+ export * from './keyboardHooks'
7
8
 
8
9
  export {
9
10
  listenToKeyboardEvents,