@draftbit/core 46.10.1-bdc763.2 → 46.10.1

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 (64) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
  2. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  3. package/lib/commonjs/components/Checkbox/context.js +1 -1
  4. package/lib/commonjs/components/CircleImage.js +15 -1
  5. package/lib/commonjs/components/CircularProgress.js +26 -8
  6. package/lib/commonjs/components/Container.js +15 -4
  7. package/lib/commonjs/components/Picker/Picker.js +13 -3
  8. package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -3
  9. package/lib/commonjs/components/Pressable.js +15 -2
  10. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
  11. package/lib/commonjs/components/RadioButton/context.js +1 -1
  12. package/lib/commonjs/components/Slider.js +21 -4
  13. package/lib/commonjs/components/TabView/TabView.js +13 -7
  14. package/lib/commonjs/constants.js +1 -1
  15. package/lib/commonjs/index.js +0 -19
  16. package/lib/commonjs/mappings/StarRating.js +6 -2
  17. package/lib/module/components/DeckSwiper/DeckSwiper.js +0 -3
  18. package/lib/module/components/Picker/Picker.js +13 -3
  19. package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
  20. package/lib/module/index.js +0 -1
  21. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  22. package/lib/typescript/src/index.d.ts +0 -1
  23. package/lib/typescript/src/index.d.ts.map +1 -1
  24. package/package.json +3 -3
  25. package/src/components/Picker/Picker.js +12 -3
  26. package/src/components/Picker/Picker.tsx +12 -3
  27. package/src/index.js +0 -1
  28. package/src/index.tsx +0 -2
  29. package/lib/commonjs/components/Table/Table.js +0 -123
  30. package/lib/commonjs/components/Table/TableCell.js +0 -49
  31. package/lib/commonjs/components/Table/TableCommon.js +0 -30
  32. package/lib/commonjs/components/Table/TableRow.js +0 -61
  33. package/lib/commonjs/components/Table/index.js +0 -27
  34. package/lib/commonjs/mappings/Table.js +0 -140
  35. package/lib/module/components/Table/Table.js +0 -114
  36. package/lib/module/components/Table/TableCell.js +0 -41
  37. package/lib/module/components/Table/TableCommon.js +0 -21
  38. package/lib/module/components/Table/TableRow.js +0 -53
  39. package/lib/module/components/Table/index.js +0 -3
  40. package/lib/module/mappings/Table.js +0 -133
  41. package/lib/typescript/src/components/Table/Table.d.ts +0 -19
  42. package/lib/typescript/src/components/Table/Table.d.ts.map +0 -1
  43. package/lib/typescript/src/components/Table/TableCell.d.ts +0 -9
  44. package/lib/typescript/src/components/Table/TableCell.d.ts.map +0 -1
  45. package/lib/typescript/src/components/Table/TableCommon.d.ts +0 -20
  46. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +0 -1
  47. package/lib/typescript/src/components/Table/TableRow.d.ts +0 -14
  48. package/lib/typescript/src/components/Table/TableRow.d.ts.map +0 -1
  49. package/lib/typescript/src/components/Table/index.d.ts +0 -4
  50. package/lib/typescript/src/components/Table/index.d.ts.map +0 -1
  51. package/lib/typescript/src/mappings/Table.d.ts +0 -337
  52. package/lib/typescript/src/mappings/Table.d.ts.map +0 -1
  53. package/src/components/Table/Table.js +0 -93
  54. package/src/components/Table/Table.tsx +0 -176
  55. package/src/components/Table/TableCell.js +0 -31
  56. package/src/components/Table/TableCell.tsx +0 -63
  57. package/src/components/Table/TableCommon.js +0 -12
  58. package/src/components/Table/TableCommon.ts +0 -40
  59. package/src/components/Table/TableRow.js +0 -37
  60. package/src/components/Table/TableRow.tsx +0 -77
  61. package/src/components/Table/index.js +0 -3
  62. package/src/components/Table/index.tsx +0 -3
  63. package/src/mappings/Table.js +0 -150
  64. package/src/mappings/Table.ts +0 -170
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _context = require("./context");
10
10
  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); }
