@lookiero/checkout 0.4.5-beta.1 → 0.4.5-beta.3

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,14 +1,15 @@
1
1
  import React from "react";
2
2
  import { ScrollView } from "react-native";
3
3
  import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
4
+ import { theme } from "../../theme/theme";
5
+ const { spaceXXXL } = theme();
4
6
  const SafeAreaScrollView = ({ children, edges = ["top", "bottom", "left", "right"], style: customStyle, scrollerPaddingTop = 0, }) => {
5
7
  const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
6
8
  return (React.createElement(SafeAreaView, { edges: edges, style: customStyle?.safeAreaView },
7
9
  React.createElement(ScrollView, { contentContainerStyle: [
8
10
  {
9
- // Why did we set this??
10
11
  paddingTop: safeAreaInsetTop + scrollerPaddingTop,
11
- paddingBottom: safeAreaInsetBottom,
12
+ paddingBottom: safeAreaInsetBottom + spaceXXXL,
12
13
  },
13
14
  customStyle?.scrollView,
14
15
  ] }, children)));
@@ -38,7 +38,7 @@ const Checkout = ({ children, customerId, useRedirect }) => {
38
38
  if (!dependenciesLoaded)
39
39
  return React.createElement(Spinner, null);
40
40
  return (React.createElement(React.Fragment, null,
41
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" ? HEADER_HEIGHT : 0 },
41
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
42
42
  React.createElement(Body, { style: { column: style.bodyColumn } },
43
43
  hasReplacedCheckoutItem && (React.createElement(View, { style: style.deliveryBannerContainer },
44
44
  React.createElement(DeliveryBanner, null))),
@@ -30,7 +30,7 @@ const Feedback = ({ customerId }) => {
30
30
  if (!dependenciesLoaded)
31
31
  return React.createElement(Spinner, null);
32
32
  return (React.createElement(CheckoutQuestionFeedbackProvider, { feedback: {} },
33
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" ? HEADER_HEIGHT : 0 },
33
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
34
34
  React.createElement(Body, { style: { column: style.bodyColumn } },
35
35
  React.createElement(CheckoutQuestionsForm, { checkoutQuestions: checkoutQuestions || [], submitButtonDisabled: giveCheckoutFeedbackStatus === CommandStatus.LOADING, onSubmit: handleOnSubmit })))));
36
36
  };
@@ -83,8 +83,8 @@ const Header = ({ customerId, menu: Menu, style: customStyle }) => {
83
83
  else {
84
84
  header = React.createElement(DefaultHeader, { onOpenMenu: handleOnOpenMenu });
85
85
  }
86
- return (React.createElement(SafeAreaView, { edges: ["top"], style: [style.container, customStyle] },
87
- header,
86
+ return (React.createElement(React.Fragment, null,
87
+ React.createElement(SafeAreaView, { edges: ["top"], style: [style.container, customStyle] }, header),
88
88
  React.createElement(Menu, { visible: menuVisible, onClose: handleOnCloseMenu })));
89
89
  };
90
90
  export { Header };
@@ -136,7 +136,7 @@ const Item = ({ customerId }) => {
136
136
  return (React.createElement(ReturnQuestionFeedbackProvider, { feedback: checkoutItem.feedbacks || {} },
137
137
  React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
138
138
  React.createElement(SizeChangeModal, { visible: sizeChangeModalVisible, onDismiss: handleOnHideSizeChangeModal }),
139
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" ? HEADER_HEIGHT : 0 },
139
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
140
140
  React.createElement(Body, null,
141
141
  customerDecissionMade && (React.createElement(CustomerDecissionBanner, { checkoutItemStatus: checkoutItem.status, onPress: handleOnBannerPress })),
142
142
  React.createElement(View, { style: [style.container, { paddingBottom: Platform.OS === "web" ? spaceXL : stickyHeight }] },
@@ -145,7 +145,7 @@ const Item = ({ customerId }) => {
145
145
  React.createElement(ProductVariantDescription, { brand: brand, color: color, name: name, price: price, size: productVariantSelected.size }),
146
146
  checkoutItem.status === CheckoutItemStatus.RETURNED && (React.createElement(View, { style: style.feedbackContainer },
147
147
  React.createElement(ReturnQuestionsFeedback, { returnQuestions: returnQuestions || [], onEditFeedback: handleOnEditFeedback })))))),
148
- !customerDecissionMade && (React.createElement(ItemActions, { keepButtonLoading: keepCheckoutItemStatus === CommandStatus.LOADING, productVariantSelected: productVariantSelected, productVariants: bookedProductsVariants?.productVariants || [], returnButtonLoading: returnCheckoutItemStatus === CommandStatus.LOADING, sizeSelectorDisabled: replaceCheckoutItemStatus === CommandStatus.LOADING, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: handleOnReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal })),
149
- React.createElement(ReturnQuestionsForm, { checkoutItemPrice: checkoutItem.price, productVariant: checkoutItem.productVariant, returnQuestions: returnQuestions || [], visible: returnQuestionsVisible, onClose: handleOnHideReturnQuestions, onSubmit: handleOnSubmit })));
148
+ React.createElement(ReturnQuestionsForm, { checkoutItemPrice: checkoutItem.price, productVariant: checkoutItem.productVariant, returnQuestions: returnQuestions || [], visible: returnQuestionsVisible, onClose: handleOnHideReturnQuestions, onSubmit: handleOnSubmit }),
149
+ !customerDecissionMade && (React.createElement(ItemActions, { keepButtonLoading: keepCheckoutItemStatus === CommandStatus.LOADING, productVariantSelected: productVariantSelected, productVariants: bookedProductsVariants?.productVariants || [], returnButtonLoading: returnCheckoutItemStatus === CommandStatus.LOADING, sizeSelectorDisabled: replaceCheckoutItemStatus === CommandStatus.LOADING, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: handleOnReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal }))));
150
150
  };
151
151
  export { Item };
@@ -44,7 +44,7 @@ const Summary = ({ customerId }) => {
44
44
  if (!dependenciesLoaded)
45
45
  return React.createElement(Spinner, null);
46
46
  return (React.createElement(React.Fragment, null,
47
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" ? HEADER_HEIGHT : 0, style: { safeAreaView: style.container } },
47
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0, style: { safeAreaView: style.container } },
48
48
  React.createElement(Body, { style: { row: { paddingBottom: pricingHeight || spaceXL } } },
49
49
  fiveItemsDiscount !== 0 && React.createElement(FiveItemsDiscountBanner, { fiveItemsDiscount: fiveItemsDiscount }),
50
50
  React.createElement(View, { style: style.content },
@@ -8,12 +8,9 @@ declare const style: {
8
8
  fontFamily: string;
9
9
  fontSize: number;
10
10
  letterSpacing: number;
11
- outlineStyle: string;
12
11
  paddingBottom: number;
13
12
  paddingHorizontal: number;
14
13
  paddingTop: number;
15
- textOverflow: string;
16
- whiteSpace: string;
17
14
  };
18
15
  };
19
16
  export { style, borderSize, paddingVertical };
@@ -10,12 +10,12 @@ const style = StyleSheet.create({
10
10
  fontFamily: fontMap.Body,
11
11
  fontSize: fontBodySize3,
12
12
  letterSpacing: fontBodyLetterSpacing3,
13
- outlineStyle: "none",
13
+ // outlineStyle: "none",
14
14
  paddingBottom: paddingVertical,
15
15
  paddingHorizontal: spaceM,
16
16
  paddingTop: paddingVertical,
17
- textOverflow: "ellipsis",
18
- whiteSpace: "nowrap",
17
+ // textOverflow: "ellipsis",
18
+ // whiteSpace: "nowrap",
19
19
  ...Platform.select({
20
20
  web: {
21
21
  lineHeight: fontBodyHeight3,
@@ -1,6 +1,7 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  declare const style: StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
3
3
  sticky: {
4
+ zIndex: number;
4
5
  backgroundColor: string;
5
6
  bottom: number;
6
7
  elevation: number;
@@ -14,6 +15,7 @@ declare const style: StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
14
15
  shadowRadius: number;
15
16
  width: string;
16
17
  } | {
18
+ zIndex: number;
17
19
  position: "sticky";
18
20
  backgroundColor: string;
19
21
  bottom: number;
@@ -28,6 +30,7 @@ declare const style: StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
28
30
  shadowRadius: number;
29
31
  width: string;
30
32
  } | {
33
+ zIndex: number;
31
34
  position: "absolute";
32
35
  backgroundColor: string;
33
36
  bottom: number;
@@ -28,6 +28,7 @@ const style = StyleSheet.create({
28
28
  position: "absolute",
29
29
  },
30
30
  }),
31
+ zIndex: 1,
31
32
  },
32
33
  });
33
34
  export { style };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.4.5-beta.1",
3
+ "version": "0.4.5-beta.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [