@draftbit/core 54.0.4 → 54.0.5

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.
Files changed (30) hide show
  1. package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
  2. package/lib/commonjs/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
  3. package/lib/commonjs/components/Portal/PortalHost.js +1 -1
  4. package/lib/commonjs/components/Portal/PortalManager.js +1 -1
  5. package/lib/commonjs/components/Surface.js +1 -1
  6. package/lib/commonjs/components/TextField.js +1 -1
  7. package/lib/commonjs/deprecated-components/AvoidKeyboardView.js +1 -1
  8. package/lib/typescript/src/components/DatePicker/DatePicker.js +3 -2
  9. package/lib/typescript/src/components/DatePicker/DatePicker.js.map +1 -1
  10. package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
  11. package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +1 -1
  12. package/lib/typescript/src/components/Portal/PortalHost.js +2 -1
  13. package/lib/typescript/src/components/Portal/PortalHost.js.map +1 -1
  14. package/lib/typescript/src/components/Portal/PortalManager.js +1 -1
  15. package/lib/typescript/src/components/Portal/PortalManager.js.map +1 -1
  16. package/lib/typescript/src/components/Surface.js +1 -9
  17. package/lib/typescript/src/components/Surface.js.map +1 -1
  18. package/lib/typescript/src/components/TextField.js +2 -1
  19. package/lib/typescript/src/components/TextField.js.map +1 -1
  20. package/lib/typescript/src/deprecated-components/AvoidKeyboardView.js +1 -3
  21. package/lib/typescript/src/deprecated-components/AvoidKeyboardView.js.map +1 -1
  22. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +3 -3
  24. package/src/components/DatePicker/DatePicker.tsx +2 -2
  25. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx +1 -1
  26. package/src/components/Portal/PortalHost.tsx +2 -5
  27. package/src/components/Portal/PortalManager.tsx +1 -2
  28. package/src/components/Surface.tsx +4 -10
  29. package/src/components/TextField.tsx +1 -1
  30. package/src/deprecated-components/AvoidKeyboardView.tsx +1 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "54.0.4",
3
+ "version": "54.0.5",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "types": "lib/typescript/src/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
43
43
  "dependencies": {
44
44
  "@draftbit/react-theme-provider": "^2.1.1",
45
- "@draftbit/theme": "54.0.4",
45
+ "@draftbit/theme": "54.0.5",
46
46
  "@emotion/react": "^11.13.5",
47
47
  "@emotion/styled": "^11.13.5",
48
48
  "@expo/vector-icons": "^15.0.3",
@@ -123,5 +123,5 @@
123
123
  ],
124
124
  "testEnvironment": "node"
125
125
  },
126
- "gitHead": "b8b9b009585851930ef7179cd33e848a5db32656"
126
+ "gitHead": "51ca63d0f063dee46a9bf62c910368c165979d34"
127
127
  }
