@draftbit/core 46.11.3-b43cd6.2 → 46.12.1-07ad46.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 (100) hide show
  1. package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
  2. package/lib/commonjs/components/AspectRatio.js +16 -2
  3. package/lib/commonjs/components/AspectRatio.js.map +1 -1
  4. package/lib/commonjs/components/AvatarEdit.js +15 -4
  5. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  6. package/lib/commonjs/components/Banner.js +23 -4
  7. package/lib/commonjs/components/Banner.js.map +1 -1
  8. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +120 -73
  9. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +1 -1
  10. package/lib/commonjs/components/Button.js +32 -10
  11. package/lib/commonjs/components/Button.js.map +1 -1
  12. package/lib/commonjs/components/Card.js.map +1 -1
  13. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +16 -3
  14. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  15. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  16. package/lib/commonjs/components/Container.js +15 -4
  17. package/lib/commonjs/components/Container.js.map +1 -1
  18. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  19. package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
  20. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
  21. package/lib/commonjs/components/DeckSwiper/index.js.map +1 -1
  22. package/lib/commonjs/components/Divider.js +12 -1
  23. package/lib/commonjs/components/Divider.js.map +1 -1
  24. package/lib/commonjs/components/Elevation.js +13 -2
  25. package/lib/commonjs/components/Elevation.js.map +1 -1
  26. package/lib/commonjs/components/FAB.js +19 -4
  27. package/lib/commonjs/components/FAB.js.map +1 -1
  28. package/lib/commonjs/components/FieldSearchBarFull.js +1 -2
  29. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  30. package/lib/commonjs/components/FormRow.js +17 -3
  31. package/lib/commonjs/components/FormRow.js.map +1 -1
  32. package/lib/commonjs/components/Image.js +16 -2
  33. package/lib/commonjs/components/Image.js.map +1 -1
  34. package/lib/commonjs/components/Justification.js +2 -1
  35. package/lib/commonjs/components/Justification.js.map +1 -1
  36. package/lib/commonjs/components/Layout.js +39 -19
  37. package/lib/commonjs/components/Layout.js.map +1 -1
  38. package/lib/commonjs/components/Markdown.js.map +1 -1
  39. package/lib/commonjs/components/NumberInput.js +11 -3
  40. package/lib/commonjs/components/NumberInput.js.map +1 -1
  41. package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -1
  42. package/lib/commonjs/components/Portal/PortalConsumer.js +1 -2
  43. package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
  44. package/lib/commonjs/components/Portal/PortalHost.js +43 -14
  45. package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
  46. package/lib/commonjs/components/Portal/PortalManager.js +34 -8
  47. package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
  48. package/lib/commonjs/components/Pressable.js +15 -2
  49. package/lib/commonjs/components/Pressable.js.map +1 -1
  50. package/lib/commonjs/components/ProgressBar.js +36 -7
  51. package/lib/commonjs/components/ProgressBar.js.map +1 -1
  52. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  53. package/lib/commonjs/components/RadioButton/RadioButton.js +14 -2
  54. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  55. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +10 -1
  56. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  57. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -4
  58. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
  59. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
  60. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  61. package/lib/commonjs/components/ResizeMode.js +2 -1
  62. package/lib/commonjs/components/ResizeMode.js.map +1 -1
  63. package/lib/commonjs/components/Row.js.map +1 -1
  64. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  65. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  66. package/lib/commonjs/components/SVG.js.map +1 -1
  67. package/lib/commonjs/components/ScreenContainer.js +23 -6
  68. package/lib/commonjs/components/ScreenContainer.js.map +1 -1
  69. package/lib/commonjs/components/Slider.js +21 -4
  70. package/lib/commonjs/components/Slider.js.map +1 -1
  71. package/lib/commonjs/components/StarRating.js +22 -4
  72. package/lib/commonjs/components/StarRating.js.map +1 -1
  73. package/lib/commonjs/components/StepIndicator.js +57 -18
  74. package/lib/commonjs/components/StepIndicator.js.map +1 -1
  75. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  76. package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
  77. package/lib/commonjs/components/Switch.js +19 -10
  78. package/lib/commonjs/components/Switch.js.map +1 -1
  79. package/lib/commonjs/components/TabView/TabView.js +14 -7
  80. package/lib/commonjs/components/TabView/TabView.js.map +1 -1
  81. package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -1
  82. package/lib/commonjs/components/Table/Table.js +6 -5
  83. package/lib/commonjs/components/Table/Table.js.map +1 -1
  84. package/lib/commonjs/components/Table/TableCommon.js.map +1 -1
  85. package/lib/commonjs/components/Table/TableRow.js +1 -2
  86. package/lib/commonjs/components/Table/TableRow.js.map +1 -1
  87. package/lib/commonjs/components/Text.js +50 -4
  88. package/lib/commonjs/components/Text.js.map +1 -1
  89. package/lib/commonjs/components/TextField.js +76 -28
  90. package/lib/commonjs/components/TextField.js.map +1 -1
  91. package/lib/commonjs/components/ToggleButton.js +14 -2
  92. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  93. package/lib/commonjs/components/Touchable.js +15 -2
  94. package/lib/commonjs/components/Touchable.js.map +1 -1
  95. package/lib/commonjs/components/Touchable.web.js.map +1 -1
  96. package/lib/commonjs/components/Typography.js.map +1 -1
  97. package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.native.js.map +1 -1
  98. package/lib/commonjs/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
  99. package/lib/commonjs/components/useAuthState.js.map +1 -1
  100. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/ActionSheet/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmE"}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/ActionSheet/index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmE"}
@@ -7,7 +7,6 @@ exports.default = void 0;
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
  const AspectRatio = props => {
12
11
  const [layout, setLayout] = _react.default.useState(null);
13
12
  const {
@@ -34,7 +33,22 @@ const AspectRatio = props => {
34
33
  });
35
34
  }
