@lookiero/checkout 0.2.20 → 0.2.22

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 (85) hide show
  1. package/dist/infrastructure/projection/returnQuestion/returnQuestions.mock.js +1 -1
  2. package/dist/infrastructure/ui/components/layouts/body/Body.js +4 -7
  3. package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +2 -2
  4. package/dist/infrastructure/ui/components/layouts/body/Body.style.js +2 -2
  5. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +1 -0
  6. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
  7. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +1 -0
  8. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  9. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +3 -2
  10. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +10 -9
  11. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -10
  12. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -10
  13. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +4 -4
  14. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +1 -0
  15. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +7 -3
  16. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
  17. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +3 -0
  18. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +3 -0
  19. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +3 -2
  20. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +2 -2
  21. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +2 -1
  22. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +1 -1
  23. package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +1 -1
  24. package/dist/infrastructure/ui/routing/Routing.js +21 -14
  25. package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.style.js +1 -1
  26. package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.js +1 -1
  27. package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.style.js +1 -1
  28. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
  29. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
  30. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
  31. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
  32. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.d.ts +1 -1
  33. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.js +1 -1
  34. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.style.d.ts +4 -1
  35. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.style.js +10 -3
  36. package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.js +1 -1
  37. package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
  38. package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
  39. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
  40. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
  41. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +17 -0
  42. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +60 -0
  43. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +49 -0
  44. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +62 -0
  45. package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
  46. package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
  47. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
  48. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
  49. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.d.ts +2 -2
  50. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.style.js +1 -1
  51. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.d.ts +1 -1
  52. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +14 -0
  53. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
  54. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
  55. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
  56. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.d.ts +8 -6
  57. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.js +8 -5
  58. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.style.d.ts +6 -0
  59. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.style.js +8 -2
  60. package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
  61. package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
  62. package/dist/infrastructure/ui/views/App.d.ts +3 -0
  63. package/dist/infrastructure/ui/views/App.js +8 -0
  64. package/dist/infrastructure/ui/views/intro/Intro.js +1 -1
  65. package/dist/infrastructure/ui/views/item/Item.js +5 -5
  66. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +1 -1
  67. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +17 -9
  68. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -13
  69. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -14
  70. package/dist/projection/returnQuestion/returnQuestion.d.ts +1 -0
  71. package/dist/projection/returnQuestion/returnQuestion.js +1 -0
  72. package/package.json +5 -2
  73. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.d.ts +0 -0
  74. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.js +0 -0
  75. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.style.d.ts +0 -0
  76. /package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.d.ts +0 -0
  77. /package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.style.d.ts +0 -0
  78. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.d.ts +0 -0
  79. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.style.d.ts +0 -0
  80. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.style.js +0 -0
  81. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.js +0 -0
  82. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.style.d.ts +0 -0
  83. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.js +0 -0
  84. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.style.d.ts +0 -0
  85. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.style.js +0 -0
