@draftbit/core 46.8.1-99122.2 → 46.8.1-a386d4.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.
@@ -20,6 +20,8 @@ const Shadow = _ref => {
20
20
  showShadowCornerTopEnd = true,
21
21
  showShadowCornerBottomStart = true,
22
22
  showShadowCornerBottomEnd = true,
23
+ paintInside = false,
24
+ style,
23
25
  ...rest
24
26
  } = _ref;
25
27
  return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, _extends({
@@ -35,7 +37,9 @@ const Shadow = _ref => {
35
37
  topEnd: showShadowCornerTopEnd,
36
38
  bottomStart: showShadowCornerBottomStart,
37
39
  bottomEnd: showShadowCornerBottomEnd
38
- }
40
+ },
41
+ containerStyle: style,
42
+ paintInside: paintInside
39
43
  }, rest));
40
44
  };
41
45
  var _default = Shadow;
@@ -7,7 +7,7 @@ exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
8
  const SEED_DATA = {
9
9
  name: "Shadow",
10
- tag: "Shadow View",
10
+ tag: "Shadow",
11
11
  description: "A cross-platform, universal shadow.",
12
12
  category: _types.COMPONENT_TYPES.view,
13
13
  stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
@@ -32,7 +32,7 @@ const SEED_DATA = {
32
32
  paintInside: (0, _types.createStaticBoolProp)({
33
33
  label: "Paint Inside",
34
34
  description: "Apply the shadow below/inside the content.",
35
- defaultValue: null
35
+ defaultValue: false
36
36
  }),
37
37
  stretch: (0, _types.createStaticBoolProp)({
38
38
  label: "Stretch",
@@ -1,4 +1,3 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React, { useEffect, useState } from "react";
3
2
  import { TextInput } from "react-native";
4
3
  import { isString, isNumber, isNaN } from "lodash";
@@ -32,7 +31,6 @@ const NumberInput = _ref => {
32
31
  setCurrentStringNumberValue(newStringNumberValue);
33
32
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
34
33
  };
35
-
36
34
  // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
37
35
  useEffect(() => {
38
36
  const nextStringNumberValue = formatValueToStringNumber(value);
@@ -41,7 +39,6 @@ const NumberInput = _ref => {
41
39
  }
42
40
  // eslint-disable-next-line react-hooks/exhaustive-deps
43
41
  }, [value]);
44
-
45
42
  // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
46
43
  useEffect(() => {
47
44
  const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
@@ -50,6 +47,17 @@ const NumberInput = _ref => {
50
47
  }
51
48
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
49
  }, []);
50
+ return /*#__PURE__*/React.createElement(TextInput, {
51
+ keyboardType: "numeric",
52
+ value: currentStringNumberValue,
53
+ onChangeText: handleChangeText,
54
+ ...props
55
+ });
56
+ };
57
+ export default NumberInput; setCurrentStringNumberValue(defaultStringNumberValue);
58
+ }
59
+ // eslint-disable-next-line react-hooks/exhaustive-deps
60
+ }, []);
53
61
  return /*#__PURE__*/React.createElement(TextInput, _extends({
54
62
  keyboardType: "numeric",
55
63
  value: currentStringNumberValue,
@@ -13,6 +13,8 @@ const Shadow = _ref => {
13
13
  showShadowCornerTopEnd = true,
14
14
  showShadowCornerBottomStart = true,
15
15
  showShadowCornerBottomEnd = true,
16
+ paintInside = false,
17
+ style,
16
18
  ...rest
17
19
  } = _ref;
18
20
  return /*#__PURE__*/React.createElement(ShadowComponent, _extends({
@@ -28,7 +30,9 @@ const Shadow = _ref => {
28
30
  topEnd: showShadowCornerTopEnd,
29
31
  bottomStart: showShadowCornerBottomStart,
30
32
  bottomEnd: showShadowCornerBottomEnd
31
- }
33
+ },
34
+ containerStyle: style,
35
+ paintInside: paintInside
32
36
  }, rest));
33
37
  };
34
38
  export default Shadow;
@@ -1,7 +1,7 @@
1
1
  import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Shadow",
4
- tag: "Shadow View",
4
+ tag: "Shadow",
5
5
  description: "A cross-platform, universal shadow.",
6
6
  category: COMPONENT_TYPES.view,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
@@ -26,7 +26,7 @@ export const SEED_DATA = {
26
26
  paintInside: createStaticBoolProp({
27
27
  label: "Paint Inside",
28
28
  description: "Apply the shadow below/inside the content.",
29
- defaultValue: null
29
+ defaultValue: false
30
30
  }),
31
31
  stretch: createStaticBoolProp({
32
32
  label: "Stretch",
@@ -1 +1 @@
1
- {"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/components/Shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EA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W,CAAC,CAmC1D,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.8.1-099122.2+099122a",
3
+ "version": "46.8.1-a386d4.2+a386d44",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -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": "^46.8.1-099122.2+099122a",
44
+ "@draftbit/types": "^46.8.1-a386d4.2+a386d44",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -93,5 +93,5 @@
93
93
  ]
94
94
  ]
95
95
  },
96
- "gitHead": "099122a1f5cf460679a1cc8e6cca569f743aae08"
96
+ "gitHead": "a386d44888799fa19a963b71ea2a3bdd62b96237"
97
97
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Shadow as ShadowComponent } from "react-native-shadow-2";
3
- const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShadowSideEnd = true, showShadowSideTop = true, showShadowSideBottom = true, showShadowCornerTopStart = true, showShadowCornerTopEnd = true, showShadowCornerBottomStart = true, showShadowCornerBottomEnd = true, ...rest }) => {
3
+ const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShadowSideEnd = true, showShadowSideTop = true, showShadowSideBottom = true, showShadowCornerTopStart = true, showShadowCornerTopEnd = true, showShadowCornerBottomStart = true, showShadowCornerBottomEnd = true, paintInside = false, style, ...rest }) => {
4
4
  return (React.createElement(ShadowComponent, { offset: [offsetX, offsetY], sides: {
5
5
  start: showShadowSideStart,
6
6
  end: showShadowSideEnd,
@@ -11,6 +11,6 @@ const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShad
11
11
  topEnd: showShadowCornerTopEnd,
12
12
  bottomStart: showShadowCornerBottomStart,
13
13
  bottomEnd: showShadowCornerBottomEnd,
14
- }, ...rest }));
14
+ }, containerStyle: style, paintInside: paintInside, ...rest }));
15
15
  };
