@draftbit/core 46.10.3-7db6c9.2 → 46.10.3-84bbff.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.
Files changed (103) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -1
  2. package/lib/commonjs/components/Banner.js +23 -4
  3. package/lib/commonjs/components/BottomSheet/BottomSheet.js +22 -4
  4. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +127 -111
  5. package/lib/commonjs/components/Button.js +33 -10
  6. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -4
  7. package/lib/commonjs/components/Checkbox/context.js +1 -1
  8. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -4
  9. package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
  10. package/lib/commonjs/components/Divider.js +14 -1
  11. package/lib/commonjs/components/FAB.js +18 -4
  12. package/lib/commonjs/components/Layout.js +40 -19
  13. package/lib/commonjs/components/Picker/PickerComponent.ios.js +36 -11
  14. package/lib/commonjs/components/Portal/Portal.js +27 -3
  15. package/lib/commonjs/components/Portal/PortalConsumer.js +22 -7
  16. package/lib/commonjs/components/Pressable.js +15 -2
  17. package/lib/commonjs/components/ScreenContainer.js +24 -6
  18. package/lib/commonjs/components/Shadow.js +15 -2
  19. package/lib/commonjs/components/Slider.js +21 -4
  20. package/lib/commonjs/components/Switch.js +19 -10
  21. package/lib/commonjs/components/TabView/TabView.js +13 -7
  22. package/lib/commonjs/components/Table/Table.js +123 -0
  23. package/lib/commonjs/components/Table/TableCell.js +49 -0
  24. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  25. package/lib/commonjs/components/Table/TableRow.js +60 -0
  26. package/lib/commonjs/components/Table/index.js +27 -0
  27. package/lib/commonjs/components/Text.js +50 -4
  28. package/lib/commonjs/components/TextField.js +76 -28
  29. package/lib/commonjs/components/ToggleButton.js +15 -2
  30. package/lib/commonjs/components/Touchable.js +15 -2
  31. package/lib/commonjs/constants.js +1 -1
  32. package/lib/commonjs/index.js +19 -7
  33. package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
  34. package/lib/commonjs/mappings/NativeBase/Layout.js +2 -11
  35. package/lib/commonjs/mappings/StarRating.js +6 -2
  36. package/lib/commonjs/mappings/Table.js +140 -0
  37. package/lib/commonjs/styles/overlay.js +1 -3
  38. package/lib/module/components/Accordion/AccordionItem.js +25 -4
  39. package/lib/module/components/AnimatedCircularProgress.js +13 -1
  40. package/lib/module/components/AspectRatio.js +18 -1
  41. package/lib/module/components/AvatarEdit.js +15 -4
  42. package/lib/module/components/BottomSheet/BottomSheetComponent.js +124 -111
  43. package/lib/module/components/Checkbox/CheckboxGroup.js +16 -2
  44. package/lib/module/components/DeprecatedButton.js +21 -3
  45. package/lib/module/components/DeprecatedCardWrapper.js +18 -1
  46. package/lib/module/components/Picker/PickerComponent.android.js +21 -3
  47. package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
  48. package/lib/module/components/Portal/PortalHost.js +45 -15
  49. package/lib/module/components/RadioButton/RadioButton.js +13 -1
  50. package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -2
  51. package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
  52. package/lib/module/components/Surface.js +15 -1
  53. package/lib/module/components/TabView/TabView.js +17 -7
  54. package/lib/module/components/Table/Table.js +114 -0
  55. package/lib/module/components/Table/TableCell.js +41 -0
  56. package/lib/module/components/Table/TableCommon.js +21 -0
  57. package/lib/module/components/Table/TableRow.js +53 -0
  58. package/lib/module/components/Table/index.js +3 -0
  59. package/lib/module/components/Touchable.js +15 -2
  60. package/lib/module/constants.js +1 -0
  61. package/lib/module/hooks.js +1 -2
  62. package/lib/module/index.js +1 -1
  63. package/lib/module/mappings/NativeBase/Layout.js +3 -12
  64. package/lib/module/mappings/Table.js +133 -0
  65. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  66. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  67. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  68. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  69. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  70. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  71. package/lib/typescript/src/components/Table/TableRow.d.ts +14 -0
  72. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  73. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  74. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  75. package/lib/typescript/src/index.d.ts +1 -1
  76. package/lib/typescript/src/index.d.ts.map +1 -1
  77. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +4 -27
  78. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
  79. package/lib/typescript/src/mappings/Table.d.ts +337 -0
  80. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  81. package/package.json +3 -3
  82. package/src/components/Table/Table.js +93 -0
  83. package/src/components/Table/Table.tsx +176 -0
  84. package/src/components/Table/TableCell.js +31 -0
  85. package/src/components/Table/TableCell.tsx +63 -0
  86. package/src/components/Table/TableCommon.js +12 -0
  87. package/src/components/Table/TableCommon.ts +40 -0
  88. package/src/components/Table/TableRow.js +37 -0
  89. package/src/components/Table/TableRow.tsx +77 -0
  90. package/src/components/Table/index.js +3 -0
  91. package/src/components/Table/index.tsx +3 -0
  92. package/src/index.js +1 -1
  93. package/src/index.tsx +2 -1
  94. package/src/mappings/NativeBase/Layout.js +9 -11
  95. package/src/mappings/NativeBase/Layout.ts +8 -11
  96. package/src/mappings/Table.js +150 -0
  97. package/src/mappings/Table.ts +170 -0
  98. package/lib/commonjs/components/Container.js +0 -93
  99. package/lib/module/components/Container.js +0 -83
  100. package/lib/typescript/src/components/Container.d.ts +0 -21
  101. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  102. package/src/components/Container.js +0 -43
  103. package/src/components/Container.tsx +0 -116
@@ -10,10 +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
- 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; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- 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); }
17
13
  const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
18
14
  const FOCUS_ANIMATION_DURATION = 150;
19
15
  const BLUR_ANIMATION_DURATION = 180;
@@ -21,7 +17,7 @@ const ICON_SIZE = 24;
21
17
  class TextField extends React.Component {
22
18
  constructor() {
23
19
  super(...arguments);
24
- _defineProperty(this, "state", {
20
+ this.state = {
25
21
  nativeProps: {},
26
22
  labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
27
23
  focused: false,
@@ -30,47 +26,46 @@ class TextField extends React.Component {
30
26
  measured: false,
31
27
  width: 0
32
28
  }
33
- });
34
- _defineProperty(this, "_timer", setTimeout(() => {}, 0));
35
- _defineProperty(this, "_showPlaceholder", () => {
29
+ };
30
+ this._timer = setTimeout(() => {}, 0);
31
+ this._showPlaceholder = () => {
36
32
  clearTimeout(this._timer);
37
-
38
33
  // Set the placeholder in a delay to offset the label animation
39
34
  // If we show it immediately, they'll overlap and look ugly
40
35
  this._timer = setTimeout(() => this.setState({
41
36
  placeholder: this.props.placeholder
42
37
  }), 50);
43
- });
44
- _defineProperty(this, "_hidePlaceholder", () => this.setState({
38
+ };
39
+ this._hidePlaceholder = () => this.setState({
45
40
  placeholder: ""
46
- }));
47
- _defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
41
+ });
42
+ this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
48
43
  toValue: 1,
49
44
  duration: FOCUS_ANIMATION_DURATION,
50
45
  useNativeDriver: true
51
- }).start());
52
- _defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
46
+ }).start();
47
+ this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
53
48
  toValue: 0,
54
49
  duration: BLUR_ANIMATION_DURATION,
55
50
  useNativeDriver: true
56
- }).start());
57
- _defineProperty(this, "_handleFocus", () => {
51
+ }).start();
52
+ this._handleFocus = () => {
58
53
  if (this.props.disabled) {
59
54
  return;
60
55
  }
61
56
  this.setState({
62
57
  focused: true
63
58
  });
64
- });
65
- _defineProperty(this, "_handleBlur", () => {
59
+ };
60
+ this._handleBlur = () => {
66
61
  if (this.props.disabled) {
67
62
  return;
68
63
  }
69
64
  this.setState({
70
65
  focused: false
71
66
  });
72
- });
73
- _defineProperty(this, "_handleChangeText", value => {
67
+ };
68
+ this._handleChangeText = value => {
74
69
  if (this.props.disabled) {
75
70
  return;
76
71
  }
@@ -85,8 +80,8 @@ class TextField extends React.Component {
85
80
  });
86
81
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
87
82
  }
88
- });
89
- _defineProperty(this, "_root", undefined);
83
+ };
84
+ this._root = undefined;
90
85
  }
91
86
  static getDerivedStateFromProps(nextProps, prevState) {
92
87
  return {
@@ -173,7 +168,9 @@ class TextField extends React.Component {
173
168
  roundness,
174
169
  disabledOpacity
175
170
  },
176
- render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
171
+ render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, {
172
+ ...props
173
+ }),
177
174
  ...rest
178
175
  } = this.props;
179
176
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -313,9 +310,10 @@ class TextField extends React.Component {
313
310
  } = _reactNative.StyleSheet.flatten(style || {});
314
311
  return /*#__PURE__*/React.createElement(_reactNative.View, {
315
312
  style: [styles.container, styleProp]
316
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
313
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
314
+ ...leftIconProps,
317
315
  style: leftIconStyle
318
- })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
316
+ }) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
319
317
  style: (0, _utilities.applyStyles)([containerStyle], {
320
318
  height: style === null || style === void 0 ? void 0 : style.height,
321
319
  backgroundColor: bgColor,
@@ -383,9 +381,10 @@ class TextField extends React.Component {
383
381
  style: {
384
382
  justifyContent: type === "solid" ? "center" : undefined
385
383
  }
386
- }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
384
+ }, /*#__PURE__*/React.createElement(Icon, {
385
+ ...leftIconProps,
387
386
  style: leftIconStyle
388
- }))) : null, render({
387
+ })) : null, render({
389
388
  ref: c => {
390
389
  this._root = c;
391
390
  },
@@ -423,6 +422,55 @@ class TextField extends React.Component {
423
422
  }
424
423
  var _default = (0, _theming.withTheme)(TextField);
425
424
  exports.default = _default;
425
+ const styles = _reactNative.StyleSheet.create({
426
+ container: {
427
+ alignSelf: "stretch"
428
+ },
429
+ placeholder: {
430
+ position: "absolute",
431
+ left: 0
432
+ },
433
+ underline: {
434
+ position: "absolute",
435
+ left: 0,
436
+ right: 0,
437
+ bottom: 0,
438
+ height: 2
439
+ },
440
+ input: {
441
+ flexGrow: 1,
442
+ justifyContent: "center",
443
+ textAlignVertical: "center",
444
+ margin: 0,
445
+ textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
446
+ }
447
+ });_handleFocus,
448
+ onBlur: this._handleBlur,
449
+ underlineColorAndroid: "transparent",
450
+ style: inputStyles,
451
+ ...rest,
452
+ ...this.state.nativeProps,
453
+ value: this.state.value
454
+ })), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
455
+ name: rightIconName,
456
+ size: ICON_SIZE,
457
+ color: colors.light,
458
+ style: {
459
+ position: "absolute",
460
+ right: 16,
461
+ marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16
462
+ }
463
+ }) : null, assistiveText ? /*#__PURE__*/React.createElement(_reactNative.Text, {
464
+ style: [{
465
+ color: error ? colors.error : colors.light,
466
+ marginTop: 8,
467
+ marginLeft: assistiveTextLeftMargin
468
+ }]
469
+ }, assistiveText) : null);
470
+ }
471
+ }
472
+ var _default = (0, _theming.withTheme)(TextField);
473
+ exports.default = _default;
426
474
  const styles = _reactNative.StyleSheet.create({
427
475
  container: {
428
476
  alignSelf: "stretch"
@@ -11,7 +11,6 @@ var _IconButton = _interopRequireDefault(require("./IconButton"));
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 ToggleButton = _ref => {
16
15
  let {
17
16
  Icon,
@@ -47,7 +46,7 @@ const ToggleButton = _ref => {
47
46
  setInternalValue(!internalValue);
48
47
  onPress(!internalValue);
49
48
  };
50
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
49
+ return /*#__PURE__*/React.createElement(_IconButton.default, {
51
50
  Icon: Icon,
52
51
  icon: icon,
53
52
  size: iconSize,
@@ -59,6 +58,20 @@ const ToggleButton = _ref => {
59
58
  height,
60
59
  backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
61
60
  borderColor: colors[borderColor]
61
+ }, style],
62
+ ...rest
63
+ });
64
+ };
65
+ const styles = _reactNative.StyleSheet.create({
66
+ mainContainer: {
67
+ borderWidth: 1
68
+ }
69
+ });
70
+ var _default = (0, _theming.withTheme)(ToggleButton);
71
+ exports.default = _default;idth,
72
+ height,
73
+ backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
74
+ borderColor: colors[borderColor]
62
75
  }, style]
63
76
  }, rest));
