mg-library 1.0.685 → 1.0.687

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/blocks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useState, useEffect } from 'react';
2
2
  import { useForm, Controller } from 'react-hook-form';
3
- import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensions, TextInput, StyleSheet } from 'react-native';
3
+ import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensions, StyleSheet } from 'react-native';
4
4
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
5
5
  import * as ImageManipulator from 'expo-image-manipulator';
6
6
  import { Camera, CameraType, CameraView } from 'expo-camera';
@@ -223,98 +223,6 @@ export function MGLogin(props) {
223
223
  </View>
224
224
  );
225
225
 
226
- /* return (
227
- <View style={{ flex: 1 }}>
228
- <Box style={[mgFunctionsLib.safeAreaViewStyleSheet(insets).safeAreaView, { display: 'flex', flexDirection: 'column', flexGrow: 1 }]}>
229
- <View style={{ flexDirection: 'column', flexGrow: 1, justifyContent: 'center' }}>
230
- {isKeyboardVisible &&
231
- <View style={{ flexDirection: 'column', alignItems: 'center', marginBottom: 10 }}>
232
- <>
233
- <Image
234
- source={require('./assets/clubonline.png')}
235
- style={{ width: 180, height: 90 }} />
236
- </>
237
- </View>
238
- }
239
- {!isKeyboardVisible &&
240
- <View style={{ flexDirection: 'column', alignItems: 'center', marginBottom: 100 }}>
241
- <>
242
- <Image
243
- source={require('./assets/clubonline.png')}
244
- style={{ width: 300, height: 150 }} />
245
- <View style={{ marginHorizontal: 10, flexDirection: 'column', alignItems: 'center' }}>
246
- <MGText style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</MGText>
247
- <MGText style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</MGText>
248
- </View>
249
- </>
250
- </View>
251
- }
252
- <View>
253
- <MGCard style={{ flexDirection: 'column', justifyContent: 'center', alignContent: 'center', marginLeft: 30, marginRight: 30 }}
254
- header={cardHeader}
255
- footer={cardFooter}>
256
- <Controller
257
- control={control}
258
- rules={{ maxLength: 50 }}
259
- render={({ field: { onChange, value } }) => (
260
- <TextInput
261
- style={nbStyles.input}
262
- placeholder={mgFunctionsLib.i18nString('userName', props.language)}
263
- placeholderTextColor="#888"
264
- onChangeText={onChange}
265
- value={value}
266
- />
267
- )}
268
- name="userName" />
269
- {props.useNumericKeyboardOnPassword &&
270
- <Controller
271
- control={control}
272
- rules={{ maxLength: 50 }}
273
- render={({ field: { onChange, value } }) => (
274
- <TextInput
275
- style={nbStyles.input}
276
- placeholder={mgFunctionsLib.i18nString('password', props.language)}
277
- placeholderTextColor="#888"
278
- onChangeText={onChange}
279
- value={value}
280
- secureTextEntry
281
- maxLength={12}
282
- keyboardType="numeric"
283
- autoCapitalize="none"
284
- autoCorrect={false}
285
- returnKeyType="done"
286
- />
287
- )}
288
- name='password' />
289
- }
290
- {!props.useNumericKeyboardOnPassword &&
291
- <Controller
292
- control={control}
293
- rules={{ maxLength: 50 }}
294
- render={({ field: { onChange, value } }) => (
295
- <TextInput
296
- style={nbStyles.input}
297
- placeholder={mgFunctionsLib.i18nString('password', props.language)}
298
- placeholderTextColor="#888"
299
- onChangeText={onChange}
300
- value={value}
301
- secureTextEntry
302
- maxLength={12}
303
- autoCapitalize="none"
304
- autoCorrect={false}
305
- returnKeyType="done"
306
- />
307
- )}
308
- name="password" />
309
- }
310
- </MGCard>
311
- </View>
312
- </View>
313
- </Box>
314
- </View>
315
- );
316
- */
317
-
318
226
  return (
319
227
  <View style={{ flex: 1 }}>
320
228
  <Box style={[mgFunctionsLib.safeAreaViewStyleSheet(insets).safeAreaView, { display: 'flex', flexDirection: 'column', flexGrow: 1 }]}>
@@ -349,9 +257,8 @@ export function MGLogin(props) {
349
257
  control={control}
350
258
  rules={{ maxLength: 50 }}
351
259
  render={({ field: { onChange, value } }) => (
352
- <Input size="lg"
260
+ <Input size="xl"
353
261
  variant="outline"
354
- h={40}
355
262
  px="$3"
356
263
  rounded="$md"
357
264
  bg="$white"
@@ -372,9 +279,8 @@ export function MGLogin(props) {
372
279
  rules={{ maxLength: 50 }}
373
280
  render={({ field: { onChange, value } }) => (
374
281
  <Input
375
- size="lg"
282
+ size="xl"
376
283
  variant="outline"
377
- h={40}
378
284
  px="$3"
379
285
  rounded="$md"
380
286
  bg="$white"
@@ -402,9 +308,8 @@ export function MGLogin(props) {
402
308
  rules={{ maxLength: 50 }}
403
309
  render={({ field: { onChange, value } }) => (
404
310
  <Input
405
- size="lg"
311
+ size="xl"
406
312
  variant="outline"
407
- h={40}
408
313
  px="$3"
409
314
  rounded="$md"
410
315
  bg="$white"
package/components.js CHANGED
@@ -28,7 +28,7 @@ export function MGText({ category = 'p1', style, children, ...props }) {
28
28
  );
29
29
  }
30
30
 
31
- export function MGCard({ children, header = null, footer = null, style = {}, ...props }) {
31
+ /* export function MGCard({ children, header = null, footer = null, style = {}, ...props }) {
32
32
  return (
33
33
  <Box
34
34
  borderWidth={1}
@@ -58,6 +58,38 @@ export function MGCard({ children, header = null, footer = null, style = {}, ...
58
58
  </Box>
59
59
  );
60
60
  }
61
+ */
62
+
63
+ export function MGCard({ children, header = null, footer = null, style = {}, ...props }) {
64
+ return (
65
+ <Box
66
+ borderWidth={1}
67
+ rounded="$md"
68
+ borderColor="$trueGray400"
69
+ bg="$white"
70
+ shadow="$5"
71
+ overflow="hidden"
72
+ mb="$4"
73
+ mx="$2"
74
+ style={style}
75
+ {...props}
76
+ >
77
+ {header != null && (
78
+ <>
79
+ <Box p="$4">{header}</Box>
80
+ <MGDivider />
81
+ </>
82
+ )}
83
+ <Box p="$4">{children}</Box>
84
+ {footer != null && (
85
+ <>
86
+ <MGDivider />
87
+ <Box p="$4">{footer}</Box>
88
+ </>
89
+ )}
90
+ </Box>
91
+ );
92
+ }
61
93
 
62
94
  export function MGButton({
63
95
  title,
package/mg-library.rar CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.685",
3
+ "version": "1.0.687",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {