@lookiero/checkout 11.2.0 → 11.3.0

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.
Files changed (94) hide show
  1. package/dist/src/ExpoRoot.js +1 -1
  2. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +4 -3
  3. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +3 -0
  4. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +3 -0
  5. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +1 -1
  6. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.d.ts +1 -0
  7. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.js +2 -1
  8. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.js +5 -5
  9. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.js +5 -5
  10. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.js +5 -5
  11. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +2 -1
  12. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -3
  13. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
  14. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.d.ts +3 -0
  15. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.js +4 -1
  16. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +2 -2
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.d.ts +1 -0
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.js +2 -1
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +7 -3
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.d.ts +9 -1
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.js +10 -2
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
  23. package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +3 -2
  24. package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +3 -2
  25. package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +4 -3
  26. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +10 -9
  27. package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +4 -3
  28. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +4 -4
  29. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +2 -0
  30. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +2 -0
  31. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +4 -4
  32. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +5 -2
  33. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +6 -3
  34. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -1
  35. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
  36. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +3 -0
  37. package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +4 -1
  38. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +7 -7
  39. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.d.ts +3 -0
  40. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.js +4 -1
  41. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +9 -6
  42. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
  43. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.d.ts +3 -0
  44. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.js +4 -1
  45. package/dist/src/infrastructure/ui/views/summary/Summary.js +10 -9
  46. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -1
  47. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +8 -5
  48. package/dist/src/version.d.ts +1 -1
  49. package/dist/src/version.js +1 -1
  50. package/package.json +1 -1
  51. package/src/ExpoRoot.tsx +2 -1
  52. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +3 -0
  53. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +5 -3
  54. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.style.ts +2 -1
  55. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.tsx +1 -0
  56. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Happy.tsx +5 -5
  57. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Normal.tsx +5 -5
  58. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/icons/Sad.tsx +5 -5
  59. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +2 -1
  60. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -3
  61. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.style.ts +4 -1
  62. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -2
  63. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.style.ts +2 -1
  64. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +2 -2
  65. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.style.ts +10 -2
  66. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +20 -12
  67. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +1 -1
  68. package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +3 -2
  69. package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +31 -80
  70. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +3 -2
  71. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +31 -80
  72. package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +4 -3
  73. package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +62 -160
  74. package/src/infrastructure/ui/views/checkout/Checkout.tsx +12 -11
  75. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +4 -3
  76. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +2 -0
  77. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +4 -4
  78. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +6 -3
  79. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +4 -4
  80. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -1
  81. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +5 -1
  82. package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +2 -3
  83. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.style.ts +4 -1
  84. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +7 -7
  85. package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +11 -12
  86. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +10 -8
  87. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts +6 -2
  88. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
  89. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +18 -0
  90. package/src/infrastructure/ui/views/summary/Summary.tsx +12 -11
  91. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -1
  92. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +22 -6
  93. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +8 -5
  94. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +36 -0
@@ -15,5 +15,8 @@ declare const style: () => {
15
15
  optionText: {
16
16
  lineHeight: number;
17
17
  };
18
+ textActive: {
19
+ color: string;
20
+ };
18
21
  };
19
22
  export { style };
@@ -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 { borderWidth1, colorBgPrimaryLight, colorBorderInteractive, space1, space5, space6 } = theme();
4
+ const { borderWidth1, colorBgPrimaryLight, colorBorderInteractive, colorTextMedium, space1, space5, space6 } = theme();
5
5
  const styles = StyleSheet.create({
6
6
  modalContent: {
7
7
  paddingBottom: space6,
@@ -18,6 +18,9 @@ const style = () => {
18
18
  optionText: {
19
19
  lineHeight: space6,
20
20
  },
21
+ textActive: {
22
+ color: colorTextMedium,
23
+ },
21
24
  });
22
25
  return {
23
26
  ...styles,
@@ -1,8 +1,8 @@
1
1
  import React, { useMemo } from "react";
2
- import { Image } from "react-native";
3
- import { COLOR, Text, View, useDevice } from "@lookiero/aurora";
2
+ import { Image, View } from "react-native";
3
+ import { Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
- import { Column, Row } from "@lookiero/sty-psp-ui";
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";
8
8
  import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
@@ -10,13 +10,13 @@ import { Price } from "../price/Price";
10
10
  import { IMAGE_SIZE, style as productVariantPreviewStyle } from "./ProductVariantPreview.style";
11
11
  const ProductVariantPreview = ({ item, country }) => {
12
12
  const cdnImageUrl = useMediaImage();
13
- const { screen } = useDevice();
13
+ const screenSize = useScreenSize();
14
14
  const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
15
15
  const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
16
16
  const { productVariant: { media, brand, name, size: sizeProjection }, price, } = item;
17
17
  const mainImage = media.find((mediaElement) => mediaElement.perspective === "MAIN");
18
18
  const style = useMemo(() => productVariantPreviewStyle(), []);
19
- return (React.createElement(View, { style: [style.wrapper, !screen.S && style.mobileWrapper], testID: "product-variant-preview" },
19
+ return (React.createElement(View, { style: [style.wrapper, screenSize === "S" && style.mobileWrapper], testID: "product-variant-preview" },
20
20
  React.createElement(Row, { style: style.row },
21
21
  React.createElement(Column, { size: { M: "2/3", L: "2/3" }, style: style.content },
22
22
  mainImage && (React.createElement(Image, { resizeMode: "stretch", style: style.image, testID: "product-variant-image", source: {
@@ -26,9 +26,9 @@ const ProductVariantPreview = ({ item, country }) => {
26
26
  }),
27
27
  } })),
28
28
  React.createElement(View, { style: style.info },
29
- React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, detail: true }, brand),
29
+ React.createElement(Text, { level: 2, style: style.text, detail: true }, brand),
30
30
  React.createElement(Text, { level: 2, detail: true }, name),
31
- React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, detail: true }, `${sizeText} ${sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country })}`)),
31
+ React.createElement(Text, { level: 2, style: style.text, detail: true }, `${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
  };
@@ -22,6 +22,9 @@ declare const style: () => {
22
22
  flex: number;
23
23
  justifyContent: "center";
24
24
  };
25
+ text: {
26
+ color: string;
27
+ };
25
28
  wrapper: {
26
29
  backgroundColor: string;
27
30
  flexDirection: "row";
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
  const IMAGE_SIZE = 35;
4
4
  const style = () => {
5
- const { borderRadius2, borderWidth1, colorBgBase, colorBorderInput, space2, space4 } = theme();
5
+ const { borderRadius2, borderWidth1, colorBgBase, colorBorderInput, colorTextMedium, space2, space4 } = theme();
6
6
  return StyleSheet.create({
7
7
  content: {
8
8
  flexDirection: "row",
@@ -26,6 +26,9 @@ const style = () => {
26
26
  flex: 1,
27
27
  justifyContent: "center",
28
28
  },
29
+ text: {
30
+ color: colorTextMedium,
31
+ },
29
32
  wrapper: {
30
33
  backgroundColor: colorBgBase,
31
34
  flexDirection: "row",
@@ -1,12 +1,13 @@
1
1
  import { PortalHost } from "@gorhom/portal";
2
2
  import React, { useCallback, useMemo } from "react";
3
- import { Platform } from "react-native";
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, Text, View, useDevice } from "@lookiero/aurora";
6
+ import { Box, Button, Layout as AuroraLayout, Spinner, Text } 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 { useScreenSize } from "@lookiero/sty-psp-ui";
10
11
  import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion.constants";
11
12
  import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
12
13
  import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
@@ -42,7 +43,9 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
42
43
  const navigate = useNavigate();
43
44
  const { basePath } = useStaticInfo();
44
45
  const logger = useLogger();
45
- const { screen } = useDevice();
46
+ const screenSize = useScreenSize();
47
+ const isDektopScreen = screenSize === "L";
48
+ const isMobileScreen = screenSize === "S";
46
49
  const style = useMemo(() => returnQuestionsFormStyle(), []);
47
50
  const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_TITLE });
48
51
  const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
@@ -104,13 +107,13 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
104
107
  React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
105
108
  React.createElement(KeyboardAwareScrollView, { extraScrollHeight: Platform.OS === "android" ? 10 : 120, keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, testID: "return-questions-form" },
106
109
  React.createElement(View, { style: style.background },
107
- React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [style.layout, screen.L ? style.desktopLayoutSpacing : undefined] },
110
+ React.createElement(AuroraLayout, { fullWidth: !isDektopScreen, style: [style.layout, isDektopScreen ? style.desktopLayoutSpacing : undefined] },
108
111
  React.createElement(Box, { size: { L: "2/3" } },
109
- React.createElement(View, { style: [style.info, !screen.S && style.desktopInfo] },
112
+ React.createElement(View, { style: [style.info, !isMobileScreen && style.desktopInfo] },
110
113
  React.createElement(Text, { level: 3, heading: true }, titleText),
111
114
  React.createElement(Text, { level: 1, style: style.description, detail: true }, descriptionText)),
112
115
  React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
113
- React.createElement(View, { style: [style.submit, !screen.S && style.submitDesktop] },
116
+ React.createElement(View, { style: [style.submit, !isMobileScreen && style.submitDesktop] },
114
117
  React.createElement(Button, { testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText)))))))));
115
118
  };
116
119
  export { ReturnQuestionsForm };
@@ -1,8 +1,8 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { Pressable, View } from "react-native";
3
- import { COLOR, Icon, Text } from "@lookiero/aurora";
3
+ import { Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
- import { LazyImage } from "@lookiero/sty-psp-ui";
5
+ import { Icon, LazyImage } from "@lookiero/sty-psp-ui";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
7
  import { size } from "../../../../../../projection/size/size";
8
8
  import { Price } from "../../../../components/atoms/price/Price";
@@ -21,9 +21,9 @@ const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color
21
21
  React.createElement(LazyImage, { hiResSrc: cdnImageUrl({ url: media[0]?.url, width: IMAGE_WIDTH }), resizeMode: "contain", src: cdnImageUrl({ url: media[0]?.url, width: IMAGE_WIDTH, dpi: 1 }), style: { view: [style.media, customStyle?.image] }, testID: "product-variant-media" })),
22
22
  React.createElement(View, { style: style.descriptionContainer },
23
23
  React.createElement(View, { style: style.infoProductVariant },
24
- React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, detail: true }, brand),
24
+ React.createElement(Text, { level: 2, style: style.text, detail: true }, brand),
25
25
  React.createElement(Text, { level: 2, detail: true }, name),
26
- React.createElement(Text, { color: COLOR.TEXT_MEDIUM, level: 2, detail: true },
26
+ React.createElement(Text, { level: 2, style: style.text, detail: true },
27
27
  sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country }),
28
28
  " / ",
29
29
  colorLabel),
@@ -35,5 +35,8 @@ declare const style: () => {
35
35
  paddingHorizontal: number;
36
36
  paddingTop: number;
37
37
  };
38
+ text: {
39
+ color: string;
40
+ };
38
41
  };
39
42
  export { style, IMAGE_WIDTH };
@@ -3,7 +3,7 @@ import { theme } from "@lookiero/sty-psp-ui";
3
3
  const IMAGE_WIDTH = 104;
4
4
  const IMAGE_HEIGHT = 132;
5
5
  const style = () => {
6
- const { colorBgSurface, borderRadius3, borderRadiusFull, borderWidth2, colorBorderInput, colorBgPrimaryLight, space05, space1, space2, space4, } = theme();
6
+ const { borderRadius3, borderRadiusFull, borderWidth2, colorBgPrimaryLight, colorBgSurface, colorBorderInput, colorTextMedium, space05, space1, space2, space4, } = theme();
7
7
  return StyleSheet.create({
8
8
  container: {
9
9
  alignItems: "flex-end",
@@ -40,6 +40,9 @@ const style = () => {
40
40
  paddingHorizontal: space2,
41
41
  paddingTop: space1,
42
42
  },
43
+ text: {
44
+ color: colorTextMedium,
45
+ },
43
46
  });
44
47
  };
45
48
  export { style, IMAGE_WIDTH };
@@ -1,10 +1,10 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from "react";
2
2
  import { Platform, ScrollView, View } from "react-native";
3
3
  import { generatePath, useMatch, useNavigate } from "react-router-native";
4
- import { Box, Text, Layout as AuroraLayout, useDevice, Spinner } from "@lookiero/aurora";
4
+ import { Box, Text, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
5
5
  import { useI18nMessage } from "@lookiero/i18n-react";
6
6
  import { QueryStatus } from "@lookiero/messaging-react";
7
- import { Sticky } from "@lookiero/sty-psp-ui";
7
+ import { Sticky, useScreenSize } from "@lookiero/sty-psp-ui";
8
8
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
9
9
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
10
10
  import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
@@ -22,7 +22,8 @@ import { style as summaryStyle } from "./Summary.style";
22
22
  import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
23
23
  const Summary = ({ layout: Layout, children }) => {
24
24
  const { customer: { customerId, country, segment }, basePath, } = useStaticInfo();
25
- const { screen } = useDevice();
25
+ const screenSize = useScreenSize();
26
+ const isDesktopScreen = screenSize === "L";
26
27
  const style = useMemo(() => summaryStyle(), []);
27
28
  const [pricingCollapsed, setPricingCollapsed] = useState(true);
28
29
  const [pricingHeight, setPricingHeight] = useState(0);
@@ -84,17 +85,17 @@ const Summary = ({ layout: Layout, children }) => {
84
85
  } },
85
86
  React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "summary-view" },
86
87
  fiveItemsDiscount !== 0 && React.createElement(FiveItemsDiscountBanner, { fiveItemsDiscount: fiveItemsDiscount }),
87
- React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }] },
88
- React.createElement(Box, { size: { L: "2/3" }, style: screen.L && style.desktopListSpacing },
89
- React.createElement(View, { style: [style.contentWrapper, screen.L && style.desktopContentWrapper] },
90
- React.createElement(View, { style: !screen.L && style.mobileInfo },
88
+ React.createElement(AuroraLayout, { fullWidth: !isDesktopScreen, style: [isDesktopScreen && style.desktopLayoutSpacing, !isDesktopScreen && { paddingBottom: pricingHeight }] },
89
+ React.createElement(Box, { size: { L: "2/3" }, style: isDesktopScreen && style.desktopListSpacing },
90
+ React.createElement(View, { style: [style.contentWrapper, isDesktopScreen && style.desktopContentWrapper] },
91
+ React.createElement(View, { style: !isDesktopScreen && style.mobileInfo },
91
92
  React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
92
93
  React.createElement(Text, { level: 3, style: style.description }, descriptionText)),
93
94
  children)),
94
- pricing && screen.L ? (React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, screen.L ? style.desktopResume : style.mobileResume] },
95
+ pricing && isDesktopScreen ? (React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, isDesktopScreen ? style.desktopResume : style.mobileResume] },
95
96
  React.createElement(View, { style: style.princingWrapper },
96
97
  React.createElement(CollapsiblePricing, { collapsed: false, collapsible: false, pricing: pricing, submitButtonText: submitButtonText, totalCheckoutItemsKept: totalCheckoutItemsKept, onSubmit: handleOnSubmit })))) : null)),
97
- pricing && !screen.L ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
98
+ pricing && !isDesktopScreen ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
98
99
  React.createElement(Body, null,
99
100
  React.createElement(CollapsiblePricing, { collapsed: pricingCollapsed, pricing: pricing, submitButtonText: submitButtonText, totalCheckoutItemsKept: totalCheckoutItemsKept, onPress: handleOnPressPricing, onSubmit: handleOnSubmit })))) : null));
100
101
  };
@@ -1,8 +1,9 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { Pressable, View } from "react-native";
3
3
  import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
4
- import { Button, Icon, Text } from "@lookiero/aurora";
4
+ import { Button, Text } from "@lookiero/aurora";
5
5
  import { useI18nMessage } from "@lookiero/i18n-react";
6
+ import { Icon } from "@lookiero/sty-psp-ui";
6
7
  import { Price } from "../../../../components/atoms/price/Price";
7
8
  import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
8
9
  import { Pricing } from "../pricing/Pricing";
@@ -1,8 +1,8 @@
1
1
  import React, { useCallback, useMemo } from "react";
2
2
  import { View } from "react-native";
3
- import { Text, useDevice } from "@lookiero/aurora";
3
+ import { Text } from "@lookiero/aurora";
4
4
  import { useI18nMessage } from "@lookiero/i18n-react";
5
- import { Tabs } from "@lookiero/sty-psp-ui";
5
+ import { Tabs, useScreenSize } from "@lookiero/sty-psp-ui";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
7
  import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
8
8
  import { ProductVariant } from "../../../shared/components/productVariant/ProductVariant";
@@ -10,7 +10,7 @@ import { style as checkoutItemsTabsStyle } from "./CheckoutItemsTabs.style";
10
10
  const CheckoutItem = ({ checkoutItemStatus, checkoutItemProductVariant, checkoutItemPrice, country, testID, style: customStyle, onPress, }) => (React.createElement(View, { testID: testID },
11
11
  React.createElement(ProductVariant, { brand: checkoutItemProductVariant.brand, color: checkoutItemProductVariant.color, country: country, media: checkoutItemProductVariant.media, name: checkoutItemProductVariant.name, price: checkoutItemPrice, size: checkoutItemProductVariant.size, status: checkoutItemStatus, style: customStyle, onPress: onPress })));
12
12
  const CheckoutItemsTabs = ({ tabIndex, checkoutItemsKept, checkoutItemsReturned, country, onPressItem, onChanged, }) => {
13
- const { screen } = useDevice();
13
+ const screenSize = useScreenSize();
14
14
  const style = useMemo(() => checkoutItemsTabsStyle(), []);
15
15
  const keepTabText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_KEEP_TAB });
16
16
  const returnTabText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_RETURN_TAB });
@@ -30,8 +30,11 @@ const CheckoutItemsTabs = ({ tabIndex, checkoutItemsKept, checkoutItemsReturned,
30
30
  style.emptyText,
31
31
  ]);
32
32
  return (React.createElement(Tabs, { data: data, defaultIndex: tabIndex, tabLabels: [`${keepTabText} (${checkoutItemsKept.length})`, `${returnTabText} (${checkoutItemsReturned.length})`], style: {
33
- carousel: [style.carousel, screen.L && style.carouselDesktop],
34
- tabList: { tabList: [style.tabList, screen.L && style.tabListDesktop], tab: { tabText: style.tabText } },
33
+ carousel: [style.carousel, screenSize === "L" && style.carouselDesktop],
34
+ tabList: {
35
+ tabList: [style.tabList, screenSize === "L" && style.tabListDesktop],
36
+ tab: { tabText: style.tabText },
37
+ },
35
38
  }, onChanged: onChanged }, renderItem));
36
39
  };
37
40
  export { CheckoutItemsTabs };
@@ -1 +1 @@
1
- export declare const VERSION = "11.2.0";
1
+ export declare const VERSION = "11.3.0";
@@ -1 +1 @@
1
- export const VERSION = "11.2.0";
1
+ export const VERSION = "11.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "11.2.0",
3
+ "version": "11.3.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
package/src/ExpoRoot.tsx CHANGED
@@ -29,6 +29,7 @@ import { VERSION } from "./version";
29
29
  const tradename = Tradename.LOOKIERO;
30
30
  const theme = themeByTradename({ tradename });
31
31
  const locale: Locale = Locale.es_ES;
32
+
32
33
  const subscription: SubscriptionProjection = "b";
33
34
  const order: OrderProjection = {
34
35
  isFirstOrder: false,
@@ -71,7 +72,7 @@ const translations: EndpointFunction[] = [
71
72
  (locale) =>
72
73
  translationExternalEndpoint({
73
74
  translationsUrl: externalTranslationsUrl,
74
- projects: [["checkout"]],
75
+ projects: [["checkout"], ["inventory-catalog"]],
75
76
  })(locale),
76
77
  ];
77
78
 
@@ -28,6 +28,9 @@ const style = () => {
28
28
  buttonActive: {
29
29
  backgroundColor: colorBgActionPrimaryActive,
30
30
  },
31
+ text: {
32
+ textAlign: "center",
33
+ },
31
34
  textActive: {
32
35
  color: colorTextActionPrimary,
33
36
  },
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useMemo } from "react";
2
2
  import { TouchableOpacity } from "react-native";
3
- import { ALIGN, Text } from "@lookiero/aurora";
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";
@@ -24,15 +24,17 @@ const ButtonCheckoutQuestionItem: CheckoutQuestionItem = ({
24
24
 
25
25
  const style = useMemo(() => buttonCheckoutQuestionItemStyle(), []);
26
26
 
27
+ const checked = feedback === checkoutQuestion.id;
28
+
27
29
  return (
28
30
  <TouchableOpacity
29
31
  accessibilityLabel={testID}
30
32
  activeOpacity={ACTIVE_OPACITY}
31
- style={[style.button, feedback === checkoutQuestion.id && style.buttonActive]}
33
+ style={[style.button, checked && style.buttonActive]}
32
34
  testID={testID}
33
35
  onPress={handleOnPress}
34
36
  >
35
- <Text align={ALIGN.CENTER} level={3} style={feedback === checkoutQuestion.id && style.textActive} action>
37
+ <Text level={3} style={[style.text, checked && style.textActive]} action>
36
38
  {optionText}
37
39
  </Text>
38
40
  </TouchableOpacity>
@@ -2,7 +2,7 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
 
4
4
  const style = () => {
5
- const { colorBgPrimaryMediumLight } = theme();
5
+ const { colorBgPrimaryMediumLight, colorIcon } = theme();
6
6
 
7
7
  const styles = StyleSheet.create({
8
8
  icon: {
@@ -13,6 +13,7 @@ const style = () => {
13
13
  return {
14
14
  ...styles,
15
15
  colorBgPrimaryMediumLight,
16
+ colorIcon,
16
17
  };
17
18
  };
18
19
 
@@ -42,6 +42,7 @@ const IconCheckoutQuestionItem: CheckoutQuestionItem = ({
42
42
  return (
43
43
  <Pressable accessibilityLabel={testID} testID={testID} onPress={handleOnPress}>
44
44
  <Icon
45
+ color={style.colorIcon}
45
46
  fill={isSelected ? style.colorBgPrimaryMediumLight : "none"}
46
47
  strokeWidth={isSelected ? 2 : 1}
47
48
  style={style.icon}
@@ -1,12 +1,12 @@
1
1
  import React, { FC } from "react";
2
2
  import Svg, { Circle, Path, SvgProps } from "react-native-svg";
3
3
 
4
- const Happy: FC<SvgProps> = ({ strokeWidth = 1, ...props }) => (
4
+ const Happy: FC<SvgProps> = ({ strokeWidth = 1, color, ...props }) => (
5
5
  <Svg fill="none" height={48} width={48} {...props}>
6
- <Circle cx={24} cy={24} r={23} stroke="#000" strokeWidth={strokeWidth} />
7
- <Circle cx={16} cy={17} fill="#000" r={2} />
8
- <Circle cx={32} cy={17} fill="#000" r={2} />
9
- <Path d="M14 28.5s3 6 10 6 10-6 10-6" stroke="#000" strokeWidth={strokeWidth} />
6
+ <Circle cx={24} cy={24} r={23} stroke={color} strokeWidth={strokeWidth} />
7
+ <Circle cx={16} cy={17} fill={color} r={2} />
8
+ <Circle cx={32} cy={17} fill={color} r={2} />
9
+ <Path d="M14 28.5s3 6 10 6 10-6 10-6" stroke={color} strokeWidth={strokeWidth} />
10
10
  </Svg>
11
11
  );
12
12
 
@@ -1,12 +1,12 @@
1
1
  import React, { FC } from "react";
2
2
  import Svg, { Circle, Path, SvgProps } from "react-native-svg";
3
3
 
4
- const Normal: FC<SvgProps> = ({ strokeWidth = 1, ...props }) => (
4
+ const Normal: FC<SvgProps> = ({ strokeWidth = 1, color, ...props }) => (
5
5
  <Svg fill="none" height={48} width={48} {...props}>
6
- <Circle cx={24} cy={24} r={23} stroke="#000" strokeWidth={strokeWidth} />
7
- <Circle cx={16} cy={17} fill="#000" r={2} />
8
- <Circle cx={32} cy={17} fill="#000" r={2} />
9
- <Path d="M15 31h19v1H15z" fill="#000" strokeWidth={strokeWidth} />
6
+ <Circle cx={24} cy={24} r={23} stroke={color} strokeWidth={strokeWidth} />
7
+ <Circle cx={16} cy={17} fill={color} r={2} />
8
+ <Circle cx={32} cy={17} fill={color} r={2} />
9
+ <Path d="M15 31.5H34" stroke={color} strokeWidth={strokeWidth} />
10
10
  </Svg>
11
11
  );
12
12
 
@@ -1,12 +1,12 @@
1
1
  import React, { FC } from "react";
2
2
  import Svg, { Circle, Path, SvgProps } from "react-native-svg";
3
3
 
4
- const Sad: FC<SvgProps> = ({ strokeWidth = 1, ...props }) => (
4
+ const Sad: FC<SvgProps> = ({ strokeWidth = 1, color, ...props }) => (
5
5
  <Svg fill="none" height={48} width={48} {...props}>
6
- <Circle cx={24} cy={24} r={23} stroke="#000" strokeWidth={strokeWidth} />
7
- <Circle cx={16} cy={17} fill="#000" r={2} />
8
- <Circle cx={32} cy={17} fill="#000" r={2} />
9
- <Path d="M14 33.5s3-6 10-6 10 6 10 6" stroke="#000" strokeWidth={strokeWidth} />
6
+ <Circle cx={24} cy={24} r={23} stroke={color} strokeWidth={strokeWidth} />
7
+ <Circle cx={16} cy={17} fill={color} r={2} />
8
+ <Circle cx={32} cy={17} fill={color} r={2} />
9
+ <Path d="M14 33.5s3-6 10-6 10 6 10 6" stroke={color} strokeWidth={strokeWidth} />
10
10
  </Svg>
11
11
  );
12
12
 
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  import React, { useMemo } from "react";
3
- import { Text, View } from "@lookiero/aurora";
3
+ import { View } from "react-native";
4
+ import { Text } from "@lookiero/aurora";
4
5
  import { useI18n } from "@lookiero/i18n-react";
5
6
  import { ReturnQuestionType } from "../../../../../../../projection/returnQuestion/returnQuestion.constants";
6
7
  import { returnQuestionWithTranslationKey } from "../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
@@ -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 { ReturnQuestionType } from "../../../../../../../projection/returnQuestion/returnQuestion.constants";
8
7
  import { DOMAIN } from "../../../../../i18n/i18n";
9
8
  import {
@@ -98,7 +97,7 @@ const HostSelectReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HOST_S
98
97
  deepestReturnQuestionWithFeedback && (
99
98
  <ButtonIcon
100
99
  name="arrow_left"
101
- style={style.backButton}
100
+ style={{ button: style.backButton }}
102
101
  testID="modal-back-button"
103
102
  onPress={handleOnBackButtonPress}
104
103
  />
@@ -2,9 +2,12 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
 
4
4
  const style = () => {
5
- const { space1 } = theme();
5
+ const { colorTextMedium, space1 } = theme();
6
6
 
7
7
  return StyleSheet.create({
8
+ text: {
9
+ color: colorTextMedium,
10
+ },
8
11
  title: {
9
12
  marginBottom: space1,
10
13
  },
@@ -2,7 +2,7 @@
2
2
  import React, { useCallback, useMemo } from "react";
3
3
  import { LayoutChangeEvent, View } from "react-native";
4
4
  import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
5
- import { COLOR, Text } from "@lookiero/aurora";
5
+ import { Text } from "@lookiero/aurora";
6
6
  import { useI18n } from "@lookiero/i18n-react";
7
7
  import { ReturnQuestionType } from "../../../../../../../../projection/returnQuestion/returnQuestion.constants";
8
8
  import { returnQuestionHasChildren } from "../../../../../../../../projection/returnQuestion/returnQuestion.typeguard";
@@ -58,7 +58,7 @@ const HostStackReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.HOST_ST
58
58
  )}
59
59
  {feedbackReturnQuestion && returnQuestionHasChildren(feedbackReturnQuestion) ? (
60
60
  <>
61
- <Text color={COLOR.TEXT_MEDIUM} level={3}>
61
+ <Text level={3} style={style.text}>
62
62
  {feedbackText}
63
63
  </Text>
64
64
  {feedbackReturnQuestion.children?.map((childReturnQuestion) => (
@@ -2,13 +2,14 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
 
4
4
  const style = () => {
5
- const { space2, space6 } = theme();
5
+ const { colorTextMedium, space2, space6 } = theme();
6
6
 
7
7
  return StyleSheet.create({
8
8
  modalContent: {
9
9
  paddingHorizontal: space6,
10
10
  },
11
11
  optionText: {
12
+ color: colorTextMedium,
12
13
  marginBottom: space6,
13
14
  },
14
15
  wrapper: {
@@ -1,6 +1,6 @@
1
1
  import React, { FC, useMemo } from "react";
2
2
  import { View } from "react-native";
3
- import { COLOR, Text } from "@lookiero/aurora";
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 { ReturnQuestionProjection } from "../../../../../../../projection/returnQuestion/returnQuestion";
@@ -31,7 +31,7 @@ const ModalOptionReturnQuestionItems: FC<ModalOptionReturnQuestionItemsProps> =
31
31
  return (
32
32
  <Modal portalHostName={portalHostName} visible={visible} scroll showCloseButton onClose={onClose}>
33
33
  <View style={style.modalContent}>
34
- <Text color={COLOR.TEXT_MEDIUM} level={2} style={style.optionText}>
34
+ <Text level={2} style={style.optionText}>
35
35
  {title}
36
36
  </Text>
37
37
  <>
@@ -2,11 +2,19 @@ import { StyleSheet } from "react-native";
2
2
  import { theme } from "@lookiero/sty-psp-ui";
3
3
 
4
4
  const style = () => {
5
- const { space2 } = theme();
5
+ const { colorText, space3, space4 } = theme();
6
6
 
7
7
  return StyleSheet.create({
8
+ text: {
9
+ color: colorText,
10
+ flex: 1,
11
+ marginLeft: space4,
12
+ },
8
13
  wrapper: {
9
- marginBottom: space2,
14
+ alignItems: "center",
15
+ flex: 1,
16
+ flexDirection: "row",
17
+ marginVertical: space3,
10
18
  },
11
19
  });
12
20
  };