64
77
  };
@@ -7,7 +7,6 @@ exports.default = Touchable;
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 Touchable(_ref) {
12
11
  let {
13
12
  children,
@@ -20,8 +19,22 @@ function Touchable(_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
  disabled: disabled,
24
+ onPress: onPress,
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
+ } disabled: disabled,
25
38
  onPress: onPress,
26
39
  delayLongPress: delayLongPress ? delayLongPress : 500,
27
40
  hitSlop: hitSlop ? hitSlop : 8,
@@ -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;AR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
@@ -117,12 +117,6 @@ Object.defineProperty(exports, "CircleImage", {
117
117
  return _CircleImage.default;
118
118
  }
119
119
  });
120
- Object.defineProperty(exports, "Container", {
121
- enumerable: true,
122
- get: function () {
123
- return _Container.default;
124
- }
125
- });
126
120
  Object.defineProperty(exports, "DatePicker", {
127
121
  enumerable: true,
128
122
  get: function () {
@@ -351,6 +345,24 @@ Object.defineProperty(exports, "TabViewItem", {
351
345
  return _TabView.TabViewItem;
352
346
  }
353
347
  });
348
+ Object.defineProperty(exports, "Table", {
349
+ enumerable: true,
350
+ get: function () {
351
+ return _Table.Table;
352
+ }
353
+ });
354
+ Object.defineProperty(exports, "TableCell", {
355
+ enumerable: true,
356
+ get: function () {
357
+ return _Table.TableCell;
358
+ }
359
+ });
360
+ Object.defineProperty(exports, "TableRow", {
361
+ enumerable: true,
362
+ get: function () {
363
+ return _Table.TableRow;
364
+ }
365
+ });
354
366
  Object.defineProperty(exports, "TextField", {
355
367
  enumerable: true,
356
368
  get: function () {
@@ -410,7 +422,6 @@ var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
410
422
  var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
411
423
  var _Card = _interopRequireDefault(require("./components/Card"));
412
424
  var _Checkbox = require("./components/Checkbox");
413
- var _Container = _interopRequireDefault(require("./components/Container"));
414
425
  var _Divider = _interopRequireDefault(require("./components/Divider"));
415
426
  var _FAB = _interopRequireDefault(require("./components/FAB"));
416
427
  var _FieldSearchBarFull = _interopRequireDefault(require("./components/FieldSearchBarFull"));
@@ -437,6 +448,7 @@ var _TabView = require("./components/TabView");
437
448
  var _Markdown = _interopRequireDefault(require("./components/Markdown"));
438
449
  var _BottomSheet = require("./components/BottomSheet");
439
450
  var _YoutubePlayer = require("./components/YoutubePlayer");
451
+ var _Table = require("./components/Table");
440
452
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
441
453
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
442
454
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -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;
@@ -22,7 +22,8 @@ const SEED_DATA = [{
22
22
  description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
23
23
  defaultValue: 1.33
24
24
  })
25
- }
25
+ },
26
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects]
26
27
  }, {
27
28
  name: "Box",
28
29
  tag: "Box",
@@ -83,16 +84,6 @@ const SEED_DATA = [{
83
84
  description: "Stack aligns items vertically or horizontally based on the direction prop",
84
85
  ...SHARED_SEED_DATA,
85
86
  props: {
86
- direction: (0, _types.createTextEnumProp)({
87
- label: "Direction",
88
- description: "The direction of the Stack",
89
- options: ["row", "column"],
90
- defaultValue: "column"
91
- }),
92
- reversed: (0, _types.createBoolProp)({
93
- label: "Reversed",
94
- description: "Determines whether to reverse the direction of items"
95
- }),
96
87
  isDisabled: (0, _types.createBoolProp)({
97
88
  label: "Disabled",
98
89
  description: "If true, the Stack will be disabled"
@@ -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;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA_PROPS = {
9
+ borderWidth: (0, _types.createStaticNumberProp)({
10
+ label: "Border Width",
11
+ description: "Specifies the width of the border. Passed down to child Table(Row/Cell) components unless overridden",
12
+ required: false,
13
+ defaultValue: null
14
+ }),
15
+ borderColor: (0, _types.createColorProp)({
16
+ label: "Border Color",
17
+ description: "Specifies the color of the border. Passed down to child Table(Row/Cell) components unless overridden",
18
+ defaultValue: null
19
+ }),
20
+ borderStyle: (0, _types.createTextEnumProp)({
21
+ label: "Border Style",
22
+ description: "Specifies the style of the border. Passed down to child Table(Row/Cell) components unless overridden",
23
+ options: ["solid", "dotted", "dashed"],
24
+ defaultValue: null
25
+ }),
26
+ drawTopBorder: (0, _types.createStaticBoolProp)({
27
+ label: "Draw Top Border",
28
+ description: "Whether to draw the top border at this layer of the Table tree or not",
29
+ defaultValue: false
30
+ }),
31
+ drawBottomBorder: (0, _types.createStaticBoolProp)({
32
+ label: "Draw Bottom Border",
33
+ description: "Whether to draw the bottom border at this layer of the Table tree or not",
34
+ defaultValue: false
35
+ }),
36
+ drawStartBorder: (0, _types.createStaticBoolProp)({
37
+ label: "Draw Start Border",
38
+ description: "Whether to draw the start border at this layer of the Table tree or not",
39
+ defaultValue: false
40
+ }),
41
+ drawEndBorder: (0, _types.createStaticBoolProp)({
42
+ label: "Draw End Border",
43
+ description: "Whether to draw the end border at this layer of the Table tree or not",
44
+ defaultValue: false
45
+ }),
46
+ cellVerticalPadding: (0, _types.createStaticNumberProp)({
47
+ label: "Cell Vertical Padding",
48
+ description: "Specifies the vertical padding of the cell. Passed down to TableCell components unless overridden",
49
+ required: false,
50
+ defaultValue: null
51
+ }),
52
+ cellHorizontalPadding: (0, _types.createStaticNumberProp)({
53
+ label: "Cell Horizontal Padding",
54
+ description: "Specifies the horizontal padding of the cell. Passed down to TableCell components unless overridden",
55
+ required: false,
56
+ defaultValue: null
57
+ })
58
+ };
59
+ const SEED_DATA = [{
60
+ name: "Table",
61
+ tag: "Table",
62
+ description: "Top level table container",
63
+ category: _types.COMPONENT_TYPES.table,
64
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Background, _types.StylesPanelSections.LayoutSelectedItem],
65
+ layout: {
66
+ flex: 1
67
+ },
68
+ props: {
69
+ ...SHARED_SEED_DATA_PROPS,
70
+ borderWidth: {
71
+ ...SHARED_SEED_DATA_PROPS.borderWidth,
72
+ defaultValue: 1
73
+ },
74
+ borderColor: {
75
+ ...SHARED_SEED_DATA_PROPS.borderColor,
76
+ defaultValue: "divider"
77
+ },
78
+ borderStyle: {
79
+ ...SHARED_SEED_DATA_PROPS.borderStyle,
80
+ defaultValue: "solid"
81
+ },
82
+ drawTopBorder: {
83
+ ...SHARED_SEED_DATA_PROPS.drawTopBorder,
84
+ defaultValue: true
85
+ },
86
+ cellVerticalPadding: {
87
+ ...SHARED_SEED_DATA_PROPS.cellVerticalPadding,
88
+ defaultValue: 10
89
+ },
90
+ cellHorizontalPadding: {
91
+ ...SHARED_SEED_DATA_PROPS.cellHorizontalPadding,
92
+ defaultValue: 10
93
+ },
94
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
95
+ label: "Show Vertical Scroll Indicator",
96
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
97
+ defaultValue: true
98
+ })
99
+ }
100
+ }, {
101
+ name: "Table Row",
102
+ tag: "TableRow",
103
+ description: "Table Row container",
104
+ category: _types.COMPONENT_TYPES.table,
105
+ stylesPanelSections: [_types.StylesPanelSections.Background],
106
+ props: {
107
+ ...SHARED_SEED_DATA_PROPS,
108
+ drawStartBorder: {
109
+ ...SHARED_SEED_DATA_PROPS.drawStartBorder,
110
+ defaultValue: true
111
+ },
112
+ drawBottomBorder: {
113
+ ...SHARED_SEED_DATA_PROPS.drawBottomBorder,
114
+ defaultValue: true
115
+ },
116
+ isTableHeader: (0, _types.createStaticBoolProp)({
117
+ label: "Header",
118
+ description: "Whether this row is a header or not (changes background and sticks while scrolling)",
119
+ defaultValue: false
120
+ })
121
+ }
122
+ }, {
123
+ name: "Table Cell",
124
+ tag: "TableCell",
125
+ description: "Table Cell container",
126
+ category: _types.COMPONENT_TYPES.table,
127
+ stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
128
+ layout: {
129
+ flex: 1,
130
+ flexDirection: "row"
131
+ },
132
+ props: {
133
+ ...SHARED_SEED_DATA_PROPS,
134
+ drawEndBorder: {
135
+ ...SHARED_SEED_DATA_PROPS.drawEndBorder,
136
+ defaultValue: true
137
+ }
138
+ }
139
+ }];
140
+ 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
+ };};
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Pressable, StyleSheet, View } from "react-native";
4
3
  import Text from "../Text";
@@ -18,9 +17,10 @@ const AccordionItem = _ref => {
18
17
  textStyles,
19
18
  viewStyles
20
19
  } = extractStyles(style);
21
- return /*#__PURE__*/React.createElement(Pressable, _extends({
22
- style: [styles.container, viewStyles]
23
- }, rest), /*#__PURE__*/React.createElement(View, {
20
+ return /*#__PURE__*/React.createElement(Pressable, {
21
+ style: [styles.container, viewStyles],
22
+ ...rest
23
+ }, /*#__PURE__*/React.createElement(View, {
24
24
  style: styles.row
25
25
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
26
26
  name: icon,
@@ -51,4 +51,25 @@ const styles = StyleSheet.create({
51
51
  justifyContent: "center"
52
52
  }
53
53
  });
54
+ export default withTheme(AccordionItem);xtStyles
55
+ }, label))));
56
+ };
57
+ const styles = StyleSheet.create({
58
+ container: {
59
+ padding: 8
60
+ },
61
+ row: {
62
+ flexDirection: "row",
63
+ alignItems: "center",
64
+ paddingLeft: 8
65
+ },
66
+ item: {
67
+ marginVertical: 6,
68
+ paddingLeft: 8
69
+ },
70
+ content: {
71
+ flex: 1,
72
+ justifyContent: "center"
73
+ }
74
+ });
54
75
  export default withTheme(AccordionItem);
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Animated, Easing } from "react-native";
4
3
  import CircularProgress from "./CircularProgress";