36
35
  }
37
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, props, {
36
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
37
+ ...props,
38
+ style: style,
39
+ onLayout: _ref => {
40
+ let {
41
+ nativeEvent: {
42
+ layout: l
43
+ }
44
+ } = _ref;
45
+ return setLayout(l);
46
+ }
47
+ }, props.children);
48
+ };
49
+ var _default = AspectRatio;
50
+ exports.default = _default;
51
+ //# sourceMappingURL=AspectRatio.js.map_react.default.createElement(_reactNative.View, _extends({}, props, {
38
52
  style: style,
39
53
  onLayout: _ref => {
40
54
  let {
@@ -1 +1 @@
1
- {"version":3,"names":["AspectRatio","props","layout","setLayout","React","useState","aspectRatio","inputStyle","StyleSheet","flatten","style","width","height","push","nativeEvent","l","children"],"sourceRoot":"../../../src","sources":["components/AspectRatio.tsx"],"mappings":";;;;;;AAAA;AACA;AAMsB;AAAA;AAOtB,MAAMA,WAAqD,GAAIC,KAAK,IAAK;EACvE,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAyB,IAAI,CAAC;EACxE,MAAM;IAAEC,WAAW,GAAG,CAAC;IAAE,GAAGC;EAAW,CAAC,GACtCC,uBAAU,CAACC,OAAO,CAACR,KAAK,CAACS,KAAK,CAAC,IAAI,CAAC,CAAC;EACvC,MAAMA,KAAK,GAAG,CAACH,UAAU,EAAE;IAAED;EAAY,CAAC,CAAC;EAE3C,IAAIJ,MAAM,EAAE;IACV,MAAM;MAAES,KAAK,GAAG,CAAC;MAAEC,MAAM,GAAG;IAAE,CAAC,GAAGV,MAAM;IACxC,IAAIS,KAAK,KAAK,CAAC,EAAE;MACfD,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK,EAAEC,MAAM,IAAI,CAAC,GAAGN,WAAW,CAAC;QAAEM;MAAO,CAAC,CAAC;IAC3D,CAAC,MAAM;MACLF,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK;QAAEC,MAAM,EAAED,KAAK,IAAI,CAAC,GAAGL,WAAW;MAAE,CAAC,CAAC;IAC1D;EACF;EACA,oBACE,6BAAC,iBAAI,eACCL,KAAK;IACT,KAAK,EAAES,KAAM;IACb,QAAQ,EAAE;MAAA,IAAC;QAAEI,WAAW,EAAE;UAAEZ,MAAM,EAAEa;QAAE;MAAE,CAAC;MAAA,OAAKZ,SAAS,CAACY,CAAC,CAAC;IAAA;EAAC,IAE1Dd,KAAK,CAACe,QAAQ,CACV;AAEX,CAAC;AAAC,eAEahB,WAAW;AAAA"}
1
+ {"version":3,"names":["AspectRatio","props","layout","setLayout","React","useState","aspectRatio","inputStyle","StyleSheet","flatten","style","width","height","push","createElement","View","onLayout","nativeEvent","l","children"],"sourceRoot":"../../../src","sources":["components/AspectRatio.js"],"mappings":";;;;;;AAAA;AACA;AAAiD;AACjD,MAAMA,WAAW,GAAIC,KAAK,IAAK;EAC3B,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,IAAI,CAAC;EAChD,MAAM;IAAEC,WAAW,GAAG,CAAC;IAAE,GAAGC;EAAW,CAAC,GAAGC,uBAAU,CAACC,OAAO,CAACR,KAAK,CAACS,KAAK,CAAC,IAAI,CAAC,CAAC;EAChF,MAAMA,KAAK,GAAG,CAACH,UAAU,EAAE;IAAED;EAAY,CAAC,CAAC;EAC3C,IAAIJ,MAAM,EAAE;IACR,MAAM;MAAES,KAAK,GAAG,CAAC;MAAEC,MAAM,GAAG;IAAE,CAAC,GAAGV,MAAM;IACxC,IAAIS,KAAK,KAAK,CAAC,EAAE;MACbD,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK,EAAEC,MAAM,IAAI,CAAC,GAAGN,WAAW,CAAC;QAAEM;MAAO,CAAC,CAAC;IAC7D,CAAC,MACI;MACDF,KAAK,CAACG,IAAI,CAAC;QAAEF,KAAK;QAAEC,MAAM,EAAED,KAAK,IAAI,CAAC,GAAGL,WAAW;MAAE,CAAC,CAAC;IAC5D;EACJ;EACA,oBAAQF,cAAK,CAACU,aAAa,CAACC,iBAAI,EAAE;IAAE,GAAGd,KAAK;IAAES,KAAK,EAAEA,KAAK;IAAEM,QAAQ,EAAE;MAAA,IAAC;QAAEC,WAAW,EAAE;UAAEf,MAAM,EAAEgB;QAAE;MAAE,CAAC;MAAA,OAAKf,SAAS,CAACe,CAAC,CAAC;IAAA;EAAC,CAAC,EAAEjB,KAAK,CAACkB,QAAQ,CAAC;AAC7I,CAAC;AAAC,eACanB,WAAW;AAAA"}
@@ -12,7 +12,6 @@ var _theming = require("../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  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); }
14
14
  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; }
15
- 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); }
16
15
  const AvatarEdit = _ref => {
17
16
  let {
18
17
  Icon,
@@ -32,9 +31,10 @@ const AvatarEdit = _ref => {
32
31
  width: size,
33
32
  height: size
34
33
  };
35
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
36
- style: [style, dimensions]
37
- }, rest), /*#__PURE__*/React.createElement(_Touchable.default, {
34
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
35
+ style: [style, dimensions],
36
+ ...rest
37
+ }, /*#__PURE__*/React.createElement(_Touchable.default, {
38
38
  onPress: onPress
39
39
  }, /*#__PURE__*/React.createElement(_CircleImage.default, {
40
40
  source: image,
@@ -57,4 +57,15 @@ const AvatarEdit = _ref => {
57
57
  };
58
58
  var _default = (0, _theming.withTheme)(AvatarEdit);
59
59
  exports.default = _default;
60
+ //# sourceMappingURL=AvatarEdit.js.map borderRadius: size * (3 / 16),
61
+ padding: size * (3 / 32)
62
+ }
63
+ }, /*#__PURE__*/React.createElement(Icon, {
64
+ name: "MaterialIcons/edit",
65
+ color: colorStyles.editIconColor,
66
+ size: size * (3 / 16)
67
+ }))));
68
+ };
69
+ var _default = (0, _theming.withTheme)(AvatarEdit);
70
+ exports.default = _default;
60
71
  //# sourceMappingURL=AvatarEdit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding","withTheme"],"sourceRoot":"../../../src","sources":["components/AvatarEdit.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAavC,MAAMA,UAAoD,GAAG,QAQvD;EAAA,IARwD;IAC5DC,IAAI;IACJC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,OAAO,GAAG,MAAM,CAAC,CAAC;IAClBC,KAAK;IACLC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,MAAMC,WAAW,GAAG;IAClBC,mBAAmB,EAAEH,KAAK,CAACI,MAAM,CAACC,OAAO;IACzCC,aAAa,EAAEN,KAAK,CAACI,MAAM,CAACG,OAAO;IACnCC,eAAe,EAAER,KAAK,CAACI,MAAM,CAACG;EAChC,CAAC;EAED,MAAME,UAAU,GAAG;IACjBC,KAAK,EAAEb,IAAI;IACXc,MAAM,EAAEd;EACV,CAAC;EAED,oBACE,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACE,KAAK,EAAEU,UAAU;EAAE,GAAKR,IAAI,gBACxC,oBAAC,kBAAS;IAAC,OAAO,EAAEH;EAAQ,gBAC1B,oBAAC,oBAAW;IAAC,MAAM,EAAEF,KAAM;IAAC,IAAI,EAAEC;EAAK,EAAG,eAC1C,oBAAC,iBAAI;IACH,KAAK,EAAE;MACLe,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC,CAAC;MACPC,KAAK,EAAE,CAAC,CAAC;MACTC,WAAW,EAAEb,WAAW,CAACM,eAAe;MACxCQ,eAAe,EAAEd,WAAW,CAACC,mBAAmB;MAChDc,YAAY,EAAEpB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;MAC7BqB,OAAO,EAAErB,IAAI,IAAI,CAAC,GAAG,EAAE;IACzB;EAAE,gBAEF,oBAAC,IAAI;IACH,IAAI,EAAC,oBAAoB;IACzB,KAAK,EAAEK,WAAW,CAACI,aAAc;IACjC,IAAI,EAAET,IAAI,IAAI,CAAC,GAAG,EAAE;EAAE,EACtB,CACG,CACG,CACP;AAEX,CAAC;AAAC,eAEa,IAAAsB,kBAAS,EAACzB,UAAU,CAAC;AAAA"}
1
+ {"version":3,"names":["AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","React","createElement","View","Touchable","CircleImage","source","position","top","right","borderColor","backgroundColor","borderRadius","padding","name","color","withTheme"],"sourceRoot":"../../../src","sources":["components/AvatarEdit.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AACvC,MAAMA,UAAU,GAAG,QAA4E;EAAA,IAA3E;IAAEC,IAAI;IAAEC,KAAK;IAAEC,IAAI,GAAG,EAAE;IAAEC,OAAO,GAAG,MAAM,CAAE,CAAC;IAAEC,KAAK;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC;EACtF,MAAMC,WAAW,GAAG;IAChBC,mBAAmB,EAAEH,KAAK,CAACI,MAAM,CAACC,OAAO;IACzCC,aAAa,EAAEN,KAAK,CAACI,MAAM,CAACG,OAAO;IACnCC,eAAe,EAAER,KAAK,CAACI,MAAM,CAACG;EAClC,CAAC;EACD,MAAME,UAAU,GAAG;IACfC,KAAK,EAAEb,IAAI;IACXc,MAAM,EAAEd;EACZ,CAAC;EACD,oBAAQe,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEf,KAAK,EAAE,CAACA,KAAK,EAAEU,UAAU,CAAC;IAAE,GAAGR;EAAK,CAAC,eACrEW,KAAK,CAACC,aAAa,CAACE,kBAAS,EAAE;IAAEjB,OAAO,EAAEA;EAAQ,CAAC,eAC/Cc,KAAK,CAACC,aAAa,CAACG,oBAAW,EAAE;IAAEC,MAAM,EAAErB,KAAK;IAAEC,IAAI,EAAEA;EAAK,CAAC,CAAC,eAC/De,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEf,KAAK,EAAE;MAC3BmB,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC,CAAC;MACPC,KAAK,EAAE,CAAC,CAAC;MACTC,WAAW,EAAEnB,WAAW,CAACM,eAAe;MACxCc,eAAe,EAAEpB,WAAW,CAACC,mBAAmB;MAChDoB,YAAY,EAAE1B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;MAC7B2B,OAAO,EAAE3B,IAAI,IAAI,CAAC,GAAG,EAAE;IAC3B;EAAE,CAAC,eACHe,KAAK,CAACC,aAAa,CAAClB,IAAI,EAAE;IAAE8B,IAAI,EAAE,oBAAoB;IAAEC,KAAK,EAAExB,WAAW,CAACI,aAAa;IAAET,IAAI,EAAEA,IAAI,IAAI,CAAC,GAAG,EAAE;EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACrI,CAAC;AAAC,eACa,IAAA8B,kBAAS,EAACjC,UAAU,CAAC;AAAA"}
@@ -12,7 +12,6 @@ var _theming = require("../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  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); }
14
14
  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; }
15
- 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); }
16
15
  const ELEVATION = 1;