@@ -334,7 +334,7 @@ const returnQuestions = [
334
334
  {
335
335
  id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
336
336
  name: "comment_title",
337
- type: ReturnQuestionType.HOST_DEFAULT,
337
+ type: ReturnQuestionType.HOST_TEXTAREA,
338
338
  children: [
339
339
  {
340
340
  id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
@@ -1,10 +1,7 @@
1
- import { Box } from "@lookiero/aurora-next/build/components/atoms/Box/Box";
2
- import { Layout } from "@lookiero/aurora-next/build/components/atoms/Layout/Layout";
3
1
  import React from "react";
2
+ import { Column } from "../../../shared/components/layouts/column/Column";
3
+ import { Row } from "../../../shared/components/layouts/row/Row";
4
4
  import { style } from "./Body.style";
5
- const Body = ({ children }) => (
6
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
- // @ts-ignore
8
- React.createElement(Layout, { style: style.layout },
9
- React.createElement(Box, { size: { M: "2/3", L: "1/3" }, style: style.box }, children)));
5
+ const Body = ({ children }) => (React.createElement(Row, { style: style.row },
6
+ React.createElement(Column, { style: style.column }, children)));
10
7
  export { Body };
@@ -2,12 +2,12 @@ declare const style: {
2
2
  container: {
3
3
  flex: number;
4
4
  };
5
- layout: {
5
+ row: {
6
6
  flex: number;
7
7
  justifyContent: "center";
8
8
  paddingVertical: number;
9
9
  };
10
- box: {
10
+ column: {
11
11
  height: string;
12
12
  };
13
13
  };
@@ -5,12 +5,12 @@ const style = StyleSheet.create({
5
5
  container: {
6
6
  flex: 1,
7
7
  },
8
- layout: {
8
+ row: {
9
9
  flex: 1,
10
10
  justifyContent: "center",
11
11
  paddingVertical: Platform.OS === "web" ? spaceXL : 0,
12
12
  },
13
- box: {
13
+ column: {
14
14
  height: "100%",
15
15
  },
16
16
  });
@@ -3,6 +3,7 @@ import { ReturnQuestionProjection } from "../../../../../projection/returnQuesti
3
3
  interface ReturnQuestionProps {
4
4
  readonly returnQuestionParentId: string;
5
5
  readonly returnQuestion: ReturnQuestionProjection;
6
+ readonly portalHostName?: string;
6
7
  }
7
8
  declare const _default: React.NamedExoticComponent<ReturnQuestionProps>;
8
9
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import React, { memo } from "react";
2
2
  import { useReturnQuestionItem } from "./behaviors/useReturnQuestionItem";
3
- const ReturnQuestion = ({ returnQuestion, returnQuestionParentId }) => {
3
+ const ReturnQuestion = ({ returnQuestion, returnQuestionParentId, portalHostName, }) => {
4
4
  const Item = useReturnQuestionItem({ type: returnQuestion.type });
5
- return (React.createElement(Item, { returnQuestion: returnQuestion, returnQuestionParentId: returnQuestionParentId },
6
- React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, returnQuestion: childReturnQuestion, returnQuestionParentId: returnQuestion.id }))))));
5
+ return (React.createElement(Item, { returnQuestion: returnQuestion, returnQuestionParentId: returnQuestionParentId, portalHostName: portalHostName },
6
+ React.createElement(React.Fragment, null, returnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, returnQuestion: childReturnQuestion, returnQuestionParentId: returnQuestion.id, portalHostName: portalHostName }))))));
7
7
  };
8
8
  export default memo(ReturnQuestion);
@@ -2,6 +2,7 @@ import { FC } from "react";
2
2
  import { ReturnQuestionProjection } from "../../../../../projection/returnQuestion/returnQuestion";
3
3
  interface ReturnQuestionsProps {
4
4
  readonly returnQuestions: ReturnQuestionProjection[];
5
+ readonly portalHostName?: string;
5
6
  }
6
7
  declare const ReturnQuestions: FC<ReturnQuestionsProps>;
7
8
  export { ReturnQuestions };
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import ReturnQuestion from "./ReturnQuestion";
3
- const ReturnQuestions = ({ returnQuestions }) => (React.createElement(React.Fragment, null, returnQuestions.map((returnQuestion) => (React.createElement(ReturnQuestion, { key: returnQuestion.id, returnQuestion: returnQuestion, returnQuestionParentId: "" })))));
3
+ const ReturnQuestions = ({ returnQuestions, portalHostName }) => (React.createElement(React.Fragment, null, returnQuestions.map((returnQuestion) => (React.createElement(ReturnQuestion, { key: returnQuestion.id, returnQuestion: returnQuestion, returnQuestionParentId: "", portalHostName: portalHostName })))));
4
4
  export { ReturnQuestions };
@@ -1,9 +1,10 @@
1
- import { FC } from "react";
1
+ import { FC, ReactNode } from "react";
2
2
  import { ReturnQuestionProjection } from "../../../../../../projection/returnQuestion/returnQuestion";
3
3
  interface ReturnQuestionItemProps {
4
4
  readonly returnQuestion: ReturnQuestionProjection;
5
5
  readonly returnQuestionParentId: string;
6
- readonly children?: JSX.Element;
6
+ readonly children?: ReactNode;
7
+ readonly portalHostName?: string;
7
8
  }
8
9
  declare type ReturnQuestionItem = FC<ReturnQuestionItemProps>;
9
10
  export type { ReturnQuestionItem, ReturnQuestionItemProps };
@@ -1,15 +1,18 @@
1
- import { ButtonIcon } from "@lookiero/aurora-next/build/components/atoms/ButtonIcon/ButtonIcon";
2
- import { InputField } from "@lookiero/aurora-next/build/components/atoms/InputField/InputField";
3
- import { Modal } from "@lookiero/aurora-next/build/components/molecules/Modal/Modal";
4
1
  import { useI18nMessage } from "@lookiero/i18n-react";
