@lookiero/checkout 0.2.21 → 0.2.23

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 (103) hide show
  1. package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
  2. package/dist/infrastructure/projection/feedback/feedback.mock.js +6 -0
  3. package/dist/infrastructure/projection/returnQuestion/returnQuestions.mock.js +1 -1
  4. package/dist/infrastructure/ui/components/layouts/body/Body.js +4 -7
  5. package/dist/infrastructure/ui/components/layouts/body/Body.style.d.ts +3 -7
  6. package/dist/infrastructure/ui/components/layouts/body/Body.style.js +4 -8
  7. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +1 -0
  8. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
  9. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +1 -0
  10. package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
  11. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +3 -2
  12. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.d.ts +3 -0
  13. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem.js +3 -0
  14. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +10 -9
  15. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -10
  16. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -10
  17. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.js +4 -4
  18. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.d.ts +1 -0
  19. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/HostStackReturnQuestionItem.style.js +7 -3
  20. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
  21. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.d.ts +3 -0
  22. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.style.js +3 -0
  23. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.d.ts +3 -0
  24. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +27 -0
  25. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.d.ts +10 -0
  26. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.style.js +13 -0
  27. package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +3 -2
  28. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +4 -2
  29. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +13 -4
  30. package/dist/infrastructure/ui/i18n/i18n.d.ts +5 -2
  31. package/dist/infrastructure/ui/i18n/i18n.js +4 -1
  32. package/dist/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +1 -1
  33. package/dist/infrastructure/ui/routing/CheckoutMiddleware.js +1 -1
  34. package/dist/infrastructure/ui/routing/Routing.js +21 -14
  35. package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.style.js +1 -1
  36. package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.js +1 -1
  37. package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.style.js +1 -1
  38. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.d.ts +12 -0
  39. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.js +7 -0
  40. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.d.ts +13 -0
  41. package/dist/infrastructure/ui/shared/components/atoms/icon/Icon.style.js +16 -0
  42. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.d.ts +1 -1
  43. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.js +1 -1
  44. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.style.d.ts +4 -1
  45. package/dist/infrastructure/ui/{components → shared/components}/atoms/input/Input.style.js +10 -3
  46. package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.js +1 -1
  47. package/dist/infrastructure/ui/shared/components/layouts/column/Column.d.ts +10 -0
  48. package/dist/infrastructure/ui/shared/components/layouts/column/Column.js +10 -0
  49. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.d.ts +12 -0
  50. package/dist/infrastructure/ui/shared/components/layouts/column/Column.style.js +23 -0
  51. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.d.ts +17 -0
  52. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.js +60 -0
  53. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.d.ts +49 -0
  54. package/dist/infrastructure/ui/shared/components/layouts/modal/Modal.style.js +62 -0
  55. package/dist/infrastructure/ui/shared/components/layouts/row/Row.d.ts +6 -0
  56. package/dist/infrastructure/ui/shared/components/layouts/row/Row.js +10 -0
  57. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.d.ts +13 -0
  58. package/dist/infrastructure/ui/shared/components/layouts/row/Row.style.js +17 -0
  59. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.d.ts +2 -2
  60. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.style.js +1 -1
  61. package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.d.ts +1 -1
  62. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.d.ts +14 -0
  63. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.js +7 -0
  64. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.d.ts +7 -0
  65. package/dist/infrastructure/ui/shared/components/molecules/buttonIcon/ButtonIcon.style.js +10 -0
  66. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.d.ts +8 -6
  67. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.js +8 -5
  68. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.style.d.ts +6 -0
  69. package/dist/infrastructure/ui/{components → shared/components}/molecules/inputField/InputField.style.js +8 -2
  70. package/dist/infrastructure/ui/shared/hooks/useScreenSize.d.ts +4 -0
  71. package/dist/infrastructure/ui/shared/hooks/useScreenSize.js +9 -0
  72. package/dist/infrastructure/ui/views/App.d.ts +3 -0
  73. package/dist/infrastructure/ui/views/App.js +8 -0
  74. package/dist/infrastructure/ui/views/intro/Intro.js +1 -1
  75. package/dist/infrastructure/ui/views/item/Item.js +12 -9
  76. package/dist/infrastructure/ui/views/item/Item.style.d.ts +6 -1
  77. package/dist/infrastructure/ui/views/item/Item.style.js +7 -2
  78. package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +1 -1
  79. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +10 -0
  80. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +32 -0
  81. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +12 -0
  82. package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +15 -0
  83. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +17 -9
  84. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -13
  85. package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -14
  86. package/dist/projection/returnQuestion/returnQuestion.d.ts +1 -0
  87. package/dist/projection/returnQuestion/returnQuestion.js +1 -0
  88. package/package.json +5 -2
  89. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.d.ts +0 -10
  90. package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.js +0 -11
  91. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.d.ts +0 -0
  92. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.js +0 -0
  93. /package/dist/infrastructure/ui/{components → shared/components}/atoms/error/Error.style.d.ts +0 -0
  94. /package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.d.ts +0 -0
  95. /package/dist/infrastructure/ui/{components → shared/components}/atoms/field/Field.style.d.ts +0 -0
  96. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.d.ts +0 -0
  97. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.style.d.ts +0 -0
  98. /package/dist/infrastructure/ui/{components → shared/components}/atoms/spinner/Spinner.style.js +0 -0
  99. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.js +0 -0
  100. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Pagination.style.d.ts +0 -0
  101. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.js +0 -0
  102. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.style.d.ts +0 -0
  103. /package/dist/infrastructure/ui/{components → shared/components}/layouts/slider/Slider.style.js +0 -0