17
16
  const DEFAULT_MAX_WIDTH = 960;
18
17
  const Banner = _ref => {
@@ -70,7 +69,6 @@ const Banner = _ref => {
70
69
  measured: true
71
70
  });
72
71
  };
73
-
74
72
  // The banner animation has 2 parts:
75
73
  // 1. Blank spacer element which animates its height to move the content
76
74
  // 2. Actual banner which animates its translateY
@@ -80,9 +78,10 @@ const Banner = _ref => {
80
78
  // However we can't animated banner's height directly as it'll also resize the content inside
81
79
  const height = _reactNative.Animated.multiply(position, layout.height);
82
80
  const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
83
- return /*#__PURE__*/React.createElement(_Surface.default, _extends({}, rest, {
81
+ return /*#__PURE__*/React.createElement(_Surface.default, {
82
+ ...rest,
84
83
  style: [styles.container, (0, _shadow.default)(ELEVATION), style]
85
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
84
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
86
85
  style: [styles.wrapper, contentStyle]
87
86
  }, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
88
87
  style: {
@@ -165,4 +164,24 @@ const styles = _reactNative.StyleSheet.create({
165
164
  });
166
165
  var _default = (0, _theming.withTheme)(Banner);
167
166
  exports.default = _default;
167
+ //# sourceMappingURL=Banner.js.map,
168
+ marginHorizontal: 8,
169
+ marginTop: 16,
170
+ marginBottom: 0
171
+ },
172
+ icon: {
173
+ margin: 8
174
+ },
175
+ message: {
176
+ flex: 1,
177
+ margin: 8
178
+ },
179
+ actions: {
180
+ flexDirection: "row",
181
+ justifyContent: "flex-end",
182
+ margin: 8
183
+ }
184
+ });
185
+ var _default = (0, _theming.withTheme)(Banner);
186
+ exports.default = _default;
168
187
  //# sourceMappingURL=Banner.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","shadow","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex","withTheme"],"sourceRoot":"../../../src","sources":["components/Banner.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AAEA;AACA;AAAuC;AAAA;AAAA;AAAA;AAGvC,MAAMA,SAAS,GAAG,CAAC;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AA4B7B,MAAMC,MAAgD,GAAG,QAWnD;EAAA,IAXoD;IACxDC,gBAAgB,GAAG,IAAI;IACvBC,WAAW,GAAG,IAAI;IAClBC,IAAI;IACJC,WAAW;IACXC,OAAO;IACPC,YAAY;IACZC,KAAK;IACLC,KAAK;IACLC,IAAI;IACJ,GAAGC;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,IAAAE,kBAAS,EAAC/D,MAAM,CAAC;AAAA"}
1
+ {"version":3,"names":["ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","React","useState","useEffect","current","position","useRef","Animated","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","createElement","Surface","styles","container","shadow","View","wrapper","onLayout","absolute","transform","opacity","marginBottom","name","size","Text","message","color","colors","text","accessibilityLiveRegion","accessibilityRole","actions","Button","primary","title","onPress","StyleSheet","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex","withTheme"],"sourceRoot":"../../../src","sources":["components/Banner.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AACvC,MAAMA,SAAS,GAAG,CAAC;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,MAAM,GAAG,QAA4H;EAAA,IAA3H;IAAEC,gBAAgB,GAAG,IAAI;IAAEC,WAAW,GAAG,IAAI;IAAEC,IAAI;IAAEC,WAAW;IAAEC,OAAO;IAAEC,YAAY;IAAEC,KAAK;IAAEC,KAAK;IAAEC,IAAI;IAAE,GAAGC;EAAK,CAAC;EAClI,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAACb,gBAAgB,CAAC;EAC9DY,KAAK,CAACE,SAAS,CAAC,MAAM;IAClB,IAAId,gBAAgB,EAAE;MAClBW,UAAU,CAAC,IAAI,CAAC;IACpB;EACJ,CAAC,EAAE,CAACX,gBAAgB,CAAC,CAAC;EACtB,MAAM;IAAEe,OAAO,EAAEC;EAAS,CAAC,GAAGJ,KAAK,CAACK,MAAM,CAAC,IAAIC,qBAAQ,CAACC,KAAK,CAACT,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;EAC/E,MAAM,CA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C3E,MAAM,CAAC;AAAA"}
@@ -10,10 +10,19 @@ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reani
10
10
  var _reactNativeGestureHandler = require("react-native-gesture-handler");
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); }
13
+ /**
14
+ * Slightly modfied version as taken from https://github.com/rgommezz/react-native-scroll-bottom-sheet
15
+ * Main previously breaking change:
16
+ * const node = this.props.innerRef.current?.getNode() ==> const node = this.props.innerRef.current as any
17
+ */
18
+ /**
19
+ * Copyright (c) 2020 Raul Gomez Acuna
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ *
24
+ */
25
+
17
26
  const {
18
27
  //@ts-ignore
19
28
  interpolate: interpolateDeprecated,
@@ -73,44 +82,42 @@ const imperativeScrollOptions = {
73
82
  }
74
83
  };
75
84
  class ScrollBottomSheet extends _react.Component {
76
- /**
77
- * Gesture Handler references
78
- */
79
-
80
- /**
81
- * Flag to indicate imperative snapping
82
- */
83
-
84
- /**
85
- * Manual snapping amount
86
- */
87
-
88
85
  constructor(props) {
89
- var _props$animationConfi, _this;
86
+ var _this;
87
+ var _a;
90
88
  super(props);
91
89
  _this = this;
92
- _defineProperty(this, "masterDrawer", /*#__PURE__*/_react.default.createRef());
93
- _defineProperty(this, "drawerHandleRef", /*#__PURE__*/_react.default.createRef());
94
- _defineProperty(this, "drawerContentRef", /*#__PURE__*/_react.default.createRef());
95
- _defineProperty(this, "scrollComponentRef", /*#__PURE__*/_react.default.createRef());
96
- _defineProperty(this, "isManuallySetValue", new _reactNativeReanimated.Value(0));
97
- _defineProperty(this, "manualYOffset", new _reactNativeReanimated.Value(0));
98
- _defineProperty(this, "prevSnapIndex", -1);
99
- _defineProperty(this, "dragY", new _reactNativeReanimated.Value(0));
100
- _defineProperty(this, "prevDragY", new _reactNativeReanimated.Value(0));
101
- _defineProperty(this, "tempDestSnapPoint", new _reactNativeReanimated.Value(0));
102
- _defineProperty(this, "isAndroid", new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android")));
103
- _defineProperty(this, "animationClock", new _reactNativeReanimated.Clock());
104
- _defineProperty(this, "animationPosition", new _reactNativeReanimated.Value(0));
105
- _defineProperty(this, "animationFinished", new _reactNativeReanimated.Value(0));
106
- _defineProperty(this, "animationFrameTime", new _reactNativeReanimated.Value(0));
107
- _defineProperty(this, "velocityY", new _reactNativeReanimated.Value(0));
108
- _defineProperty(this, "lastStartScrollY", new _reactNativeReanimated.Value(0));
109
- _defineProperty(this, "destSnapPoint", new _reactNativeReanimated.Value(0));
110
- _defineProperty(this, "dragWithHandle", new _reactNativeReanimated.Value(0));
111
- _defineProperty(this, "scrollUpAndPullDown", new _reactNativeReanimated.Value(0));
112
- _defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
113
- _defineProperty(this, "getNormalisedSnapPoints", () => {
90
+ /**
91
+ * Gesture Handler references
92
+ */
93
+ this.masterDrawer = /*#__PURE__*/_react.default.createRef();
94
+ this.drawerHandleRef = /*#__PURE__*/_react.default.createRef();
95
+ this.drawerContentRef = /*#__PURE__*/_react.default.createRef();
96
+ this.scrollComponentRef = /*#__PURE__*/_react.default.createRef();
97
+ /**
98
+ * Flag to indicate imperative snapping
99
+ */
100
+ this.isManuallySetValue = new _reactNativeReanimated.Value(0);
101
+ /**
102
+ * Manual snapping amount
103
+ */
104
+ this.manualYOffset = new _reactNativeReanimated.Value(0);
105
+ this.prevSnapIndex = -1;
106
+ this.dragY = new _reactNativeReanimated.Value(0);
107
+ this.prevDragY = new _reactNativeReanimated.Value(0);
108
+ this.tempDestSnapPoint = new _reactNativeReanimated.Value(0);
109
+ this.isAndroid = new _reactNativeReanimated.Value(Number(_reactNative.Platform.OS === "android"));
110
+ this.animationClock = new _reactNativeReanimated.Clock();
111
+ this.animationPosition = new _reactNativeReanimated.Value(0);
112
+ this.animationFinished = new _reactNativeReanimated.Value(0);
113
+ this.animationFrameTime = new _reactNativeReanimated.Value(0);
114
+ this.velocityY = new _reactNativeReanimated.Value(0);
115
+ this.lastStartScrollY = new _reactNativeReanimated.Value(0);
116
+ this.destSnapPoint = new _reactNativeReanimated.Value(0);
117
+ this.dragWithHandle = new _reactNativeReanimated.Value(0);
118
+ this.scrollUpAndPullDown = new _reactNativeReanimated.Value(0);
119
+ this.convertPercentageToDp = str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100;
120
+ this.getNormalisedSnapPoints = () => {
114
121
  return this.props.snapPoints.map(p => {
115
122
  if (typeof p === "string") {
116
123
  return this.convertPercentageToDp(p);
@@ -119,8 +126,8 @@ class ScrollBottomSheet extends _react.Component {
119
126
  }
120
127
  throw new Error("Invalid type for value ".concat(p, ": ").concat(typeof p, ". It should be either a percentage string or a number"));
121
128
  });
122
- });
123
- _defineProperty(this, "getScrollComponent", () => {
129
+ };
130
+ this.getScrollComponent = () => {
124
131
  switch (this.props.componentType) {
125
132
  case "FlatList":
126
133
  return _reactNative.FlatList;
@@ -131,33 +138,32 @@ class ScrollBottomSheet extends _react.Component {
131
138
  default:
132
139
  throw new Error("Component type not supported: it should be one of `FlatList`, `ScrollView` or `SectionList`");
133
140
  }
134
- });
135
- _defineProperty(this, "snapTo", index => {
141
+ };
142
+ this.snapTo = index => {
136
143
  const snapPoints = this.getNormalisedSnapPoints();
137
144
  this.isManuallySetValue.setValue(1);
138
145
  this.manualYOffset.setValue(snapPoints[index]);
139
146
  this.nextSnapIndex.setValue(index);
140
- });
147
+ };
141
148
  const {
142
149
  initialSnapIndex,
143
150
  animationType
144
151
  } = props;
145
152
  const animationDriver = animationType === "timing" ? 0 : 1;
146
- const animationDuration = props.animationType === "timing" && ((_props$animationConfi = props.animationConfig) === null || _props$animationConfi === void 0 ? void 0 : _props$animationConfi.duration) || DEFAULT_ANIMATION_DURATION;
153
+ const animationDuration = props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.duration) || DEFAULT_ANIMATION_DURATION;
147
154
  const ScrollComponent = this.getScrollComponent();
148
155
  // @ts-ignore
149
156
  this.scrollComponent = _reactNativeReanimated.default.createAnimatedComponent(ScrollComponent);
150
- const _snapPoints = this.getNormalisedSnapPoints();
151
- const openPosition = _snapPoints[0];
152
- const closedPosition = this.props.enableOverScroll ? windowHeight : _snapPoints[_snapPoints.length - 1];
153
- const initialSnap = _snapPoints[initialSnapIndex];
157
+ const snapPoints = this.getNormalisedSnapPoints();
158
+ const openPosition = snapPoints[0];
159
+ const closedPosition = this.props.enableOverScroll ? windowHeight : snapPoints[snapPoints.length - 1];
160
+ const initialSnap = snapPoints[initialSnapIndex];
154
161
  this.nextSnapIndex = new _reactNativeReanimated.Value(initialSnapIndex);
155
162
  const initialDecelerationRate = _reactNative.Platform.select({
156
163
  android: props.initialSnapIndex === 0 ? ANDROID_NORMAL_DECELERATION_RATE : 0,
157
164
  ios: IOS_NORMAL_DECELERATION_RATE
158
165
  });
159
166
  this.decelerationRate = new _reactNativeReanimated.Value(initialDecelerationRate);
160
-
161
167
  //@ts-ignore
162
168
  const handleGestureState = new _reactNativeReanimated.Value(-1);
163
169
  //@ts-ignore
@@ -196,29 +202,27 @@ class ScrollBottomSheet extends _react.Component {
196
202
  const didHandleGestureBegin = (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE);
197
203
  const isAnimationInterrupted = (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.BEGAN), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.isAndroid, 0), (0, _reactNativeReanimated.eq)(animationDriver, 1), (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.ACTIVE)))), (0, _reactNativeReanimated.clockRunning)(this.animationClock));
198
204
  this.didGestureFinish = (0, _reactNativeReanimated.or)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(handleOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(handleGestureState, _reactNativeGestureHandler.State.END)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(drawerOldGestureState, _reactNativeGestureHandler.State.ACTIVE), (0, _reactNativeReanimated.eq)(drawerGestureState, _reactNativeGestureHandler.State.END)));
199
-
200
205
  // Function that determines if the last snap point is in the range {snapPoints}
201
206
  // In the case of interruptions in the middle of an animation, we'll get
202
207
  // lastSnap values outside the range
203
208
  const isLastSnapPointInRange = function () {
204
209
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
205
- return i === _snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, _snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
210
+ return i === snapPoints.length ? lastSnapInRange : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(_this.lastSnap, snapPoints[i]), [(0, _reactNativeReanimated.set)(lastSnapInRange, 1)], isLastSnapPointInRange(i + 1));
206
211
  };
