@lookiero/checkout 0.4.5-beta.4 → 0.4.5-beta.6

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.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ScrollView } from "react-native";
2
+ import { Platform, ScrollView } from "react-native";
3
3
  import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
4
4
  import { theme } from "../../theme/theme";
5
5
  const { spaceXXXL } = theme();
@@ -9,7 +9,7 @@ const SafeAreaScrollView = ({ children, footer, edges = ["top", "bottom", "left"
9
9
  React.createElement(ScrollView, { contentContainerStyle: [
10
10
  {
11
11
  paddingTop: safeAreaInsetTop + scrollerPaddingTop,
12
- paddingBottom: safeAreaInsetBottom + spaceXXXL,
12
+ paddingBottom: safeAreaInsetBottom + Platform.OS === "android" ? spaceXXXL : 0,
13
13
  },
14
14
  customStyle?.scrollView,
15
15
  ] }, children),
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
3
  interface MenuProps {
4
- readonly visible: boolean;
4
+ readonly isVisible: boolean;
5
5
  readonly onClose: () => void;
6
6
  }
7
7
  type Menu = FC<MenuProps>;
@@ -1,7 +1,7 @@
1
1
  import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
2
2
  import { useI18nMessage } from "@lookiero/i18n-react";
3
3
  import React, { useCallback, useState } from "react";
4
- import { View } from "react-native";
4
+ import { View, } from "react-native";
5
5
  import { SafeAreaView } from "react-native-safe-area-context";
6
6
  import { generatePath, useMatch, useNavigate, useParams } from "react-router-native";
7
7
  import { ButtonIcon } from "../../../../shared/ui/components/molecules/buttonIcon/ButtonIcon";
@@ -84,7 +84,11 @@ const Header = ({ customerId, menu: Menu, style: customStyle }) => {
84
84
  header = React.createElement(DefaultHeader, { onOpenMenu: handleOnOpenMenu });
85
85
  }
86
86
  return (React.createElement(React.Fragment, null,
87
- React.createElement(SafeAreaView, { edges: ["top"], style: [style.container, customStyle] }, header),
88
- React.createElement(Menu, { visible: menuVisible, onClose: handleOnCloseMenu })));
87
+ React.createElement(SafeAreaView, { edges: ["top"], style: [
88
+ style.container,
89
+ // Platform.OS === "android" && { paddingTop: StatusBar.currentHeight },
90
+ customStyle,
91
+ ] }, header),
92
+ React.createElement(Menu, { isVisible: menuVisible, onClose: handleOnCloseMenu })));
89
93
  };
90
94
  export { Header };
@@ -23,7 +23,7 @@ const Field = ({ label, isFocused = false, style: customStyle }) => {
23
23
  },
24
24
  customStyle?.field,
25
25
  ] },
26
- React.createElement(Text, { level: 1, style: [style.fieldText, customStyle?.fieldText], detail: true }, label),
26
+ React.createElement(Text, { level: 1, numberOfLines: 1, style: [style.fieldText, customStyle?.fieldText], detail: true }, label),
27
27
  React.createElement(View, { style: [style.fieldBackground, { opacity: isFocused ? 1 : 0 }] })));
28
28
  };
29
29
  export { Field };
@@ -7,6 +7,8 @@ declare const style: {
7
7
  zIndex: number;
8
8
  };
9
9
  fieldText: {
10
+ flexWrap: "nowrap";
11
+ overflow: "hidden";
10
12
  paddingHorizontal: number;
11
13
  zIndex: number;
12
14
  };
@@ -10,6 +10,8 @@ const style = StyleSheet.create({
10
10
  zIndex: 0,
11
11
  },
12
12
  fieldText: {
13
+ flexWrap: "nowrap",
14
+ overflow: "hidden",
13
15
  paddingHorizontal: spaceS,
14
16
  zIndex: 1,
15
17
  },
@@ -32,6 +32,6 @@ const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customSt
32
32
  }, [maxHeight, minHeight, multiline]);
33
33
  useLayoutEffect(handleOnContentSizeChangeWeb, [handleOnContentSizeChangeWeb, value]);
34
34
  const textInputRef = useRef(null);
35
- return (React.createElement(TextInput, { ...restOfProps, ref: textInputRef, multiline: multiline, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange }));
35
+ return (React.createElement(TextInput, { ...restOfProps, ref: textInputRef, multiline: multiline, numberOfLines: !!multiline ? undefined : 1, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange }));
36
36
  };
37
37
  export { Input };
@@ -17,7 +17,7 @@ const InputField = ({ label, placeholder, value, multiline = false, minHeight, e
17
17
  return (React.createElement(View, { style: customStyle?.inputField, testID: "input-field" },
18
18
  React.createElement(Field, { isFocused: isFocused || !!value, label: label, style: {
19
19
  field: [style.field, customStyle?.field],
20
- fieldText: [{ color }, customStyle?.fieldText],
20
+ fieldText: [{ color }, !!icon && { paddingRight: inputPaddingRightWithIcon }, customStyle?.fieldText],
21
21
  } }),
22
22
  React.createElement(Input, { minHeight: minHeight, multiline: multiline, placeholder: placeholder, placeholderTextColor: isFocused ? colorGrayscaleL : colorBase, style: [!!icon && { paddingRight: inputPaddingRightWithIcon }, { borderColor: color }, customStyle?.input], value: value, onBlur: handleOnBlur, onChangeText: handleOnChange, onFocus: handleOnFocus, ...inputRestProps }),
23
23
  !!icon && React.createElement(Icon, { name: icon, style: [style.icon, { color }, customStyle?.icon] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.4.5-beta.4",
3
+ "version": "0.4.5-beta.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -53,6 +53,7 @@
53
53
  "react": "^18.0.0",
54
54
  "react-dom": "^18.0.0",
55
55
  "react-native": "^0.70.6",
56
+ "react-native-get-random-values": "^1.8.0",
56
57
  "react-native-web": "^0.18.9",
57
58
  "react-router-dom": "^6.4.5",
58
59
  "react-router-native": "^6.4.5"