5
2
  import React, { useCallback, useState } from "react";
6
3
  import { useIntl } from "react-intl";
7
4
  import { TouchableHighlight, View } from "react-native";
5
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
8
6
  import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
7
+ import { Modal } from "../../../../../shared/components/layouts/modal/Modal";
8
+ import { InputField } from "../../../../../shared/components/molecules/inputField/InputField";
9
+ import { theme } from "../../../../../theme/theme";
9
10
  import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
10
11
  import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
11
12
  import { style, containerUnderlayColor } from "./HostSelectReturnQuestionItem.style";
12
- const HostSelectReturnQuestionItem = ({ returnQuestion, children }) => {
13
+ const { spaceXL } = theme();
14
+ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
15
+ const { bottom: safeAreaInsetBottom } = useSafeAreaInsets();
13
16
  const placeholderText = useI18nMessage({ id: returnQuestion.placeholder, prefix: RETURN_QUESTIONS_PREFIX });
14
17
  const [modalVisible, setModalVisible] = useState(false);
15
18
  const handleOnPress = useCallback(() => setModalVisible(true), []);
@@ -21,10 +24,8 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children }) => {
21
24
  return (React.createElement(React.Fragment, null,
22
25
  React.createElement(TouchableHighlight, { style: style.container, onPress: handleOnPress, underlayColor: containerUnderlayColor },
23
26
  React.createElement(View, { pointerEvents: "none" },
24
- React.createElement(InputField, { label: placeholderText, value: inputValue, name: returnQuestion.name, icon: "arrow-down", type: "text", testID: returnQuestion.name }))),
25
- React.createElement(Modal, { style: style.modal, size: "1/2", isVisible: modalVisible },
26
- React.createElement(View, { style: style.modalContent },
27
- React.createElement(ButtonIcon, { name: "close", style: style.backButton, onPress: handleOnModalClose }),
28
- children))));
27
+ React.createElement(InputField, { label: placeholderText || "", value: inputValue, icon: "arrow-down", editable: false }))),
28
+ React.createElement(Modal, { visible: modalVisible, onClose: handleOnModalClose, portalHostName: portalHostName },
29
+ React.createElement(View, { style: [style.modalContent, { paddingBottom: spaceXL + safeAreaInsetBottom }] }, children))));
29
30
  };
30
31
  export { HostSelectReturnQuestionItem };
@@ -3,18 +3,9 @@ declare const style: {
3
3
  container: {
4
4
  marginVertical: number;
5
5
  };
6
- modal: {
7
- zIndex: number;
8
- };
9
6
  modalContent: {
10
- marginTop: number;
11
7
  paddingBottom: number;
12
- };
13
- backButton: {
14
- top: number;
15
- right: number;
16
- alignSelf: "flex-end";
17
- zIndex: number;
8
+ paddingHorizontal: number;
18
9
  };
19
10
  };
20
11
  export { style, containerUnderlayColor };
@@ -6,18 +6,9 @@ const style = StyleSheet.create({
6
6
  container: {
7
7
  marginVertical: spaceM,
8
8
  },
9
- modal: {
10
- zIndex: 10,
11
- },
12
9
  modalContent: {
13
- marginTop: -spaceXL,
14
10
  paddingBottom: spaceXL,
15
- },
16
- backButton: {
17
- top: 0,
18
- right: -spaceM,
19
- alignSelf: "flex-end",
20
- zIndex: 20,
11
+ paddingHorizontal: spaceXL,
21
12
  },
22
13
  });
23
14
  export { style, containerUnderlayColor };
@@ -1,12 +1,12 @@
1
- import { ButtonIcon } from "@lookiero/aurora-next/build/components/atoms/ButtonIcon/ButtonIcon";
2
1
  import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
3
2
  import { useI18nMessage } from "@lookiero/i18n-react";
4
3
  import React, { useCallback } from "react";
5
4
  import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
5
+ import { ButtonIcon } from "../../../../../shared/components/molecules/buttonIcon/ButtonIcon";
6
6
  import ReturnQuestion from "../../ReturnQuestion";
