@draftbit/core 46.6.9-ac42c5.2 → 46.6.9-ec4c95.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/lib/commonjs/styles/overlay.js +1 -2
- package/lib/module/styles/overlay.js +1 -2
- package/lib/typescript/src/styles/overlay.d.ts +1 -1
- package/lib/typescript/src/styles/overlay.d.ts.map +1 -1
- package/lib/typescript/src/styles/shadow.d.ts +2 -2
- package/package.json +3 -3
- package/src/styles/overlay.js +1 -3
- package/src/styles/overlay.tsx +3 -3
|
@@ -12,8 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
12
12
|
|
|
13
13
|
const isAnimatedValue = it => it instanceof _reactNative.Animated.Value;
|
|
14
14
|
function overlay(elevation) {
|
|
15
|
-
|
|
16
|
-
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_DarkTheme$colors = _DarkTheme.default.colors) === null || _DarkTheme$colors === void 0 ? void 0 : _DarkTheme$colors.surface;
|
|
15
|
+
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _DarkTheme.default.colors.surface;
|
|
17
16
|
if (isAnimatedValue(elevation)) {
|
|
18
17
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
19
18
|
|
|
@@ -4,8 +4,7 @@ import { Animated } from "react-native";
|
|
|
4
4
|
import DarkTheme from "./DarkTheme";
|
|
5
5
|
const isAnimatedValue = it => it instanceof Animated.Value;
|
|
6
6
|
export default function overlay(elevation) {
|
|
7
|
-
|
|
8
|
-
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_DarkTheme$colors = DarkTheme.colors) === null || _DarkTheme$colors === void 0 ? void 0 : _DarkTheme$colors.surface;
|
|
7
|
+
let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DarkTheme.colors.surface;
|
|
9
8
|
if (isAnimatedValue(elevation)) {
|
|
10
9
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
11
10
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Animated } from "react-native";
|
|
2
|
-
export default function overlay<T extends Animated.Value | number>(elevation: T, surfaceColor?: string): T extends number ? string : Animated.AnimatedInterpolation
|
|
2
|
+
export default function overlay<T extends Animated.Value | number>(elevation: T, surfaceColor?: string): T extends number ? string : Animated.AnimatedInterpolation;
|
|
3
3
|
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/styles/overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAOxC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,CAAC,SAAS,QAAQ,CAAC,KAAK,GAAG,MAAM,EAC/D,SAAS,EAAE,CAAC,EACZ,YAAY,GAAE,
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/styles/overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAOxC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,CAAC,SAAS,QAAQ,CAAC,KAAK,GAAG,MAAM,EAC/D,SAAS,EAAE,CAAC,EACZ,YAAY,GAAE,MAAiC,GAC9C,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC,qBAAqB,CAe5D"}
|
|
@@ -3,10 +3,10 @@ export default function shadow(elevation?: number | Animated.Value): {
|
|
|
3
3
|
shadowColor: string;
|
|
4
4
|
shadowOffset: {
|
|
5
5
|
width: Animated.Value;
|
|
6
|
-
height: Animated.AnimatedInterpolation
|
|
6
|
+
height: Animated.AnimatedInterpolation;
|
|
7
7
|
};
|
|
8
8
|
shadowOpacity: Animated.Value;
|
|
9
|
-
shadowRadius: Animated.AnimatedInterpolation
|
|
9
|
+
shadowRadius: Animated.AnimatedInterpolation;
|
|
10
10
|
} | {
|
|
11
11
|
shadowColor?: undefined;
|
|
12
12
|
shadowOffset?: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.6.9-
|
|
3
|
+
"version": "46.6.9-ec4c95.2+ec4c954",
|
|
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.6.9-
|
|
44
|
+
"@draftbit/types": "^46.6.9-ec4c95.2+ec4c954",
|
|
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": "ec4c95446ab366c273909458e9b7c52e6943eb70"
|
|
95
95
|
}
|
package/src/styles/overlay.js
CHANGED
|
@@ -3,9 +3,7 @@ import color from "color";
|
|
|
3
3
|
import { Animated } from "react-native";
|
|
4
4
|
import DarkTheme from "./DarkTheme";
|
|
5
5
|
const isAnimatedValue = (it) => it instanceof Animated.Value;
|
|
6
|
-
export default function overlay(elevation, surfaceColor) {
|
|
7
|
-
var _a;
|
|
8
|
-
if (surfaceColor === void 0) { surfaceColor = (_a = DarkTheme.colors) === null || _a === void 0 ? void 0 : _a.surface; }
|
|
6
|
+
export default function overlay(elevation, surfaceColor = DarkTheme.colors.surface) {
|
|
9
7
|
if (isAnimatedValue(elevation)) {
|
|
10
8
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
11
9
|
// @ts-expect-error: TS doesn't seem to refine the type correctly
|
package/src/styles/overlay.tsx
CHANGED
|
@@ -4,13 +4,13 @@ import { Animated } from "react-native";
|
|
|
4
4
|
import DarkTheme from "./DarkTheme";
|
|
5
5
|
|
|
6
6
|
const isAnimatedValue = (
|
|
7
|
-
it: number |
|
|
7
|
+
it: number | Animated.AnimatedInterpolation
|
|
8
8
|
): it is Animated.Value => it instanceof Animated.Value;
|
|
9
9
|
|
|
10
10
|
export default function overlay<T extends Animated.Value | number>(
|
|
11
11
|
elevation: T,
|
|
12
|
-
surfaceColor: string = DarkTheme.colors
|
|
13
|
-
): T extends number ? string : Animated.AnimatedInterpolation
|
|
12
|
+
surfaceColor: string = DarkTheme.colors.surface
|
|
13
|
+
): T extends number ? string : Animated.AnimatedInterpolation {
|
|
14
14
|
if (isAnimatedValue(elevation)) {
|
|
15
15
|
const inputRange = [0, 1, 2, 3, 8, 24];
|
|
16
16
|
|