@lookiero/checkout 0.2.23 → 0.2.25
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/dist/infrastructure/ui/Root.js +1 -1
- package/dist/infrastructure/ui/components/atoms/modal/Modal.style.d.ts +2 -2
- package/dist/infrastructure/ui/components/atoms/modal/Modal.style.js +2 -2
- package/dist/infrastructure/ui/components/atoms/price/Price.js +2 -2
- package/dist/infrastructure/ui/components/atoms/price/Price.style.d.ts +4 -4
- package/dist/infrastructure/ui/components/atoms/price/Price.style.js +4 -4
- package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +3 -3
- package/dist/infrastructure/ui/components/layouts/body/Body.style.js +3 -3
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.d.ts +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.style.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +14 -10
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +13 -19
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +4 -10
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +5 -14
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.d.ts +10 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/util/returnQuestionFeedback.js +41 -14
- package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +4 -4
- package/dist/infrastructure/ui/routing/Routing.js +2 -2
- package/dist/infrastructure/ui/shared/components/atoms/error/Error.js +1 -1
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.js +3 -2
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.d.ts +9 -2
- package/dist/infrastructure/ui/shared/components/atoms/field/Field.style.js +9 -2
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +3 -3
- package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +3 -3
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.js +2 -2
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.d.ts +4 -4
- package/dist/infrastructure/ui/shared/components/atoms/input/Input.style.js +5 -5
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.js +1 -1
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.d.ts +1 -1
- package/dist/infrastructure/ui/shared/components/atoms/spinner/Spinner.style.js +1 -1
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +1 -0
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +12 -10
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +23 -26
- package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +22 -25
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +2 -2
- package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +2 -2
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.js +2 -2
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.d.ts +12 -12
- package/dist/infrastructure/ui/shared/components/layouts/slider/Pagination.style.js +12 -12
- package/dist/infrastructure/ui/shared/components/layouts/slider/Slider.js +2 -2
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +5 -3
- package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +1 -1
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.js +3 -3
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.d.ts +4 -4
- package/dist/infrastructure/ui/shared/components/molecules/inputField/InputField.style.js +4 -4
- package/dist/infrastructure/ui/views/intro/Intro.js +6 -6
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +20 -20
- package/dist/infrastructure/ui/views/intro/Intro.style.js +21 -21
- package/dist/infrastructure/ui/views/item/Item.js +1 -1
- package/dist/infrastructure/ui/views/item/Item.style.d.ts +5 -5
- package/dist/infrastructure/ui/views/item/Item.style.js +5 -5
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +2 -2
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +6 -6
- package/dist/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +6 -6
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -2
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +7 -7
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +7 -7
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.js +1 -1
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.style.d.ts +6 -6
- package/dist/infrastructure/ui/views/item/components/productVariantActions/ProductVariantActions.style.js +6 -6
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +4 -4
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +3 -3
- package/dist/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +3 -3
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +3 -3
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.d.ts +7 -7
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.style.js +7 -7
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +5 -5
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +5 -5
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +7 -14
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +2 -2
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +4 -4
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +4 -4
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -2
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +4 -4
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +4 -4
- package/dist/infrastructure/ui/views/summary/Summary.js +1 -2
- package/package.json +2 -1
|
@@ -4,7 +4,7 @@ import { theme } from "../../../../theme/theme";
|
|
|
4
4
|
import { style } from "./Input.style";
|
|
5
5
|
const DEFAULT_HEIGHT = 56;
|
|
6
6
|
const { colorGrayscaleL } = theme();
|
|
7
|
-
const Input = ({ minHeight = DEFAULT_HEIGHT, style: customStyle, onChange, onContentSizeChange, ...restOfProps }) => {
|
|
7
|
+
const Input = ({ minHeight = DEFAULT_HEIGHT, style: customStyle, placeholderTextColor = colorGrayscaleL, onChange, onContentSizeChange, ...restOfProps }) => {
|
|
8
8
|
const [height, setHeight] = useState(minHeight);
|
|
9
9
|
// When content height has became smaller the onContentSizeChange does in fact triggered but the internal height is incorrect.
|
|
10
10
|
const handleOnContentSizeChange = useCallback((event) => {
|
|
@@ -24,6 +24,6 @@ const Input = ({ minHeight = DEFAULT_HEIGHT, style: customStyle, onChange, onCon
|
|
|
24
24
|
element.style.height = `${Math.max(minHeight, element.scrollHeight)}px`;
|
|
25
25
|
});
|
|
26
26
|
}, [minHeight, onChange]);
|
|
27
|
-
return (React.createElement(TextInput, { ...restOfProps, style: [style.input, customStyle, { height }],
|
|
27
|
+
return (React.createElement(TextInput, { ...restOfProps, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", onChange: handleOnChange, onContentSizeChange: handleOnContentSizeChange }));
|
|
28
28
|
};
|
|
29
29
|
export { Input };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
declare const style: {
|
|
2
2
|
input: {
|
|
3
3
|
lineHeight?: number | undefined;
|
|
4
|
-
paddingHorizontal: number;
|
|
5
|
-
paddingTop: number;
|
|
6
|
-
paddingBottom: number;
|
|
7
4
|
borderWidth: number;
|
|
8
5
|
color: string;
|
|
9
6
|
fontFamily: string;
|
|
10
7
|
fontSize: number;
|
|
11
8
|
letterSpacing: number;
|
|
12
9
|
outlineStyle: string;
|
|
13
|
-
whiteSpace: string;
|
|
14
10
|
overflow: "hidden";
|
|
11
|
+
paddingBottom: number;
|
|
12
|
+
paddingHorizontal: number;
|
|
13
|
+
paddingTop: number;
|
|
15
14
|
textOverflow: string;
|
|
15
|
+
whiteSpace: string;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
export { style };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { borderSize, colorContent, fontBodySize3, fontBodyHeight3, fontBodyLetterSpacing3, fontMap, spaceM } = theme();
|
|
4
|
+
// paddingVertical not working in multiline mode
|
|
4
5
|
const style = StyleSheet.create({
|
|
5
6
|
input: {
|
|
6
|
-
// paddingVertical not working in multiline mode
|
|
7
|
-
paddingHorizontal: spaceM,
|
|
8
|
-
paddingTop: spaceM,
|
|
9
|
-
paddingBottom: spaceM,
|
|
10
7
|
borderWidth: borderSize,
|
|
11
8
|
color: colorContent,
|
|
12
9
|
fontFamily: fontMap.Body,
|
|
13
10
|
fontSize: fontBodySize3,
|
|
14
11
|
letterSpacing: fontBodyLetterSpacing3,
|
|
15
12
|
outlineStyle: "none",
|
|
16
|
-
whiteSpace: "nowrap",
|
|
17
13
|
overflow: "hidden",
|
|
14
|
+
paddingBottom: spaceM,
|
|
15
|
+
paddingHorizontal: spaceM,
|
|
16
|
+
paddingTop: spaceM,
|
|
18
17
|
textOverflow: "ellipsis",
|
|
18
|
+
whiteSpace: "nowrap",
|
|
19
19
|
...Platform.select({
|
|
20
20
|
web: {
|
|
21
21
|
lineHeight: fontBodyHeight3,
|
|
@@ -4,5 +4,5 @@ import { theme } from "../../../../theme/theme";
|
|
|
4
4
|
import { style } from "./Spinner.style";
|
|
5
5
|
const { colorPrimary } = theme();
|
|
6
6
|
const Spinner = () => (React.createElement(View, { style: style.container },
|
|
7
|
-
React.createElement(ActivityIndicator, { size: "large"
|
|
7
|
+
React.createElement(ActivityIndicator, { color: colorPrimary, size: "large" })));
|
|
8
8
|
export { Spinner };
|
|
@@ -9,6 +9,7 @@ interface ModalProps {
|
|
|
9
9
|
readonly onClose?: () => void;
|
|
10
10
|
readonly header?: ReactNode;
|
|
11
11
|
readonly portalHostName?: string;
|
|
12
|
+
readonly scroll?: boolean;
|
|
12
13
|
readonly size?: Partial<Record<ScreenSize, ColumnSize>>;
|
|
13
14
|
readonly style?: Partial<Record<ModalStyle, ViewProps>>;
|
|
14
15
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Portal } from "@gorhom/portal";
|
|
2
2
|
import { animated, useTransition } from "@react-spring/native";
|
|
3
|
-
import React, { useCallback, useState } from "react";
|
|
4
|
-
import { Dimensions, Platform, TouchableWithoutFeedback, View } from "react-native";
|
|
3
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
4
|
+
import { Dimensions, Platform, ScrollView, TouchableWithoutFeedback, View, } from "react-native";
|
|
5
5
|
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
6
6
|
import { useScreenSize } from "../../../hooks/useScreenSize";
|
|
7
7
|
import { ButtonIcon } from "../../molecules/buttonIcon/ButtonIcon";
|
|
8
8
|
import { Row } from "../row/Row";
|
|
9
9
|
import { style } from "./Modal.style";
|
|
10
10
|
const TRANSITION_MODAL_SCALE = 0.9;
|
|
11
|
-
const Modal = ({ children, visible, header, portalHostName, onClose, size = { M: "2/3", L: "1/3" }, style: customStyle, }) => {
|
|
11
|
+
const Modal = ({ children, visible, header, portalHostName, onClose, size = { M: "2/3", L: "1/3" }, style: customStyle, scroll = false, }) => {
|
|
12
12
|
const { height: screenHeight } = Dimensions.get("screen");
|
|
13
13
|
const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
|
|
14
14
|
const screenSizeWithoutInsets = screenHeight - safeAreaInsetTop;
|
|
@@ -37,12 +37,13 @@ const Modal = ({ children, visible, header, portalHostName, onClose, size = { M:
|
|
|
37
37
|
: { modalOpacity: 0, overlayOpacity: 0, modalTranslateY: 0, modalScale: TRANSITION_MODAL_SCALE },
|
|
38
38
|
unique: true,
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
const ModalContentView = useMemo(() => (scroll ? ScrollView : View), [scroll]);
|
|
41
|
+
return (React.createElement(Portal, { hostName: portalHostName }, transitions(({ modalOpacity, overlayOpacity, modalTranslateY, modalScale }, item) => item && (React.createElement(View, { pointerEvents: visible ? "auto" : "none", style: style.container, testID: "modal" },
|
|
41
42
|
React.createElement(TouchableWithoutFeedback, { onPress: visible ? onClose : undefined },
|
|
42
43
|
React.createElement(animated.View, { style: [style.overlay, { opacity: overlayOpacity }, customStyle?.overlay] })),
|
|
43
|
-
React.createElement(SafeAreaView, { edges: ["right", "top", "left"],
|
|
44
|
-
React.createElement(Row, { style: [style.row, isSmallDevice && style.rowSmall, customStyle?.row]
|
|
45
|
-
React.createElement(animated.View, { style: [
|
|
44
|
+
React.createElement(SafeAreaView, { edges: ["right", "top", "left"], pointerEvents: "box-none", style: style.safeArea },
|
|
45
|
+
React.createElement(Row, { pointerEvents: "box-none", style: [style.row, isSmallDevice && style.rowSmall, customStyle?.row] },
|
|
46
|
+
React.createElement(animated.View, { pointerEvents: visible ? "auto" : "none", style: [
|
|
46
47
|
style.modal,
|
|
47
48
|
columnSizeForScreenSize && style.modal[columnSizeForScreenSize],
|
|
48
49
|
{
|
|
@@ -51,10 +52,11 @@ const Modal = ({ children, visible, header, portalHostName, onClose, size = { M:
|
|
|
51
52
|
maxHeight: screenSizeWithoutInsets,
|
|
52
53
|
},
|
|
53
54
|
customStyle?.modal,
|
|
54
|
-
], onLayout: handleOnModalLayout
|
|
55
|
+
], onLayout: handleOnModalLayout },
|
|
55
56
|
(header || onClose) && (React.createElement(View, { style: [style.header, customStyle?.header] },
|
|
56
57
|
React.createElement(View, null, header),
|
|
57
|
-
onClose && (React.createElement(ButtonIcon, { style: { button:
|
|
58
|
-
|
|
58
|
+
onClose && (React.createElement(ButtonIcon, { name: "close", style: { button: customStyle?.closeButton }, onPress: onClose })))),
|
|
59
|
+
React.createElement(ModalContentView, null,
|
|
60
|
+
React.createElement(View, { style: { paddingBottom: safeAreaInsetBottom } }, children))))))))));
|
|
59
61
|
};
|
|
60
62
|
export { Modal };
|
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
import { ViewStyle } from "react-native";
|
|
2
2
|
declare const style: {
|
|
3
3
|
container: {
|
|
4
|
-
position: "absolute";
|
|
5
|
-
width: string;
|
|
6
4
|
height: string;
|
|
7
5
|
overflow: "hidden";
|
|
8
|
-
};
|
|
9
|
-
overlay: {
|
|
10
|
-
zIndex: number;
|
|
11
|
-
backgroundColor: string;
|
|
12
6
|
position: "absolute";
|
|
13
7
|
width: string;
|
|
14
|
-
height: string;
|
|
15
|
-
cursor: string;
|
|
16
|
-
};
|
|
17
|
-
safeArea: {
|
|
18
|
-
flex: number;
|
|
19
|
-
zIndex: number;
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
justifyContent: "
|
|
25
|
-
|
|
26
|
-
rowSmall: {
|
|
27
|
-
justifyContent: "flex-end";
|
|
9
|
+
header: {
|
|
10
|
+
alignItems: "center";
|
|
11
|
+
flexDirection: "row";
|
|
12
|
+
justifyContent: "space-between";
|
|
13
|
+
padding: number;
|
|
28
14
|
};
|
|
29
15
|
modal: {
|
|
30
16
|
"1/4": ViewStyle;
|
|
@@ -36,14 +22,25 @@ declare const style: {
|
|
|
36
22
|
width: string;
|
|
37
23
|
zIndex: number;
|
|
38
24
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
25
|
+
overlay: {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
cursor: string;
|
|
28
|
+
height: string;
|
|
29
|
+
position: "absolute";
|
|
30
|
+
width: string;
|
|
31
|
+
zIndex: number;
|
|
44
32
|
};
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
row: {
|
|
34
|
+
alignContent: "center";
|
|
35
|
+
flex: number;
|
|
36
|
+
justifyContent: "center";
|
|
37
|
+
};
|
|
38
|
+
rowSmall: {
|
|
39
|
+
justifyContent: "flex-end";
|
|
40
|
+
};
|
|
41
|
+
safeArea: {
|
|
42
|
+
flex: number;
|
|
43
|
+
zIndex: number;
|
|
47
44
|
};
|
|
48
45
|
};
|
|
49
46
|
export { style };
|
|
@@ -17,46 +17,43 @@ const modalStylesForColumSize = {
|
|
|
17
17
|
};
|
|
18
18
|
const style = StyleSheet.create({
|
|
19
19
|
container: {
|
|
20
|
-
position: "absolute",
|
|
21
|
-
width: "100%",
|
|
22
20
|
height: "100%",
|
|
23
21
|
overflow: "hidden",
|
|
22
|
+
position: "absolute",
|
|
23
|
+
width: "100%",
|
|
24
|
+
},
|
|
25
|
+
header: {
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
justifyContent: "space-between",
|
|
29
|
+
padding: spaceM,
|
|
30
|
+
},
|
|
31
|
+
modal: {
|
|
32
|
+
backgroundColor: colorBase,
|
|
33
|
+
position: "absolute",
|
|
34
|
+
width: "100%",
|
|
35
|
+
zIndex: 3,
|
|
36
|
+
...modalStylesForColumSize,
|
|
24
37
|
},
|
|
25
38
|
overlay: {
|
|
26
|
-
zIndex: 1,
|
|
27
39
|
backgroundColor: colorOverlay,
|
|
40
|
+
cursor: "pointer",
|
|
41
|
+
height: "100%",
|
|
28
42
|
position: "absolute",
|
|
29
43
|
width: "100%",
|
|
30
|
-
|
|
31
|
-
cursor: "pointer",
|
|
32
|
-
},
|
|
33
|
-
safeArea: {
|
|
34
|
-
flex: 1,
|
|
35
|
-
zIndex: 2,
|
|
44
|
+
zIndex: 1,
|
|
36
45
|
},
|
|
37
46
|
row: {
|
|
38
|
-
flex: 1,
|
|
39
47
|
alignContent: "center",
|
|
48
|
+
flex: 1,
|
|
40
49
|
justifyContent: "center",
|
|
41
50
|
},
|
|
42
51
|
rowSmall: {
|
|
43
52
|
justifyContent: "flex-end",
|
|
44
53
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width: "100%",
|
|
49
|
-
zIndex: 3,
|
|
50
|
-
...modalStylesForColumSize,
|
|
51
|
-
},
|
|
52
|
-
header: {
|
|
53
|
-
alignItems: "center",
|
|
54
|
-
justifyContent: "space-between",
|
|
55
|
-
padding: spaceM,
|
|
56
|
-
flexDirection: "row",
|
|
57
|
-
},
|
|
58
|
-
closeButton: {
|
|
59
|
-
alignSelf: "flex-end",
|
|
54
|
+
safeArea: {
|
|
55
|
+
flex: 1,
|
|
56
|
+
zIndex: 2,
|
|
60
57
|
},
|
|
61
58
|
});
|
|
62
59
|
export { style };
|
|
@@ -4,11 +4,11 @@ const { spaceXXL, layoutMaxWidth } = theme();
|
|
|
4
4
|
const rowLargeMaxWidth = layoutMaxWidth - 2 * spaceXXL;
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
6
|
row: {
|
|
7
|
+
alignItems: "center",
|
|
7
8
|
flexWrap: "wrap",
|
|
9
|
+
marginHorizontal: "auto",
|
|
8
10
|
maxWidth: layoutMaxWidth,
|
|
9
11
|
width: "100%",
|
|
10
|
-
alignItems: "center",
|
|
11
|
-
marginHorizontal: "auto",
|
|
12
12
|
},
|
|
13
13
|
rowLarge: {
|
|
14
14
|
maxWidth: rowLargeMaxWidth,
|
|
@@ -2,10 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
3
|
import { style } from "./Pagination.style";
|
|
4
4
|
const Pagination = ({ touchable = true, paginationStyle, paginationItemStyle, paginationActiveItemStyle, count = 0, activeIndex = 0, renderItem, onChange, }) => (React.createElement(View, { style: [style.paginationWrapper, paginationStyle], testID: "slider-pagination" }, Array.from(Array(count).keys()).map((index) => (React.createElement(View, { key: index, style: style.paginationContainer },
|
|
5
|
-
React.createElement(Pressable, {
|
|
5
|
+
React.createElement(Pressable, { testID: "slider-pagination-item", style: [
|
|
6
6
|
style.paginationItem,
|
|
7
7
|
activeIndex === index && style.active,
|
|
8
8
|
paginationItemStyle,
|
|
9
9
|
activeIndex === index && paginationActiveItemStyle,
|
|
10
|
-
],
|
|
10
|
+
], onPress: !touchable ? undefined : () => onChange(index) }, renderItem?.(index)))))));
|
|
11
11
|
export { Pagination };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
declare const style: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
bottom: number;
|
|
5
|
-
flexDirection: "row";
|
|
6
|
-
justifyContent: "center";
|
|
7
|
-
position: "absolute";
|
|
8
|
-
width: string;
|
|
2
|
+
active: {
|
|
3
|
+
backgroundColor: string;
|
|
9
4
|
};
|
|
10
5
|
paginationContainer: {
|
|
11
6
|
margin: number;
|
|
12
7
|
};
|
|
13
8
|
paginationItem: {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
borderRadius: number;
|
|
17
9
|
backgroundColor: string;
|
|
10
|
+
borderRadius: number;
|
|
11
|
+
height: number;
|
|
12
|
+
width: number;
|
|
18
13
|
};
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
paginationWrapper: {
|
|
15
|
+
alignItems: "center";
|
|
16
|
+
bottom: number;
|
|
17
|
+
flexDirection: "row";
|
|
18
|
+
justifyContent: "center";
|
|
19
|
+
position: "absolute";
|
|
20
|
+
width: string;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export { style };
|
|
@@ -3,25 +3,25 @@ import { theme } from "../../../../theme/theme";
|
|
|
3
3
|
const { colorGrayscaleS, colorGrayscaleXL } = theme();
|
|
4
4
|
const DOT_SIZE = 8;
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
bottom: 10,
|
|
9
|
-
flexDirection: "row",
|
|
10
|
-
justifyContent: "center",
|
|
11
|
-
position: "absolute",
|
|
12
|
-
width: "100%",
|
|
6
|
+
active: {
|
|
7
|
+
backgroundColor: colorGrayscaleXL,
|
|
13
8
|
},
|
|
14
9
|
paginationContainer: {
|
|
15
10
|
margin: 3,
|
|
16
11
|
},
|
|
17
12
|
paginationItem: {
|
|
18
|
-
width: DOT_SIZE,
|
|
19
|
-
height: DOT_SIZE,
|
|
20
|
-
borderRadius: DOT_SIZE / 2,
|
|
21
13
|
backgroundColor: colorGrayscaleS,
|
|
14
|
+
borderRadius: DOT_SIZE / 2,
|
|
15
|
+
height: DOT_SIZE,
|
|
16
|
+
width: DOT_SIZE,
|
|
22
17
|
},
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
paginationWrapper: {
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
bottom: 10,
|
|
21
|
+
flexDirection: "row",
|
|
22
|
+
justifyContent: "center",
|
|
23
|
+
position: "absolute",
|
|
24
|
+
width: "100%",
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
export { style };
|
|
@@ -120,13 +120,13 @@ const Slider = ({ children, active = 0, loop = false, minDistanceToCapture = 5,
|
|
|
120
120
|
widthRef.current = width;
|
|
121
121
|
fixState();
|
|
122
122
|
}, [fixState]);
|
|
123
|
-
return (React.createElement(View, { style: style.container,
|
|
123
|
+
return (React.createElement(View, { style: style.container, testID: "slider", onLayout: onLayoutWrapper },
|
|
124
124
|
React.createElement(Animated.View, { style: StyleSheet.flatten([
|
|
125
125
|
{
|
|
126
126
|
transform: [{ translateX: pan.x }, { translateY: pan.y }],
|
|
127
127
|
},
|
|
128
128
|
style.sliderAreaStyle,
|
|
129
129
|
]), ...panResponder.panHandlers }, flatennedChildren.map((child, index) => (React.createElement(View, { key: index, style: { width }, testID: "slider-child" }, child)))),
|
|
130
|
-
paginationEnabled && (React.createElement(Pagination, {
|
|
130
|
+
paginationEnabled && (React.createElement(Pagination, { activeIndex: getActiveIndex(), count: count, paginationActiveItemStyle: paginationActiveItemStyle, paginationItemStyle: paginationItemStyle, paginationStyle: paginationStyle, renderItem: paginationRenderItem, onChange: (index) => goTo(index) }))));
|
|
131
131
|
};
|
|
132
132
|
export { Slider };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { StyleProp, TouchableHighlightProps, ViewStyle } from "react-native";
|
|
3
3
|
import { IconName, IconStyle } from "../../atoms/icon/Icon";
|
|
4
4
|
interface ButtonIconStyle {
|
|
5
5
|
readonly button: StyleProp<ViewStyle>;
|
|
6
6
|
readonly icon: IconStyle;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
interface ButtonIconBaseProps {
|
|
9
9
|
readonly name: IconName;
|
|
10
|
+
readonly testID?: string;
|
|
10
11
|
readonly style?: Partial<ButtonIconStyle>;
|
|
11
|
-
|
|
12
|
+
}
|
|
13
|
+
interface ButtonIconProps extends Omit<TouchableHighlightProps, keyof ButtonIconBaseProps>, ButtonIconBaseProps {
|
|
12
14
|
}
|
|
13
15
|
declare const ButtonIcon: FC<ButtonIconProps>;
|
|
14
16
|
export { ButtonIcon };
|
|
@@ -2,6 +2,6 @@ import React from "react";
|
|
|
2
2
|
import { TouchableHighlight } from "react-native";
|
|
3
3
|
import { Icon } from "../../atoms/icon/Icon";
|
|
4
4
|
import { buttonIconUnderlayColor, style } from "./ButtonIcon.style";
|
|
5
|
-
const ButtonIcon = ({ name, style: customStyle, onPress }) => (React.createElement(TouchableHighlight, { style: [style.buttonIcon, customStyle?.button],
|
|
5
|
+
const ButtonIcon = ({ name, style: customStyle, testID = "button-icon", onPress, ...restProps }) => (React.createElement(TouchableHighlight, { style: [style.buttonIcon, customStyle?.button], testID: testID, underlayColor: buttonIconUnderlayColor, onPress: onPress, ...restProps },
|
|
6
6
|
React.createElement(Icon, { name: name, style: customStyle?.icon })));
|
|
7
7
|
export { ButtonIcon };
|
|
@@ -6,7 +6,7 @@ import { Field } from "../../atoms/field/Field";
|
|
|
6
6
|
import { Icon } from "../../atoms/icon/Icon";
|
|
7
7
|
import { Input } from "../../atoms/input/Input";
|
|
8
8
|
import { style } from "./InputField.style";
|
|
9
|
-
const { colorContent, colorGrayscaleL, colorPrimary, spaceM, iconSize } = theme();
|
|
9
|
+
const { colorBase, colorContent, colorGrayscaleL, colorPrimary, spaceM, iconSize } = theme();
|
|
10
10
|
const inputPaddingRightWithIcon = iconSize + spaceM * 2;
|
|
11
11
|
const InputField = ({ label, placeholder, value, multiline = false, minHeight, error, style: customStyle, onChange = () => void 0, icon, ...inputRestProps }) => {
|
|
12
12
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -15,14 +15,14 @@ const InputField = ({ label, placeholder, value, multiline = false, minHeight, e
|
|
|
15
15
|
const handleOnFocus = useCallback(() => setIsFocused(true), []);
|
|
16
16
|
const color = error ? colorPrimary : isFocused ? colorContent : colorGrayscaleL;
|
|
17
17
|
return (React.createElement(View, { style: customStyle?.inputField, testID: "input-field" },
|
|
18
|
-
React.createElement(Field, {
|
|
18
|
+
React.createElement(Field, { isFocused: isFocused || !!value, label: label, style: {
|
|
19
19
|
field: { ...style.field, ...customStyle?.field },
|
|
20
20
|
fieldText: {
|
|
21
21
|
color,
|
|
22
22
|
...customStyle?.fieldText,
|
|
23
23
|
},
|
|
24
24
|
} }),
|
|
25
|
-
React.createElement(Input, {
|
|
25
|
+
React.createElement(Input, { minHeight: minHeight, multiline: multiline, placeholder: placeholder, placeholderTextColor: isFocused ? colorGrayscaleL : colorBase, style: [!!icon ? { paddingRight: inputPaddingRightWithIcon } : {}, { borderColor: color }, customStyle?.input], value: value, onBlur: handleOnBlur, onChangeText: handleOnChange, onFocus: handleOnFocus, ...inputRestProps }),
|
|
26
26
|
!!icon && React.createElement(Icon, { name: icon, style: [style.icon, { color }, customStyle?.icon] }),
|
|
27
27
|
!!error && React.createElement(Error, { error: error, style: [style.error, customStyle?.error] })));
|
|
28
28
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const style: {
|
|
2
|
+
error: {
|
|
3
|
+
marginLeft: number;
|
|
4
|
+
marginTop: number;
|
|
5
|
+
};
|
|
2
6
|
field: {
|
|
3
7
|
position: "absolute";
|
|
4
8
|
zIndex: number;
|
|
5
9
|
};
|
|
6
|
-
error: {
|
|
7
|
-
marginTop: number;
|
|
8
|
-
marginLeft: number;
|
|
9
|
-
};
|
|
10
10
|
icon: {
|
|
11
11
|
position: "absolute";
|
|
12
12
|
right: number;
|
|
@@ -2,14 +2,14 @@ import { StyleSheet } from "react-native";
|
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { spaceXS, spaceM, spaceL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
|
+
error: {
|
|
6
|
+
marginLeft: spaceL,
|
|
7
|
+
marginTop: spaceXS,
|
|
8
|
+
},
|
|
5
9
|
field: {
|
|
6
10
|
position: "absolute",
|
|
7
11
|
zIndex: 4,
|
|
8
12
|
},
|
|
9
|
-
error: {
|
|
10
|
-
marginTop: spaceXS,
|
|
11
|
-
marginLeft: spaceL,
|
|
12
|
-
},
|
|
13
13
|
icon: {
|
|
14
14
|
position: "absolute",
|
|
15
15
|
right: spaceM,
|
|
@@ -14,7 +14,7 @@ import { Spinner } from "../../shared/components/atoms/spinner/Spinner";
|
|
|
14
14
|
import { style } from "./Intro.style";
|
|
15
15
|
const Bullet = ({ text }) => (React.createElement(View, { style: style.bullet },
|
|
16
16
|
React.createElement(Icon, { name: "rounded-tick", style: style.tickIcon }),
|
|
17
|
-
React.createElement(Text, {
|
|
17
|
+
React.createElement(Text, { level: 2, detail: true }, text)));
|
|
18
18
|
const Intro = ({ customerId }) => {
|
|
19
19
|
const titleText = useI18nMessage({ id: I18nMessages.INTRO_TITLE });
|
|
20
20
|
const subTitleText = useI18nMessage({ id: I18nMessages.INTRO_SUBTITLE });
|
|
@@ -34,15 +34,15 @@ const Intro = ({ customerId }) => {
|
|
|
34
34
|
React.createElement(Body, null,
|
|
35
35
|
React.createElement(View, { style: style.container },
|
|
36
36
|
React.createElement(View, { style: style.content },
|
|
37
|
-
React.createElement(Text, {
|
|
38
|
-
React.createElement(Text, {
|
|
37
|
+
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
38
|
+
React.createElement(Text, { level: 3, style: style.subtitle, body: true }, subTitleText),
|
|
39
39
|
React.createElement(View, { style: style.discountContainer },
|
|
40
40
|
React.createElement(View, { style: style.discount },
|
|
41
|
-
React.createElement(Text, {
|
|
41
|
+
React.createElement(Text, { level: 2, heading: true },
|
|
42
42
|
"- ",
|
|
43
43
|
fiveItemsDiscount),
|
|
44
|
-
React.createElement(Text, {
|
|
45
|
-
React.createElement(Text, {
|
|
44
|
+
React.createElement(Text, { level: 3, style: style.percentage, heading: true }, "%")),
|
|
45
|
+
React.createElement(Text, { level: 3, body: true }, discountText)),
|
|
46
46
|
React.createElement(View, { style: style.description },
|
|
47
47
|
React.createElement(Bullet, { text: bulletOneText }),
|
|
48
48
|
React.createElement(Bullet, { text: bulletTwoText }),
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare const style: {
|
|
2
|
+
bullet: {
|
|
3
|
+
alignItems: "center";
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
marginVertical: number;
|
|
6
|
+
};
|
|
2
7
|
container: {
|
|
3
8
|
flex: number;
|
|
4
9
|
justifyContent: "space-between";
|
|
@@ -6,12 +11,17 @@ declare const style: {
|
|
|
6
11
|
content: {
|
|
7
12
|
alignItems: "center";
|
|
8
13
|
};
|
|
9
|
-
|
|
14
|
+
description: {
|
|
15
|
+
borderWidth: number;
|
|
10
16
|
marginBottom: number;
|
|
11
|
-
|
|
17
|
+
padding: number;
|
|
18
|
+
width: string;
|
|
12
19
|
};
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
discount: {
|
|
21
|
+
alignItems: "flex-end";
|
|
22
|
+
flexDirection: "row";
|
|
23
|
+
justifyContent: "center";
|
|
24
|
+
marginBottom: number;
|
|
15
25
|
};
|
|
16
26
|
discountContainer: {
|
|
17
27
|
alignItems: "center";
|
|
@@ -21,28 +31,18 @@ declare const style: {
|
|
|
21
31
|
textAlign: "center";
|
|
22
32
|
width: string;
|
|
23
33
|
};
|
|
24
|
-
discount: {
|
|
25
|
-
alignItems: "flex-end";
|
|
26
|
-
flexDirection: "row";
|
|
27
|
-
justifyContent: "center";
|
|
28
|
-
marginBottom: number;
|
|
29
|
-
};
|
|
30
34
|
percentage: {
|
|
31
35
|
marginLeft: number;
|
|
32
36
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
marginBottom: number;
|
|
36
|
-
padding: number;
|
|
37
|
-
width: string;
|
|
38
|
-
};
|
|
39
|
-
bullet: {
|
|
40
|
-
alignItems: "center";
|
|
41
|
-
flexDirection: "row";
|
|
42
|
-
marginVertical: number;
|
|
37
|
+
subtitle: {
|
|
38
|
+
textAlign: "center";
|
|
43
39
|
};
|
|
44
40
|
tickIcon: {
|
|
45
41
|
marginRight: number;
|
|
46
42
|
};
|
|
43
|
+
title: {
|
|
44
|
+
marginBottom: number;
|
|
45
|
+
textAlign: "center";
|
|
46
|
+
};
|
|
47
47
|
};
|
|
48
48
|
export { style };
|