16
16
  export default Shadow;
@@ -33,6 +33,8 @@ const Shadow: React.FC<React.PropsWithChildren<ShadowProps>> = ({
33
33
  showShadowCornerTopEnd = true,
34
34
  showShadowCornerBottomStart = true,
35
35
  showShadowCornerBottomEnd = true,
36
+ paintInside = false,
37
+ style,
36
38
  ...rest
37
39
  }) => {
38
40
  return (
@@ -50,6 +52,8 @@ const Shadow: React.FC<React.PropsWithChildren<ShadowProps>> = ({
50
52
  bottomStart: showShadowCornerBottomStart,
51
53
  bottomEnd: showShadowCornerBottomEnd,
52
54
  }}
55
+ containerStyle={style}
56
+ paintInside={paintInside}
53
57
  {...rest}
54
58
  />
55
59
  );
@@ -1,7 +1,7 @@
1
1
  import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Shadow",
4
- tag: "Shadow View",
4
+ tag: "Shadow",
5
5
  description: "A cross-platform, universal shadow.",
6
6
  category: COMPONENT_TYPES.view,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
@@ -26,7 +26,7 @@ export const SEED_DATA = {
26
26
  paintInside: createStaticBoolProp({
27
27
  label: "Paint Inside",
28
28
  description: "Apply the shadow below/inside the content.",
29
- defaultValue: null,
29
+ defaultValue: false,
30
30
  }),
31
31
  stretch: createStaticBoolProp({
32
32
  label: "Stretch",
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  export const SEED_DATA = {
11
11
  name: "Shadow",
12
- tag: "Shadow View",
12
+ tag: "Shadow",
13
13
  description: "A cross-platform, universal shadow.",
14
14
  category: COMPONENT_TYPES.view,
15
15
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
@@ -34,7 +34,7 @@ export const SEED_DATA = {
34
34
  paintInside: createStaticBoolProp({
35
35
  label: "Paint Inside",
36
36
  description: "Apply the shadow below/inside the content.",
37
- defaultValue: null,
37
+ defaultValue: false,
38
38
  }),
39
39
  stretch: createStaticBoolProp({
40
40
  label: "Stretch",