7
7
  import { useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
8
8
  import { style } from "./HostStackReturnQuestionItem.style";
9
- const HostStackReturnQuestionItem = ({ returnQuestion, children }) => {
9
+ const HostStackReturnQuestionItem = ({ returnQuestion, children, portalHostName, }) => {
10
10
  const titleText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_PREFIX });
11
11
  const { feedback, onChange } = useReturnQuestionFeedbackForId({ id: returnQuestion.id });
12
12
  const feedbackReturnQuestion = feedback
@@ -19,10 +19,10 @@ const HostStackReturnQuestionItem = ({ returnQuestion, children }) => {
19
19
  const questionTitle = titleText && (React.createElement(Text, { level: 2, style: style.title }, titleText));
20
20
  if (feedbackReturnQuestion) {
21
21
  return (React.createElement(React.Fragment, null,
22
- React.createElement(ButtonIcon, { name: "arrow-left", style: style.backButton, onPress: handleOnBackButtonPress }),
22
+ React.createElement(ButtonIcon, { name: "arrow-left", style: { icon: style.backButton }, onPress: handleOnBackButtonPress }),
23
23
  questionTitle,
24
24
  React.createElement(Text, { level: 3, style: style.feedback }, feedbackText),
25
- feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, returnQuestion: childReturnQuestion, returnQuestionParentId: feedbackReturnQuestion.id })))));
25
+ feedbackReturnQuestion.children?.map((childReturnQuestion) => (React.createElement(ReturnQuestion, { key: childReturnQuestion.id, returnQuestion: childReturnQuestion, returnQuestionParentId: feedbackReturnQuestion.id, portalHostName: portalHostName })))));
26
26
  }
27
27
  else {
28
28
  return (React.createElement(React.Fragment, null,
@@ -12,6 +12,7 @@ declare const style: {
12
12
  feedback: {
13
13
  color: string;
14
14
  marginVertical: number;
15
+ lineHeight: number;
15
16
  };
16
17
  };
17
18
  export { style };
@@ -1,11 +1,14 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { theme } from "../../../../../theme/theme";
3
- const { colorGrayscaleL, spaceM, spaceL } = theme();
3
+ const { colorGrayscaleL, spaceS, spaceM, spaceL, iconSize } = theme();
4
+ const headerPadding = spaceM;
5
+ const buttonIconPadding = spaceS;
6
+ const backButtonTop = (iconSize + headerPadding + buttonIconPadding * 2) * -1;
4
7
  const style = StyleSheet.create({
5
8
  backButton: {
6
9
  position: "absolute",
7
- top: 0,
8
- left: -spaceM,
10
+ top: backButtonTop,
11
+ left: spaceM,
9
12
  zIndex: 20,
10
13
  },
11
14
  title: {
@@ -15,6 +18,7 @@ const style = StyleSheet.create({
15
18
  feedback: {
16
19
  color: colorGrayscaleL,
17
20
  marginVertical: spaceM,
21
+ lineHeight: 24,
18
22
  },
19
23
  });
20
24
  export { style };
@@ -10,6 +10,6 @@ const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) =
10
10
  const optionText = useI18nMessage({ id: returnQuestion.name, prefix: RETURN_QUESTIONS_PREFIX });
11
11
  const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParentId]);
12
12
  return (React.createElement(TouchableHighlight, { style: style.container, onPress: handleOnPress, underlayColor: containerUnderlayColor },
13
- React.createElement(Text, { level: 3 }, optionText)));
13
+ React.createElement(Text, { level: 3, style: style.text }, optionText)));
14
14
  };
15
15
  export { OptionReturnQuestionItem };
@@ -5,5 +5,8 @@ declare const style: {
5
5
  borderBottomWidth: number;
6
6
  borderBottomColor: string;
7
7
  };
8
+ text: {
9
+ lineHeight: number;
10
+ };
8
11
  };
9
12
  export { style, containerUnderlayColor };
@@ -8,5 +8,8 @@ const style = StyleSheet.create({
8
8
  borderBottomWidth: 1,
9
9
  borderBottomColor: colorGrayscaleS,
10
10
  },
11
+ text: {
12
+ lineHeight: 24,
13
+ },
11
14
  });
12
15
  export { style, containerUnderlayColor };
@@ -1,12 +1,13 @@
1
1
  import { useI18nMessage } from "@lookiero/i18n-react";
2
2
  import React, { useCallback } from "react";
3
3
  import { RETURN_QUESTIONS_PREFIX } from "../../../../../i18n/i18n";