207
- const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, _snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
212
+ const scrollY = [(0, _reactNativeReanimated.set)(lastSnapInRange, 0), isLastSnapPointInRange(), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.or)(didHandleGestureBegin, (0, _reactNativeReanimated.and)(this.isManuallySetValue, (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.manualYOffset, snapPoints[0])))), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 1), 0]), (0, _reactNativeReanimated.cond)(
208
213
  // This is to account for a continuous scroll on the drawer from a snap point
209
214
  // Different than top, bringing the drawer to the top position, so that if we
210
215
  // change scroll direction without releasing the gesture, it doesn't pull down the drawer again
211
- (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(_snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, _snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, _snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
216
+ (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), (0, _reactNativeReanimated.greaterThan)(snapPoints[0], (0, _reactNativeReanimated.add)(this.lastSnap, this.dragY)), (0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.lastSnap, snapPoints[0])), lastSnapInRange)), [(0, _reactNativeReanimated.set)(this.lastSnap, snapPoints[0]), (0, _reactNativeReanimated.set)(this.dragWithHandle, 0), this.lastStartScrollY], (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.dragWithHandle, 1), 0, this.lastStartScrollY))];
212
217
  this.didScrollUpAndPullDown = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY), (0, _reactNativeReanimated.greaterThan)(this.lastStartScrollY, 0)), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 1));
