@draftbit/core 46.7.9-437259.2 → 46.7.9-900f3a.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.
@@ -26,12 +26,13 @@ const DeckSwiper = _ref => {
26
26
  const cardsFillerData = _react.default.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
27
27
 
28
28
  /**
29
- * By default react-native-deck-swiper positions everything with absolute position
30
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
29
+ * By default react-native-deck-swiper positions everything with absolute position.
30
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
31
31
  *
32
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
33
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
34
- * This effectivley makes the default height of the container be the height of the first card
32
+ *
33
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
34
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
35
+ * This effectivley makes the default height of the container be the height of the first card.
35
36
  */
36
37
 
37
38
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
@@ -14,10 +14,11 @@ const DeckSwiperCard = _ref => {
14
14
  children,
15
15
  theme
16
16
  } = _ref;
17
+ var _a;
17
18
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
18
19
  style: [styles.card, {
19
20
  backgroundColor: theme.colors.background,
20
- borderRadius: theme.borderRadius.global,
21
+ borderRadius: (_a = theme.borderRadius) === null || _a === void 0 ? void 0 : _a.global,
21
22
  borderColor: theme.colors.divider
22
23
  }, style]
23
24
  }, children);
@@ -32,4 +33,5 @@ const styles = _reactNative.StyleSheet.create({
32
33
  }
33
34
  });
34
35
  var _default = (0, _theming.withTheme)(DeckSwiperCard);
36
+ exports.default = _default;(0, _theming.withTheme)(DeckSwiperCard);
35
37
  exports.default = _default;
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -23,9 +23,7 @@ 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
27
26
  handlerPropName: "onPress",
28
- // the change handler prop in this component
29
27
  valuePropName: "rating" // the value prop in this component
30
28
  }),
31
29
 
@@ -50,4 +48,10 @@ const SEED_DATA = {
50
48
  })
51
49
  }
52
50
  };
51
+ exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
52
+ label: "Inactive Color",
53
+ defaultValue: "divider"
54
+ })
55
+ }
56
+ };
53
57
  exports.SEED_DATA = SEED_DATA;
@@ -15,7 +15,6 @@ 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
-
19
18
  // @ts-expect-error: TS doesn't seem to refine the type correctly
20
19
  return elevation.interpolate({
21
20
  inputRange,
@@ -24,7 +23,6 @@ function overlay(elevation) {
24
23
  })
25
24
  });
26
25
  }
27
-
28
26
  // @ts-expect-error: TS doesn't seem to refine the type correctly
29
27
  return calculateColor(surfaceColor, elevation);
30
28
  }
@@ -65,4 +63,4 @@ const elevationOverlayTransparency = {
65
63
  22: 15.72,
66
64
  23: 15.84,
67
65
  24: 16
68
- };
66
+ };};
@@ -19,12 +19,13 @@ const DeckSwiper = _ref => {
19
19
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
20
20
 
21
21
  /**
22
- * By default react-native-deck-swiper positions everything with absolute position
23
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
22
+ * By default react-native-deck-swiper positions everything with absolute position.
23
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
24
24
  *
25
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
26
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
27
- * This effectivley makes the default height of the container be the height of the first card
25
+ *
26
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
27
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
28
+ * This effectivley makes the default height of the container be the height of the first card.
28
29
  */
29
30
 
30
31
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { View, StyleSheet } from "react-native";
3
3
  import { withTheme } from "../../theming";
4
4
  const DeckSwiperCard = _ref => {
5
+ var _theme$borderRadius;
5
6
  let {
6
7
  style,
7
8
  children,
@@ -10,7 +11,7 @@ const DeckSwiperCard = _ref => {
10
11
  return /*#__PURE__*/React.createElement(View, {
11
12
  style: [styles.card, {
12
13
  backgroundColor: theme.colors.background,
13
- borderRadius: theme.borderRadius.global,
14
+ borderRadius: (_theme$borderRadius = theme.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.global,
14
15
  borderColor: theme.colors.divider
15
16
  }, style]
16
17
  }, children);
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet, ActivityIndicator, Pressable, Platform } from "react-native";
3
4
  import { withTheme } from "../theming";
@@ -17,7 +18,7 @@ const IconButton = _ref => {
17
18
  ...props
18
19
  } = _ref;
19
20
  const iconColor = customColor || theme.colors.primary;
20
- return /*#__PURE__*/React.createElement(Pressable, {
21
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
21
22
  onPress: onPress,
22
23
  disabled: disabled || loading,
23
24
  style: _ref2 => {
@@ -31,9 +32,8 @@ const IconButton = _ref => {
31
32
  alignItems: "center",
32
33
  justifyContent: "center"
33
34
  }, style];
34
- },
35
- ...props
36
- }, /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
35
+ }
36
+ }, props), /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
37
37
  name: icon,
38
38
  size: size - 2,
39
39
  color: iconColor
@@ -54,21 +54,4 @@ const styles = StyleSheet.create({
54
54
  })
55
55
  }
