ordering-ui-react-native 0.12.18 → 0.12.19
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/package.json +1 -1
- package/src/config.json +2 -2
- package/themes/business/src/components 2/AcceptOrRejectOrder/index.tsx +0 -389
- package/themes/business/src/components 2/AcceptOrRejectOrder/styles.tsx +0 -36
- package/themes/business/src/components 2/BusinessController/index.tsx +0 -155
- package/themes/business/src/components 2/BusinessController/styles.tsx +0 -19
- package/themes/business/src/components 2/Chat/index.tsx +0 -1152
- package/themes/business/src/components 2/Chat/styles.tsx +0 -12
- package/themes/business/src/components 2/Contacts/index.tsx +0 -299
- package/themes/business/src/components 2/Contacts/styles.tsx +0 -42
- package/themes/business/src/components 2/DriverMap/index.tsx +0 -525
- package/themes/business/src/components 2/FloatingButton/index.tsx +0 -141
- package/themes/business/src/components 2/FloatingButton/styles.tsx +0 -35
- package/themes/business/src/components 2/ForgotPasswordForm/index.tsx +0 -204
- package/themes/business/src/components 2/ForgotPasswordForm/styles.tsx +0 -11
- package/themes/business/src/components 2/GoogleMap/index.tsx +0 -347
- package/themes/business/src/components 2/Home/index.tsx +0 -111
- package/themes/business/src/components 2/Home/styles.tsx +0 -27
- package/themes/business/src/components 2/LanguageSelector/index.tsx +0 -124
- package/themes/business/src/components 2/LanguageSelector/lang_country.json +0 -152
- package/themes/business/src/components 2/LanguageSelector/styles.tsx +0 -17
- package/themes/business/src/components 2/LoginForm/index.tsx +0 -663
- package/themes/business/src/components 2/LoginForm/styles.tsx +0 -48
- package/themes/business/src/components 2/LogoutButton/index.tsx +0 -63
- package/themes/business/src/components 2/MapView/index.tsx +0 -317
- package/themes/business/src/components 2/MessagesOption/index.tsx +0 -337
- package/themes/business/src/components 2/MessagesOption/styles.tsx +0 -27
- package/themes/business/src/components 2/NewOrderNotification/index.tsx +0 -167
- package/themes/business/src/components 2/NewOrderNotification/styles.tsx +0 -8
- package/themes/business/src/components 2/NotFoundSource/index.tsx +0 -52
- package/themes/business/src/components 2/NotFoundSource/styles.tsx +0 -17
- package/themes/business/src/components 2/OrderDetails/Business.tsx +0 -683
- package/themes/business/src/components 2/OrderDetails/Delivery.tsx +0 -454
- package/themes/business/src/components 2/OrderDetails/OrderContentComponent.tsx +0 -391
- package/themes/business/src/components 2/OrderDetails/OrderHeaderComponent.tsx +0 -148
- package/themes/business/src/components 2/OrderDetails/styles.tsx +0 -84
- package/themes/business/src/components 2/OrderMessage/index.tsx +0 -344
- package/themes/business/src/components 2/OrderMessage/styles.tsx +0 -5
- package/themes/business/src/components 2/OrderSummary/index.tsx +0 -700
- package/themes/business/src/components 2/OrderSummary/styles.tsx +0 -61
- package/themes/business/src/components 2/OrdersOption/index.tsx +0 -755
- package/themes/business/src/components 2/OrdersOption/styles.tsx +0 -54
- package/themes/business/src/components 2/OrdersOptionBusiness/index.tsx +0 -51
- package/themes/business/src/components 2/OrdersOptionBusiness/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionCity/index.tsx +0 -52
- package/themes/business/src/components 2/OrdersOptionCity/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionDate/index.tsx +0 -52
- package/themes/business/src/components 2/OrdersOptionDate/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionDelivery/index.tsx +0 -35
- package/themes/business/src/components 2/OrdersOptionDelivery/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionDriver/index.tsx +0 -50
- package/themes/business/src/components 2/OrdersOptionDriver/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionPaymethod/index.tsx +0 -49
- package/themes/business/src/components 2/OrdersOptionPaymethod/styles.tsx +0 -8
- package/themes/business/src/components 2/OrdersOptionStatus/index.tsx +0 -46
- package/themes/business/src/components 2/OrdersOptionStatus/styles.tsx +0 -8
- package/themes/business/src/components 2/PhoneInputNumber/index.tsx +0 -160
- package/themes/business/src/components 2/PhoneInputNumber/styles.tsx +0 -3
- package/themes/business/src/components 2/PreviousMessages/index.tsx +0 -304
- package/themes/business/src/components 2/PreviousMessages/styles.tsx +0 -32
- package/themes/business/src/components 2/PreviousOrders/index.tsx +0 -180
- package/themes/business/src/components 2/PreviousOrders/styles.tsx +0 -38
- package/themes/business/src/components 2/ProductItemAccordion/index.tsx +0 -301
- package/themes/business/src/components 2/ProductItemAccordion/styles.tsx +0 -61
- package/themes/business/src/components 2/SearchBar/index.tsx +0 -112
- package/themes/business/src/components 2/SignupForm/index.tsx +0 -530
- package/themes/business/src/components 2/SignupForm/styles.tsx +0 -16
- package/themes/business/src/components 2/StoresList/index.tsx +0 -208
- package/themes/business/src/components 2/StoresList/styles.tsx +0 -26
- package/themes/business/src/components 2/UserFormDetails/index.tsx +0 -513
- package/themes/business/src/components 2/UserFormDetails/styles.tsx +0 -40
- package/themes/business/src/components 2/UserProfileForm/index.tsx +0 -496
- package/themes/business/src/components 2/UserProfileForm/styles.tsx +0 -36
- package/themes/business/src/components 2/VerifyPhone/index.tsx +0 -201
- package/themes/business/src/components 2/VerifyPhone/styles.tsx +0 -43
- package/themes/business/src/components 2/shared/OAlert.tsx +0 -52
- package/themes/business/src/components 2/shared/OButton.tsx +0 -149
- package/themes/business/src/components 2/shared/OChatBubble.tsx +0 -100
- package/themes/business/src/components 2/shared/ODropDown.tsx +0 -195
- package/themes/business/src/components 2/shared/ODropDownCalendar.tsx +0 -328
- package/themes/business/src/components 2/shared/OFab.tsx +0 -54
- package/themes/business/src/components 2/shared/OIcon.tsx +0 -67
- package/themes/business/src/components 2/shared/OIconButton.tsx +0 -127
- package/themes/business/src/components 2/shared/OInput.tsx +0 -144
- package/themes/business/src/components 2/shared/OLink.tsx +0 -76
- package/themes/business/src/components 2/shared/OModal.tsx +0 -275
- package/themes/business/src/components 2/shared/OSegment.tsx +0 -86
- package/themes/business/src/components 2/shared/OText.tsx +0 -55
- package/themes/business/src/components 2/shared/OTextarea.tsx +0 -46
- package/themes/business/src/components 2/shared/OToast.tsx +0 -92
- package/themes/business/src/components 2/shared/index.tsx +0 -27
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TextStyle } from 'react-native';
|
|
3
|
-
import styled, { css } from 'styled-components/native';
|
|
4
|
-
|
|
5
|
-
const SText = styled.Text`
|
|
6
|
-
color: ${(props: any) => props.color || '#344050'};
|
|
7
|
-
font-family: 'Poppins-Regular';
|
|
8
|
-
font-size: ${(props: any) => (props.size ? `${props.size}px` : '14px')};
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
margin-bottom: ${(props: any) =>
|
|
11
|
-
props.hasBottom ? '10px' : props.mBottom ? `${props.mBottom}px` : 0};
|
|
12
|
-
margin-right: ${(props: any) =>
|
|
13
|
-
props.hasBottom ? '10px' : props.mRight ? `${props.mRight}px` : 0};
|
|
14
|
-
margin-left: ${(props: any) =>
|
|
15
|
-
props.hasBottom ? '10px' : props.mLeft ? `${props.mLeft}px` : 0};
|
|
16
|
-
${(props: any) =>
|
|
17
|
-
props.weight &&
|
|
18
|
-
css`
|
|
19
|
-
font-weight: ${props.weight};
|
|
20
|
-
`};
|
|
21
|
-
${(props: any) =>
|
|
22
|
-
props.isWrap &&
|
|
23
|
-
css`
|
|
24
|
-
flex: ${props.weight ? 1 : 0};
|
|
25
|
-
`};
|
|
26
|
-
text-decoration: ${(props : any) => props.textDecorationLine};
|
|
27
|
-
`;
|
|
28
|
-
interface Props {
|
|
29
|
-
color?: string;
|
|
30
|
-
size?: number;
|
|
31
|
-
weight?: any;
|
|
32
|
-
style?: TextStyle;
|
|
33
|
-
children?: JSX.Element | JSX.Element[] | string;
|
|
34
|
-
isWrap?: boolean;
|
|
35
|
-
hasBottom?: boolean;
|
|
36
|
-
mBottom?: any;
|
|
37
|
-
space?: any;
|
|
38
|
-
mRight?: number;
|
|
39
|
-
mLeft?: number;
|
|
40
|
-
numberOfLines?: number;
|
|
41
|
-
ellipsizeMode?: string;
|
|
42
|
-
adjustsFontSizeToFit?: boolean;
|
|
43
|
-
textDecorationLine?: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const OText = (props: Props): React.ReactElement => {
|
|
47
|
-
return (
|
|
48
|
-
<SText {...props} style={props.style}>
|
|
49
|
-
{props.children}
|
|
50
|
-
{props.space && ' '}
|
|
51
|
-
</SText>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default OText;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import styled from 'styled-components/native';
|
|
3
|
-
import { useTheme } from 'styled-components/native';
|
|
4
|
-
|
|
5
|
-
const Wrapper = styled.View`
|
|
6
|
-
border-radius: 10px;
|
|
7
|
-
border: 1px solid ${(props: any) => props.theme.colors.lightGray};
|
|
8
|
-
`;
|
|
9
|
-
const Inner = styled.TextInput`
|
|
10
|
-
height: 100px;
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
interface Props {
|
|
14
|
-
lines?: number;
|
|
15
|
-
value?: string;
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
onChange?: any;
|
|
18
|
-
onFocus?: any;
|
|
19
|
-
textTareaRef?: any;
|
|
20
|
-
autoFocus?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const OTextarea = (props: Props) => {
|
|
24
|
-
const theme = useTheme();
|
|
25
|
-
return (
|
|
26
|
-
<Wrapper>
|
|
27
|
-
<Inner
|
|
28
|
-
ref={props.textTareaRef}
|
|
29
|
-
onFocus={() => props.onFocus()}
|
|
30
|
-
onChangeText={(txt: any) => props.onChange(txt)}
|
|
31
|
-
textAlignVertical={'top'}
|
|
32
|
-
placeholder={props.placeholder}
|
|
33
|
-
placeholderTextColor={theme.colors.arrowColor}
|
|
34
|
-
numberOfLines={props.lines}
|
|
35
|
-
underlineColorAndroid={'transparent'}
|
|
36
|
-
value={props.value}
|
|
37
|
-
autoFocus={props.autoFocus}
|
|
38
|
-
multiline={true}
|
|
39
|
-
selectionColor={theme.colors.primary}
|
|
40
|
-
color={theme.colors.textGray}
|
|
41
|
-
/>
|
|
42
|
-
</Wrapper>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default OTextarea;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Animated, StyleSheet, Text, View } from 'react-native';
|
|
3
|
-
import { ToastType, useToast, useLanguage } from 'ordering-components/native';
|
|
4
|
-
import { useTheme } from 'styled-components/native';
|
|
5
|
-
import { getTraduction } from '../../utils';
|
|
6
|
-
|
|
7
|
-
const fadeDuration = 300;
|
|
8
|
-
const bottomPosition = 20;
|
|
9
|
-
|
|
10
|
-
export const Toast = (props: any) => {
|
|
11
|
-
const [toastConfig, { hideToast }] = useToast();
|
|
12
|
-
const [, t] = useLanguage();
|
|
13
|
-
const opacity = React.useRef(new Animated.Value(0)).current;
|
|
14
|
-
const theme = useTheme();
|
|
15
|
-
|
|
16
|
-
const fadeIn = React.useCallback(() => {
|
|
17
|
-
Animated.timing(opacity, {
|
|
18
|
-
toValue: 1,
|
|
19
|
-
duration: fadeDuration,
|
|
20
|
-
useNativeDriver: true,
|
|
21
|
-
}).start();
|
|
22
|
-
}, [opacity]);
|
|
23
|
-
|
|
24
|
-
const fadeOut = React.useCallback(() => {
|
|
25
|
-
Animated.timing(opacity, {
|
|
26
|
-
toValue: 0,
|
|
27
|
-
duration: fadeDuration,
|
|
28
|
-
useNativeDriver: true,
|
|
29
|
-
}).start(() => {
|
|
30
|
-
hideToast();
|
|
31
|
-
});
|
|
32
|
-
}, [opacity, hideToast]);
|
|
33
|
-
|
|
34
|
-
React.useEffect(() => {
|
|
35
|
-
if (!toastConfig) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fadeIn();
|
|
40
|
-
const timer = setTimeout(fadeOut, toastConfig.duration);
|
|
41
|
-
|
|
42
|
-
return () => clearTimeout(timer);
|
|
43
|
-
}, [toastConfig, fadeIn, fadeOut]);
|
|
44
|
-
|
|
45
|
-
if (!toastConfig) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const { type, message } = toastConfig;
|
|
50
|
-
|
|
51
|
-
let backgroundColor;
|
|
52
|
-
switch (type) {
|
|
53
|
-
case ToastType.Info:
|
|
54
|
-
backgroundColor = theme.colors.toastInfo || '#6BA4FF';
|
|
55
|
-
break;
|
|
56
|
-
case ToastType.Error:
|
|
57
|
-
backgroundColor = theme.colors.toastError || '#D83520';
|
|
58
|
-
break;
|
|
59
|
-
case ToastType.Success:
|
|
60
|
-
backgroundColor = theme.colors.toastSuccess || '#90C68E';
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<Animated.View
|
|
66
|
-
style={[styles.container, { bottom: bottomPosition, opacity }]}>
|
|
67
|
-
<View style={[styles.toast, { backgroundColor }]}>
|
|
68
|
-
<Text style={{ ...styles.message, ...props.messageStyle }}>
|
|
69
|
-
{getTraduction(message, t)}
|
|
70
|
-
</Text>
|
|
71
|
-
</View>
|
|
72
|
-
</Animated.View>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const styles = StyleSheet.create({
|
|
77
|
-
container: {
|
|
78
|
-
alignSelf: 'center',
|
|
79
|
-
position: 'absolute',
|
|
80
|
-
maxWidth: 480,
|
|
81
|
-
zIndex: 9999999999,
|
|
82
|
-
},
|
|
83
|
-
toast: {
|
|
84
|
-
borderRadius: 16,
|
|
85
|
-
padding: 16,
|
|
86
|
-
},
|
|
87
|
-
message: {
|
|
88
|
-
fontSize: 14,
|
|
89
|
-
textAlign: 'center',
|
|
90
|
-
color: '#fff',
|
|
91
|
-
},
|
|
92
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import OText from './OText';
|
|
2
|
-
import OButton from './OButton';
|
|
3
|
-
import OInput from './OInput';
|
|
4
|
-
import OIcon from './OIcon';
|
|
5
|
-
import OIconButton from './OIconButton';
|
|
6
|
-
import OTextarea from './OTextarea';
|
|
7
|
-
import OModal from './OModal';
|
|
8
|
-
import OAlert from './OAlert';
|
|
9
|
-
import OFab from './OFab';
|
|
10
|
-
import OLink from './OLink';
|
|
11
|
-
import ODropDown from './ODropDown';
|
|
12
|
-
import ODropDownCalendar from './ODropDownCalendar';
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
OText,
|
|
16
|
-
OButton,
|
|
17
|
-
OInput,
|
|
18
|
-
OIcon,
|
|
19
|
-
OIconButton,
|
|
20
|
-
OTextarea,
|
|
21
|
-
OAlert,
|
|
22
|
-
OModal,
|
|
23
|
-
OFab,
|
|
24
|
-
OLink,
|
|
25
|
-
ODropDown,
|
|
26
|
-
ODropDownCalendar
|
|
27
|
-
};
|