213
218
  this.setTranslationY = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.not)(this.dragWithHandle), (0, _reactNativeReanimated.not)((0, _reactNativeReanimated.greaterOrEq)(this.dragY, this.lastStartScrollY))), (0, _reactNativeReanimated.set)(this.translationY, (0, _reactNativeReanimated.sub)(this.dragY, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.translationY, this.dragY));
214
219
  this.extraOffset = (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0);
215
220
  const endOffsetY = (0, _reactNativeReanimated.add)(this.lastSnap, this.translationY, (0, _reactNativeReanimated.multiply)(1 - props.friction, this.velocityY));
216
221
  this.calculateNextSnapPoint = function () {
217
222
  let i = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
218
- return i === _snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(_snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
223
+ return i === snapPoints.length ? _this.tempDestSnapPoint : (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.greaterThan)((0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)(_this.tempDestSnapPoint, endOffsetY)), (0, _reactNativeReanimated.abs)((0, _reactNativeReanimated.sub)((0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset), endOffsetY))), [(0, _reactNativeReanimated.set)(_this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(snapPoints[i], _this.extraOffset)), (0, _reactNativeReanimated.set)(_this.nextSnapIndex, i), _this.calculateNextSnapPoint(i + 1)], _this.calculateNextSnapPoint(i + 1));
219
224
  };