4
- import { InputField } from "../../../../molecules/inputField/InputField";
4
+ import { InputField } from "../../../../../shared/components/molecules/inputField/InputField";
5
5
  import { useReturnQuestionFeedbackForId } from "../../behaviors/useReturnQuestionFeedback";
6
+ const TEXTAREA_MIN_HEIGHT = 96;
6
7
  const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) => {
7
8
  const placeholderText = useI18nMessage({ id: returnQuestion.placeholder, prefix: RETURN_QUESTIONS_PREFIX });
8
9
  const { feedback, onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
9
10
  const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: value }), [onChange, returnQuestionParentId]);
10
- return (React.createElement(InputField, { multiline: true, label: placeholderText, placeholder: placeholderText, minHeight: 96, value: feedback, onChange: handleOnChange }));
11
+ return (React.createElement(InputField, { multiline: true, label: placeholderText, placeholder: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, value: feedback, onChange: handleOnChange }));
11
12
  };
12
13
  export { TextareaReturnQuestionItem };
@@ -1,6 +1,6 @@
1
- import { FC } from "react";
1
+ import { FC, ReactNode } from "react";
2
2
  interface SafeAreaScrollViewProps {
3
- readonly children: JSX.Element;
3
+ readonly children: ReactNode;
4
4
  }
5
5
  declare const SafeAreaScrollView: FC<SafeAreaScrollViewProps>;
6
6
  export { SafeAreaScrollView };
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
- import { SafeAreaView, ScrollView } from "react-native";
2
+ import { ScrollView } from "react-native";
3
+ import { SafeAreaView } from "react-native-safe-area-context";
3
4
  import { style } from "./SafeAreaScrollView.style";
4
5
  const SafeAreaScrollView = ({ children }) => (React.createElement(SafeAreaView, { style: style.container },
5
6
  React.createElement(ScrollView, { contentContainerStyle: style.scrollContainer, showsVerticalScrollIndicator: false }, children)));
@@ -2,7 +2,7 @@ import { QueryStatus } from "@lookiero/messaging-react";
2
2
  import React, { useEffect, useRef } from "react";
3
3
  import { Outlet } from "react-router-native";
4
4
  import { useViewIsCheckoutAccessibleByCustomerId } from "../../projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId";
5
- import { Spinner } from "../components/atoms/spinner/Spinner";
5
+ import { Spinner } from "../shared/components/atoms/spinner/Spinner";
6
6
  const CheckoutAccessibilityMiddleware = ({ customerId, onNotAccessible, loader = React.createElement(Spinner, null), }) => {
7
7
  const [accessible, status] = useViewIsCheckoutAccessibleByCustomerId({ customerId });
8
8
  const onNotAccessibleRef = useRef(onNotAccessible);
@@ -4,7 +4,7 @@ import { generatePath, Navigate, Outlet, useMatch } from "react-router";
4
4
  import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
5
5
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
6
6
  import { useViewCheckoutIntroShown } from "../../projection/uiSetting/react/useViewCheckoutIntroShown";
7
- import { Spinner } from "../components/atoms/spinner/Spinner";
7
+ import { Spinner } from "../shared/components/atoms/spinner/Spinner";
8
8
  import { Routes } from "./routes";
9
9
  const CheckoutMiddleware = ({ customerId, loader = React.createElement(Spinner, null) }) => {
10
10
  const [checkoutIntroShown, checkoutIntroShownStatus] = useViewCheckoutIntroShown();
@@ -1,6 +1,7 @@
1
1
  import React, { lazy, Suspense } from "react";
2
2
  import { Navigate, Outlet, useRoutes } from "react-router-native";
3
- import { Spinner } from "../components/atoms/spinner/Spinner";
3
+ import { Spinner } from "../shared/components/atoms/spinner/Spinner";
4
+ import { App } from "../views/App";
4
5
  import { CheckoutAccessibilityMiddleware } from "./CheckoutAccessibilityMiddleware";
5
6
  import { CheckoutMiddleware } from "./CheckoutMiddleware";
6
7
  import { Routes } from "./routes";
@@ -23,19 +24,25 @@ const Routing = ({ onNotAccessible, customerId, locale, I18n, onI18nError }) =>
23
24
  element: React.createElement(CheckoutMiddleware, { customerId: customerId }),
24
25
  children: [
25
26
  {
26
- path: Routes.INTRO,
27
- element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
28
- React.createElement(Intro, { customerId: customerId }))),
29
- },
30
- {
31
- path: Routes.ITEM,
32
- element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
33
- React.createElement(Item, { customerId: customerId }))),
34
- },
35
- {
36
- path: Routes.SUMMARY,
37
- element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
38
- React.createElement(Summary, null))),
27
+ path: "",
28
+ element: React.createElement(App, null),
29
+ children: [
30
+ {
31
+ path: Routes.INTRO,
32
+ element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
33
+ React.createElement(Intro, { customerId: customerId }))),
34
+ },
35
+ {
36
+ path: Routes.ITEM,
37
+ element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
38
+ React.createElement(Item, { customerId: customerId }))),
39
+ },
40
+ {
41
+ path: Routes.SUMMARY,
42
+ element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
43
+ React.createElement(Summary, null))),
44
+ },
45
+ ],
39
46
  },