56
56
  });
57
- export default withTheme(IconButton);ement(ActivityIndicator, {
58
- size: "small",
59
- color: iconColor
60
- }) : null));
61
- };
62
- const styles = StyleSheet.create({
63
- container: {
64
- alignItems: "center",
65
- justifyContent: "center",
66
- ...Platform.select({
67
- web: {
68
- cursor: "pointer",
69
- userSelect: "none"
70
- }
71
- })
72
- }
73
- });
74
57
  export default withTheme(IconButton);
@@ -1 +1 @@
1
- {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA4DlE,CAAC;AAiBF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../../src/components/DeckSwiper/DeckSwiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,cAAc,CAAC;AAGtE,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA6DlE,CAAC;AAiBF,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.7.9-437259.2+437259f",
3
+ "version": "46.7.9-900f3a.2+900f3a5",
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.9-437259.2+437259f",
44
+ "@draftbit/types": "^46.7.9-900f3a.2+900f3a5",
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",
@@ -92,5 +92,5 @@
92
92
  ]
93
93
  ]
94
94
  },
95
- "gitHead": "437259f8dc889b1b26cadfda9f0a30caa2788d25"
95
+ "gitHead": "900f3a5c593c3da3393acc763e5ad5411f85cd8b"
96
96
  }
@@ -6,12 +6,13 @@ const DeckSwiper = ({ onIndexChanged, onEndReached, startCardIndex = 0, infinite
6
6
  // an array of indices based on children count
7
7
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
8
8
  /**
9
- * By default react-native-deck-swiper positions everything with absolute position
10
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
9
+ * By default react-native-deck-swiper positions everything with absolute position.
10
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
11
11
  *
12
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
13
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
14
- * This effectivley makes the default height of the container be the height of the first card
12
+ *
13
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
14
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
15
+ * This effectivley makes the default height of the container be the height of the first card.
15
16
  */
16
17
  return (React.createElement(View, null,
17
18
  React.createElement(View, { style: styles.containerHeightFiller }, childrenArray.length && childrenArray[0]),
@@ -36,12 +36,13 @@ const DeckSwiper: React.FC<React.PropsWithChildren<DeckSwiperProps>> = ({
36
36
  );
37
37
 
38
38
  /**
39
- * By default react-native-deck-swiper positions everything with absolute position
40
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
39
+ * By default react-native-deck-swiper positions everything with absolute position.
40
+ * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
41
41
  *
42
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
43
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space
44
- * This effectivley makes the default height of the container be the height of the first card
42
+ *
43
+ * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
44
+ * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
45
+ * This effectivley makes the default height of the container be the height of the first card.
45
46
  */
46
47
 
47
48
  return (
@@ -1,15 +1,18 @@
1
1
  import React from "react";
2
2
  import { View, StyleSheet } from "react-native";
3
3
  import { withTheme } from "../../theming";
4
- const DeckSwiperCard = ({ style, children, theme, }) => (React.createElement(View, { style: [
5
- styles.card,
6
- {
7
- backgroundColor: theme.colors.background,
8
- borderRadius: theme.borderRadius.global,
9
- borderColor: theme.colors.divider,
10
- },
11
- style,
12
- ] }, children));
4
+ const DeckSwiperCard = ({ style, children, theme, }) => {
5
+ var _a;
6
+ return (React.createElement(View, { style: [
7
+ styles.card,
8
+ {
9
+ backgroundColor: theme.colors.background,
10
+ borderRadius: (_a = theme.borderRadius) === null || _a === void 0 ? void 0 : _a.global,
11
+ borderColor: theme.colors.divider,
12
+ },
13
+ style,
14
+ ] }, children));
15
+ };
13
16
  const styles = StyleSheet.create({
14
17
  card: {
15
18
  flex: 1,
@@ -19,7 +19,7 @@ const DeckSwiperCard: React.FC<DeckSwiperCardProps> = ({
19
19
  styles.card,
20
20
  {
21
21
  backgroundColor: theme.colors.background,
22
- borderRadius: theme.borderRadius.global,
22
+ borderRadius: theme.borderRadius?.global,
23
23
  borderColor: theme.colors.divider,
24
24
  },
25
25
  style,