220
225
  const runAnimation = _ref => {
221
- var _props$animationConfi2;
222
226
  let {
223
227
  clock,
224
228
  from,
@@ -228,6 +232,7 @@ class ScrollBottomSheet extends _react.Component {
228
232
  velocity,
229
233
  frameTime
230
234
  } = _ref;
235
+ var _a;
231
236
  const state = {
232
237
  finished,
233
238
  velocity: new _reactNativeReanimated.Value(0),
@@ -237,7 +242,7 @@ class ScrollBottomSheet extends _react.Component {
237
242
  };
238
243
  const timingConfig = {
239
244
  duration: animationDuration,
240
- easing: props.animationType === "timing" && ((_props$animationConfi2 = props.animationConfig) === null || _props$animationConfi2 === void 0 ? void 0 : _props$animationConfi2.easing) || DEFAULT_EASING,
245
+ easing: props.animationType === "timing" && ((_a = props.animationConfig) === null || _a === void 0 ? void 0 : _a.easing) || DEFAULT_EASING,
241
246
  toValue: new _reactNativeReanimated.Value(0)
242
247
  };
243
248
  const springConfig = {
@@ -253,14 +258,14 @@ class ScrollBottomSheet extends _react.Component {
253
258
  //@ts-ignore
254
259
  (0, _reactNativeReanimated.timing)(clock, state, timingConfig), (0, _reactNativeReanimated.spring)(clock, state, springConfig)), (0, _reactNativeReanimated.cond)(state.finished, [(0, _reactNativeReanimated.call)([this.nextSnapIndex], _ref2 => {
255
260
  let [value] = _ref2;
261
+ var _a, _b;
256
262
  if (value !== this.prevSnapIndex) {
257
- var _this$props$onSettle, _this$props;
258
- (_this$props$onSettle = (_this$props = this.props).onSettle) === null || _this$props$onSettle === void 0 ? void 0 : _this$props$onSettle.call(_this$props, value);
263
+ (_b = (_a = this.props).onSettle) === null || _b === void 0 ? void 0 : _b.call(_a, value);
259
264
  }
260
265
  this.prevSnapIndex = value;
261
266
  }),
262
267
  // Resetting appropriate values
263
- (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, _snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
268
+ (0, _reactNativeReanimated.set)(drawerOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(handleOldGestureState, _reactNativeGestureHandler.State.END), (0, _reactNativeReanimated.set)(this.prevTranslateYOffset, state.position), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), [(0, _reactNativeReanimated.set)(this.prevTranslateYOffset, (0, _reactNativeReanimated.sub)(this.prevTranslateYOffset, this.lastStartScrollY)), (0, _reactNativeReanimated.set)(this.lastStartScrollY, 0), (0, _reactNativeReanimated.set)(this.scrollUpAndPullDown, 0)]), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.destSnapPoint, snapPoints[0]), [(0, _reactNativeReanimated.set)(this.dragWithHandle, 0)]), (0, _reactNativeReanimated.set)(this.isManuallySetValue, 0), (0, _reactNativeReanimated.set)(this.manualYOffset, 0), (0, _reactNativeReanimated.stopClock)(clock), this.prevTranslateYOffset],
264
269
  // We made the block return the updated position,
265
270
  state.position)];
266
271
  };
@@ -289,7 +294,7 @@ class ScrollBottomSheet extends _react.Component {
289
294
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
290
295
  });
291
296
  this.position = interpolate(this.translateY, {
292
- inputRange: [openPosition, _snapPoints[_snapPoints.length - 1]],
297
+ inputRange: [openPosition, snapPoints[snapPoints.length - 1]],
293
298
  outputRange: [1, 0],
294
299
  extrapolate: _reactNativeReanimated.Extrapolate.CLAMP
295
300
  });
@@ -330,26 +335,25 @@ class ScrollBottomSheet extends _react.Component {
330
335
  ref: this.scrollComponentRef,
331
336
  waitFor: this.masterDrawer,
332
337
  simultaneousHandlers: this.drawerContentRef
333
- }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, _extends({
338
+ }, /*#__PURE__*/_react.default.createElement(AnimatedScrollableComponent, {
334
339
  overScrollMode: "never",
335
- bounces: false
336
- }, rest, {
337
- ref: this.props.innerRef
340
+ bounces: false,
341
+ ...rest,
342
+ ref: this.props.innerRef,
338
343
  // @ts-ignore
339
- ,
340
344
  decelerationRate: this.decelerationRate,
341
345
  onScrollBeginDrag: this.onScrollBeginDrag,
342
346
  scrollEventThrottle: 1,
343
347
  contentContainerStyle: [rest.contentContainerStyle, {
344
348
  paddingBottom: this.getNormalisedSnapPoints()[0]
345
349
  }]
346
- }))))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
350
+ })))), this.props.animatedPosition && /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
347
351
  exec: (0, _reactNativeReanimated.onChange)(this.position, (0, _reactNativeReanimated.set)(this.props.animatedPosition, this.position))
348
352
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
349
353
  exec: (0, _reactNativeReanimated.onChange)(this.dragY, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.not)((0, _reactNativeReanimated.eq)(this.dragY, 0)), (0, _reactNativeReanimated.set)(this.prevDragY, this.dragY)))