40
47
  ],
41
48
  },
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { theme } from "../../../theme/theme";
2
+ import { theme } from "../../../../theme/theme";
3
3
  const { colorPrimary } = theme();
4
4
  const style = StyleSheet.create({
5
5
  error: {
@@ -1,7 +1,7 @@
1
1
  import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
2
2
  import { animated, useSpring } from "@react-spring/native";
3
3
  import React from "react";
4
- import { theme } from "../../../theme/theme";
4
+ import { theme } from "../../../../theme/theme";
5
5
  import { style } from "./Field.style";
6
6
  const { spaceM } = theme();
7
7
  const Field = ({ label, isFocused = false, style: customStyle }) => {
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { theme } from "../../../theme/theme";
2
+ import { theme } from "../../../../theme/theme";
3
3
  const { colorBase, spaceS } = theme();
4
4
  const style = StyleSheet.create({
5
5
  field: {
@@ -0,0 +1,12 @@
1
+ import glyphs from "@lookiero/aurora-iconfont/dist/glyphs.json";
2
+ import { FC } from "react";
3
+ import { StyleProp, TextStyle } from "react-native";
4
+ declare type IconStyle = StyleProp<TextStyle>;
5
+ declare type IconName = keyof typeof glyphs;
6
+ interface IconProps {
7
+ readonly name: IconName;
8
+ readonly style?: IconStyle;
9
+ }
10
+ declare const Icon: FC<IconProps>;
11
+ export type { IconName, IconStyle };
12
+ export { Icon };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { Text } from "react-native";
3
+ import { theme } from "../../../../theme/theme";
4
+ import { style } from "./Icon.style";
5
+ const { iconGlyphs } = theme();
6
+ const Icon = ({ name, style: customStyle }) => (React.createElement(Text, { accessibilityElementsHidden: true, allowFontScaling: false, importantForAccessibility: "no", selectable: false, style: [style.icon, customStyle], testID: "icon" }, String.fromCharCode(iconGlyphs[name])));
7
+ export { Icon };
@@ -0,0 +1,13 @@
1
+ declare const style: {
2
+ icon: {
3
+ fontFamily: string;
4
+ fontStyle: "normal";
5
+ fontWeight: "normal";
6
+ minWidth: number;
7
+ width: number;
8
+ minHeight: number;
9
+ height: number;
10
+ fontSize: number;
11
+ };
12
+ };
13
+ export { style };
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { iconFamily, iconSize } = theme();
4
+ const style = StyleSheet.create({
5
+ icon: {
6
+ fontFamily: iconFamily,
7
+ fontStyle: "normal",
8
+ fontWeight: "normal",
9
+ minWidth: iconSize,
10
+ width: iconSize,
11
+ minHeight: iconSize,
12
+ height: iconSize,
13
+ fontSize: iconSize,
14
+ },
15
+ });
16
+ export { style };
@@ -6,5 +6,5 @@ interface InputProps extends TextInputProps {
6
6
  readonly style?: InputStyle;
7
7
  }
8
8
  declare const Input: FC<InputProps>;
9
- export type { InputStyle };
9
+ export type { InputProps, InputStyle };
10
10
  export { Input };
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useState } from "react";
2
2
  import { Platform, TextInput, } from "react-native";
3
- import { theme } from "../../../theme/theme";
3
+ import { theme } from "../../../../theme/theme";
4
4
  import { style } from "./Input.style";
5
5
  const DEFAULT_HEIGHT = 56;
6
6
  const { colorGrayscaleL } = theme();
@@ -1,5 +1,6 @@
1
1
  declare const style: {
2
2
  input: {
3
+ lineHeight?: number | undefined;
3
4
  paddingHorizontal: number;
4
5
  paddingTop: number;
5
6
  paddingBottom: number;
@@ -7,9 +8,11 @@ declare const style: {
7
8
  color: string;
8
9
  fontFamily: string;
9
10
  fontSize: number;
10
- lineHeight: number;
11
11
  letterSpacing: number;
12
12
  outlineStyle: string;
13
+ whiteSpace: string;
14
+ overflow: "hidden";
15
+ textOverflow: string;
13
16
  };
14
17
  };
15
18
  export { style };
@@ -1,5 +1,5 @@
1
- import { StyleSheet } from "react-native";
2
- import { theme } from "../../../theme/theme";
1
+ import { Platform, StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
3
  const { borderSize, colorContent, fontBodySize3, fontBodyHeight3, fontBodyLetterSpacing3, fontMap, spaceM } = theme();
4
4
  const style = StyleSheet.create({
5
5
  input: {
@@ -11,9 +11,16 @@ const style = StyleSheet.create({
11
11
  color: colorContent,
12
12
  fontFamily: fontMap.Body,
13
13
  fontSize: fontBodySize3,
14
- lineHeight: fontBodyHeight3,
15
14
  letterSpacing: fontBodyLetterSpacing3,
16
15
  outlineStyle: "none",
16
+ whiteSpace: "nowrap",
17
+ overflow: "hidden",
18
+ textOverflow: "ellipsis",
19
+ ...Platform.select({
20
+ web: {
21
+ lineHeight: fontBodyHeight3,
22
+ },
23
+ }),
17
24
  },
18
25
  });
19
26
  export { style };
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ActivityIndicator, View } from "react-native";
3
- import { theme } from "../../../theme/theme";
3
+ import { theme } from "../../../../theme/theme";
4
4
  import { style } from "./Spinner.style";
5
5
  const { colorPrimary } = theme();
6
6
  const Spinner = () => (React.createElement(View, { style: style.container },
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ import { ViewProps } from "react-native";
3
+ import { ScreenSize } from "../../../hooks/useScreenSize";
4
+ declare type ColumnSize = "1/4" | "1/3" | "1/2" | "2/3";
5
+ interface ColumnProps extends ViewProps {
6
+ readonly size?: Partial<Record<ScreenSize, ColumnSize>>;
7
+ }
8
+ declare const Column: FC<ColumnProps>;
9
+ export type { ColumnSize };
10
+ export { Column };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { useScreenSize } from "../../../hooks/useScreenSize";
4
+ import { style } from "./Column.style";
5
+ const Column = ({ children, style: customStyle, size = { M: "2/3", L: "1/3" } }) => {
6
+ const screenSize = useScreenSize();
7
+ const columnSizeForScreenSize = size[screenSize];
8
+ return (React.createElement(View, { style: [style.column, columnSizeForScreenSize && style.column[columnSizeForScreenSize], customStyle] }, children));
9
+ };
10
+ export { Column };
@@ -0,0 +1,12 @@
1
+ import { ViewStyle } from "react-native";
2
+ declare const style: {
3
+ column: {
4
+ "1/4": ViewStyle;
5
+ "1/3": ViewStyle;
6
+ "1/2": ViewStyle;
7
+ "2/3": ViewStyle;
8
+ flex: number;
9
+ width: string;
10
+ };
11
+ };
12
+ export { style };
@@ -0,0 +1,23 @@
1
+ import { StyleSheet } from "react-native";
2
+ const stylesForColumSize = {
3
+ ["1/4"]: {
4
+ maxWidth: `${100 * (1 / 4)}%`,
5
+ },
6
+ ["1/3"]: {
7
+ maxWidth: `${100 * (1 / 3)}%`,
8
+ },
9
+ ["1/2"]: {
10
+ maxWidth: `${100 * (1 / 2)}%`,
11
+ },
12
+ ["2/3"]: {
13
+ maxWidth: `${100 * (2 / 3)}%`,
14
+ },
15
+ };
16
+ const style = StyleSheet.create({
17
+ column: {
18
+ flex: 1,
19
+ width: "100%",
20
+ ...stylesForColumSize,
21
+ },
22
+ });
23
+ export { style };