@lookiero/checkout 11.2.0 → 11.3.1
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/src/ExpoRoot.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +4 -3
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +3 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.js +5 -5
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.js +4 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +19 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.d.ts +21 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.js +22 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +3 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +3 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +4 -3
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +10 -9
- package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +4 -3
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +4 -4
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +2 -0
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +4 -4
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +5 -2
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +6 -3
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +4 -1
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +7 -7
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.js +4 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +9 -6
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.js +4 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.js +10 -9
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +8 -5
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +3 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +5 -3
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.ts +2 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.tsx +1 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.ts +4 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.ts +2 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.ts +33 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +34 -13
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +3 -2
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +31 -80
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +3 -2
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +31 -80
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +4 -3
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +62 -160
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +12 -11
- package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +4 -3
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +2 -0
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +6 -3
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -1
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +5 -1
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +2 -3
- package/src/infrastructure/ui/views/return/Return.test.tsx +2 -1
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.ts +4 -1
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +7 -7
- package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +11 -12
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.test.tsx +2 -0
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +10 -8
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts +6 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +18 -0
- package/src/infrastructure/ui/views/summary/Summary.tsx +12 -11
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -1
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +22 -6
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +8 -5
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +36 -0
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -56,7 +56,7 @@ const externalTranslationsUrl = Platform.OS !== "web"
|
|
|
56
56
|
const translations = [
|
|
57
57
|
(locale) => translationExternalEndpoint({
|
|
58
58
|
translationsUrl: externalTranslationsUrl,
|
|
59
|
-
projects: [["checkout"]],
|
|
59
|
+
projects: [["checkout"], ["inventory-catalog"]],
|
|
60
60
|
})(locale),
|
|
61
61
|
];
|
|
62
62
|
const useRedirect = () => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { TouchableOpacity } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
6
6
|
import { useCheckoutQuestionFeedbackForId } from "../../behaviors/useCheckoutQuestionFeedback";
|
|
@@ -11,7 +11,8 @@ const ButtonCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId
|
|
|
11
11
|
const optionText = useI18nMessage({ domain: DOMAIN, id: checkoutQuestion.name });
|
|
12
12
|
const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
|
|
13
13
|
const style = useMemo(() => buttonCheckoutQuestionItemStyle(), []);
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const checked = feedback === checkoutQuestion.id;
|
|
15
|
+
return (React.createElement(TouchableOpacity, { accessibilityLabel: testID, activeOpacity: ACTIVE_OPACITY, style: [style.button, checked && style.buttonActive], testID: testID, onPress: handleOnPress },
|
|
16
|
+
React.createElement(Text, { level: 3, style: [style.text, checked && style.textActive], action: true }, optionText)));
|
|
16
17
|
};
|
|
17
18
|
export { ButtonCheckoutQuestionItem };
|
|
@@ -22,6 +22,6 @@ const IconCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId,
|
|
|
22
22
|
const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
|
|
23
23
|
invariant(Icon, "CheckoutQuestion icon does not exist");
|
|
24
24
|
return (React.createElement(Pressable, { accessibilityLabel: testID, testID: testID, onPress: handleOnPress },
|
|
25
|
-
React.createElement(Icon, { fill: isSelected ? style.colorBgPrimaryMediumLight : "none", strokeWidth: isSelected ? 2 : 1, style: style.icon })));
|
|
25
|
+
React.createElement(Icon, { color: style.colorIcon, fill: isSelected ? style.colorBgPrimaryMediumLight : "none", strokeWidth: isSelected ? 2 : 1, style: style.icon })));
|
|
26
26
|
};
|
|
27
27
|
export { IconCheckoutQuestionItem };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
const style = () => {
|
|
4
|
-
const { colorBgPrimaryMediumLight } = theme();
|
|
4
|
+
const { colorBgPrimaryMediumLight, colorIcon } = theme();
|
|
5
5
|
const styles = StyleSheet.create({
|
|
6
6
|
icon: {
|
|
7
7
|
marginHorizontal: 12,
|
|
@@ -10,6 +10,7 @@ const style = () => {
|
|
|
10
10
|
return {
|
|
11
11
|
...styles,
|
|
12
12
|
colorBgPrimaryMediumLight,
|
|
13
|
+
colorIcon,
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
16
|
export { style };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Svg, { Circle, Path } from "react-native-svg";
|
|
3
|
-
const Happy = ({ strokeWidth = 1, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
-
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke:
|
|
5
|
-
React.createElement(Circle, { cx: 16, cy: 17, fill:
|
|
6
|
-
React.createElement(Circle, { cx: 32, cy: 17, fill:
|
|
7
|
-
React.createElement(Path, { d: "M14 28.5s3 6 10 6 10-6 10-6", stroke:
|
|
3
|
+
const Happy = ({ strokeWidth = 1, color, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
+
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke: color, strokeWidth: strokeWidth }),
|
|
5
|
+
React.createElement(Circle, { cx: 16, cy: 17, fill: color, r: 2 }),
|
|
6
|
+
React.createElement(Circle, { cx: 32, cy: 17, fill: color, r: 2 }),
|
|
7
|
+
React.createElement(Path, { d: "M14 28.5s3 6 10 6 10-6 10-6", stroke: color, strokeWidth: strokeWidth })));
|
|
8
8
|
export { Happy };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Svg, { Circle, Path } from "react-native-svg";
|
|
3
|
-
const Normal = ({ strokeWidth = 1, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
-
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke:
|
|
5
|
-
React.createElement(Circle, { cx: 16, cy: 17, fill:
|
|
6
|
-
React.createElement(Circle, { cx: 32, cy: 17, fill:
|
|
7
|
-
React.createElement(Path, { d: "M15
|
|
3
|
+
const Normal = ({ strokeWidth = 1, color, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
+
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke: color, strokeWidth: strokeWidth }),
|
|
5
|
+
React.createElement(Circle, { cx: 16, cy: 17, fill: color, r: 2 }),
|
|
6
|
+
React.createElement(Circle, { cx: 32, cy: 17, fill: color, r: 2 }),
|
|
7
|
+
React.createElement(Path, { d: "M15 31.5H34", stroke: color, strokeWidth: strokeWidth })));
|
|
8
8
|
export { Normal };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Svg, { Circle, Path } from "react-native-svg";
|
|
3
|
-
const Sad = ({ strokeWidth = 1, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
-
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke:
|
|
5
|
-
React.createElement(Circle, { cx: 16, cy: 17, fill:
|
|
6
|
-
React.createElement(Circle, { cx: 32, cy: 17, fill:
|
|
7
|
-
React.createElement(Path, { d: "M14 33.5s3-6 10-6 10 6 10 6", stroke:
|
|
3
|
+
const Sad = ({ strokeWidth = 1, color, ...props }) => (React.createElement(Svg, { fill: "none", height: 48, width: 48, ...props },
|
|
4
|
+
React.createElement(Circle, { cx: 24, cy: 24, r: 23, stroke: color, strokeWidth: strokeWidth }),
|
|
5
|
+
React.createElement(Circle, { cx: 16, cy: 17, fill: color, r: 2 }),
|
|
6
|
+
React.createElement(Circle, { cx: 32, cy: 17, fill: color, r: 2 }),
|
|
7
|
+
React.createElement(Path, { d: "M14 33.5s3-6 10-6 10 6 10 6", stroke: color, strokeWidth: strokeWidth })));
|
|
8
8
|
export { Sad };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { Text } from "@lookiero/aurora";
|
|
4
5
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
6
|
import { returnQuestionWithTranslationKey } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
6
7
|
import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { TouchableHighlight, View } from "react-native";
|
|
4
|
-
import { ButtonIcon } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
-
import { InputField, Modal, TextInput } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { ButtonIcon, InputField, Modal, TextInput } from "@lookiero/sty-psp-ui";
|
|
7
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
8
7
|
import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
|
|
9
8
|
import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
|
|
@@ -35,7 +34,7 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
|
|
|
35
34
|
React.createElement(TouchableHighlight, { accessibilityLabel: testID, style: style.container, testID: testID, underlayColor: style.containerUnderlayColor, accessible: true, onPress: handleOnPress },
|
|
36
35
|
React.createElement(View, { pointerEvents: "none" },
|
|
37
36
|
React.createElement(InputField, { icon: "arrow_down", label: placeholderText, value: inputValue, input: ({ onBlur, onFocus, style }) => (React.createElement(TextInput, { editable: false, placeholder: placeholderText, style: style, value: inputValue, onBlur: onBlur, onChange: () => void 0, onFocus: onFocus })) }))),
|
|
38
|
-
React.createElement(Modal, { portalHostName: portalHostName, style: deepestReturnQuestionWithFeedback && { header: style.header }, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow_left", style: style.backButton, testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
37
|
+
React.createElement(Modal, { portalHostName: portalHostName, style: deepestReturnQuestionWithFeedback && { header: style.header }, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.backButton }, testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
39
38
|
React.createElement(View, { style: style.modalContent }, children))));
|
|
40
39
|
};
|
|
41
40
|
export { HostSelectReturnQuestionItem };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
5
|
-
import {
|
|
5
|
+
import { Text } from "@lookiero/aurora";
|
|
6
6
|
import { useI18n } from "@lookiero/i18n-react";
|
|
7
7
|
import { returnQuestionHasChildren } from "../../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
8
8
|
import { DOMAIN } from "../../../../../../i18n/i18n";
|
|
@@ -27,7 +27,7 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName,
|
|
|
27
27
|
React.createElement(View, { onLayout: handleOnLayout },
|
|
28
28
|
titleText && (React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText)),
|
|
29
29
|
feedbackReturnQuestion && returnQuestionHasChildren(feedbackReturnQuestion) ? (React.createElement(React.Fragment, null,
|
|
30
|
-
React.createElement(Text, {
|
|
30
|
+
React.createElement(Text, { level: 3, style: style.text }, feedbackText),
|
|
31
31
|
feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: portalHostName, returnQuestion: childReturnQuestion, returnQuestionParent: feedbackReturnQuestion }))))) : (children))));
|
|
32
32
|
};
|
|
33
33
|
export { HostStackReturnQuestionItem };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
const style = () => {
|
|
4
|
-
const { space1 } = theme();
|
|
4
|
+
const { colorTextMedium, space1 } = theme();
|
|
5
5
|
return StyleSheet.create({
|
|
6
|
+
text: {
|
|
7
|
+
color: colorTextMedium,
|
|
8
|
+
},
|
|
6
9
|
title: {
|
|
7
10
|
marginBottom: space1,
|
|
8
11
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { returnQuestionHasChildren } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
@@ -13,7 +13,7 @@ const ModalOptionReturnQuestionItems = ({ portalHostName, returnQuestion, visibl
|
|
|
13
13
|
const style = useMemo(() => modalOptionReturnQuestionItemsStyle(), []);
|
|
14
14
|
return (React.createElement(Modal, { portalHostName: portalHostName, visible: visible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
15
15
|
React.createElement(View, { style: style.modalContent },
|
|
16
|
-
React.createElement(Text, {
|
|
16
|
+
React.createElement(Text, { level: 2, style: style.optionText }, title),
|
|
17
17
|
React.createElement(React.Fragment, null, returnQuestionHasChildren(returnQuestion) &&
|
|
18
18
|
returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, portalHostName: "", returnQuestion: childReturnQuestion, returnQuestionParent: returnQuestion })))))));
|
|
19
19
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
const style = () => {
|
|
4
|
-
const { space2, space6 } = theme();
|
|
4
|
+
const { colorTextMedium, space2, space6 } = theme();
|
|
5
5
|
return StyleSheet.create({
|
|
6
6
|
modalContent: {
|
|
7
7
|
paddingHorizontal: space6,
|
|
8
8
|
},
|
|
9
9
|
optionText: {
|
|
10
|
+
color: colorTextMedium,
|
|
10
11
|
marginBottom: space6,
|
|
11
12
|
},
|
|
12
13
|
wrapper: {
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Pressable } from "react-native";
|
|
4
|
+
import { Text as AuroraText } from "@lookiero/aurora";
|
|
4
5
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
+
import { Checkbox } from "@lookiero/sty-psp-ui";
|
|
7
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
8
|
+
import { useStaticInfo } from "../../../../../hooks/useStaticInfo";
|
|
5
9
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
6
10
|
import { useReturnQuestionFeedback, useReturnQuestionFeedbackForReturnQuestion, } from "../../behaviors/useReturnQuestionFeedback";
|
|
7
11
|
import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQuestion, } from "../../util/returnQuestionFeedback";
|
|
8
12
|
import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
|
|
9
13
|
import { style as radioReturnQuestionItemStyle } from "./RadioReturnQuestionItem.style";
|
|
14
|
+
const TEXT = {
|
|
15
|
+
[Tradename.LOOKIERO]: (props) => React.createElement(AuroraText, { level: 1, detail: true, ...props }),
|
|
16
|
+
[Tradename.OUTFITTERY]: (props) => React.createElement(AuroraText, { level: 3, ...props }),
|
|
17
|
+
};
|
|
10
18
|
const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
|
|
19
|
+
const { tradename } = useStaticInfo();
|
|
11
20
|
const style = useMemo(() => radioReturnQuestionItemStyle(), []);
|
|
12
21
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
13
22
|
const [modalVisible, setModalVisible] = useState(false);
|
|
@@ -44,9 +53,16 @@ const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID,
|
|
|
44
53
|
/**
|
|
45
54
|
* This logic is for closing the Modal when its children has been answered.
|
|
46
55
|
*/
|
|
56
|
+
const checked = returnQuestion.id === feedbackId;
|
|
57
|
+
const Text = useMemo(() => TEXT[tradename], [tradename]);
|
|
47
58
|
return (React.createElement(React.Fragment, null,
|
|
48
|
-
React.createElement(
|
|
49
|
-
|
|
59
|
+
React.createElement(Pressable, { accessibilityLabel: "radio-return-question-item", accessibilityState: { checked }, testID: testID, style: [
|
|
60
|
+
style.wrapper,
|
|
61
|
+
tradename === Tradename.LOOKIERO && style.wrapperLookiero,
|
|
62
|
+
tradename === Tradename.LOOKIERO && checked && style.wrapperLookieroChecked,
|
|
63
|
+
], accessible: true, onPress: handleOnPress },
|
|
64
|
+
React.createElement(Checkbox, { checked: checked }),
|
|
65
|
+
React.createElement(Text, { style: style.text }, inputValue ? `${optionText} / ${inputValue}` : `${optionText}`)),
|
|
50
66
|
hasChildren ? (React.createElement(ModalOptionReturnQuestionItems, { portalHostName: portalHostName, returnQuestion: returnQuestion, returnQuestionParent: returnQuestion, visible: modalVisible, onClose: handleOnModalClose })) : null));
|
|
51
67
|
};
|
|
52
68
|
export { RadioReturnQuestionItem };
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
declare const style: () => {
|
|
2
|
+
text: {
|
|
3
|
+
color: string;
|
|
4
|
+
flex: number;
|
|
5
|
+
marginLeft: number;
|
|
6
|
+
};
|
|
2
7
|
wrapper: {
|
|
3
|
-
|
|
8
|
+
alignItems: "center";
|
|
9
|
+
flex: number;
|
|
10
|
+
flexDirection: "row";
|
|
11
|
+
marginVertical: number;
|
|
12
|
+
};
|
|
13
|
+
wrapperLookiero: {
|
|
14
|
+
borderColor: string;
|
|
15
|
+
borderRadius: number;
|
|
16
|
+
borderWidth: number;
|
|
17
|
+
marginVertical: number;
|
|
18
|
+
padding: number;
|
|
19
|
+
};
|
|
20
|
+
wrapperLookieroChecked: {
|
|
21
|
+
borderColor: string;
|
|
22
|
+
borderWidth: number;
|
|
23
|
+
padding: number;
|
|
4
24
|
};
|
|
5
25
|
};
|
|
6
26
|
export { style };
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
const style = () => {
|
|
4
|
-
const {
|
|
4
|
+
const { borderWidth1, borderWidth2, borderRadius3, colorBorderInteractive, colorBorderInputFocus, colorText, space025, space1, space3, space4, } = theme();
|
|
5
5
|
return StyleSheet.create({
|
|
6
|
+
text: {
|
|
7
|
+
color: colorText,
|
|
8
|
+
flex: 1,
|
|
9
|
+
marginLeft: space4,
|
|
10
|
+
},
|
|
6
11
|
wrapper: {
|
|
7
|
-
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
flex: 1,
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
marginVertical: space3,
|
|
16
|
+
},
|
|
17
|
+
wrapperLookiero: {
|
|
18
|
+
borderColor: colorBorderInteractive,
|
|
19
|
+
borderRadius: borderRadius3,
|
|
20
|
+
borderWidth: borderWidth1,
|
|
21
|
+
marginVertical: space1,
|
|
22
|
+
padding: space4,
|
|
23
|
+
},
|
|
24
|
+
wrapperLookieroChecked: {
|
|
25
|
+
borderColor: colorBorderInputFocus,
|
|
26
|
+
borderWidth: borderWidth2,
|
|
27
|
+
padding: space4 - space025,
|
|
8
28
|
},
|
|
9
29
|
});
|
|
10
30
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
|
-
import { View } from "
|
|
3
|
+
import { View } from "react-native";
|
|
4
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { InputField, TextInput } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
import { Header } from "../Header";
|
|
6
7
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
@@ -9,7 +10,7 @@ const CheckoutHeader = ({ onBack }) => {
|
|
|
9
10
|
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
10
11
|
const style = useMemo(() => checkoutHeader(), []);
|
|
11
12
|
return (React.createElement(Header, { testID: "checkout-header" },
|
|
12
|
-
React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
13
|
+
React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
13
14
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
14
15
|
React.createElement(ButtonIconPlaceholder, null)));
|
|
15
16
|
};
|
package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
import { Header } from "../Header";
|
|
6
7
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
@@ -11,6 +12,6 @@ const ItemDetailHeader = ({ onBack }) => {
|
|
|
11
12
|
return (React.createElement(Header, { testID: "item-detail-header" },
|
|
12
13
|
React.createElement(ButtonIconPlaceholder, null),
|
|
13
14
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
14
|
-
React.createElement(ButtonIcon, { name: "close", style: style.button, testID: "close-button-icon", onPress: onBack })));
|
|
15
|
+
React.createElement(ButtonIcon, { name: "close", style: { button: style.button }, testID: "close-button-icon", onPress: onBack })));
|
|
15
16
|
};
|
|
16
17
|
export { ItemDetailHeader };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { generatePath, useNavigate } from "react-router-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
6
7
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
8
|
import { Routes } from "../../../../routing/routes";
|
|
@@ -29,8 +30,8 @@ const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
|
29
30
|
navigate(generatePath(`${basePath}/${Routes.ITEM}`, { id: nextItem.id }));
|
|
30
31
|
}, [basePath, item.id, itemIndex, items, navigate, onNext]);
|
|
31
32
|
return (React.createElement(Header, { testID: "item-header" },
|
|
32
|
-
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
33
|
+
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
33
34
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
34
|
-
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: style.button, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
35
|
+
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: { button: style.button }, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
35
36
|
};
|
|
36
37
|
export { ItemHeader };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { Platform, ScrollView, View } from "react-native";
|
|
3
3
|
import { useNavigate } from "react-router-native";
|
|
4
|
-
import { Box, Button, Layout as AuroraLayout, Spinner, Text
|
|
4
|
+
import { Box, Button, Layout as AuroraLayout, Spinner, Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
7
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
8
|
-
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
8
|
+
import { Sticky, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
9
9
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
10
10
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
11
11
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -26,10 +26,11 @@ import { DeliveryBanner } from "./components/deliveryBanner/DeliveryBanner";
|
|
|
26
26
|
import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrument";
|
|
27
27
|
const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedirect, onCheckoutFlowSuccess, }) => {
|
|
28
28
|
const { customer: { customerId, country, segment }, basePath, } = useStaticInfo();
|
|
29
|
+
const screenSize = useScreenSize();
|
|
30
|
+
const isDektopScreen = screenSize === "L";
|
|
29
31
|
const style = useMemo(() => checkoutStyle(), []);
|
|
30
32
|
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_TITLE });
|
|
31
33
|
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
32
|
-
const { screen } = useDevice();
|
|
33
34
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
34
35
|
const handleOnPricingLayout = useCallback(({ height }) => setPricingHeight(height), []);
|
|
35
36
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
@@ -82,9 +83,9 @@ const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedire
|
|
|
82
83
|
} },
|
|
83
84
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "checkout-view" },
|
|
84
85
|
hasReplacedCheckoutItem && React.createElement(DeliveryBanner, null),
|
|
85
|
-
React.createElement(AuroraLayout, { fullWidth: !
|
|
86
|
-
React.createElement(Box, { size: { L: "2/3" }, style:
|
|
87
|
-
React.createElement(View, { style: [style.contentWrapper,
|
|
86
|
+
React.createElement(AuroraLayout, { fullWidth: !isDektopScreen, style: [isDektopScreen && style.desktopLayoutSpacing, !isDektopScreen && { paddingBottom: pricingHeight }] },
|
|
87
|
+
React.createElement(Box, { size: { L: "2/3" }, style: isDektopScreen && style.desktopListSpacing },
|
|
88
|
+
React.createElement(View, { style: [style.contentWrapper, isDektopScreen && style.desktopContentWrapper] },
|
|
88
89
|
country === Country.NL && (React.createElement(View, { style: style.paymentSelectorNL },
|
|
89
90
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))),
|
|
90
91
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
@@ -94,10 +95,10 @@ const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedire
|
|
|
94
95
|
: checkoutItem.productVariant.size })))),
|
|
95
96
|
country !== Country.NL && (React.createElement(View, { style: style.paymentSelector },
|
|
96
97
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))))),
|
|
97
|
-
React.createElement(Box, { size: { L: "1/3" }, style: [style.resume,
|
|
98
|
+
React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, isDektopScreen && style.desktopResume] }, pricing ? (React.createElement(View, { style: [style.princingWrapper, !isDektopScreen && style.princingWrapperSmall] },
|
|
98
99
|
React.createElement(Pricing, { pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0 }),
|
|
99
|
-
|
|
100
|
-
pricing && !
|
|
100
|
+
isDektopScreen ? (React.createElement(Button, { busy: checkoutFlowStatus === "loading", testID: "confirm-checkout-button", onPress: handleOnSubmit }, submitButtonText)) : null)) : null))),
|
|
101
|
+
pricing && !isDektopScreen ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
|
|
101
102
|
React.createElement(Body, null,
|
|
102
103
|
React.createElement(Button, { busy: checkoutFlowStatus === "loading", testID: "confirm-checkout-button", small: true, onPress: handleOnSubmit }, submitButtonText)))) : null,
|
|
103
104
|
paymentFlowComponent));
|
package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ALIGN, InfoBox, INFOBOX_TYPE
|
|
2
|
+
import { ALIGN, InfoBox, INFOBOX_TYPE } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
6
|
const DeliveryBanner = () => {
|
|
6
|
-
const
|
|
7
|
-
return (React.createElement(InfoBox, { contentAlign:
|
|
7
|
+
const screenSize = useScreenSize();
|
|
8
|
+
return (React.createElement(InfoBox, { contentAlign: screenSize === "L" ? ALIGN.CENTER : undefined, testID: "delivery-banner", text: useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_DELIVERY_BANNER }), type: INFOBOX_TYPE.SQUARED }));
|
|
8
9
|
};
|
|
9
10
|
export { DeliveryBanner };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Button, BUTTON_VARIANT, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
@@ -19,11 +19,11 @@ const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
|
19
19
|
const style = useMemo(() => getOutOfCheckoutModalStyle(), []);
|
|
20
20
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, onClose: onDismiss },
|
|
21
21
|
React.createElement(View, { style: style.modalContent },
|
|
22
|
-
React.createElement(Text, {
|
|
22
|
+
React.createElement(Text, { level: 1, style: style.title }, titleText),
|
|
23
23
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
24
24
|
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
25
|
-
React.createElement(Text, {
|
|
25
|
+
React.createElement(Text, { level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, dismissButtonText)),
|
|
26
26
|
React.createElement(Button, { style: [style.button, style.confirmButton], variant: BUTTON_VARIANT.SECONDARY, onPress: onConfirm },
|
|
27
|
-
React.createElement(Text, {
|
|
27
|
+
React.createElement(Text, { level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, confirmButtonText)))));
|
|
28
28
|
};
|
|
29
29
|
export { GetOutOfCheckoutModal };
|
|
@@ -3,6 +3,7 @@ declare const style: () => {
|
|
|
3
3
|
flex: number;
|
|
4
4
|
};
|
|
5
5
|
buttonText: {
|
|
6
|
+
textAlign: "center";
|
|
6
7
|
width: "100%";
|
|
7
8
|
};
|
|
8
9
|
confirmButton: {
|
|
@@ -16,6 +17,7 @@ declare const style: () => {
|
|
|
16
17
|
paddingHorizontal: number;
|
|
17
18
|
};
|
|
18
19
|
title: {
|
|
20
|
+
textAlign: "center";
|
|
19
21
|
width: "100%";
|
|
20
22
|
};
|
|
21
23
|
};
|
|
@@ -7,6 +7,7 @@ const style = () => {
|
|
|
7
7
|
flex: 0,
|
|
8
8
|
},
|
|
9
9
|
buttonText: {
|
|
10
|
+
textAlign: "center",
|
|
10
11
|
width: "100%",
|
|
11
12
|
},
|
|
12
13
|
confirmButton: {
|
|
@@ -20,6 +21,7 @@ const style = () => {
|
|
|
20
21
|
paddingHorizontal: space6,
|
|
21
22
|
},
|
|
22
23
|
title: {
|
|
24
|
+
textAlign: "center",
|
|
23
25
|
width: "100%",
|
|
24
26
|
},
|
|
25
27
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
@@ -13,10 +13,10 @@ const ProductVariantDescription = ({ brand, name, price, size: sizeProjection, c
|
|
|
13
13
|
const screenDevice = useScreenSize();
|
|
14
14
|
const isDesktopScreen = screenDevice !== "S";
|
|
15
15
|
const style = useMemo(() => productVariantDescriptionStyle(), []);
|
|
16
|
-
return (React.createElement(View, { style: [style.container, isDesktopScreen
|
|
16
|
+
return (React.createElement(View, { style: [style.container, !isDesktopScreen && style.smallContainer] },
|
|
17
17
|
React.createElement(View, { style: style.info },
|
|
18
|
-
React.createElement(View, { style: style.
|
|
19
|
-
React.createElement(Text, {
|
|
18
|
+
React.createElement(View, { style: style.content },
|
|
19
|
+
React.createElement(Text, { level: 1, style: style.brand, detail: true }, brand),
|
|
20
20
|
React.createElement(Text, { level: 1, detailBold: true }, name)),
|
|
21
21
|
React.createElement(Price, { price: price, withPercentage: true })),
|
|
22
22
|
React.createElement(Text, { level: 1, detail: true }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)));
|