350
354
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
351
355
  exec: (0, _reactNativeReanimated.onChange)(this.didGestureFinish, (0, _reactNativeReanimated.cond)(this.didGestureFinish, [this.didScrollUpAndPullDown, this.setTranslationY, (0, _reactNativeReanimated.set)(this.tempDestSnapPoint, (0, _reactNativeReanimated.add)(normalisedSnapPoints[0], this.extraOffset)), (0, _reactNativeReanimated.set)(this.nextSnapIndex, 0), (0, _reactNativeReanimated.set)(this.destSnapPoint, this.calculateNextSnapPoint()), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.and)((0, _reactNativeReanimated.greaterThan)(this.dragY, this.lastStartScrollY), this.isAndroid, (0, _reactNativeReanimated.not)(this.dragWithHandle)), (0, _reactNativeReanimated.call)([], () => {
352
- var _this$props2, _this$props2$data;
356
+ var _a, _b;
353
357
  // This prevents the scroll glide from happening on Android when pulling down with inertia.
354
358
  // It's not perfect, but does the job for now
355
359
  const {
@@ -358,25 +362,68 @@ class ScrollBottomSheet extends _react.Component {
358
362
  } = imperativeScrollOptions[this.props.componentType];
359
363
  // @ts-ignore
360
364
  const node = this.props.innerRef.current;
361
- if (node && node[method] && (this.props.componentType === "FlatList" && (((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$data = _this$props2.data) === null || _this$props2$data === void 0 ? void 0 : _this$props2$data.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
365
+ if (node && node[method] && (this.props.componentType === "FlatList" && (((_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.length) || 0) > 0 || this.props.componentType === "SectionList" && this.props.sections.length > 0 || this.props.componentType === "ScrollView")) {
362
366
  node[method](args);
363
367
  }
364
368
  })), (0, _reactNativeReanimated.set)(this.dragY, 0), (0, _reactNativeReanimated.set)(this.velocityY, 0), (0, _reactNativeReanimated.set)(this.lastSnap, (0, _reactNativeReanimated.sub)(this.destSnapPoint, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.scrollUpAndPullDown, 1), this.lastStartScrollY, 0))), (0, _reactNativeReanimated.call)([this.lastSnap], _ref3 => {
365
- var _this$masterDrawer, _this$masterDrawer$cu;
366
369
  let [value] = _ref3;
370
+ var _a, _b;
367
371
  // This is the TapGHandler trick
368
372
  // @ts-ignore
369
- (_this$masterDrawer = this.masterDrawer) === null || _this$masterDrawer === void 0 ? void 0 : (_this$masterDrawer$cu = _this$masterDrawer.current) === null || _this$masterDrawer$cu === void 0 ? void 0 : _this$masterDrawer$cu.setNativeProps({
373
+ (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
370
374
  maxDeltaY: value - this.getNormalisedSnapPoints()[0]
371
375
  });
372
376
  }), (0, _reactNativeReanimated.set)(this.decelerationRate, (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.isAndroid, 1), (0, _reactNativeReanimated.cond)((0, _reactNativeReanimated.eq)(this.lastSnap, normalisedSnapPoints[0]), ANDROID_NORMAL_DECELERATION_RATE, 0), IOS_NORMAL_DECELERATION_RATE))]))
373
377
  }), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.Code, {
374
378
  exec: (0, _reactNativeReanimated.onChange)(this.isManuallySetValue, [(0, _reactNativeReanimated.cond)(this.isManuallySetValue, [(0, _reactNativeReanimated.set)(this.destSnapPoint, this.manualYOffset), (0, _reactNativeReanimated.set)(this.animationFinished, 0), (0, _reactNativeReanimated.set)(this.lastSnap, this.manualYOffset), (0, _reactNativeReanimated.call)([this.lastSnap], _ref4 => {
375
- var _this$masterDrawer2, _this$masterDrawer2$c;
376
379
  let [value] = _ref4;
380
+ var _a, _b;
377
381
  // This is the TapGHandler trick
378
382
  // @ts-ignore
379
- (_this$masterDrawer2 = this.masterDrawer) === null || _this$masterDrawer2 === void 0 ? void 0 : (_this$masterDrawer2$c = _this$masterDrawer2.current) === null || _this$masterDrawer2$c === void 0 ? void 0 : _this$masterDrawer2$c.setNativeProps({
383
+ (_b = (_a = this.masterDrawer) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setNativeProps({
384
+ maxDeltaY: value - this.getNormalisedSnapPoints()[0]
385
+ });
386
+ })], [(0, _reactNativeReanimated.set)(this.nextSnapIndex, 0)])])
387
+ }));
388
+ // On Android, having an intermediary view with pointerEvents="box-none", breaks the
389
+ // waitFor logic
390
+ if (_reactNative.Platform.OS === "android") {
391
+ return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
392
+ maxDurationMs: 100000,
393
+ ref: this.masterDrawer,
394
+ maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0],
395
+ shouldCancelWhenOutside: false
396
+ }, Content);
397
+ }
398
+ // On iOS, We need to wrap the content on a view with PointerEvents box-none
399
+ // So that we can start scrolling automatically when reaching the top without
400
+ // Stopping the gesture
401
+ return /*#__PURE__*/_react.default.createElement(_reactNativeGestureHandler.TapGestureHandler, {
402
+ maxDurationMs: 100000,
403
+ ref: this.masterDrawer,
404
+ maxDeltaY: initialSnap - this.getNormalisedSnapPoints()[0]
405
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
406
+ style: _reactNative.StyleSheet.absoluteFillObject,
407
+ pointerEvents: "box-none"
408
+ }, Content));
409
+ }
410
+ }
411
+ exports.ScrollBottomSheet = ScrollBottomSheet;
412
+ ScrollBottomSheet.defaultProps = {
413
+ topInset: 0,
414
+ friction: 0.95,
415
+ animationType: "timing",
416
+ innerRef: /*#__PURE__*/_react.default.createRef(),
417
+ enableOverScroll: false
418
+ };
419
+ var _default = ScrollBottomSheet;
420
+ exports.default = _default;
421
+ const styles = _reactNative.StyleSheet.create({
422
+ container: {
423
+ flex: 1
424
+ }
425
+ });
426
+ //# sourceMappingURL=BottomSheetComponent.js.map _this$masterDrawer2.current) === null || _this$masterDrawer2$c === void 0 ? void 0 : _this$masterDrawer2$c.setNativeProps({
380
427
  maxDeltaY: value - this.getNormalisedSnapPoints()[0]
381
428
  });
382
429
  })], [(0, _reactNativeReanimated.set)(this.nextSnapIndex, 0)])])