@lookiero/checkout 14.1.0 → 14.2.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/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/ExpoRoot.d.ts +1 -0
- package/dist/src/ExpoRoot.js +4 -3
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +3 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +2 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/atoms/price/Price.style.js +1 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostLegacyRadioGroupReturnQuestionItem/HostLegacyRadioGroupReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +3 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +3 -3
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +2 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +4 -3
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.js +3 -0
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +4 -4
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +4 -4
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +3 -3
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +4 -4
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/return/components/price/Price.style.js +1 -0
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +4 -4
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -3
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +5 -5
- package/dist/src/infrastructure/ui/views/summary/Summary.js +3 -3
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +3 -3
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +1 -1
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +4 -4
- package/src/ExpoRoot.tsx +4 -3
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
- package/src/infrastructure/ui/components/atoms/price/Price.style.ts +1 -0
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +2 -7
- package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +24 -28
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostLegacyRadioGroupReturnQuestionItem/HostLegacyRadioGroupReturnQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +5 -6
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +3 -3
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +21 -18
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +21 -18
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +39 -30
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.style.ts +3 -0
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +4 -3
- package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +12 -18
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +14 -4
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +30 -28
- package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +45 -33
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +38 -56
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +2 -2
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +28 -19
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +28 -25
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +57 -84
- package/src/infrastructure/ui/views/return/components/price/Price.style.ts +1 -0
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +4 -4
- package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +12 -19
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +4 -4
- package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +18 -26
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +4 -3
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +5 -5
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +80 -82
- package/src/infrastructure/ui/views/summary/Summary.tsx +3 -3
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -3
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +58 -54
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +2 -2
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +1 -1
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +197 -193
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/src/ExpoRoot.d.ts
CHANGED
package/dist/src/ExpoRoot.js
CHANGED
|
@@ -3,12 +3,13 @@ import { useFonts } from "expo-font";
|
|
|
3
3
|
import React, { useCallback, useState } from "react";
|
|
4
4
|
import { Platform, ScrollView } from "react-native";
|
|
5
5
|
import { Navigate, Route, Routes } from "react-router-native";
|
|
6
|
-
import { Aurora
|
|
6
|
+
import { Aurora } from "@lookiero/aurora";
|
|
7
7
|
import { EventProvider } from "@lookiero/event";
|
|
8
8
|
import { PaymentsQueryProvider, setPaymentsBridge } from "@lookiero/payments-front";
|
|
9
9
|
import { Country, Locale } from "@lookiero/sty-psp-locale";
|
|
10
10
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
11
|
-
import
|
|
11
|
+
import "@lookiero/sty-psp-ui";
|
|
12
|
+
import { DummyLayout, themeByTradename, Text } from "@lookiero/sty-psp-ui";
|
|
12
13
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
13
14
|
import { bootstrap as checkoutBootstrap } from "./infrastructure/delivery/bootstrap";
|
|
14
15
|
import { bootstrap as checkoutMockBootstrap } from "./infrastructure/delivery/bootstrap.mock";
|
|
@@ -97,7 +98,7 @@ const ExpoRoot = () => {
|
|
|
97
98
|
React.createElement(PaymentsQueryProvider, null,
|
|
98
99
|
React.createElement(EventProvider, null,
|
|
99
100
|
React.createElement(Aurora, { theme: theme },
|
|
100
|
-
isAccessible === false && React.createElement(Text, {
|
|
101
|
+
isAccessible === false && React.createElement(Text, { variant: "heading" }, "Checkout is not accessible!"),
|
|
101
102
|
React.createElement(Router, null,
|
|
102
103
|
React.createElement(Routes, null,
|
|
103
104
|
React.createElement(Route, { path: "/checkout/*", element: React.createElement(Root, { basePath: "/checkout", customer: customer, layout: DummyLayout, locale: locale, tradename: tradename, useRedirect: useRedirect, onCheckoutFlowSuccess: () => console.log("Checkout flow success!"), onNotAccessible: onNotAccessible }) }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { ALIGN,
|
|
2
|
+
import { ALIGN, InfoBox, INFOBOX_TYPE } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
4
5
|
import { DOMAIN, I18nMessages } from "../../../i18n/i18n";
|
|
5
6
|
import { style as fiveItemsDiscountBannerStyle } from "./FiveItemsDiscountBanner.style";
|
|
6
7
|
const FiveItemsDiscountBanner = ({ fiveItemsDiscount }) => {
|
|
@@ -10,7 +11,7 @@ const FiveItemsDiscountBanner = ({ fiveItemsDiscount }) => {
|
|
|
10
11
|
id: I18nMessages.BANNER_DISCOUNT_TEXT,
|
|
11
12
|
values: {
|
|
12
13
|
discount: fiveItemsDiscount.toString(),
|
|
13
|
-
b: (chunks) => (React.createElement(Text, {
|
|
14
|
+
b: (chunks) => (React.createElement(Text, { level: 2, style: style.textBold }, chunks)),
|
|
14
15
|
},
|
|
15
16
|
});
|
|
16
17
|
return (React.createElement(InfoBox, { contentAlign: ALIGN.CENTER, icon: "info", testID: "five-items-discount-banner", text: bannerText, type: INFOBOX_TYPE.SQUARED }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { DOMAIN } from "../../../i18n/i18n";
|
|
6
6
|
import { style as priceStyle } from "./Price.style";
|
|
7
7
|
const PRICE_VARIANT = {
|
|
@@ -29,7 +29,7 @@ const Price = ({ price, variant = "default", withPercentage = false }) => {
|
|
|
29
29
|
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
30
30
|
React.createElement(Text, { ...PRICE_VARIANT[variant], testID: "price-text" }, priceValue),
|
|
31
31
|
isDiscounted && (React.createElement(View, { style: style.discountedPriceInfo },
|
|
32
|
-
React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPriceText, testID: "discounted-price-text"
|
|
32
|
+
React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPriceText, testID: "discounted-price-text" }, productPrice),
|
|
33
33
|
withPercentage ? (React.createElement(Text, { ...PRICE_VARIANT[variant], style: style.discountedPercentage, testID: "discounted-percentage-text" }, `-${price.discountedPrice.percentage}%`)) : null))));
|
|
34
34
|
};
|
|
35
35
|
export { Price };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { TouchableOpacity } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useCheckoutQuestionFeedbackForId } from "../../behaviors/useCheckoutQuestionFeedback";
|
|
8
8
|
import { style as buttonCheckoutQuestionItemStyle } from "./ButtonCheckoutQuestionItem.style";
|
|
@@ -14,6 +14,6 @@ const ButtonCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId
|
|
|
14
14
|
const style = useMemo(() => buttonCheckoutQuestionItemStyle(), []);
|
|
15
15
|
const checked = feedback === checkoutQuestion.id;
|
|
16
16
|
return (React.createElement(TouchableOpacity, { accessibilityLabel: testID, activeOpacity: ACTIVE_OPACITY, style: [style.button, checked && style.buttonActive], testID: testID, onPress: handleOnPress },
|
|
17
|
-
React.createElement(Text, { level: 3, style: [style.text, checked && style.textActive],
|
|
17
|
+
React.createElement(Text, { level: 3, style: [style.text, checked && style.textActive], variant: "action" }, optionText)));
|
|
18
18
|
};
|
|
19
19
|
export { ButtonCheckoutQuestionItem };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { style as hostDefaultCheckoutQuestionItemStyle } from "./HostDefaultCheckoutQuestionItem.style";
|
|
8
8
|
const HostDefaultCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { style as hostSelectCheckoutQuestionItemStyle } from "./HostSelectCheckoutQuestionItem.style";
|
|
8
8
|
const HostSelectCheckoutQuestionItem = ({ checkoutQuestion, children, }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
|
|
7
7
|
import { style as hostDefaultReturnQuestionItemStyle } from "./HostDefaultReturnQuestionItem.style";
|
|
8
8
|
const HostDefaultReturnQuestionItem = ({ returnQuestion, children, }) => {
|
|
@@ -11,7 +11,7 @@ const HostDefaultReturnQuestionItem = ({ returnQuestion, children, }) => {
|
|
|
11
11
|
const style = useMemo(() => hostDefaultReturnQuestionItemStyle(), []);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
returnQuestion.translationKey && returnQuestion.translationKey !== " " && !isAllOptions ? (React.createElement(View, { style: style.title },
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, formatMessage({ id: returnQuestion.translationKey })))) : null,
|
|
15
15
|
children));
|
|
16
16
|
};
|
|
17
17
|
export { HostDefaultReturnQuestionItem };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { style as hostLegacyRadioGroupReturnQuestionItemStyle } from "./HostLegacyRadioGroupReturnQuestionItem.style";
|
|
8
8
|
const HostLegacyRadioGroupReturnQuestionItem = ({ returnQuestion, children, testID, }) => {
|
|
@@ -11,7 +11,7 @@ const HostLegacyRadioGroupReturnQuestionItem = ({ returnQuestion, children, test
|
|
|
11
11
|
const style = useMemo(() => hostLegacyRadioGroupReturnQuestionItemStyle(), []);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement(View, { style: style.wrapper, testID: testID },
|
|
14
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
14
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "action" }, placeholderText),
|
|
15
15
|
children)));
|
|
16
16
|
};
|
|
17
17
|
export { HostLegacyRadioGroupReturnQuestionItem };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { style as hostRadioGroupReturnQuestionItemStyle } from "./HostRadioGroupReturnQuestionItem.style";
|
|
8
8
|
const HostRadioGroupReturnQuestionItem = ({ returnQuestion, children, testID, }) => {
|
|
9
9
|
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
10
10
|
const style = useMemo(() => hostRadioGroupReturnQuestionItemStyle(), []);
|
|
11
11
|
return (React.createElement(View, { style: style.wrapper, testID: testID },
|
|
12
|
-
returnQuestion.translationKey && (React.createElement(Text, { level: 3, style: style.title,
|
|
12
|
+
returnQuestion.translationKey && (React.createElement(Text, { level: 3, style: style.title, variant: "action" }, formatMessage({ id: returnQuestion.translationKey }))),
|
|
13
13
|
children));
|
|
14
14
|
};
|
|
15
15
|
export { HostRadioGroupReturnQuestionItem };
|
|
@@ -2,8 +2,8 @@
|
|
|
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 { Text } from "@lookiero/aurora";
|
|
6
5
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
7
7
|
import { returnQuestionHasChildren } from "../../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
8
8
|
import { DOMAIN } from "../../../../../../i18n/i18n";
|
|
9
9
|
import ReturnQuestion from "../../../ReturnQuestion";
|
|
@@ -25,7 +25,7 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName,
|
|
|
25
25
|
const style = useMemo(() => hostStackReturnQuestionItemStyle(), []);
|
|
26
26
|
return (React.createElement(Animated.View, { style: stackAnimatedStyle },
|
|
27
27
|
React.createElement(View, { onLayout: handleOnLayout },
|
|
28
|
-
titleText && (React.createElement(Text, { level: 3, style: style.title,
|
|
28
|
+
titleText && (React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText)),
|
|
29
29
|
feedbackReturnQuestion && returnQuestionHasChildren(feedbackReturnQuestion) ? (React.createElement(React.Fragment, null,
|
|
30
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))));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18n } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { returnQuestionHasChildren } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
|
|
7
7
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { TouchableHighlight } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
8
|
import { style as optionReturnQuestionItemStyle } from "./OptionReturnQuestionItem.style";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { Pressable } from "react-native";
|
|
4
|
-
import { Text as AuroraText } from "@lookiero/aurora";
|
|
5
4
|
import { useI18n } from "@lookiero/i18n-react";
|
|
6
|
-
import { Checkbox } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { Checkbox, Text } from "@lookiero/sty-psp-ui";
|
|
7
6
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
8
7
|
import { useStaticInfo } from "../../../../../hooks/useStaticInfo";
|
|
9
8
|
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
@@ -12,8 +11,8 @@ import { deepestReturnQuestionWithFeedbackForReturnQuestion, feedbackForReturnQu
|
|
|
12
11
|
import { ModalOptionReturnQuestionItems } from "../modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems";
|
|
13
12
|
import { style as radioReturnQuestionItemStyle } from "./RadioReturnQuestionItem.style";
|
|
14
13
|
const TEXT = {
|
|
15
|
-
[Tradename.LOOKIERO]: (props) => React.createElement(
|
|
16
|
-
[Tradename.OUTFITTERY]: (props) => React.createElement(
|
|
14
|
+
[Tradename.LOOKIERO]: (props) => React.createElement(Text, { level: 1, variant: "detail", ...props }),
|
|
15
|
+
[Tradename.OUTFITTERY]: (props) => React.createElement(Text, { level: 3, ...props }),
|
|
17
16
|
};
|
|
18
17
|
const RadioReturnQuestionItem = ({ returnQuestion, returnQuestionParent, testID, portalHostName, }) => {
|
|
19
18
|
const { tradename } = useStaticInfo();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
|
-
import { Text } from "@lookiero/aurora";
|
|
5
4
|
import { useI18nMessage, useI18n } from "@lookiero/i18n-react";
|
|
5
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
|
|
7
7
|
import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
8
|
import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
|
|
@@ -15,7 +15,7 @@ const ReturnQuestionFeedbackItem = ({ returnQuestion }) => {
|
|
|
15
15
|
const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(" / ");
|
|
16
16
|
const style = useMemo(() => returnQuestionFeedbackItemStyle(), []);
|
|
17
17
|
return (React.createElement(View, { style: style.container },
|
|
18
|
-
returnQuestion.translationKey && (React.createElement(Text, { level: 2, style: style.title,
|
|
19
|
-
React.createElement(Text, { level: 1,
|
|
18
|
+
returnQuestion.translationKey && (React.createElement(Text, { level: 2, style: style.title, variant: "detailBold" }, formatMessage({ id: returnQuestion.translationKey }))),
|
|
19
|
+
React.createElement(Text, { level: 1, variant: "detail" }, feedback || unansweredText)));
|
|
20
20
|
};
|
|
21
21
|
export { ReturnQuestionFeedbackItem };
|
package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { Text } from "@lookiero/aurora";
|
|
3
2
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
4
4
|
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
6
6
|
import { Header } from "../Header";
|
|
@@ -11,7 +11,7 @@ const CheckoutHeader = ({ onBack }) => {
|
|
|
11
11
|
const style = useMemo(() => checkoutHeader(), []);
|
|
12
12
|
return (React.createElement(Header, { testID: "checkout-header" },
|
|
13
13
|
React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
15
15
|
React.createElement(ButtonIconPlaceholder, null)));
|
|
16
16
|
};
|
|
17
17
|
export { CheckoutHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { Text } from "@lookiero/aurora";
|
|
3
2
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
4
4
|
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
6
6
|
import { Header } from "../Header";
|
|
@@ -11,7 +11,7 @@ const ItemDetailHeader = ({ onBack }) => {
|
|
|
11
11
|
const style = useMemo(() => itemDetailHeaderStyle(), []);
|
|
12
12
|
return (React.createElement(Header, { testID: "item-detail-header" },
|
|
13
13
|
React.createElement(ButtonIconPlaceholder, null),
|
|
14
|
-
React.createElement(Text, { level: 3,
|
|
14
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
15
15
|
React.createElement(ButtonIcon, { name: "close", style: { button: style.button }, testID: "close-button-icon", onPress: onBack })));
|
|
16
16
|
};
|
|
17
17
|
export { ItemDetailHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { generatePath, useNavigate } from "react-router-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
7
7
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
@@ -31,7 +31,7 @@ const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
|
31
31
|
}, [basePath, item.id, itemIndex, items, navigate, onNext]);
|
|
32
32
|
return (React.createElement(Header, { testID: "item-header" },
|
|
33
33
|
!isFirstItem ? (React.createElement(ButtonIcon, { name: "arrow_left", style: { button: style.button }, testID: "arrow-left-button-icon", onPress: navigateToPreviousItem })) : (React.createElement(ButtonIconPlaceholder, null)),
|
|
34
|
-
React.createElement(Text, { level: 3,
|
|
34
|
+
React.createElement(Text, { level: 3, variant: "action" }, title),
|
|
35
35
|
!isLastItem ? (React.createElement(ButtonIcon, { name: "arrow_right", style: { button: style.button }, testID: "arrow-right-button-icon", onPress: navigateToNextItem })) : (React.createElement(ButtonIconPlaceholder, null))));
|
|
36
36
|
};
|
|
37
37
|
export { ItemHeader };
|
|
@@ -1,12 +1,12 @@
|
|
|
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, Layout as AuroraLayout, Spinner
|
|
4
|
+
import { Box, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
7
|
import { PayButton, Section } from "@lookiero/payments-front";
|
|
8
8
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
9
|
-
import { Sticky, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
9
|
+
import { Sticky, Text, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
10
10
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
11
11
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
12
12
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -90,7 +90,7 @@ const Checkout = ({ layout: Layout, getAuthToken, useRedirect, onCheckoutFlowSuc
|
|
|
90
90
|
React.createElement(View, { style: [style.contentWrapper, isDektopScreen && style.desktopContentWrapper] },
|
|
91
91
|
country === Country.NL && (React.createElement(View, { style: style.paymentSelectorNL },
|
|
92
92
|
React.createElement(PaymentInstrument, { useRedirect: useRedirect }))),
|
|
93
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
93
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText),
|
|
94
94
|
checkoutItemsKept?.map((checkoutItem) => (React.createElement(View, { key: checkoutItem.id, testID: "checkout-items-kept" },
|
|
95
95
|
React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price, status: checkoutItem.status, size: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
96
96
|
? checkoutItem.replacedFor.size
|
package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
+
import "@lookiero/sty-psp-ui";
|
|
2
3
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
3
4
|
type CustomerDecissionBannerStatus = Exclude<CheckoutItemStatus, CheckoutItemStatus.INITIAL>;
|
|
4
5
|
interface CustomerDecissionBannerProps {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
|
-
import { InfoBox
|
|
3
|
+
import { InfoBox } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import
|
|
5
|
+
import "@lookiero/sty-psp-ui";
|
|
6
|
+
import { useScreenSize, Text } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
8
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
8
9
|
import { style as customerDecissionBannerStyle } from "./CustomerDecissionBanner.style";
|
|
@@ -20,6 +21,6 @@ const CustomerDecissionBanner = ({ checkoutItemStatus, onPress }) => {
|
|
|
20
21
|
return (React.createElement(View, { style: [style.container, isSmallScreen ? style.smallContainer : null] },
|
|
21
22
|
React.createElement(InfoBox, { text: decissionText },
|
|
22
23
|
React.createElement(Pressable, { testID: "customer-decission-banner", onPress: onPress },
|
|
23
|
-
React.createElement(Text, { level: isSmallScreen ? 2 : 1,
|
|
24
|
+
React.createElement(Text, { level: isSmallScreen ? 2 : 1, style: style.underlinedText, variant: "detail" }, bannerButtonText)))));
|
|
24
25
|
};
|
|
25
26
|
export { CustomerDecissionBanner };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Button, BUTTON_VARIANT
|
|
3
|
+
import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import { Modal } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { Modal, Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style as getOutOfCheckoutModalStyle } from "./GetOutOfCheckoutModal.style";
|
|
8
8
|
const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
@@ -22,8 +22,8 @@ const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
|
22
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, { level: 3, selectable: false, style: style.buttonText,
|
|
25
|
+
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }], variant: "action" }, dismissButtonText)),
|
|
26
26
|
React.createElement(Button, { style: [style.button, style.confirmButton], variant: BUTTON_VARIANT.SECONDARY, onPress: onConfirm },
|
|
27
|
-
React.createElement(Text, { level: 3, selectable: false, style: style.buttonText,
|
|
27
|
+
React.createElement(Text, { level: 3, selectable: false, style: [style.buttonText, { textTransform: "uppercase" }], variant: "action" }, confirmButtonText)))));
|
|
28
28
|
};
|
|
29
29
|
export { GetOutOfCheckoutModal };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
@@ -16,9 +16,9 @@ const ProductVariantDescription = ({ brand, name, price, size: sizeProjection, c
|
|
|
16
16
|
return (React.createElement(View, { style: [style.container, !isDesktopScreen && style.smallContainer] },
|
|
17
17
|
React.createElement(View, { style: style.info },
|
|
18
18
|
React.createElement(View, { style: style.content },
|
|
19
|
-
React.createElement(Text, { level: 1, style: style.brand,
|
|
20
|
-
React.createElement(Text, { level: 1,
|
|
19
|
+
React.createElement(Text, { level: 1, style: style.brand, variant: "detail" }, brand),
|
|
20
|
+
React.createElement(Text, { level: 1, variant: "detailBold" }, name)),
|
|
21
21
|
React.createElement(Price, { price: price, withPercentage: true })),
|
|
22
|
-
React.createElement(Text, { level: 1,
|
|
22
|
+
React.createElement(Text, { level: 1, variant: "detail" }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)));
|
|
23
23
|
};
|
|
24
24
|
export { ProductVariantDescription };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { ButtonIcon } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
7
7
|
import { ReturnQuestions } from "../../../../components/organisms/returnQuestions/ReturnQuestions";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
2
|
import { TouchableHighlight, View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/
|
|
3
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
4
4
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { style as modalStyle } from "./SelectModal.style";
|
|
6
6
|
const SelectModal = ({ modalVisible, options, style: customStyle, testID, title, value, portalHostName, onChange = () => void 0, onClose = () => void 0, }) => {
|
|
@@ -11,7 +11,7 @@ const SelectModal = ({ modalVisible, options, style: customStyle, testID, title,
|
|
|
11
11
|
const style = useMemo(() => modalStyle(), []);
|
|
12
12
|
return (React.createElement(Modal, { portalHostName: portalHostName, testID: testID, visible: modalVisible, scroll: true, showCloseButton: true, onClose: onClose },
|
|
13
13
|
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
|
|
14
|
-
title && (React.createElement(Text, { level: 3, style: style.modalTitle,
|
|
14
|
+
title && (React.createElement(Text, { level: 3, style: style.modalTitle, variant: "heading" }, title)),
|
|
15
15
|
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, accessibilityLabel: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], testID: optionValue, underlayColor: style.underlayColor, accessible: true, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
16
16
|
React.createElement(Text, { level: 3, style: [style.optionText, value === optionValue && style.textActive, customStyle?.optionText] }, label)))))));
|
|
17
17
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Button
|
|
3
|
+
import { Button } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import { Modal } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { Modal, Text } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style as sizeWithoutStockModalStyle } from "./SizeWithoutStockModal.style";
|
|
8
8
|
const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
@@ -12,7 +12,7 @@ const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
|
12
12
|
const style = useMemo(() => sizeWithoutStockModalStyle(), []);
|
|
13
13
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
14
14
|
React.createElement(View, { style: style.modalContent },
|
|
15
|
-
React.createElement(Text, { level: 3, style: style.title,
|
|
15
|
+
React.createElement(Text, { level: 3, style: style.title, variant: "heading" }, titleText),
|
|
16
16
|
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
17
17
|
React.createElement(Button, { onPress: onDismiss }, buttonText))));
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { DOMAIN } from "../../../../i18n/i18n";
|
|
6
6
|
import { style as priceStyle } from "./Price.style";
|
|
7
7
|
const Price = ({ price, withPercentage = false }) => {
|
|
@@ -21,9 +21,9 @@ const Price = ({ price, withPercentage = false }) => {
|
|
|
21
21
|
const priceValue = isDiscounted ? productDiscountedPrice : productPrice;
|
|
22
22
|
const style = useMemo(() => priceStyle(), []);
|
|
23
23
|
return (React.createElement(View, { style: style.price, testID: "price" },
|
|
24
|
-
isDiscounted && (React.createElement(Text, { level: 1, style: style.discountedPriceText, testID: "discounted-price-text",
|
|
24
|
+
isDiscounted && (React.createElement(Text, { level: 1, style: style.discountedPriceText, testID: "discounted-price-text", variant: "detail" }, productPrice)),
|
|
25
25
|
React.createElement(View, { style: style.discountedPriceInfo },
|
|
26
|
-
React.createElement(Text, { level: 1, testID: "price-text",
|
|
27
|
-
isDiscounted && withPercentage ? (React.createElement(Text, { level: 1, style: style.discountedPercentage, testID: "discounted-percentage-text",
|
|
26
|
+
React.createElement(Text, { level: 1, testID: "price-text", variant: "detail" }, priceValue),
|
|
27
|
+
isDiscounted && withPercentage ? (React.createElement(Text, { level: 1, style: style.discountedPercentage, testID: "discounted-percentage-text", variant: "detail" }, `-${price.discountedPrice.percentage}%`)) : null)));
|
|
28
28
|
};
|
|
29
29
|
export { Price };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { Image, View } from "react-native";
|
|
3
|
-
import { Text } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
5
5
|
import { Column, Row, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
@@ -26,9 +26,9 @@ const ProductVariantPreview = ({ item, country }) => {
|
|
|
26
26
|
}),
|
|
27
27
|
} })),
|
|
28
28
|
React.createElement(View, { style: style.info },
|
|
29
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
30
|
-
React.createElement(Text, { level: 2,
|
|
31
|
-
React.createElement(Text, { level: 2, style: style.text,
|
|
29
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" }, brand),
|
|
30
|
+
React.createElement(Text, { level: 2, variant: "detail" }, name),
|
|
31
|
+
React.createElement(Text, { level: 2, style: style.text, variant: "detail" }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)),
|
|
32
32
|
React.createElement(View, { style: style.price },
|
|
33
33
|
React.createElement(Price, { price: price, withPercentage: true }))))));
|
|
34
34
|
};
|
|
@@ -3,10 +3,11 @@ import React, { useCallback, useMemo } from "react";
|
|
|
3
3
|
import { Platform, View } from "react-native";
|
|
4
4
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
5
5
|
import { generatePath, useNavigate } from "react-router-native";
|
|
6
|
-
import { Box, Button, Layout as AuroraLayout, Spinner
|
|
6
|
+
import { Box, Button, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
|
|
7
7
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
8
8
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
9
9
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
10
|
+
import { Text } from "@lookiero/sty-psp-ui";
|
|
10
11
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
11
12
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
12
13
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
@@ -120,8 +121,8 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
120
121
|
!isMobileScreen && style.infoDesktop,
|
|
121
122
|
tradename === Tradename.OUTFITTERY && style.infoOutfittery,
|
|
122
123
|
] },
|
|
123
|
-
React.createElement(Text, { level: 3,
|
|
124
|
-
React.createElement(Text, { level: 1, style: style.description,
|
|
124
|
+
React.createElement(Text, { level: 3, variant: "heading" }, titleText),
|
|
125
|
+
React.createElement(Text, { level: 1, style: style.description, variant: "detail" }, descriptionText)),
|
|
125
126
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
126
127
|
React.createElement(View, { style: [style.submit, !isMobileScreen && style.submitDesktop] },
|
|
127
128
|
React.createElement(Button, { testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText)))))))));
|