@draftbit/core 46.7.5 → 46.7.6-0a91fd.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.
|
@@ -11,6 +11,7 @@ var _theming = require("../theming");
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
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); }
|
|
14
15
|
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
15
16
|
const Elevation = _ref => {
|
|
16
17
|
let {
|
|
@@ -27,24 +28,11 @@ const Elevation = _ref => {
|
|
|
27
28
|
colors
|
|
28
29
|
} = theme;
|
|
29
30
|
const borderRadius = radius;
|
|
30
|
-
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
31
|
-
...rest,
|
|
31
|
+
return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
|
|
32
32
|
style: [{
|
|
33
33
|
borderRadius,
|
|
34
34
|
backgroundColor: colors.surface
|
|
35
35
|
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
36
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
37
|
-
style: {
|
|
38
|
-
overflow: "hidden",
|
|
39
|
-
borderRadius
|
|
40
|
-
}
|
|
41
|
-
}, children));
|
|
42
|
-
};
|
|
43
|
-
var _default = (0, _theming.withTheme)(Elevation);
|
|
44
|
-
exports.default = _default;
|
|
45
|
-
borderRadius,
|
|
46
|
-
backgroundColor: colors.surface
|
|
47
|
-
}, elevation ? (0, _shadow.default)(elevation) : null, style]
|
|
48
36
|
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
49
37
|
style: {
|
|
50
38
|
overflow: "hidden",
|
|
@@ -14,7 +14,6 @@ const SEED_DATA = [{
|
|
|
14
14
|
preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
|
|
15
15
|
supports_list_render: false,
|
|
16
16
|
triggers: [_types.Triggers.OnChange],
|
|
17
|
-
// TODO Triggers.OnSubmit for multiple triggers
|
|
18
17
|
props: {
|
|
19
18
|
icon: {
|
|
20
19
|
group: _types.GROUPS.basic,
|
|
@@ -53,4 +52,7 @@ const SEED_DATA = [{
|
|
|
53
52
|
},
|
|
54
53
|
layout: {}
|
|
55
54
|
}];
|
|
55
|
+
exports.SEED_DATA = SEED_DATA;},
|
|
56
|
+
layout: {}
|
|
57
|
+
}];
|
|
56
58
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -23,7 +23,9 @@ const SEED_DATA = {
|
|
|
23
23
|
}),
|
|
24
24
|
fieldName: (0, _types.createFieldNameProp)({
|
|
25
25
|
defaultValue: "ratingValue",
|
|
26
|
+
// this is the name of the variable declared on the screen in Draftbit
|
|
26
27
|
handlerPropName: "onPress",
|
|
28
|
+
// the change handler prop in this component
|
|
27
29
|
valuePropName: "rating" // the value prop in this component
|
|
28
30
|
}),
|
|
29
31
|
|
|
@@ -48,10 +50,4 @@ const SEED_DATA = {
|
|
|
48
50
|
})
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
|
-
exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
|
|
52
|
-
label: "Inactive Color",
|
|
53
|
-
defaultValue: "divider"
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
53
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -15,6 +15,7 @@ function overlay(elevation) {
|
|
|
15
15
|
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _DarkTheme.default.colors.surface;
|
|
16
16
|
if (isAnimatedValue(elevation)) {
|
|
17
17
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
18
|
+
|
|
18
19
|
// @ts-expect-error: TS doesn't seem to refine the type correctly
|
|
19
20
|
return elevation.interpolate({
|
|
20
21
|
inputRange,
|
|
@@ -23,6 +24,7 @@ function overlay(elevation) {
|
|
|
23
24
|
})
|
|
24
25
|
});
|
|
25
26
|
}
|
|
27
|
+
|
|
26
28
|
// @ts-expect-error: TS doesn't seem to refine the type correctly
|
|
27
29
|
return calculateColor(surfaceColor, elevation);
|
|
28
30
|
}
|
|
@@ -63,4 +65,4 @@ const elevationOverlayTransparency = {
|
|
|
63
65
|
22: 15.72,
|
|
64
66
|
23: 15.84,
|
|
65
67
|
24: 16
|
|
66
|
-
};
|
|
68
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.7.
|
|
3
|
+
"version": "46.7.6-0a91fd.2+0a91fd4",
|
|
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.7.
|
|
44
|
+
"@draftbit/types": "^46.7.6-0a91fd.2+0a91fd4",
|
|
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",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "0a91fd44c2d3c344cf8f1961d530af6189f34c1e"
|
|
95
95
|
}
|