@codeleap/mobile 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc.js +3 -0
- package/.vscode/settings.json +11 -0
- package/CodeLeap-Mobile-Packages.code-workspace +8 -0
- package/dist/components/ActivityIndicator.js +9 -6
- package/dist/components/ActivityIndicator.js.map +1 -1
- package/dist/components/Animated.d.ts +1 -89
- package/dist/components/Animated.js +2 -2
- package/dist/components/Animated.js.map +1 -1
- package/dist/components/Button.d.ts +107 -98
- package/dist/components/Button.js +29 -9
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.js +7 -8
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.d.ts +47 -43
- package/dist/components/Checkbox/styles.js +8 -8
- package/dist/components/Checkbox/styles.js.map +1 -1
- package/dist/components/ContentView.js +4 -2
- package/dist/components/ContentView.js.map +1 -1
- package/dist/components/FileInput.d.ts +10 -3
- package/dist/components/FileInput.js +94 -32
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/Icon.d.ts +4 -6
- package/dist/components/Icon.js +25 -11
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Image.d.ts +7 -6
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.js.map +1 -1
- package/dist/components/List.d.ts +11 -0
- package/dist/components/List.js +77 -0
- package/dist/components/List.js.map +1 -0
- package/dist/components/Modal/index.d.ts +2 -1
- package/dist/components/Modal/index.js +23 -30
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/styles.d.ts +51 -47
- package/dist/components/Modal/styles.js +13 -18
- package/dist/components/Modal/styles.js.map +1 -1
- package/dist/components/Navigation/Navigation.d.ts +3 -0
- package/dist/components/Navigation/Navigation.js +76 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/constants.d.ts +5 -0
- package/dist/components/Navigation/constants.js +11 -0
- package/dist/components/Navigation/constants.js.map +1 -0
- package/dist/components/Navigation/index.d.ts +3 -0
- package/dist/components/Navigation/index.js +16 -0
- package/dist/components/Navigation/index.js.map +1 -0
- package/dist/components/Navigation/types.d.ts +26 -0
- package/dist/components/Navigation/types.js +8 -0
- package/dist/components/Navigation/types.js.map +1 -0
- package/dist/components/Navigation/utils.d.ts +3 -0
- package/dist/components/Navigation/utils.js +67 -0
- package/dist/components/Navigation/utils.js.map +1 -0
- package/dist/components/Overlay.d.ts +5 -5
- package/dist/components/Overlay.js +13 -15
- package/dist/components/Overlay.js.map +1 -1
- package/dist/components/Pager/index.d.ts +19 -0
- package/dist/components/Pager/index.js +164 -0
- package/dist/components/Pager/index.js.map +1 -0
- package/dist/components/Pager/styles.d.ts +51 -0
- package/dist/components/Pager/styles.js +44 -0
- package/dist/components/Pager/styles.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +1 -0
- package/dist/components/RadioInput/index.js +13 -19
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.d.ts +48 -44
- package/dist/components/RadioInput/styles.js +4 -4
- package/dist/components/RadioInput/styles.js.map +1 -1
- package/dist/components/Scroll.d.ts +3 -2
- package/dist/components/Scroll.js +11 -8
- package/dist/components/Scroll.js.map +1 -1
- package/dist/components/Sections.d.ts +11 -0
- package/dist/components/Sections.js +77 -0
- package/dist/components/Sections.js.map +1 -0
- package/dist/components/Select/index.d.ts +5 -2
- package/dist/components/Select/index.js +118 -5
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.d.ts +9 -0
- package/dist/components/Select/styles.js +57 -0
- package/dist/components/Select/styles.js.map +1 -0
- package/dist/components/Select/types.d.ts +33 -0
- package/dist/components/Select/types.js +3 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/Slider/Mark.d.ts +3 -0
- package/dist/components/Slider/Mark.js +32 -0
- package/dist/components/Slider/Mark.js.map +1 -0
- package/dist/components/Slider/Thumb.d.ts +7 -0
- package/dist/components/Slider/Thumb.js +30 -0
- package/dist/components/Slider/Thumb.js.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.js +94 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/{Slider.d.ts → Slider/types.d.ts} +12 -7
- package/dist/components/Slider/types.js +3 -0
- package/dist/components/Slider/types.js.map +1 -0
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.js +6 -7
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Text.js +5 -5
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextInput.d.ts +108 -94
- package/dist/components/TextInput.js +28 -25
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/Touchable.d.ts +1 -0
- package/dist/components/Touchable.js +9 -11
- package/dist/components/Touchable.js.map +1 -1
- package/dist/components/View.d.ts +97 -175
- package/dist/components/View.js +4 -4
- package/dist/components/View.js.map +1 -1
- package/dist/components/{index.d.ts → components.d.ts} +3 -0
- package/dist/components/{index.js → components.js} +4 -1
- package/dist/components/components.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/documentPicker.d.ts +3 -1
- package/dist/modules/documentPicker.js +6 -4
- package/dist/modules/documentPicker.js.map +1 -1
- package/dist/modules/fastImage.js +1 -1
- package/dist/modules/fastImage.js.map +1 -1
- package/dist/modules/reactNavigation.d.ts +3 -0
- package/dist/modules/reactNavigation.js +11 -0
- package/dist/modules/reactNavigation.js.map +1 -0
- package/dist/modules/types/fileTypes.d.ts +138 -0
- package/dist/modules/types/fileTypes.js +3 -0
- package/dist/modules/types/fileTypes.js.map +1 -0
- package/dist/types/utility.d.ts +1 -1
- package/dist/utils/OSAlert.d.ts +3 -3
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/misc.d.ts +2 -0
- package/dist/utils/misc.js +26 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/styles.js +1 -1
- package/dist/utils/styles.js.map +1 -1
- package/package.json +6 -3
- package/src/components/ActivityIndicator.tsx +38 -28
- package/src/components/Animated.tsx +22 -19
- package/src/components/Button.tsx +67 -34
- package/src/components/Checkbox/index.tsx +60 -48
- package/src/components/Checkbox/styles.ts +39 -30
- package/src/components/ContentView.tsx +24 -18
- package/src/components/FileInput.tsx +161 -52
- package/src/components/Icon.tsx +36 -23
- package/src/components/Image.tsx +42 -36
- package/src/components/List.tsx +100 -0
- package/src/components/Modal/index.tsx +109 -94
- package/src/components/Modal/styles.ts +62 -66
- package/src/components/Navigation/Navigation.tsx +51 -0
- package/src/components/Navigation/constants.ts +8 -0
- package/src/components/Navigation/index.tsx +3 -0
- package/src/components/Navigation/types.ts +37 -0
- package/src/components/Navigation/utils.tsx +54 -0
- package/src/components/Overlay.tsx +68 -64
- package/src/components/Pager/index.tsx +241 -0
- package/src/components/Pager/styles.ts +51 -0
- package/src/components/RadioInput/index.tsx +76 -52
- package/src/components/RadioInput/styles.ts +23 -18
- package/src/components/Scroll.tsx +84 -73
- package/src/components/Select/index.tsx +179 -6
- package/src/components/Select/styles.ts +81 -0
- package/src/components/Select/types.ts +41 -0
- package/src/components/Slider/Mark.tsx +46 -0
- package/src/components/Slider/Thumb.tsx +29 -0
- package/src/components/Slider/index.tsx +123 -0
- package/src/components/Slider/types.ts +25 -0
- package/src/components/Switch.tsx +63 -54
- package/src/components/Text.tsx +22 -23
- package/src/components/TextInput.tsx +195 -198
- package/src/components/Touchable.tsx +43 -30
- package/src/components/View.tsx +32 -29
- package/src/components/components.ts +26 -0
- package/src/index.ts +6 -3
- package/src/modules/documentPicker.ts +8 -2
- package/src/modules/fastImage.ts +2 -2
- package/src/modules/index.d.ts +496 -0
- package/src/modules/reactNavigation.ts +4 -0
- package/src/modules/types/documentPicker.d.ts +215 -0
- package/src/modules/types/fileTypes.ts +138 -0
- package/src/types/utility.ts +2 -2
- package/src/utils/OSAlert.ts +35 -33
- package/src/utils/misc.ts +24 -0
- package/src/utils/styles.ts +14 -17
- package/dist/components/Drawer.d.ts +0 -23
- package/dist/components/Drawer.js +0 -78
- package/dist/components/Drawer.js.map +0 -1
- package/dist/components/Navigation.d.ts +0 -30
- package/dist/components/Navigation.js +0 -126
- package/dist/components/Navigation.js.map +0 -1
- package/dist/components/Slider.js +0 -130
- package/dist/components/Slider.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/modules/cropPicker.d.ts +0 -1
- package/dist/modules/cropPicker.js +0 -10
- package/dist/modules/cropPicker.js.map +0 -1
- package/src/components/Navigation.tsx +0 -125
- package/src/components/Slider.tsx +0 -198
- package/src/components/index.ts +0 -23
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { ModalPropsIOS } from 'react-native'
|
|
2
|
+
import type { PlatformTypes, SupportedPlatforms } from './fileTypes'
|
|
3
|
+
|
|
4
|
+
export declare type DocumentPickerResponse = {
|
|
5
|
+
uri: string;
|
|
6
|
+
name: string;
|
|
7
|
+
copyError?: string;
|
|
8
|
+
fileCopyUri: string | null;
|
|
9
|
+
type: string | null;
|
|
10
|
+
size: number | null;
|
|
11
|
+
};
|
|
12
|
+
export declare const types: Readonly<{
|
|
13
|
+
readonly allFiles: '*/*';
|
|
14
|
+
readonly audio: 'audio/*';
|
|
15
|
+
readonly csv: 'text/csv';
|
|
16
|
+
readonly doc: 'application/msword';
|
|
17
|
+
readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
18
|
+
readonly images: 'image/*';
|
|
19
|
+
readonly pdf: 'application/pdf';
|
|
20
|
+
readonly plainText: 'text/plain';
|
|
21
|
+
readonly ppt: 'application/vnd.ms-powerpoint';
|
|
22
|
+
readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
23
|
+
readonly video: 'video/*';
|
|
24
|
+
readonly xls: 'application/vnd.ms-excel';
|
|
25
|
+
readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
26
|
+
readonly zip: 'application/zip';
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
readonly allFiles: 'public.item';
|
|
29
|
+
readonly audio: 'public.audio';
|
|
30
|
+
readonly csv: 'public.comma-separated-values-text';
|
|
31
|
+
readonly doc: 'com.microsoft.word.doc';
|
|
32
|
+
readonly docx: 'org.openxmlformats.wordprocessingml.document';
|
|
33
|
+
readonly images: 'public.image';
|
|
34
|
+
readonly pdf: 'com.adobe.pdf';
|
|
35
|
+
readonly plainText: 'public.plain-text';
|
|
36
|
+
readonly ppt: 'com.microsoft.powerpoint.ppt';
|
|
37
|
+
readonly pptx: 'org.openxmlformats.presentationml.presentation';
|
|
38
|
+
readonly video: 'public.movie';
|
|
39
|
+
readonly xls: 'com.microsoft.excel.xls';
|
|
40
|
+
readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet';
|
|
41
|
+
readonly zip: 'public.zip-archive';
|
|
42
|
+
}> | Readonly<{
|
|
43
|
+
readonly allFiles: '*';
|
|
44
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
45
|
+
readonly csv: '.csv';
|
|
46
|
+
readonly doc: '.doc';
|
|
47
|
+
readonly docx: '.docx';
|
|
48
|
+
readonly images: '.jpeg .jpg .png';
|
|
49
|
+
readonly pdf: '.pdf';
|
|
50
|
+
readonly plainText: '.txt';
|
|
51
|
+
readonly ppt: '.ppt';
|
|
52
|
+
readonly pptx: '.pptx';
|
|
53
|
+
readonly video: '.mp4';
|
|
54
|
+
readonly xls: '.xls';
|
|
55
|
+
readonly xlsx: '.xlsx';
|
|
56
|
+
readonly zip: '.zip .gz';
|
|
57
|
+
}>
|
|
58
|
+
export declare type DirectoryPickerResponse = {
|
|
59
|
+
uri: string;
|
|
60
|
+
};
|
|
61
|
+
export declare type DocumentPickerOptions<OS extends SupportedPlatforms> = {
|
|
62
|
+
type?: string | PlatformTypes[OS][keyof PlatformTypes[OS]] | Array<PlatformTypes[OS][keyof PlatformTypes[OS]] | string>;
|
|
63
|
+
mode?: 'import' | 'open';
|
|
64
|
+
copyTo?: 'cachesDirectory' | 'documentDirectory';
|
|
65
|
+
allowMultiSelection?: boolean;
|
|
66
|
+
} & Pick<ModalPropsIOS, 'presentationStyle'>;
|
|
67
|
+
export declare function pickDirectory<
|
|
68
|
+
OS extends SupportedPlatforms>(params?: Pick<DocumentPickerOptions<OS>, 'presentationStyle'>): Promise<DirectoryPickerResponse | null>;
|
|
69
|
+
export declare function pickMultiple<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse[]>;
|
|
70
|
+
export declare function pickSingle<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse>;
|
|
71
|
+
export declare function pick<OS extends SupportedPlatforms>(opts?: DocumentPickerOptions<OS>): Promise<DocumentPickerResponse[]>;
|
|
72
|
+
export declare function releaseSecureAccess(uris: Array<string>): Promise<void>;
|
|
73
|
+
export declare type NativeModuleErrorShape = Error & {
|
|
74
|
+
code?: string;
|
|
75
|
+
};
|
|
76
|
+
export declare function isCancel(err: unknown): boolean;
|
|
77
|
+
export declare function isInProgress(err: unknown): boolean;
|
|
78
|
+
|
|
79
|
+
export type DocumentPicker = {
|
|
80
|
+
isCancel: typeof isCancel;
|
|
81
|
+
releaseSecureAccess: typeof releaseSecureAccess;
|
|
82
|
+
pickDirectory: typeof pickDirectory;
|
|
83
|
+
pick: typeof pick;
|
|
84
|
+
pickMultiple: typeof pickMultiple;
|
|
85
|
+
pickSingle: typeof pickSingle;
|
|
86
|
+
types: Readonly<{
|
|
87
|
+
readonly allFiles: '*/*';
|
|
88
|
+
readonly audio: 'audio/*';
|
|
89
|
+
readonly csv: 'text/csv';
|
|
90
|
+
readonly doc: 'application/msword';
|
|
91
|
+
readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
92
|
+
readonly images: 'image/*';
|
|
93
|
+
readonly pdf: 'application/pdf';
|
|
94
|
+
readonly plainText: 'text/plain';
|
|
95
|
+
readonly ppt: 'application/vnd.ms-powerpoint';
|
|
96
|
+
readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
97
|
+
readonly video: 'video/*';
|
|
98
|
+
readonly xls: 'application/vnd.ms-excel';
|
|
99
|
+
readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
100
|
+
readonly zip: 'application/zip';
|
|
101
|
+
}> | Readonly<{
|
|
102
|
+
readonly allFiles: 'public.item';
|
|
103
|
+
readonly audio: 'public.audio';
|
|
104
|
+
readonly csv: 'public.comma-separated-values-text';
|
|
105
|
+
readonly doc: 'com.microsoft.word.doc';
|
|
106
|
+
readonly docx: 'org.openxmlformats.wordprocessingml.document';
|
|
107
|
+
readonly images: 'public.image';
|
|
108
|
+
readonly pdf: 'com.adobe.pdf';
|
|
109
|
+
readonly plainText: 'public.plain-text';
|
|
110
|
+
readonly ppt: 'com.microsoft.powerpoint.ppt';
|
|
111
|
+
readonly pptx: 'org.openxmlformats.presentationml.presentation';
|
|
112
|
+
readonly video: 'public.movie';
|
|
113
|
+
readonly xls: 'com.microsoft.excel.xls';
|
|
114
|
+
readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet';
|
|
115
|
+
readonly zip: 'public.zip-archive';
|
|
116
|
+
}> | Readonly<{
|
|
117
|
+
readonly allFiles: '*';
|
|
118
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
119
|
+
readonly csv: '.csv';
|
|
120
|
+
readonly doc: '.doc';
|
|
121
|
+
readonly docx: '.docx';
|
|
122
|
+
readonly images: '.jpeg .jpg .png';
|
|
123
|
+
readonly pdf: '.pdf';
|
|
124
|
+
readonly plainText: '.txt';
|
|
125
|
+
readonly ppt: '.ppt';
|
|
126
|
+
readonly pptx: '.pptx';
|
|
127
|
+
readonly video: '.mp4';
|
|
128
|
+
readonly xls: '.xls';
|
|
129
|
+
readonly xlsx: '.xlsx';
|
|
130
|
+
readonly zip: '.zip .gz';
|
|
131
|
+
}>;
|
|
132
|
+
perPlatformTypes: {
|
|
133
|
+
android: Readonly<{
|
|
134
|
+
readonly allFiles: '*/*';
|
|
135
|
+
readonly audio: 'audio/*';
|
|
136
|
+
readonly csv: 'text/csv';
|
|
137
|
+
readonly doc: 'application/msword';
|
|
138
|
+
readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
139
|
+
readonly images: 'image/*';
|
|
140
|
+
readonly pdf: 'application/pdf';
|
|
141
|
+
readonly plainText: 'text/plain';
|
|
142
|
+
readonly ppt: 'application/vnd.ms-powerpoint';
|
|
143
|
+
readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
144
|
+
readonly video: 'video/*';
|
|
145
|
+
readonly xls: 'application/vnd.ms-excel';
|
|
146
|
+
readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
147
|
+
readonly zip: 'application/zip';
|
|
148
|
+
}>;
|
|
149
|
+
ios: Readonly<{
|
|
150
|
+
readonly allFiles: 'public.item';
|
|
151
|
+
readonly audio: 'public.audio';
|
|
152
|
+
readonly csv: 'public.comma-separated-values-text';
|
|
153
|
+
readonly doc: 'com.microsoft.word.doc';
|
|
154
|
+
readonly docx: 'org.openxmlformats.wordprocessingml.document';
|
|
155
|
+
readonly images: 'public.image';
|
|
156
|
+
readonly pdf: 'com.adobe.pdf';
|
|
157
|
+
readonly plainText: 'public.plain-text';
|
|
158
|
+
readonly ppt: 'com.microsoft.powerpoint.ppt';
|
|
159
|
+
readonly pptx: 'org.openxmlformats.presentationml.presentation';
|
|
160
|
+
readonly video: 'public.movie';
|
|
161
|
+
readonly xls: 'com.microsoft.excel.xls';
|
|
162
|
+
readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet';
|
|
163
|
+
readonly zip: 'public.zip-archive';
|
|
164
|
+
}>;
|
|
165
|
+
windows: Readonly<{
|
|
166
|
+
readonly allFiles: '*';
|
|
167
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
168
|
+
readonly csv: '.csv';
|
|
169
|
+
readonly doc: '.doc';
|
|
170
|
+
readonly docx: '.docx';
|
|
171
|
+
readonly images: '.jpeg .jpg .png';
|
|
172
|
+
readonly pdf: '.pdf';
|
|
173
|
+
readonly plainText: '.txt';
|
|
174
|
+
readonly ppt: '.ppt';
|
|
175
|
+
readonly pptx: '.pptx';
|
|
176
|
+
readonly video: '.mp4';
|
|
177
|
+
readonly xls: '.xls';
|
|
178
|
+
readonly xlsx: '.xlsx';
|
|
179
|
+
readonly zip: '.zip .gz';
|
|
180
|
+
}>;
|
|
181
|
+
macos: Readonly<{
|
|
182
|
+
readonly allFiles: '*';
|
|
183
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
184
|
+
readonly csv: '.csv';
|
|
185
|
+
readonly doc: '.doc';
|
|
186
|
+
readonly docx: '.docx';
|
|
187
|
+
readonly images: '.jpeg .jpg .png';
|
|
188
|
+
readonly pdf: '.pdf';
|
|
189
|
+
readonly plainText: '.txt';
|
|
190
|
+
readonly ppt: '.ppt';
|
|
191
|
+
readonly pptx: '.pptx';
|
|
192
|
+
readonly video: '.mp4';
|
|
193
|
+
readonly xls: '.xls';
|
|
194
|
+
readonly xlsx: '.xlsx';
|
|
195
|
+
readonly zip: '.zip .gz';
|
|
196
|
+
}>;
|
|
197
|
+
web: Readonly<{
|
|
198
|
+
readonly allFiles: '*';
|
|
199
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
200
|
+
readonly csv: '.csv';
|
|
201
|
+
readonly doc: '.doc';
|
|
202
|
+
readonly docx: '.docx';
|
|
203
|
+
readonly images: '.jpeg .jpg .png';
|
|
204
|
+
readonly pdf: '.pdf';
|
|
205
|
+
readonly plainText: '.txt';
|
|
206
|
+
readonly ppt: '.ppt';
|
|
207
|
+
readonly pptx: '.pptx';
|
|
208
|
+
readonly video: '.mp4';
|
|
209
|
+
readonly xls: '.xls';
|
|
210
|
+
readonly xlsx: '.xlsx';
|
|
211
|
+
readonly zip: '.zip .gz';
|
|
212
|
+
}>;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
declare const mimeTypes: Readonly<{
|
|
2
|
+
readonly allFiles: '*/*';
|
|
3
|
+
readonly audio: 'audio/*';
|
|
4
|
+
readonly csv: 'text/csv';
|
|
5
|
+
readonly doc: 'application/msword';
|
|
6
|
+
readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
7
|
+
readonly images: 'image/*';
|
|
8
|
+
readonly pdf: 'application/pdf';
|
|
9
|
+
readonly plainText: 'text/plain';
|
|
10
|
+
readonly ppt: 'application/vnd.ms-powerpoint';
|
|
11
|
+
readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
12
|
+
readonly video: 'video/*';
|
|
13
|
+
readonly xls: 'application/vnd.ms-excel';
|
|
14
|
+
readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
15
|
+
readonly zip: 'application/zip';
|
|
16
|
+
}>
|
|
17
|
+
declare const utis: Readonly<{
|
|
18
|
+
readonly allFiles: 'public.item';
|
|
19
|
+
readonly audio: 'public.audio';
|
|
20
|
+
readonly csv: 'public.comma-separated-values-text';
|
|
21
|
+
readonly doc: 'com.microsoft.word.doc';
|
|
22
|
+
readonly docx: 'org.openxmlformats.wordprocessingml.document';
|
|
23
|
+
readonly images: 'public.image';
|
|
24
|
+
readonly pdf: 'com.adobe.pdf';
|
|
25
|
+
readonly plainText: 'public.plain-text';
|
|
26
|
+
readonly ppt: 'com.microsoft.powerpoint.ppt';
|
|
27
|
+
readonly pptx: 'org.openxmlformats.presentationml.presentation';
|
|
28
|
+
readonly video: 'public.movie';
|
|
29
|
+
readonly xls: 'com.microsoft.excel.xls';
|
|
30
|
+
readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet';
|
|
31
|
+
readonly zip: 'public.zip-archive';
|
|
32
|
+
}>
|
|
33
|
+
declare const extensions: Readonly<{
|
|
34
|
+
readonly allFiles: '*';
|
|
35
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
36
|
+
readonly csv: '.csv';
|
|
37
|
+
readonly doc: '.doc';
|
|
38
|
+
readonly docx: '.docx';
|
|
39
|
+
readonly images: '.jpeg .jpg .png';
|
|
40
|
+
readonly pdf: '.pdf';
|
|
41
|
+
readonly plainText: '.txt';
|
|
42
|
+
readonly ppt: '.ppt';
|
|
43
|
+
readonly pptx: '.pptx';
|
|
44
|
+
readonly video: '.mp4';
|
|
45
|
+
readonly xls: '.xls';
|
|
46
|
+
readonly xlsx: '.xlsx';
|
|
47
|
+
readonly zip: '.zip .gz';
|
|
48
|
+
}>
|
|
49
|
+
export declare type PlatformTypes = {
|
|
50
|
+
android: typeof mimeTypes;
|
|
51
|
+
ios: typeof utis;
|
|
52
|
+
windows: typeof extensions;
|
|
53
|
+
};
|
|
54
|
+
export declare type SupportedPlatforms = 'ios' | 'android' | 'windows';
|
|
55
|
+
export declare const perPlatformTypes: {
|
|
56
|
+
android: Readonly<{
|
|
57
|
+
readonly allFiles: '*/*';
|
|
58
|
+
readonly audio: 'audio/*';
|
|
59
|
+
readonly csv: 'text/csv';
|
|
60
|
+
readonly doc: 'application/msword';
|
|
61
|
+
readonly docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
62
|
+
readonly images: 'image/*';
|
|
63
|
+
readonly pdf: 'application/pdf';
|
|
64
|
+
readonly plainText: 'text/plain';
|
|
65
|
+
readonly ppt: 'application/vnd.ms-powerpoint';
|
|
66
|
+
readonly pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
|
|
67
|
+
readonly video: 'video/*';
|
|
68
|
+
readonly xls: 'application/vnd.ms-excel';
|
|
69
|
+
readonly xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
|
70
|
+
readonly zip: 'application/zip';
|
|
71
|
+
}>;
|
|
72
|
+
ios: Readonly<{
|
|
73
|
+
readonly allFiles: 'public.item';
|
|
74
|
+
readonly audio: 'public.audio';
|
|
75
|
+
readonly csv: 'public.comma-separated-values-text';
|
|
76
|
+
readonly doc: 'com.microsoft.word.doc';
|
|
77
|
+
readonly docx: 'org.openxmlformats.wordprocessingml.document';
|
|
78
|
+
readonly images: 'public.image';
|
|
79
|
+
readonly pdf: 'com.adobe.pdf';
|
|
80
|
+
readonly plainText: 'public.plain-text';
|
|
81
|
+
readonly ppt: 'com.microsoft.powerpoint.ppt';
|
|
82
|
+
readonly pptx: 'org.openxmlformats.presentationml.presentation';
|
|
83
|
+
readonly video: 'public.movie';
|
|
84
|
+
readonly xls: 'com.microsoft.excel.xls';
|
|
85
|
+
readonly xlsx: 'org.openxmlformats.spreadsheetml.sheet';
|
|
86
|
+
readonly zip: 'public.zip-archive';
|
|
87
|
+
}>;
|
|
88
|
+
windows: Readonly<{
|
|
89
|
+
readonly allFiles: '*';
|
|
90
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
91
|
+
readonly csv: '.csv';
|
|
92
|
+
readonly doc: '.doc';
|
|
93
|
+
readonly docx: '.docx';
|
|
94
|
+
readonly images: '.jpeg .jpg .png';
|
|
95
|
+
readonly pdf: '.pdf';
|
|
96
|
+
readonly plainText: '.txt';
|
|
97
|
+
readonly ppt: '.ppt';
|
|
98
|
+
readonly pptx: '.pptx';
|
|
99
|
+
readonly video: '.mp4';
|
|
100
|
+
readonly xls: '.xls';
|
|
101
|
+
readonly xlsx: '.xlsx';
|
|
102
|
+
readonly zip: '.zip .gz';
|
|
103
|
+
}>;
|
|
104
|
+
macos: Readonly<{
|
|
105
|
+
readonly allFiles: '*';
|
|
106
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
107
|
+
readonly csv: '.csv';
|
|
108
|
+
readonly doc: '.doc';
|
|
109
|
+
readonly docx: '.docx';
|
|
110
|
+
readonly images: '.jpeg .jpg .png';
|
|
111
|
+
readonly pdf: '.pdf';
|
|
112
|
+
readonly plainText: '.txt';
|
|
113
|
+
readonly ppt: '.ppt';
|
|
114
|
+
readonly pptx: '.pptx';
|
|
115
|
+
readonly video: '.mp4';
|
|
116
|
+
readonly xls: '.xls';
|
|
117
|
+
readonly xlsx: '.xlsx';
|
|
118
|
+
readonly zip: '.zip .gz';
|
|
119
|
+
}>;
|
|
120
|
+
web: Readonly<{
|
|
121
|
+
readonly allFiles: '*';
|
|
122
|
+
readonly audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma';
|
|
123
|
+
readonly csv: '.csv';
|
|
124
|
+
readonly doc: '.doc';
|
|
125
|
+
readonly docx: '.docx';
|
|
126
|
+
readonly images: '.jpeg .jpg .png';
|
|
127
|
+
readonly pdf: '.pdf';
|
|
128
|
+
readonly plainText: '.txt';
|
|
129
|
+
readonly ppt: '.ppt';
|
|
130
|
+
readonly pptx: '.pptx';
|
|
131
|
+
readonly video: '.mp4';
|
|
132
|
+
readonly xls: '.xls';
|
|
133
|
+
readonly xlsx: '.xlsx';
|
|
134
|
+
readonly zip: '.zip .gz';
|
|
135
|
+
}>;
|
|
136
|
+
}
|
|
137
|
+
export declare const typesAreEqual: true
|
|
138
|
+
export {}
|
package/src/types/utility.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StyleProp } from
|
|
1
|
+
import { StyleProp } from 'react-native'
|
|
2
2
|
|
|
3
|
-
export type StylesOf<C extends string> = Partial<Record<C, StyleProp<any
|
|
3
|
+
export type StylesOf<C extends string> = Partial<Record<C, StyleProp<any>>>;
|
package/src/utils/OSAlert.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint no-restricted-imports: 'off' */
|
|
2
2
|
import { Alert, AlertButton } from 'react-native'
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Alert.{function} receives three parameters, the last one being an object:
|
|
7
6
|
*
|
|
@@ -14,19 +13,18 @@ import { Alert, AlertButton } from 'react-native'
|
|
|
14
13
|
* @property {function} run callback function to run on press
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
|
-
type NativeAlertArgs = Parameters<typeof Alert.alert
|
|
16
|
+
type NativeAlertArgs = Parameters<typeof Alert.alert>;
|
|
18
17
|
|
|
19
18
|
type OSAlertArgs = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
type AlertEvent = AlertButton['onPress']
|
|
19
|
+
title: NativeAlertArgs['0'];
|
|
20
|
+
body?: NativeAlertArgs['1'];
|
|
21
|
+
options?: NativeAlertArgs['2'];
|
|
22
|
+
};
|
|
23
|
+
type AlertEvent = AlertButton['onPress'];
|
|
25
24
|
|
|
26
|
-
type NamedEvents<E extends string> = Partial<Record<E, AlertEvent
|
|
27
|
-
|
|
28
|
-
function ask({ title, body, options = null }:OSAlertArgs) {
|
|
25
|
+
type NamedEvents<E extends string> = Partial<Record<E, AlertEvent>>;
|
|
29
26
|
|
|
27
|
+
function ask({ title, body, options = null }: OSAlertArgs) {
|
|
30
28
|
if (!title) {
|
|
31
29
|
title = 'Quick quetion'
|
|
32
30
|
}
|
|
@@ -37,8 +35,12 @@ function ask({ title, body, options = null }:OSAlertArgs) {
|
|
|
37
35
|
})
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
function warn({
|
|
41
|
-
|
|
38
|
+
function warn({
|
|
39
|
+
title,
|
|
40
|
+
body,
|
|
41
|
+
onAccept,
|
|
42
|
+
onReject,
|
|
43
|
+
}: OSAlertArgs & NamedEvents<'onReject' | 'onAccept'>) {
|
|
42
44
|
if (!title) {
|
|
43
45
|
title = 'Hang on'
|
|
44
46
|
}
|
|
@@ -54,7 +56,7 @@ function warn({ title, body, onAccept, onReject }:OSAlertArgs & NamedEvents<'onR
|
|
|
54
56
|
options: [
|
|
55
57
|
{
|
|
56
58
|
text: 'Cancel',
|
|
57
|
-
onPress:onReject,
|
|
59
|
+
onPress: onReject,
|
|
58
60
|
},
|
|
59
61
|
{
|
|
60
62
|
text: 'OK',
|
|
@@ -65,8 +67,11 @@ function warn({ title, body, onAccept, onReject }:OSAlertArgs & NamedEvents<'onR
|
|
|
65
67
|
})
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
function info({
|
|
69
|
-
|
|
70
|
+
function info({
|
|
71
|
+
title,
|
|
72
|
+
body,
|
|
73
|
+
onDismiss = () => null,
|
|
74
|
+
}: OSAlertArgs & NamedEvents<'onDismiss'>) {
|
|
70
75
|
if (!title) {
|
|
71
76
|
title = 'FYI'
|
|
72
77
|
}
|
|
@@ -76,13 +81,17 @@ function info({ title, body, onDismiss = () => null }:OSAlertArgs & NamedEvents<
|
|
|
76
81
|
options: [
|
|
77
82
|
{
|
|
78
83
|
text: 'OK',
|
|
79
|
-
onPress:onDismiss,
|
|
84
|
+
onPress: onDismiss,
|
|
80
85
|
},
|
|
81
86
|
],
|
|
82
87
|
})
|
|
83
88
|
}
|
|
84
89
|
|
|
85
|
-
function OSError({
|
|
90
|
+
function OSError({
|
|
91
|
+
title,
|
|
92
|
+
body,
|
|
93
|
+
onDismiss = () => null,
|
|
94
|
+
}: OSAlertArgs & NamedEvents<'onDismiss'>) {
|
|
86
95
|
if (!title) {
|
|
87
96
|
title = 'Whoops!'
|
|
88
97
|
}
|
|
@@ -101,22 +110,15 @@ function OSError({ title, body, onDismiss = () => null }:OSAlertArgs & NamedEven
|
|
|
101
110
|
})
|
|
102
111
|
}
|
|
103
112
|
|
|
104
|
-
function OSAlert(params:OSAlertArgs) {
|
|
105
|
-
Alert.alert(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
params.options,
|
|
109
|
-
{
|
|
110
|
-
cancelable: false,
|
|
111
|
-
},
|
|
112
|
-
)
|
|
113
|
+
function OSAlert(params: OSAlertArgs) {
|
|
114
|
+
Alert.alert(params.title, params.body, params.options, {
|
|
115
|
+
cancelable: false,
|
|
116
|
+
})
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
|
|
116
119
|
export default {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
ask,
|
|
121
|
+
warn,
|
|
122
|
+
info,
|
|
123
|
+
error: OSError,
|
|
124
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MobileInputFile, parseFilePathData } from '@codeleap/common'
|
|
2
|
+
|
|
3
|
+
export const stringToFile = (str: string): MobileInputFile => {
|
|
4
|
+
if (!str) {
|
|
5
|
+
return {
|
|
6
|
+
file: null,
|
|
7
|
+
preview: null,
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const fileData = parseFilePathData(str)
|
|
11
|
+
|
|
12
|
+
const data: MobileInputFile['file'] = {
|
|
13
|
+
name: fileData.name,
|
|
14
|
+
type: 'image/' + fileData.extension,
|
|
15
|
+
size: 1000,
|
|
16
|
+
uri: str,
|
|
17
|
+
fileCopyUri: str,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
file: data,
|
|
22
|
+
preview: data.uri,
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/utils/styles.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StyleSheet } from
|
|
3
|
-
|
|
4
|
-
export function useLogStyles(){
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { useCodeleapContext } from '@codeleap/common'
|
|
2
|
+
import { StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
export function useLogStyles() {
|
|
5
|
+
const { logger } = useCodeleapContext()
|
|
6
|
+
|
|
7
|
+
return (name, styles) => {
|
|
8
|
+
logger.debug.blue(
|
|
9
|
+
name,
|
|
10
|
+
JSON.stringify(StyleSheet.flatten(styles), null, 2),
|
|
11
|
+
'Component Styles',
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AnyFunction, ComponentVariants, DrawerComposition, DrawerStyles, StylesOf } from "@codeleap/common";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
declare const axisMap: {
|
|
5
|
-
readonly top: readonly [-1, "Y"];
|
|
6
|
-
readonly bottom: readonly [1, "Y"];
|
|
7
|
-
readonly left: readonly [-1, "X"];
|
|
8
|
-
readonly right: readonly [1, "X"];
|
|
9
|
-
};
|
|
10
|
-
export declare type DrawerProps = {
|
|
11
|
-
open: boolean;
|
|
12
|
-
toggle: AnyFunction;
|
|
13
|
-
darkenBackground?: boolean;
|
|
14
|
-
size: number;
|
|
15
|
-
showCloseButton?: boolean;
|
|
16
|
-
title?: ReactNode;
|
|
17
|
-
footer?: ReactNode;
|
|
18
|
-
position?: keyof typeof axisMap;
|
|
19
|
-
styles?: StylesOf<DrawerComposition>;
|
|
20
|
-
animationDuration?: string;
|
|
21
|
-
} & ComponentVariants<typeof DrawerStyles>;
|
|
22
|
-
export declare const Drawer: React.FC<DrawerProps>;
|
|
23
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Drawer = void 0;
|
|
23
|
-
var React = __importStar(require("react"));
|
|
24
|
-
var common_1 = require("@codeleap/common");
|
|
25
|
-
var react_native_1 = require("react-native");
|
|
26
|
-
var View_1 = require("./View");
|
|
27
|
-
var View_2 = require("./View");
|
|
28
|
-
var styles_1 = require("../utils/styles");
|
|
29
|
-
var Touchable_1 = require("./Touchable");
|
|
30
|
-
var height = react_native_1.Dimensions.get('screen').height;
|
|
31
|
-
var axisMap = {
|
|
32
|
-
top: [-1, 'Y'],
|
|
33
|
-
bottom: [1, 'Y'],
|
|
34
|
-
left: [-1, 'X'],
|
|
35
|
-
right: [1, 'X'],
|
|
36
|
-
};
|
|
37
|
-
var Drawer = function (drawerProps) {
|
|
38
|
-
var open = drawerProps.open, variants = drawerProps.variants, responsiveVariants = drawerProps.responsiveVariants, styles = drawerProps.styles, size = drawerProps.size, children = drawerProps.children, toggle = drawerProps.toggle;
|
|
39
|
-
// const slideAnim = useRef(new Animated.Value(0)).current
|
|
40
|
-
var variantStyles = (0, common_1.useComponentStyle)('Drawer', {
|
|
41
|
-
variants: variants,
|
|
42
|
-
responsiveVariants: responsiveVariants,
|
|
43
|
-
styles: styles,
|
|
44
|
-
});
|
|
45
|
-
// onUpdate(() => {
|
|
46
|
-
// if(open){
|
|
47
|
-
// Animated.timing(slideAnim,{
|
|
48
|
-
// toValue: 0,
|
|
49
|
-
// duration: 600,
|
|
50
|
-
// useNativeDriver: true
|
|
51
|
-
// }).start()
|
|
52
|
-
// }else{
|
|
53
|
-
// Animated.timing(slideAnim,{
|
|
54
|
-
// toValue: 0.5,
|
|
55
|
-
// duration: 600,
|
|
56
|
-
// useNativeDriver: true
|
|
57
|
-
// }).start()
|
|
58
|
-
// }
|
|
59
|
-
// },[open])
|
|
60
|
-
var logStyles = (0, styles_1.useLogStyles)();
|
|
61
|
-
logStyles('Drawer ', [variantStyles.box, {
|
|
62
|
-
transform: [{ translateX: open ? 0 : 100 }],
|
|
63
|
-
width: size,
|
|
64
|
-
height: '100%'
|
|
65
|
-
}]);
|
|
66
|
-
return <View_2.View variants={['whole']} style={variantStyles.wrapper} pointerEvents={open ? 'auto' : 'none'}>
|
|
67
|
-
<Touchable_1.AnimatedTouchable onPress={function () { return toggle(); }} style={[variantStyles.overlay, { opacity: open ? 0.5 : 0 }]}/>
|
|
68
|
-
<View_1.AnimatedView style={[variantStyles.box, {
|
|
69
|
-
transform: [{ translateX: open ? 0 : -size }],
|
|
70
|
-
width: size,
|
|
71
|
-
height: height
|
|
72
|
-
}]}>
|
|
73
|
-
{children}
|
|
74
|
-
</View_1.AnimatedView>
|
|
75
|
-
</View_2.View>;
|
|
76
|
-
};
|
|
77
|
-
exports.Drawer = Drawer;
|
|
78
|
-
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/components/Drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAAsJ;AAEtJ,6CAAyC;AACzC,+BAAqC;AACrC,+BAA6B;AAC7B,0CAA8C;AAC9C,yCAA+C;AACxC,IAAA,MAAM,GAAI,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,OAA5B,CAA4B;AACzC,IAAM,OAAO,GAAG;IACZ,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;IAChB,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;CACP,CAAA;AAeL,IAAM,MAAM,GAAyB,UAAC,WAAW;IAEhD,IAAA,IAAI,GAOJ,WAAW,KAPP,EACJ,QAAQ,GAMR,WAAW,SANH,EACR,kBAAkB,GAKlB,WAAW,mBALO,EAClB,MAAM,GAIN,WAAW,OAJL,EACN,IAAI,GAGJ,WAAW,KAHP,EACJ,QAAQ,GAER,WAAW,SAFH,EACR,MAAM,GACN,WAAW,OADL,CACK;IAEf,0DAA0D;IAG1D,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,QAAQ,EAAE;QAC9C,QAAQ,UAAA;QACR,kBAAkB,oBAAA;QAClB,MAAM,QAAA;KAET,CAAC,CAAA;IACF,mBAAmB;IACnB,gBAAgB;IAEhB,sCAAsC;IACtC,0BAA0B;IAC1B,6BAA6B;IAC7B,oCAAoC;IACpC,qBAAqB;IACrB,aAAa;IACb,sCAAsC;IACtC,4BAA4B;IAC5B,6BAA6B;IAC7B,oCAAoC;IACpC,qBAAqB;IACrB,QAAQ;IACR,YAAY;IAEZ,IAAM,SAAS,GAAG,IAAA,qBAAY,GAAE,CAAA;IAEhC,SAAS,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE;YACrC,SAAS,EAAE,CAAC,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAC,CAAC;YACzC,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,MAAM;SACjB,CAAC,CAAC,CAAA;IAEH,OAAO,CAAC,WAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAClG;QAAA,CAAC,6BAAiB,CACd,OAAO,CAAC,CAAC,cAAM,OAAA,MAAM,EAAE,EAAR,CAAQ,CAAC,CACxB,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAEhE;QAAA,CAAC,mBAAY,CACT,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE;gBACvB,SAAS,EAAE,CAAC,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAC,CAAC;gBAC3C,KAAK,EAAE,IAAI;gBACX,MAAM,EAAE,MAAM;aACjB,CAAC,CAAC,CAEH;YAAA,CAAC,QAAQ,CACb;QAAA,EAAE,mBAAY,CAClB;IAAA,EAAE,WAAI,CAAC,CAAA;AAEX,CAAC,CAAA;AA7DY,QAAA,MAAM,UA6DlB"}
|