@draftbit/core 48.3.6-68430b.2 → 48.4.0

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": "48.3.6-68430b.2+68430bb",
3
+ "version": "48.4.0",
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": "^48.3.6-68430b.2+68430bb",
44
+ "@draftbit/types": "48.3.0",
45
45
  "@expo/vector-icons": "^13.0.0",
46
46
  "@material-ui/core": "^4.11.0",
47
47
  "@material-ui/pickers": "^3.2.10",
@@ -100,5 +100,5 @@
100
100
  ],
101
101
  "testEnvironment": "node"
102
102
  },
103
- "gitHead": "68430bb8bbb863dfba77e3dba40da8a7b05d5d1b"
103
+ "gitHead": "c2ee4e16e6874d15d1241190ca402707f18c0d3c"
104
104
  }
@@ -8,8 +8,8 @@ const Square = ({ size, style, onLayout, ...rest }) => {
8
8
  onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
9
9
  }, ...rest, style: [
10
10
  style,
11
- size ? { width: size, height: size } : {},
12
- calculatedSize
11
+ size != undefined ? { width: size, height: size } : {},
12
+ calculatedSize > 0
13
13
  ? {
14
14
  width: calculatedSize,
15
15
  height: calculatedSize,
@@ -1 +1 @@
1
- {"version":3,"file":"Square.js","sourceRoot":"","sources":["Square.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,UAAU,CAAC;AAM9B,MAAM,MAAM,GAA0B,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC3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,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACzD,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAC,CAAC,CAAC;QAChB,CAAC,KACG,IAAI,EACR,KAAK,EAAE;YACL,KAAK;YACL,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;YACtD,cAAc,GAAG,CAAC;gBAChB,CAAC,CAAC;oBACE,KAAK,EAAE,cAAc;oBACrB,MAAM,EAAE,cAAc;iBACvB;gBACH,CAAC,CAAC,EAAE;SACP,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -19,8 +19,8 @@ const Square: React.FC<SquareProps> = ({ size, style, onLayout, ...rest }) => {
19
19
  {...rest}
20
20
  style={[
21
21
  style,
22
- size ? { width: size, height: size } : {},
23
- calculatedSize
22
+ size != undefined ? { width: size, height: size } : {},
23
+ calculatedSize > 0
24
24
  ? {
25
25
  width: calculatedSize,
26
26
  height: calculatedSize,
@@ -6,9 +6,12 @@ const ZStack = ({ reversed, children, ...rest }) => {
6
6
  if (reversed) {
7
7
  childrenArray = childrenArray.reverse();
8
8
  }
9
- return childrenArray.map((child) => {
9
+ return childrenArray.map((child, index) => {
10
10
  const props = child.props || {};
11
- return React.cloneElement(child, { ...props, style: { position: "absolute", ...props.style } }, props.children);
11
+ return React.cloneElement(child, {
12
+ ...props,
13
+ style: { position: "absolute", zIndex: index + 1, ...props.style },
14
+ }, props.children);
12
15
  });
13
16
  }, [children, reversed]);
14
17
  return React.createElement(View, { ...rest }, absoluteChildren);
@@ -1 +1 @@
1
- {"version":3,"file":"ZStack.js","sourceRoot":"","sources":["ZStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAa,MAAM,cAAc,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AAQ,EAAE;YACZ,aAAa,GAAG,aAAa,CAAC,OAAO,EAAE,CAAC;SACzC;QAED,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC,YAAY,CACvB,KAAK,EACL;gBACE,GAAG,KAAK;gBACR,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE;aACnE,EACD,KAAK,CAAC,QAAQ,CACf,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEzB,OAAO,oBAAC,IAAI,OAAK,IAAI,IAAG,gBAAgB,CAAQ,CAAC;AACnD,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -15,11 +15,14 @@ const ZStack: React.FC<ZStackProps> = ({ reversed, children, ...rest }) => {
15
15
  childrenArray = childrenArray.reverse();
16
16
  }
17
17
 
18
- return childrenArray.map((child) => {
18
+ return childrenArray.map((child, index) => {
19
19
  const props = child.props || {};
20
20
  return React.cloneElement(
21
21
  child,
22
- { ...props, style: { position: "absolute", ...props.style } },
22
+ {
23
+ ...props,
24
+ style: { position: "absolute", zIndex: index + 1, ...props.style },
25
+ },
23
26
  props.children
24
27
  );
25
28
  });