@@ -444,7 +444,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
444
444
  return (
445
445
  <>
446
446
  <Touchable disabled={disabled} onPress={toggleVisibility}>
447
- <View pointerEvents="none">
447
+ <View style={{ pointerEvents: "none" }}>
448
448
  <View
449
449
  style={StyleSheet.flatten([
450
450
  styles.container,
@@ -491,10 +491,10 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
491
491
  // Position colored placeholder and gray placeholder on top of each other and crossfade them
492
492
  // This gives the effect of animating the color, but allows us to use native driver
493
493
  <View
494
- pointerEvents="none"
495
494
  style={[
496
495
  StyleSheet.absoluteFill,
497
496
  {
497
+ pointerEvents: "none",
498
498
  opacity:
499
499
  // Hide the label in minimized state until we measure its width
500
500
  date || focused ? (labelLayout.measured ? 1 : 0) : 1,
@@ -268,7 +268,7 @@ const VideoPlayer = React.forwardRef<VideoPlayerRef, VideoPlayerProps>(
268
268
  {...videoPlayerProps}
269
269
  />
270
270
  {showPoster && posterSource && (
271
- <View style={StyleSheet.absoluteFill} pointerEvents="none">
271
+ <View style={[StyleSheet.absoluteFill, { pointerEvents: "none" }]}>
272
272
  <Image
273
273
  source={posterSource}
274
274
  resizeMode={posterResizeMode}
@@ -124,11 +124,7 @@ export default class PortalHost extends React.Component<Props> {
124
124
  }}
125
125
  >
126
126
  {/* Need collapsable=false here to clip the elevations, otherwise they appear above Portal components */}
127
- <View
128
- style={styles.container}
129
- collapsable={false}
130
- pointerEvents="box-none"
131
- >
127
+ <View style={styles.container} collapsable={false}>
132
128
  {this.props.children}
133
129
  </View>
134
130
  <PortalManager ref={this.setManager} />
@@ -140,5 +136,6 @@ export default class PortalHost extends React.Component<Props> {
140
136
  const styles = StyleSheet.create({
141
137
  container: {
142
138
  flex: 1,
139
+ pointerEvents: "none",
143
140
  },
144
141
  });
@@ -44,8 +44,7 @@ export default class PortalManager extends React.PureComponent<object, State> {
44
44
  collapsable={
45
45
  false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
46
46
  }
47
- pointerEvents="box-none"
48
- style={StyleSheet.absoluteFill}
47
+ style={[StyleSheet.absoluteFill, { pointerEvents: "none" }]}
49
48
  >
50
49
  {children}
51
50
  </View>
@@ -56,10 +56,11 @@ const Surface: React.FC<React.PropsWithChildren<Props>> = ({
56
56
  );
57
57
  };
58
58
 
59
- const SHADOW_COLOR = "#000";
60
59
  const SHADOW_OPACITY = 0.24;
61
60
 
62
- function shadow(elevation: number) {
61
+ function shadow(
62
+ elevation: number
63
+ ): { boxShadow: string } | Record<string, never> {
63
64
  if (elevation === 0) {
64
65
  return {};
65
66
  }
@@ -80,14 +81,7 @@ function shadow(elevation: number) {
80
81
  }
81
82
 
82
83
  return {
83
- shadowColor: SHADOW_COLOR,
84
- shadowOffset: {
85
- width: 0,
86
- height,
87
- },
88
- shadowOpacity: SHADOW_OPACITY,
89
- shadowRadius: radius,
90
- elevation,
84
+ boxShadow: `0px ${height}px ${radius}px rgba(0, 0, 0, ${SHADOW_OPACITY})`,
91
85
  };
92
86
  }
93
87
 
@@ -472,10 +472,10 @@ class TextField extends React.Component<Props, State> {
472
472
  // Position colored placeholder and gray placeholder on top of each other and crossfade them
473
473
  // This gives the effect of animating the color, but allows us to use native driver
474
474
  <View
475
- pointerEvents="none"
476
475
  style={[
477
476
  StyleSheet.absoluteFill,
478
477
  {
478
+ pointerEvents: "none",
479
479
  opacity:
480
480
  // Hide the label in minimized state until we measure its width
481
481
  this.state.value || this.state.focused
@@ -14,11 +14,7 @@ try {
14
14
  const avoidSoftInputPackage = require("react-native-avoid-softinput");
15
15
  AvoidSoftInput = avoidSoftInputPackage.AvoidSoftInput;
16
16
  AvoidSoftInputView = avoidSoftInputPackage.AvoidSoftInputView;
17
- } catch (_) {
18
- console.warn(
19
- "AvoidKeyboardView: `react-native-avoid-softinput` is not installed, falling back to `View`. No keyboard avoiding capabilties will be used."
20
- );
21
- }
17
+ } catch (_) {}
22
18
 
23
19
  /**
24
20
  * Requires additional setup: https://mateusz1913.github.io/react-native-avoid-softinput/docs/guides