@@ -46,6 +45,19 @@ const AnimatedCircularProgress = _ref => {
46
45
  React.useEffect(() => {
47
46
  animate();
48
47
  }, [fill, animate]);
48
+ return /*#__PURE__*/React.createElement(AnimatedProgress, {
49
+ ...other,
50
+ style: other.style,
51
+ childrenContainerStyle: other.childrenContainerStyle,
52
+ fill: fillAnimation,
53
+ tintColor: animateColor()
54
+ });
55
+ };
56
+ export default AnimatedCircularProgress;imation;
57
+ };
58
+ React.useEffect(() => {
59
+ animate();
60
+ }, [fill, animate]);
49
61
  return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
50
62
  style: other.style,
51
63
  childrenContainerStyle: other.childrenContainerStyle,
@@ -1,4 +1,3 @@
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); }
2
1
  import React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  const AspectRatio = props => {
@@ -27,6 +26,24 @@ const AspectRatio = props => {
27
26
  });
28
27
  }
29
28
  }
29
+ return /*#__PURE__*/React.createElement(View, {
30
+ ...props,
31
+ style: style,
32
+ onLayout: _ref => {
33
+ let {
34
+ nativeEvent: {
35
+ layout: l
36
+ }
37
+ } = _ref;
38
+ return setLayout(l);
39
+ }
40
+ }, props.children);
41
+ };
42
+ export default AspectRatio;idth,
43
+ height: width * (1 / aspectRatio)
44
+ });
45
+ }
46
+ }
30
47
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
31
48
  style: style,
32
49
  onLayout: _ref => {