mg-library 1.0.748 → 1.0.750
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 +14 -7
- package/components.js +0 -43
- package/mg-library.rar +0 -0
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -5,7 +5,7 @@ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityI
|
|
5
5
|
import * as ImageManipulator from 'expo-image-manipulator';
|
6
6
|
import { Camera, CameraType, CameraView } from 'expo-camera';
|
7
7
|
import axios from 'axios';
|
8
|
-
import { Box, Input, InputField } from '@gluestack-ui/themed';
|
8
|
+
import { Box, Input, InputField, IconButton } from '@gluestack-ui/themed';
|
9
9
|
import { uploadFile } from '@uploadcare/upload-client';
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
11
11
|
|
@@ -162,6 +162,7 @@ export function MGBenefits(props) {
|
|
162
162
|
export function MGLogin(props) {
|
163
163
|
|
164
164
|
const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
|
165
|
+
const [isKeyboardNumericForPassword, setIsKeyboardNumericForPassword] = useState(true);
|
165
166
|
|
166
167
|
const { control, handleSubmit, formState: { errors } } = useForm({
|
167
168
|
defaultValues: props.defaultValues,
|
@@ -246,11 +247,12 @@ export function MGLogin(props) {
|
|
246
247
|
rules={{ maxLength: 50 }}
|
247
248
|
render={({ field: { onChange, value } }) => (
|
248
249
|
<Input size="lg"
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
250
|
+
variant="outline"
|
251
|
+
px="$3"
|
252
|
+
rounded="$md"
|
253
|
+
bg="$white"
|
254
|
+
borderColor="$gray300"
|
255
|
+
mb={10}>
|
254
256
|
<InputField
|
255
257
|
placeholder={mgFunctionsLib.i18nString('userName', props.language)}
|
256
258
|
placeholderTextColor="$gray300"
|
@@ -281,7 +283,7 @@ export function MGLogin(props) {
|
|
281
283
|
onChangeText={onChange}
|
282
284
|
secureTextEntry
|
283
285
|
maxLength={12}
|
284
|
-
keyboardType="numeric"
|
286
|
+
keyboardType={isKeyboardNumericForPassword ? "numeric" : "default"}
|
285
287
|
autoCapitalize="none"
|
286
288
|
autoCorrect={false}
|
287
289
|
returnKeyType="done"
|
@@ -319,6 +321,11 @@ export function MGLogin(props) {
|
|
319
321
|
name="password" />
|
320
322
|
}
|
321
323
|
</MGCard>
|
324
|
+
<IconButton
|
325
|
+
icon={<Icon as={MaterialCommunityIcons} name="alert-outline" size={48} color="$primary500" mb="$3" />}
|
326
|
+
onPress={() => setIsKeyboardNumericForPassword(!isKeyboardNumericForPassword)}
|
327
|
+
aria-label="Notifications"
|
328
|
+
/>
|
322
329
|
</View>
|
323
330
|
</View>
|
324
331
|
</Box>
|
package/components.js
CHANGED
@@ -167,49 +167,6 @@ export function MGButton({
|
|
167
167
|
);
|
168
168
|
}
|
169
169
|
|
170
|
-
/* export function MGPopover(props) {
|
171
|
-
const { title, icon, language, callback } = props;
|
172
|
-
const [open, setOpen] = useState(false);
|
173
|
-
const handleConfirm = async () => {
|
174
|
-
try { await callback?.(); } finally { setOpen(false); }
|
175
|
-
};
|
176
|
-
return (
|
177
|
-
<Popover
|
178
|
-
trigger={(triggerProps) => (
|
179
|
-
<Button {...triggerProps} action="primary" variant="solid">
|
180
|
-
<Icon as={MaterialCommunityIcons} name="alert-outline" mr="$2" color="$white" />
|
181
|
-
<ButtonText>{props.title}</ButtonText>
|
182
|
-
</Button>
|
183
|
-
)}
|
184
|
-
>
|
185
|
-
<PopoverBackdrop />
|
186
|
-
<PopoverContent w={300} bg="$white" zIndex={9999} elevation={24}>
|
187
|
-
<PopoverArrow />
|
188
|
-
<PopoverCloseButton />
|
189
|
-
<PopoverBody>
|
190
|
-
<Box alignItems="center" justifyContent="center">
|
191
|
-
<Icon as={MaterialCommunityIcons} name="alert-outline" size={16} color="$primary500" mb="$3" />
|
192
|
-
<MGText textAlign="center">
|
193
|
-
{mgFunctionsLib.i18nString('confirm', language)}?
|
194
|
-
</MGText>
|
195
|
-
</Box>
|
196
|
-
</PopoverBody>
|
197
|
-
<PopoverFooter>
|
198
|
-
<Box style={{flex: 1}} flexDirection="row" justifyContent="space-around" mt="$5" mb="$5">
|
199
|
-
<Button action="primary" variant="solid" onPress={handleConfirm}>
|
200
|
-
<ButtonText>{mgFunctionsLib.i18nString('yes', language)}</ButtonText>
|
201
|
-
</Button>
|
202
|
-
<Button action="primary" variant="outline" onPress={() => setOpen(false)}>
|
203
|
-
<ButtonText>{mgFunctionsLib.i18nString('no', language)}</ButtonText>
|
204
|
-
</Button>
|
205
|
-
</Box>
|
206
|
-
</PopoverFooter>
|
207
|
-
</PopoverContent>
|
208
|
-
</Popover>
|
209
|
-
);
|
210
|
-
}
|
211
|
-
*/
|
212
|
-
|
213
170
|
export function MGPopover(props) {
|
214
171
|
const { title, icon, language, callback } = props;
|
215
172
|
const [open, setOpen] = useState(false);
|
package/mg-library.rar
CHANGED
Binary file
|