@@ -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 };
@@ -0,0 +1,17 @@
1
+ import { FC, ReactNode } 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
+ declare type ModalStyle = "overlay" | "row" | "modal" | "header" | "closeButton";
6
+ interface ModalProps {
7
+ readonly children: ReactNode;
8
+ readonly visible: boolean;
9
+ readonly onClose?: () => void;
10
+ readonly header?: ReactNode;
11
+ readonly portalHostName?: string;
12
+ readonly size?: Partial<Record<ScreenSize, ColumnSize>>;
13
+ readonly style?: Partial<Record<ModalStyle, ViewProps>>;
14
+ }
15
+ declare const Modal: FC<ModalProps>;
16
+ export type { ColumnSize };
17
+ export { Modal };
@@ -0,0 +1,60 @@
1
+ import { Portal } from "@gorhom/portal";
2
+ import { animated, useTransition } from "@react-spring/native";
3
+ import React, { useCallback, useState } from "react";
4
+ import { Dimensions, Platform, TouchableWithoutFeedback, View } from "react-native";
5
+ import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
6
+ import { useScreenSize } from "../../../hooks/useScreenSize";
7
+ import { ButtonIcon } from "../../molecules/buttonIcon/ButtonIcon";
8
+ import { Row } from "../row/Row";
9
+ import { style } from "./Modal.style";
10
+ const TRANSITION_MODAL_SCALE = 0.9;
11
+ const Modal = ({ children, visible, header, portalHostName, onClose, size = { M: "2/3", L: "1/3" }, style: customStyle, }) => {
12
+ const { height: screenHeight } = Dimensions.get("screen");
13
+ const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
14
+ const screenSizeWithoutInsets = screenHeight - safeAreaInsetTop;
15
+ const screenSize = useScreenSize();
16
+ const isSmallDevice = screenSize === "S" || Platform.OS !== "web";
17
+ const columnSizeForScreenSize = size[screenSize];
18
+ const [modalHeight, setModalHeight] = useState();
19
+ const handleOnModalLayout = useCallback(({ nativeEvent: { layout: { height }, }, }) => setModalHeight(height), []);
20
+ const transitions = useTransition(visible, {
21
+ from: isSmallDevice
22
+ ? {
23
+ modalOpacity: 1,
24
+ overlayOpacity: 0,
25
+ modalTranslateY: (modalHeight || screenHeight) + safeAreaInsetBottom,
26
+ modalScale: 1,
27
+ }
28
+ : { modalOpacity: 0, overlayOpacity: 0, modalTranslateY: 0, modalScale: TRANSITION_MODAL_SCALE },
29
+ enter: { modalOpacity: 1, overlayOpacity: 1, modalTranslateY: 0, modalScale: 1 },
30
+ leave: isSmallDevice
31
+ ? {
32
+ modalOpacity: 1,
33
+ overlayOpacity: 0,
34
+ modalTranslateY: (modalHeight || screenHeight) + safeAreaInsetBottom,
35
+ modalScale: 1,
36
+ }
37
+ : { modalOpacity: 0, overlayOpacity: 0, modalTranslateY: 0, modalScale: TRANSITION_MODAL_SCALE },
38
+ unique: true,
39
+ });
40
+ return (React.createElement(Portal, { hostName: portalHostName }, transitions(({ modalOpacity, overlayOpacity, modalTranslateY, modalScale }, item) => item && (React.createElement(View, { style: style.container, pointerEvents: visible ? "auto" : "none", testID: "modal" },
41
+ React.createElement(TouchableWithoutFeedback, { onPress: visible ? onClose : undefined },
42
+ React.createElement(animated.View, { style: [style.overlay, { opacity: overlayOpacity }, customStyle?.overlay] })),
43
+ React.createElement(SafeAreaView, { edges: ["right", "top", "left"], style: style.safeArea, pointerEvents: "box-none" },
44
+ React.createElement(Row, { style: [style.row, isSmallDevice && style.rowSmall, customStyle?.row], pointerEvents: "box-none" },
45
+ React.createElement(animated.View, { style: [
46
+ style.modal,
47
+ columnSizeForScreenSize && style.modal[columnSizeForScreenSize],
48
+ {
49
+ opacity: modalOpacity,
50
+ transform: [{ translateY: modalTranslateY }, { scale: modalScale }],
51
+ maxHeight: screenSizeWithoutInsets,
52
+ },
53
+ customStyle?.modal,
54
+ ], onLayout: handleOnModalLayout, pointerEvents: visible ? "auto" : "none" },
55
+ (header || onClose) && (React.createElement(View, { style: [style.header, customStyle?.header] },
56
+ React.createElement(View, null, header),
57
+ onClose && (React.createElement(ButtonIcon, { style: { button: [style.closeButton, customStyle?.closeButton] }, name: "close", onPress: onClose })))),
58
+ children))))))));
59
+ };
60
+ export { Modal };
@@ -0,0 +1,49 @@
1
+ import { ViewStyle } from "react-native";
2
+ declare const style: {
3
+ container: {
4
+ position: "absolute";
5
+ width: string;
6
+ height: string;
7
+ overflow: "hidden";
8
+ };
9
+ overlay: {
10
+ zIndex: number;
11
+ backgroundColor: string;
12
+ position: "absolute";
13
+ width: string;
14
+ height: string;
15
+ cursor: string;
16
+ };
17
+ safeArea: {
18
+ flex: number;
19
+ zIndex: number;
20
+ };
21
+ row: {
22
+ flex: number;
23
+ alignContent: "center";
24
+ justifyContent: "center";
25
+ };
26
+ rowSmall: {
27
+ justifyContent: "flex-end";
28
+ };
29
+ modal: {
30
+ "1/4": ViewStyle;
31
+ "1/3": ViewStyle;
32
+ "1/2": ViewStyle;
33
+ "2/3": ViewStyle;
34
+ backgroundColor: string;
35
+ position: "absolute";
36
+ width: string;
37
+ zIndex: number;
38
+ };
39
+ header: {
40
+ alignItems: "center";
41
+ justifyContent: "space-between";
42
+ padding: number;
43
+ flexDirection: "row";
44
+ };
45
+ closeButton: {
46
+ alignSelf: "flex-end";
47
+ };
48
+ };
49
+ export { style };
@@ -0,0 +1,62 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceM, colorBase, colorOverlay } = theme();
4
+ const modalStylesForColumSize = {
5
+ ["1/4"]: {
6
+ maxWidth: `${100 * (1 / 4)}%`,
7
+ },
8
+ ["1/3"]: {
9
+ maxWidth: `${100 * (1 / 3)}%`,
10
+ },
11
+ ["1/2"]: {
12
+ maxWidth: `${100 * (1 / 2)}%`,
13
+ },
14
+ ["2/3"]: {
15
+ maxWidth: `${100 * (2 / 3)}%`,
16
+ },
17
+ };
18
+ const style = StyleSheet.create({
19
+ container: {
20
+ position: "absolute",
21
+ width: "100%",
22
+ height: "100%",
23
+ overflow: "hidden",
24
+ },
25
+ overlay: {
26
+ zIndex: 1,
27
+ backgroundColor: colorOverlay,
28
+ position: "absolute",
29
+ width: "100%",
30
+ height: "100%",
31
+ cursor: "pointer",
32
+ },
33
+ safeArea: {
34
+ flex: 1,
35
+ zIndex: 2,
36
+ },
37
+ row: {
38
+ flex: 1,
39
+ alignContent: "center",
40
+ justifyContent: "center",
41
+ },
42
+ rowSmall: {
43
+ justifyContent: "flex-end",
44
+ },
45
+ modal: {
46
+ backgroundColor: colorBase,
47
+ position: "absolute",
48
+ width: "100%",
49
+ zIndex: 3,
50
+ ...modalStylesForColumSize,
51
+ },
52
+ header: {
53
+ alignItems: "center",
54
+ justifyContent: "space-between",
55
+ padding: spaceM,
56
+ flexDirection: "row",
57
+ },
58
+ closeButton: {
59
+ alignSelf: "flex-end",
60
+ },
61
+ });
62
+ export { style };
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ import { ViewProps } from "react-native";
3
+ interface RowProps extends ViewProps {
4
+ }
5
+ declare const Row: FC<RowProps>;
6
+ export { Row };
@@ -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 "./Row.style";
5
+ const Row = ({ children, style: customStyle, ...restProps }) => {
6
+ const screenSize = useScreenSize();
7
+ const largeStyle = screenSize !== "S" && style.rowLarge;
8
+ return (React.createElement(View, { style: [style.row, largeStyle, customStyle], ...restProps }, children));
9
+ };
10
+ export { Row };
@@ -0,0 +1,13 @@
1
+ declare const style: {
2
+ row: {
3
+ flexWrap: "wrap";
4
+ maxWidth: number;
5
+ width: string;
6
+ alignItems: "center";
7
+ marginHorizontal: string;
8
+ };
9
+ rowLarge: {
10
+ maxWidth: number;
11
+ };
12
+ };
13
+ export { style };
@@ -0,0 +1,17 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceXXL, layoutMaxWidth } = theme();
4
+ const rowLargeMaxWidth = layoutMaxWidth - 2 * spaceXXL;
5
+ const style = StyleSheet.create({
6
+ row: {
7
+ flexWrap: "wrap",
8
+ maxWidth: layoutMaxWidth,
9
+ width: "100%",
10
+ alignItems: "center",
11
+ marginHorizontal: "auto",
12
+ },
13
+ rowLarge: {
14
+ maxWidth: rowLargeMaxWidth,
15
+ },
16
+ });
17
+ export { style };
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
1
+ import { FC, ReactNode } from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
3
  interface PaginationProps {
4
4
  readonly touchable?: boolean;
@@ -8,7 +8,7 @@ interface PaginationProps {
8
8
  readonly count?: number;
9
9
  readonly activeIndex?: number;
10
10
  readonly onChange: (index: number) => void;
11
- readonly renderItem?: (index: number) => JSX.Element;
11
+ readonly renderItem?: (index: number) => ReactNode;
12
12
  }
13
13
  declare const Pagination: FC<PaginationProps>;
14
14
  export { Pagination };
@@ -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 { colorGrayscaleS, colorGrayscaleXL } = theme();
4
4
  const DOT_SIZE = 8;
5
5
  const style = StyleSheet.create({
@@ -14,7 +14,7 @@ interface SliderProps {
14
14
  readonly onSliderStart?: () => void;
15
15
  readonly onSliderEnd?: () => void;
16
16
  readonly onChanged?: (index: number) => void;
17
- readonly paginationRenderItem?: (index: number) => JSX.Element;
17
+ readonly paginationRenderItem?: (index: number) => ReactNode;
18
18
  }
19
19
  declare const Slider: FC<SliderProps>;
20
20
  export { Slider };
@@ -0,0 +1,14 @@
1
+ import { FC } from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { IconName, IconStyle } from "../../atoms/icon/Icon";
4
+ interface ButtonIconStyle {
5
+ readonly button: StyleProp<ViewStyle>;
6
+ readonly icon: IconStyle;
7
+ }
8
+ interface ButtonIconProps {
9
+ readonly name: IconName;
10
+ readonly style?: Partial<ButtonIconStyle>;
11
+ readonly onPress: () => void;
12
+ }
13
+ declare const ButtonIcon: FC<ButtonIconProps>;
14
+ export { ButtonIcon };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { TouchableHighlight } from "react-native";
3
+ import { Icon } from "../../atoms/icon/Icon";
4
+ import { buttonIconUnderlayColor, style } from "./ButtonIcon.style";
5
+ const ButtonIcon = ({ name, style: customStyle, onPress }) => (React.createElement(TouchableHighlight, { style: [style.buttonIcon, customStyle?.button], onPress: onPress, underlayColor: buttonIconUnderlayColor, testID: "button-icon" },
6
+ React.createElement(Icon, { name: name, style: customStyle?.icon })));
7
+ export { ButtonIcon };
@@ -0,0 +1,7 @@
1
+ declare const buttonIconUnderlayColor: string;
2
+ declare const style: {
3
+ buttonIcon: {
4
+ padding: number;
5
+ };
6
+ };
7
+ export { style, buttonIconUnderlayColor };
@@ -0,0 +1,10 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceS, colorGrayscaleS } = theme();
4
+ const buttonIconUnderlayColor = colorGrayscaleS;
5
+ const style = StyleSheet.create({
6
+ buttonIcon: {
7
+ padding: spaceS,
8
+ },
9
+ });
10
+ export { style, buttonIconUnderlayColor };
@@ -2,21 +2,23 @@ import { FC } from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
3
  import { ErrorStyle } from "../../atoms/error/Error";
4
4
  import { FieldStyle } from "../../atoms/field/Field";
5
- import { InputStyle } from "../../atoms/input/Input";
5
+ import { IconName, IconStyle } from "../../atoms/icon/Icon";
6
+ import { InputProps, InputStyle } from "../../atoms/input/Input";
6
7
  declare type InputFieldStyle = FieldStyle & {
7
8
  readonly inputField: StyleProp<ViewStyle>;
8
9
  readonly input: InputStyle;
9
10
  readonly error: ErrorStyle;
11
+ readonly icon: IconStyle;
10
12
  };
11
- interface InputFieldProps {
13
+ interface InputFieldBaseProps {
12
14
  readonly label: string;
13
- readonly placeholder?: string;
14
- readonly value: string | undefined;
15
15
  readonly multiline?: boolean;
16
- readonly minHeight?: number;
17
16
  readonly error?: string | null;
18
17
  readonly style?: Partial<InputFieldStyle>;
19
- readonly onChange: (value: string) => void;
18
+ readonly onChange?: (value: string) => void;
19
+ readonly icon?: IconName;
20
+ }
21
+ interface InputFieldProps extends Omit<InputProps, keyof InputFieldBaseProps>, InputFieldBaseProps {
20
22
  }
21
23
  declare const InputField: FC<InputFieldProps>;
22
24
  export { InputField };
@@ -1,18 +1,20 @@
1
1
  import React, { useCallback, useState } from "react";
2
2
  import { View } from "react-native";
3
- import { theme } from "../../../theme/theme";
3
+ import { theme } from "../../../../theme/theme";
4
4
  import { Error } from "../../atoms/error/Error";
5
5
  import { Field } from "../../atoms/field/Field";
6
+ import { Icon } from "../../atoms/icon/Icon";
6
7
  import { Input } from "../../atoms/input/Input";
7
8
  import { style } from "./InputField.style";
8
- const { colorContent, colorGrayscaleL, colorPrimary } = theme();
9
- const InputField = ({ label, placeholder, value, multiline = false, minHeight, error, style: customStyle, onChange, }) => {
9
+ const { colorContent, colorGrayscaleL, colorPrimary, spaceM, iconSize } = theme();
10
+ const inputPaddingRightWithIcon = iconSize + spaceM * 2;
11
+ const InputField = ({ label, placeholder, value, multiline = false, minHeight, error, style: customStyle, onChange = () => void 0, icon, ...inputRestProps }) => {
10
12
  const [isFocused, setIsFocused] = useState(false);
11
13
  const handleOnChange = useCallback((text) => onChange(text), [onChange]);
12
14
  const handleOnBlur = useCallback(() => setIsFocused(false), []);
13
15
  const handleOnFocus = useCallback(() => setIsFocused(true), []);
14
16
  const color = error ? colorPrimary : isFocused ? colorContent : colorGrayscaleL;
15
- return (React.createElement(View, { style: customStyle?.inputField },
17
+ return (React.createElement(View, { style: customStyle?.inputField, testID: "input-field" },
16
18
  React.createElement(Field, { label: label, isFocused: isFocused || !!value, style: {
17
19
  field: { ...style.field, ...customStyle?.field },
18
20
  fieldText: {
@@ -20,7 +22,8 @@ const InputField = ({ label, placeholder, value, multiline = false, minHeight, e
20
22
  ...customStyle?.fieldText,
21
23
  },
22
24
  } }),
23
- React.createElement(Input, { value: value, placeholder: placeholder, multiline: multiline, minHeight: minHeight, onChangeText: handleOnChange, onBlur: handleOnBlur, onFocus: handleOnFocus, style: [{ borderColor: color }, customStyle?.input] }),
25
+ React.createElement(Input, { value: value, placeholder: placeholder, multiline: multiline, minHeight: minHeight, onChangeText: handleOnChange, onBlur: handleOnBlur, onFocus: handleOnFocus, style: [!!icon ? { paddingRight: inputPaddingRightWithIcon } : {}, { borderColor: color }, customStyle?.input], ...inputRestProps }),
26
+ !!icon && React.createElement(Icon, { name: icon, style: [style.icon, { color }, customStyle?.icon] }),
24
27
  !!error && React.createElement(Error, { error: error, style: [style.error, customStyle?.error] })));
25
28
  };
26
29
  export { InputField };
@@ -7,5 +7,11 @@ declare const style: {
7
7
  marginTop: number;
8
8
  marginLeft: number;
9
9
  };
10
+ icon: {
11
+ position: "absolute";
12
+ right: number;
13
+ top: number;
14
+ zIndex: number;
15
+ };
10
16
  };
11
17
  export { style };
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { theme } from "../../../theme/theme";
3
- const { spaceXS, spaceL } = theme();
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceXS, spaceM, spaceL } = theme();
4
4
  const style = StyleSheet.create({
5
5
  field: {
6
6
  position: "absolute",
@@ -10,5 +10,11 @@ const style = StyleSheet.create({
10
10
  marginTop: spaceXS,
11
11
  marginLeft: spaceL,
12
12
  },
13
+ icon: {
14
+ position: "absolute",
15
+ right: spaceM,
16
+ top: spaceM,
17
+ zIndex: 4,
18
+ },
13
19
  });
14
20
  export { style };
@@ -0,0 +1,4 @@
1
+ declare type ScreenSize = "S" | "M" | "L";
2
+ declare const useScreenSize: () => ScreenSize;
3
+ export type { ScreenSize };
4
+ export { useScreenSize };
@@ -0,0 +1,9 @@
1
+ import { useDevice } from "@lookiero/aurora-next/build/contexts/Device/Device";
2
+ const useScreenSize = () => {
3
+ const { screen } = useDevice();
4
+ const screenSize = Object.entries(screen)
5
+ .filter(([key]) => ["S", "M", "L"].includes(key))
6
+ .find(([, value]) => value);
7
+ return screenSize?.[0];
8
+ };
9
+ export { useScreenSize };
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ declare const App: FC;
3
+ export { App };
@@ -0,0 +1,8 @@
1
+ import { PortalProvider } from "@gorhom/portal";
2
+ import React from "react";
3
+ import { SafeAreaProvider } from "react-native-safe-area-context";
4
+ import { Outlet } from "react-router-native";
5
+ const App = () => (React.createElement(SafeAreaProvider, null,
6
+ React.createElement(PortalProvider, null,
7
+ React.createElement(Outlet, null))));
8
+ export { App };
@@ -7,10 +7,10 @@ import React, { useCallback } from "react";
7
7
  import { View } from "react-native";
8
8
  import { useSetCheckoutIntroShown } from "../../../domain/uiSetting/react/useSetCheckoutIntroShown";
9
9
  import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
10
- import { Spinner } from "../../components/atoms/spinner/Spinner";
11
10
  import { Body } from "../../components/layouts/body/Body";
12
11
  import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
13
12
  import { I18nMessages } from "../../i18n/i18n";
13
+ import { Spinner } from "../../shared/components/atoms/spinner/Spinner";
14
14
  import { style } from "./Intro.style";
15
15
  const Bullet = ({ text }) => (React.createElement(View, { style: style.bullet },
16
16
  React.createElement(Icon, { name: "rounded-tick", style: style.tickIcon }),