11
11
  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; }
12
- 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); }
13
12
  const {
14
13
  Provider
15
14
  } = _context.checkboxGroupContext;
@@ -31,7 +30,23 @@ const CheckboxGroup = _ref => {
31
30
  alignItems: "center"
32
31
  });
33
32
  }
34
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
33
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
34
+ style: [{
35
+ minHeight: 40
36
+ }, style],
37
+ ...rest
38
+ }, /*#__PURE__*/React.createElement(Provider, {
39
+ value: {
40
+ values,
41
+ onValueChange,
42
+ direction
43
+ }
44
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
45
+ style: _containerStyle
46
+ }, children)));
47
+ };
48
+ var _default = CheckboxGroup;
49
+ exports.default = _default;s({
35
50
  style: [{
36
51
  minHeight: 40
37
52
  }, style]
@@ -14,7 +14,8 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- var Direction;
17
+ 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); }
18
+ let Direction;
18
19
  exports.Direction = Direction;
19
20
  (function (Direction) {
20
21
  Direction["Row"] = "row";
@@ -57,6 +58,7 @@ const CheckboxRow = _ref => {
57
58
  setInternalValue(status);
58
59
  }
59
60
  }, [status]);
61
+
60
62
  // This special logic is to handle weird APIs like Airtable that return
61
63
  // true or undefined for a boolean
62
64
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -80,14 +82,13 @@ const CheckboxRow = _ref => {
80
82
  textStyles,
81
83
  viewStyles
82
84
  } = (0, _utilities.extractStyles)(style);
83
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
85
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
84
86
  onPress: handlePress,
85
87
  style: [viewStyles, styles.mainParent, {
86
88
  flexDirection: direction
87
89
  }],
88
- disabled: disabled,
89
- ...rest
90
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
90
+ disabled: disabled
91
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
91
92
  style: [styles.label, {
92
93
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
93
94
  }, labelContainerStyle]
@@ -124,22 +125,4 @@ const styles = _reactNative.StyleSheet.create({
124
125
  }
125
126
  });
126
127
  var _default = CheckboxRow;
127
- exports.default = _default;ems: "center",
128
- justifyContent: "space-around",
129
- paddingStart: 20,
130
- minHeight: 50,
131
- paddingEnd: 20,
132
- display: "flex",
133
- ..._reactNative.Platform.select({
134
- web: {
135
- cursor: "pointer",
136
- userSelect: "none"
137
- }
138
- })
139
- },
140
- label: {
141
- flex: 3
142
- }
143
- });
144
- var _default = CheckboxRow;
145
128
  exports.default = _default;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.checkboxGroupContext = exports.Direction = void 0;
7
7
  exports.useCheckboxGroupContext = useCheckboxGroupContext;
8
8
  var _react = require("react");
9
- var Direction;
9
+ let Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -10,7 +10,6 @@ var _Config = _interopRequireDefault(require("./Config"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  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); }
12
12
  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; }
