@draftbit/core 50.0.2 → 50.0.3-6b2618.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "50.0.2",
3
+ "version": "50.0.3-6b2618.2+6b26185",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "types": "lib/typescript/src/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "50.0.2",
44
+ "@draftbit/types": "^50.0.3-6b2618.2+6b26185",
45
45
  "@expo/vector-icons": "^14.0.0",
46
46
  "@gorhom/bottom-sheet": "5.0.0-alpha.7",
47
47
  "@material-ui/core": "^4.11.0",
@@ -114,5 +114,5 @@
114
114
  ],
115
115
  "testEnvironment": "node"
116
116
  },
117
- "gitHead": "9e22f20c66aac16f2758fdae149f4b6d0e69f47c"
117
+ "gitHead": "6b26185f980ab0a760b89b4ebba998d45337536f"
118
118
  }
@@ -2,16 +2,22 @@ import * as React from "react";
2
2
  import { StyleSheet, ScrollView, View, } from "react-native";
3
3
  import { SafeAreaView } from "react-native-safe-area-context";
4
4
  import { withTheme } from "../theming";
5
- function ScreenContainer({ scrollable = false, hasSafeArea = false, hasBottomSafeArea = false, hasTopSafeArea = false, theme, style, children, ...rest }) {
5
+ function ScreenContainer({ scrollable = false, hasSafeArea = false, hasBottomSafeArea = false, hasTopSafeArea = false, hasLeftSafeArea = true, hasRightSafeArea = true, theme, style, children, ...rest }) {
6
6
  var _a;
7
7
  const backgroundColor = ((_a = StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background;
8
- const edges = ["left", "right"];
8
+ const edges = [];
9
9
  if (hasSafeArea || hasTopSafeArea) {
10
10
  edges.push("top");
11
11
  }
12
12
  if (hasSafeArea || hasBottomSafeArea) {
13
13
  edges.push("bottom");
14
14
  }
15
+ if (hasSafeArea || hasLeftSafeArea) {
16
+ edges.push("left");
17
+ }
18
+ if (hasSafeArea || hasRightSafeArea) {
19
+ edges.push("right");
20
+ }
15
21
  return (React.createElement(SafeAreaView, { edges: edges, style: [
16
22
  styles.container,
17
23
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenContainer.js","sourceRoot":"","sources":["ScreenContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,UAAU,EACV,UAAU,EAGV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAavC,SAAS,eAAe,CAAC,EACvB,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,KAAK,EACnB,iBAAiB,GAAG,KAAK,EACzB,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACc;;IACrB,MAAM,eAAe,GACnB,CAAA,MAAA,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,0CAAE,eAAe,KAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;IAExE,MAAM,KAAK,GAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,IAAI,WAAW,IAAI,cAAc,EAAE;QACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IAED,IAAI,WAAW,IAAI,iBAAiB,EAAE;QACpC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACtB;IAED,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,MAAM,CAAC,SAAS;YAChB;gBACE,eAAe;aAChB;SACF,KACG,IAAI,IAEP,UAAU,C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B,IAAI,WAAW,IAAI,cAAc,EAAE;QACjC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IAED,IAAI,WAAW,IAAI,iBAAiB,EAAE;QACpC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACtB;IAED,IAAI,WAAW,IAAI,eAAe,EAAE;QAClC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACpB;IAED,IAAI,WAAW,IAAI,gBAAgB,EAAE;QACnC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACrB;IAED,OAAO,CACL,oBAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,MAAM,CAAC,SAAS;YAChB;gBACE,eAAe;aAChB;SACF,KACG,IAAI,IAEP,UAAU,CAAC,CAAC,CAAC,CACZ,oBAAC,UAAU,IACT,qBAAqB,EAAE;YACrB,MAAM,CAAC,mBAAmB;YAC1B,EAAE,eAAe,EAAE;YACnB,KAAK;SACN,IAEA,QAAQ,CACE,CACd,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,CAAC,IACxD,QAAQ,CACJ,CACR,CACY,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,mBAAmB,EAAE;QACnB,QAAQ,EAAE,CAAC;QACX,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,eAAe,CAAC,CAAC"}
@@ -16,6 +16,8 @@ type ScreenContainerProps = {
16
16
  hasSafeArea?: boolean;
17
17
  hasTopSafeArea?: boolean;
18
18
  hasBottomSafeArea?: boolean;
19
+ hasLeftSafeArea?: boolean;
20
+ hasRightSafeArea?: boolean;
19
21
  theme: Theme;
20
22
  style?: StyleProp<ViewStyle>;
21
23
  children?: React.ReactNode;
@@ -26,6 +28,8 @@ function ScreenContainer({
26
28
  hasSafeArea = false,
27
29
  hasBottomSafeArea = false,
28
30
  hasTopSafeArea = false,
31
+ hasLeftSafeArea = true,
32
+ hasRightSafeArea = true,
29
33
  theme,
30
34
  style,
31
35
  children,
@@ -34,7 +38,7 @@ function ScreenContainer({
34
38
  const backgroundColor =
35
39
  StyleSheet.flatten(style)?.backgroundColor || theme.colors.background;
36
40
 
37
- const edges: Edge[] = ["left", "right"];
41
+ const edges: Edge[] = [];
38
42
  if (hasSafeArea || hasTopSafeArea) {
39
43
  edges.push("top");
40
44
  }
@@ -43,6 +47,14 @@ function ScreenContainer({
43
47
  edges.push("bottom");
44
48
  }
45
49
 
50
+ if (hasSafeArea || hasLeftSafeArea) {
51
+ edges.push("left");
52
+ }
53
+
54
+ if (hasSafeArea || hasRightSafeArea) {
55
+ edges.push("right");
56
+ }
57
+
46
58
  return (
47
59
  <SafeAreaView
48
60
  edges={edges}