13
- 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
13
  const CircleImage = _ref => {
15
14
  let {
16
15
  source = _Config.default.placeholderImageURL,
@@ -19,6 +18,21 @@ const CircleImage = _ref => {
19
18
  ...props
20
19
  } = _ref;
21
20
  const borderRadius = size / 2;
21
+ return /*#__PURE__*/React.createElement(_reactNative.Image, {
22
+ style: [{
23
+ width: size,
24
+ height: size,
25
+ borderRadius
26
+ }, style],
27
+ source: typeof source === "string" ? {
28
+ uri: source
29
+ } : source,
30
+ resizeMode: "cover",
31
+ ...props
32
+ });
33
+ };
34
+ var _default = CircleImage;
35
+ exports.default = _default;size / 2;
22
36
  return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
23
37
  style: [{
24
38
  width: size,
@@ -8,27 +8,24 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _reactNativeSvg = require("react-native-svg");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
11
  class CircularProgress extends _react.default.Component {
15
12
  constructor() {
16
13
  super(...arguments);
17
- _defineProperty(this, "polarToCartesian", (centerX, centerY, radius, angleInDegrees) => {
14
+ this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
18
15
  var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
19
16
  return {
20
17
  x: centerX + radius * Math.cos(angleInRadians),
21
18
  y: centerY + radius * Math.sin(angleInRadians)
22
19
  };
23
- });
24
- _defineProperty(this, "circlePath", (x, y, radius, startAngle, endAngle) => {
20
+ };
21
+ this.circlePath = (x, y, radius, startAngle, endAngle) => {
25
22
  var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
26
23
  var end = this.polarToCartesian(x, y, radius, startAngle);
27
24
  var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
28
25
  var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
29
26
  return d.join(" ");
30
- });
31
- _defineProperty(this, "clampFill", fill => Math.min(100, Math.max(0, fill)));
27
+ };
28
+ this.clampFill = fill => Math.min(100, Math.max(0, fill));
32
29
  }
33
30
  render() {
34
31
  const {
@@ -109,4 +106,25 @@ class CircularProgress extends _react.default.Component {
109
106
  }
110
107
  }
111
108
  var _default = CircularProgress;
109
+ exports.default = _default;padding) / 2
110
+ }, backgroundColor && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
111
+ d: backgroundPath,
112
+ stroke: backgroundColor,
113
+ strokeWidth: backgroundWidth || width,
114
+ strokeLinecap: lineCap,
115
+ strokeDasharray: strokeDasharrayBackground,
116
+ fill: "transparent"
117
+ }), fill > 0 && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
118
+ d: circlePathItem,
119
+ stroke: tintColor,
120
+ strokeWidth: width,
121
+ strokeLinecap: lineCap,
122
+ strokeDasharray: strokeDasharrayTint,
123
+ fill: "transparent"
124
+ }), cap)), children && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
125
+ style: localChildrenContainerStyle
126
+ }, children(fill)));
127
+ }
128
+ }
129
+ var _default = CircularProgress;
112
130
  exports.default = _default;
@@ -11,7 +11,6 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
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); }
15
14
  const Container = _ref => {
16
15
  let {
17
16
  useThemeGutterPadding,
@@ -73,9 +72,10 @@ const Container = _ref => {
73
72
  };
74
73
  const Wrap = elevation ? _Elevation.default : _reactNative.View;
75
74
  if (elevation) containerStyle.elevation = elevation;
76
- return /*#__PURE__*/React.createElement(Wrap, _extends({
77
- style: [containerStyle, style]
78
- }, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
75
+ return /*#__PURE__*/React.createElement(Wrap, {
76
+ style: [containerStyle, style],
77
+ ...rest
78
+ }, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
79
79
  source: typeof backgroundImage === "string" ? {
80
80
  uri: backgroundImage
81
81
  } : backgroundImage,
@@ -90,4 +90,15 @@ const Container = _ref => {
90
90
  }, children));
91
91
  };
92
92
  var _default = (0, _theming.withTheme)(Container);
93
+ exports.default = _default;sizeMode: backgroundImageResizeMode,
94
+ style: {
95
+ flex: 1
96
+ }
97
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
98
+ style: innerStyle
99
+ }, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
100
+ style: innerStyle
101
+ }, children));
102
+ };
103
+ var _default = (0, _theming.withTheme)(Container);
93
104
  exports.default = _default;
@@ -58,7 +58,7 @@ const Picker = _ref => {
58
58
  defaultValue,
59
59
  Icon,
60
60
  style,
61
- placeholder,
61
+ placeholder = "Select an option",
62
62
  value,
63
63
  disabled = false,
64
64
  assistiveText,
@@ -99,7 +99,14 @@ const Picker = _ref => {
99
99
  _reactNative.Keyboard.dismiss();
100
100
  }
101
101
  }, [pickerVisible, autoDismissKeyboard]);
102
- const pickerOptions = normalizeOptions(options);
102
+ const normalizedOptions = normalizeOptions(options);
103
+
104
+ //Underlying Picker component defaults selection to first element when value is not provided (or undefined)
105
+ //Placholder must be the 1st option in order to allow selection of the 'actual' 1st option
106
+ const pickerOptions = placeholder ? [{
107
+ label: placeholder,
108
+ value: placeholder
109
+ }, ...normalizedOptions] : normalizedOptions;
103
110
  const {
104
111
  viewStyles,
105
112
  textStyles
@@ -199,9 +206,12 @@ const Picker = _ref => {
199
206
  } : {})
200
207
  };
201
208
  const handleValueChange = (newValue, itemIndex) => {
202
- if (newValue !== "") {
209
+ if (newValue !== "" && newValue !== placeholder) {
203
210
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(newValue, itemIndex);
204
211
  setInternalValue(newValue);
212
+ } else if (newValue === placeholder) {
213
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange("", 0);
214
+ setInternalValue(undefined);
205
215
  }
206
216
  };
207
217
  return (
@@ -15,9 +15,7 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
18
- 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); }
19
18
  const Picker = _ref => {
20
- var _options$find$label, _options$find;
21
19
  let {
22
20
  style,
23
21
  options,
@@ -27,6 +25,7 @@ const Picker = _ref => {
27
25
  onValueChange: onValueChangeOverride = () => {},
28
26
  ...props
29
27
  } = _ref;
28
+ var _a, _b;
30
29
  const {
31
30
  viewStyles: {
32
31
  borderRadius,
@@ -71,7 +70,7 @@ const Picker = _ref => {
71
70
  };
72
71
 
73
72
  const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
74
- const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
73
+ const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
75
74
  return /*#__PURE__*/React.createElement(_Touchable.default, {
76
75
  disabled: disabled,
77
76
  onPress: toggleFocus,
@@ -95,6 +94,24 @@ const Picker = _ref => {
95
94
  key: o.value
96
95
  }))), /*#__PURE__*/React.createElement(_reactNative.View, {
97
96
  pointerEvents: "none"
97
+ }, /*#__PURE__*/React.createElement(_TextField.default, {
98
+ ...props,
99
+ value: selectedLabel,
100
+ placeholder: placeholder,
101
+ // @ts-ignore
102
+ ref: textField,
103
+ disabled: disabled,
104
+ // @ts-expect-error
105
+ style: stylesWithoutMargin
106
+ }))));
107
+ };
108
+ const styles = _reactNative.StyleSheet.create({
109
+ container: {
110
+ alignSelf: "stretch"
111
+ }
112
+ });
113
+ var _default = (0, _theming.withTheme)(Picker);
114
+ exports.default = _default;pointerEvents: "none"
98
115
  }, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
99
116
  value: selectedLabel,
100
117
  placeholder: placeholder
@@ -7,7 +7,6 @@ exports.default = Pressable;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- 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); }
11
10
  function Pressable(_ref) {
12
11
  let {
13
12
  children,
@@ -20,8 +19,22 @@ function Pressable(_ref) {
20
19
  style,
21
20
  ...props
22
21
  } = _ref;
23
- return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, _extends({
22
+ return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
24
23
  onPress: onPress,
24
+ disabled: disabled,
25
+ delayLongPress: delayLongPress ? delayLongPress : 500,
26
+ hitSlop: hitSlop ? hitSlop : 8,
27
+ style: _ref2 => {
28
+ let {
29
+ pressed
30
+ } = _ref2;
31
+ return [{
32
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
33
+ }, style];
34
+ },
35
+ ...props
36
+ }, children);
37
+ } onPress: onPress,
25
38
  disabled: disabled,
26
39
  delayLongPress: delayLongPress ? delayLongPress : 500,
27
40
  hitSlop: hitSlop ? hitSlop : 8,
@@ -14,8 +14,7 @@ var _utilities = require("../../utilities");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- 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); }
18
- let Direction;
17
+ var Direction;
19
18
  exports.Direction = Direction;
20
19
  (function (Direction) {
21
20
  Direction["Row"] = "row";
@@ -72,13 +71,14 @@ const RadioButtonRow = _ref => {
72
71
  textStyles,
73
72
  viewStyles
74
73
  } = (0, _utilities.extractStyles)(style);
75
- return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
74
+ return /*#__PURE__*/React.createElement(_Touchable.default, {
76
75
  onPress: handlePress,
77
76
  style: [styles.mainParent, {
78
77
  flexDirection: direction
79
78
  }, viewStyles],
80
- disabled: disabled
81
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
79
+ disabled: disabled,
80
+ ...rest
81
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
82
82
  style: [styles.label, {
83
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
84
  }, labelContainerStyle]
@@ -116,4 +116,22 @@ const styles = _reactNative.StyleSheet.create({
116
116
  }
117
117
  });
118
118
  var _default = RadioButtonRow;
119
+ exports.default = _default; "center",
120
+ justifyContent: "space-around",
121
+ paddingStart: 20,
122
+ minHeight: 50,
123
+ paddingEnd: 20,
124
+ display: "flex",
125
+ ..._reactNative.Platform.select({
126
+ web: {
127
+ cursor: "pointer",
128
+ userSelect: "none"
129
+ }
130
+ })
131
+ },
132
+ label: {
133
+ flex: 3
134
+ }
135
+ });
136
+ var _default = RadioButtonRow;
119
137
  exports.default = _default;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.radioButtonGroupContext = exports.Direction = void 0;
7
7
  exports.useRadioButtonGroupContext = useRadioButtonGroupContext;
8
8
  var _react = require("react");
9
- let Direction;
9
+ var Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -13,7 +13,6 @@ var _theming = require("../theming");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  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); }
15
15
  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; }
16
- 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); }
17
16
  function maybeParseValue(value) {
18
17
  if (value === undefined) {
19
18
  return undefined;
@@ -73,9 +72,10 @@ function Slider(_ref) {
73
72
  setInternalValue(newValue);
74
73
  onValueChange(newValue);
75
74
  };
76
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
77
- style: [styles.container, style]
78
- }, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
75
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
76
+ style: [styles.container, style],
77
+ ...rest
78
+ }, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
79
79
  color: leftIconThemeColor,
80
80
  name: leftIcon,
81
81
  size: 24
@@ -108,4 +108,21 @@ const styles = _reactNative.StyleSheet.create({
108
108
  }
109
109
  });
110
110
  var _default = (0, _theming.withTheme)(Slider);
111
+ exports.default = _default;or: rightIconThemeColor,
112
+ name: rightIcon,
113
+ size: 24
114
+ }) : null);
115
+ }
116
+ const styles = _reactNative.StyleSheet.create({
117
+ container: {
118
+ height: 40,
119
+ flexDirection: "row",
120
+ alignItems: "center"
121
+ },
122
+ slider: {
123
+ flex: 1,
124
+ marginHorizontal: 12
125
+ }
126
+ });
127
+ var _default = (0, _theming.withTheme)(Slider);
111
128
  exports.default = _default;
@@ -10,7 +10,6 @@ var _theming = require("../../theming");
10
10
  var _utilities = require("../../utilities");
11
11
  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); }
12
12
  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; }
13
- 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
13
  const TabViewComponent = _ref => {
15
14
  let {
16
15
  Icon,
@@ -36,13 +35,11 @@ const TabViewComponent = _ref => {
36
35
  textStyles,
37
36
  viewStyles
38
37
  } = (0, _utilities.extractStyles)(style);
39
-
40
38
  //Check type of child using props
41
39
  //Regular '.type' cannot work because Draftbit strips the type in Draft view
42
40
  const instanceOfTabViewItemProps = object => {
43
41
  return "title" in object;
44
42
  };
45
-
46
43
  //Populate routes and scenes based on children
47
44
  React.useEffect(() => {
48
45
  const newRoutes = [];
@@ -68,7 +65,8 @@ const TabViewComponent = _ref => {
68
65
  }
69
66
  };
70
67
  const renderTabBar = props => {
71
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
68
+ return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, {
69
+ ...props,
72
70
  activeColor: activeColor || theme.colors.primary,
73
71
  inactiveColor: inactiveColor || theme.colors.divider,
74
72
  pressColor: pressColor || theme.colors.primary,
@@ -82,7 +80,7 @@ const TabViewComponent = _ref => {
82
80
  route,
83
81
  color
84
82
  } = _ref2;
85
- return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
83
+ return (route === null || route === void 0 ? void 0 : route.icon) ? /*#__PURE__*/React.createElement(Icon, {
86
84
  name: route.icon,
87
85
  color: color,
88
86
  size: 16
@@ -91,9 +89,8 @@ const TabViewComponent = _ref => {
91
89
  style: {
92
90
  backgroundColor: tabsBackgroundColor || theme.colors.background
93
91
  }
94
- }));
92
+ });
95
93
  };
96
-
97
94
  //Cannot render TabView without at least one tab
98
95
  if (!routes.length) {
99
96
  return /*#__PURE__*/React.createElement(React.Fragment, null);
@@ -113,4 +110,13 @@ const TabViewComponent = _ref => {
113
110
  });
114
111
  };
115
112
  var _default = (0, _theming.withTheme)(TabViewComponent);
113
+ exports.default = _default; renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
114
+ renderTabBar: renderTabBar,
115
+ onIndexChange: indexChangeHandler,
116
+ tabBarPosition: tabBarPosition,
117
+ keyboardDismissMode: keyboardDismissMode,
118
+ swipeEnabled: swipeEnabled
119
+ });
120
+ };
121
+ var _default = (0, _theming.withTheme)(TabViewComponent);
116
122
  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;
@@ -369,24 +369,6 @@ Object.defineProperty(exports, "TabViewItem", {
369
369
  return _TabView.TabViewItem;
370
370
  }
371
371
  });
372
- Object.defineProperty(exports, "Table", {
373
- enumerable: true,
374
- get: function () {
375
- return _Table.Table;
376
- }
377
- });
378
- Object.defineProperty(exports, "TableCell", {
379
- enumerable: true,
380
- get: function () {
381
- return _Table.TableCell;
382
- }
383
- });
384
- Object.defineProperty(exports, "TableRow", {
385
- enumerable: true,
386
- get: function () {
387
- return _Table.TableRow;
388
- }
389
- });
390
372
  Object.defineProperty(exports, "TextField", {
391
373
  enumerable: true,
392
374
  get: function () {
@@ -473,7 +455,6 @@ var _TabView = require("./components/TabView");
473
455
  var _Markdown = _interopRequireDefault(require("./components/Markdown"));
474
456
  var _BottomSheet = require("./components/BottomSheet");
475
457
  var _YotubePlayer = _interopRequireDefault(require("./components/YotubePlayer"));
476
- var _Table = require("./components/Table");
477
458
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
478
459
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
479
460
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -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;
@@ -24,7 +24,6 @@ const DeckSwiper = _ref => {
24
24
  console.warn("'children' of DeckSwiper ignored due to usage of 'data' and 'renderItem'");
25
25
  }
26
26
  const childrenArray = React.useMemo(() => React.Children.toArray(children), [children]);
27
-
28
27
  // an array of indices based on children count
29
28
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
30
29
  const cardsData = data || cardsFillerData;
@@ -51,7 +50,6 @@ const DeckSwiper = _ref => {
51
50
  return card === null || card === void 0 ? void 0 : card.toString();
52
51
  }
53
52
  };
54
-
55
53
  /**
56
54
  * By default react-native-deck-swiper positions everything with absolute position.
57
55
  * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
@@ -61,7 +59,6 @@ const DeckSwiper = _ref => {
61
59
  * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
62
60
  * This effectivley makes the default height of the container be the height of the first card.
63
61
  */
64
-
65
62
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
66
63
  style: styles.containerHeightFiller
67
64
  }, renderFirstCard()), /*#__PURE__*/React.createElement(DeckSwiperComponent, {