@draftbit/core 47.2.1-a33ddf.2 → 47.2.1-d833e1.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 (81) hide show
  1. package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
  2. package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +16 -3
  4. package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +22 -5
  6. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
  7. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  8. package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
  9. package/lib/commonjs/components/SwipeableView/SwipeableView.js +155 -0
  10. package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +1 -0
  11. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +13 -0
  12. package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +1 -0
  13. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +13 -0
  14. package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
  15. package/lib/commonjs/components/SwipeableView/index.js +28 -0
  16. package/lib/commonjs/components/SwipeableView/index.js.map +1 -0
  17. package/lib/commonjs/index.js +19 -0
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/mappings/BottomSheet.js +37 -9
  20. package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
  21. package/lib/commonjs/mappings/SwipeableView.js +183 -0
  22. package/lib/commonjs/mappings/SwipeableView.js.map +1 -0
  23. package/lib/commonjs/utilities.js +27 -2
  24. package/lib/commonjs/utilities.js.map +1 -1
  25. package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
  26. package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
  27. package/lib/module/components/SwipeableView/SwipeableView.js +147 -0
  28. package/lib/module/components/SwipeableView/SwipeableView.js.map +1 -0
  29. package/lib/module/components/SwipeableView/SwipeableViewButton.js +6 -0
  30. package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +1 -0
  31. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +6 -0
  32. package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
  33. package/lib/module/components/SwipeableView/index.js +4 -0
  34. package/lib/module/components/SwipeableView/index.js.map +1 -0
  35. package/lib/module/constants.js +1 -1
  36. package/lib/module/index.js +1 -0
  37. package/lib/module/index.js.map +1 -1
  38. package/lib/module/mappings/BottomSheet.js +38 -10
  39. package/lib/module/mappings/BottomSheet.js.map +1 -1
  40. package/lib/module/mappings/SwipeableView.js +175 -0
  41. package/lib/module/mappings/SwipeableView.js.map +1 -0
  42. package/lib/module/mappings/TextArea.js.map +1 -1
  43. package/lib/module/utilities.js +18 -0
  44. package/lib/module/utilities.js.map +1 -1
  45. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
  46. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  47. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +29 -0
  48. package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +1 -0
  49. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +13 -0
  50. package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +1 -0
  51. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +13 -0
  52. package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +1 -0
  53. package/lib/typescript/src/components/SwipeableView/index.d.ts +4 -0
  54. package/lib/typescript/src/components/SwipeableView/index.d.ts.map +1 -0
  55. package/lib/typescript/src/index.d.ts +1 -0
  56. package/lib/typescript/src/index.d.ts.map +1 -1
  57. package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
  58. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
  59. package/lib/typescript/src/mappings/SwipeableView.d.ts +426 -0
  60. package/lib/typescript/src/mappings/SwipeableView.d.ts.map +1 -0
  61. package/lib/typescript/src/utilities.d.ts +6 -0
  62. package/lib/typescript/src/utilities.d.ts.map +1 -1
  63. package/package.json +4 -3
  64. package/src/components/BottomSheet/BottomSheet.js +17 -2
  65. package/src/components/BottomSheet/BottomSheet.tsx +32 -4
  66. package/src/components/SwipeableView/SwipeableView.js +117 -0
  67. package/src/components/SwipeableView/SwipeableView.tsx +299 -0
  68. package/src/components/SwipeableView/SwipeableViewButton.js +5 -0
  69. package/src/components/SwipeableView/SwipeableViewButton.tsx +18 -0
  70. package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +5 -0
  71. package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +20 -0
  72. package/src/components/SwipeableView/index.js +3 -0
  73. package/src/components/SwipeableView/index.tsx +3 -0
  74. package/src/index.js +1 -0
  75. package/src/index.tsx +6 -0
  76. package/src/mappings/BottomSheet.js +37 -9
  77. package/src/mappings/BottomSheet.ts +43 -8
  78. package/src/mappings/SwipeableView.js +181 -0
  79. package/src/mappings/SwipeableView.ts +210 -0
  80. package/src/utilities.js +41 -0
  81. package/src/utilities.ts +71 -0
@@ -13,8 +13,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
13
13
  const BottomSheet = _ref => {
14
14
  let {
15
15
  theme,
16
- snapPoints = ["10%", "50%", "80%"],
17
- initialSnapIndex = 0,
16
+ snapPoints: snapPointsProp,
17
+ topSnapPosition = "10%",
18
+ middleSnapPosition = "50%",
19
+ bottomSnapPosition = "80%",
20
+ initialSnapIndex,
21
+ initialSnapPosition = "bottom",
18
22
  showHandle = true,
19
23
  handleColor = theme.colors.divider,
20
24
  topBorderRadius = 20,
@@ -26,13 +30,24 @@ const BottomSheet = _ref => {
26
30
  ...rest
27
31
  } = _ref;
28
32
  const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
33
+ const snapPoints = snapPointsProp || [topSnapPosition, middleSnapPosition, bottomSnapPosition];
34
+ const getSnapIndexFromPosition = position => {
35
+ switch (position) {
36
+ case "top":
37
+ return 0;
38
+ case "middle":
39
+ return 1;
40
+ case "bottom":
41
+ return 2;
42
+ }
43
+ };
29
44
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
30
45
  style: styles.parentContainer,
31
46
  pointerEvents: "box-none"
32
47
  }, /*#__PURE__*/_react.default.createElement(_BottomSheetComponent.default, _extends({
33
48
  componentType: "ScrollView",
34
49
  snapPoints: snapPoints,
35
- initialSnapIndex: initialSnapIndex,
50
+ initialSnapIndex: initialSnapIndex !== null && initialSnapIndex !== void 0 ? initialSnapIndex : getSnapIndexFromPosition(initialSnapPosition),
36
51
  renderHandle: () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showHandle && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
37
52
  style: [styles.handleContainer, {
38
53
  backgroundColor,
@@ -1 +1 @@
1
- {"version":3,"names":["BottomSheet","theme","snapPoints","initialSnapIndex","showHandle","handleColor","colors","divider","topBorderRadius","borderWidth","borderColor","onSettle","style","children","rest","backgroundColor","background","styles","parentContainer","handleContainer","borderTopLeftRadius","borderTopRightRadius","handle","contentContainerStyle","StyleSheet","flatten","containerStyle","create","position","left","right","top","bottom","zIndex","overflow","paddingHorizontal","paddingVertical","flex","alignItems","width","height","borderRadius","withTheme"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/BottomSheet.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAEA;AAA0C;AAAA;AAe1C,MAAMA,WAAgE,GAAG,QAanE;EAAA,IAboE;IACxEC,KAAK;IACLC,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAClCC,gBAAgB,GAAG,CAAC;IACpBC,UAAU,GAAG,IAAI;IACjBC,WAAW,GAAG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EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE;EACZ,CAAC;EACDX,qBAAqB,EAAE;IACrBY,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDV,cAAc,EAAE;IACdW,IAAI,EAAE,CAAC;IACPH,QAAQ,EAAE;EACZ,CAAC;EACDf,eAAe,EAAE;IACfmB,UAAU,EAAE,QAAQ;IACpBF,eAAe,EAAE;EACnB,CAAC;EACDd,MAAM,EAAE;IACNiB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAC1C,WAAW,CAAC;AAAA"}
1
+ {"version":3,"names":["BottomSheet","theme","snapPoints","snapPointsProp","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","colors","divider","topBorderRadius","borderWidth","borderColor","onSettle","style","children","rest","backgroundColor","background","getSnapIndexFromPosition","position","styles","parentContainer","handleContainer","borderTopLeftRadius","borderTopRightRadius","handle","contentContainerStyle","StyleSheet","flatten","containerStyle","create","left","right","top","bottom","zIndex","overflow","paddingHorizontal","paddingVertical","flex","alignItems","width","height","borderRadius","withTheme"],"sourceRoot":"../../../../src","sources":["components/BottomSheet/BottomSheet.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AAEA;AAA0C;AAAA;AAoB1C,MAAMA,WAAgE,GAAG,QAiBnE;EAAA,IAjBoE;IACxEC,KAAK;IACLC,UAAU,EAAEC,cAAc;IAC1BC,eAAe,GAAG,KAAK;IACvBC,kBAAkB,GAAG,KAAK;IAC1BC,kBAAkB,GAAG,KAAK;IAC1BC,gBAAgB;IAChBC,mBAAmB,GAAG,QAAQ;IAC9BC,UAAU,GAAG,I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K,CAAE;IAC7D,cAAc,EAAEc,uBAAU,CAACC,OAAO,CAAC,CACjCR,MAAM,CAACS,cAAc,EACrB;MACEb,eAAe;MACfO,mBAAmB,EAAEd,eAAe;MACpCe,oBAAoB,EAAEf,eAAe;MACrCC,WAAW;MACXC;IACF,CAAC,CACF,CAAE;IACH,QAAQ,EAAEC;EAAS,GACfG,IAAI,GAEPD,QAAQ,CACY,CAClB;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGO,uBAAU,CAACG,MAAM,CAAC;EAC/B;EACAT,eAAe,EAAE;IACfF,QAAQ,EAAE,UAAU;IACpBY,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE;EACZ,CAAC;EACDV,qBAAqB,EAAE;IACrBW,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDT,cAAc,EAAE;IACdU,IAAI,EAAE,CAAC;IACPH,QAAQ,EAAE;EACZ,CAAC;EACDd,eAAe,EAAE;IACfkB,UAAU,EAAE,QAAQ;IACpBF,eAAe,EAAE;EACnB,CAAC;EACDb,MAAM,EAAE;IACNgB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAChD,WAAW,CAAC;AAAA"}
@@ -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,10 +30,24 @@ 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, {
35
34
  style: [{
36
35
  minHeight: 40
37
- }, style]
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;
50
+ //# sourceMappingURL=CheckboxGroup.js.map}, style]
38
51
  }, rest), /*#__PURE__*/React.createElement(Provider, {
39
52
  value: {
40
53
  values,
@@ -1 +1 @@
1
- {"version":3,"names":["Provider","checkboxGroupContext","CheckboxGroup","direction","Direction","Vertical","values","onValueChange","style","children","rest","_containerStyle","flexDirection","Horizontal","overflow","push","alignItems","minHeight"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxGroup.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AAA4D;AAAA;AAAA;AAW5D,MAAM;EAAEA;AAAS,CAAC,GAAGC,6BAAoB;AAEzC,MAAMC,aAA2C,GAAG,QAO9C;EAAA,IAP+C;IACnDC,SAAS,GAAGC,kBAAS,CAACC,QAAQ;IAC9BC,MAAM;IACNC,aAAa,GAAG,MAAM,CAAC,CAAC;IACxBC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAMC,eAAqC,GAAG,CAC5C;IACEC,aAAa,EAAET,SAAS,KAAKC,kBAAS,CAACS,UAAU,GAAG,KAAK,GAAG,QAAQ;IACpEC,QAAQ,EAAE;EACZ,CAAC,CACF;EAED,IAAIX,SAAS,KAAKC,kBAAS,CAACC,QAAQ,EAAE;IACpCM,eAAe,CAACI,IAAI,CAAC;MACnBC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ;EAEA,oBACE,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAAC;MAAEC,SAAS,EAAE;IAAG,CAAC,EAAET,KAAK;EAAE,GAAKE,IAAI,gBAC/C,oBAAC,QAAQ;IAAC,KAAK,EAAE;MAAEJ,MAAM;MAAEC,aAAa;MAAEJ;IAAU;EAAE,gBACpD,oBAAC,iBAAI;IAAC,KAAK,EAAEQ;EAAgB,GAAEF,QAAQ,CAAQ,CACtC,CACN;AAEX,CAAC;AAAC,eAEaP,aAAa;AAAA"}
1
+ {"version":3,"names":["Provider","checkboxGroupContext","CheckboxGroup","direction","Direction","Vertical","values","onValueChange","style","children","rest","_containerStyle","flexDirection","Horizontal","overflow","push","alignItems","React","createElement","View","minHeight","value"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxGroup.js"],"mappings":";;;;;;AAAA;AACA;AACA;AAA4D;AAAA;AAC5D,MAAM;EAAEA;AAAS,CAAC,GAAGC,6BAAoB;AACzC,MAAMC,aAAa,GAAG,QAAqG;EAAA,IAApG;IAAEC,SAAS,GAAGC,kBAAS,CAACC,QAAQ;IAAEC,MAAM;IAAEC,aAAa,GAAG,MAAM,CAAE,CAAC;IAAEC,KAAK;IAAEC,QAAQ;IAAE,GAAGC;EAAK,CAAC;EAClH,MAAMC,eAAe,GAAG,CACpB;IACIC,aAAa,EAAET,SAAS,KAAKC,kBAAS,CAACS,UAAU,GAAG,KAAK,GAAG,QAAQ;IACpEC,QAAQ,EAAE;EACd,CAAC,CACJ;EACD,IAAIX,SAAS,KAAKC,kBAAS,CAACC,QAAQ,EAAE;IAClCM,eAAe,CAACI,IAAI,CAAC;MACjBC,UAAU,EAAE;IAChB,CAAC,CAAC;EACN;EACA,oBAAQC,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEX,KAAK,EAAE,CAAC;MAAEY,SAAS,EAAE;IAAG,CAAC,EAAEZ,KAAK,CAAC;IAAE,GAAGE;EAAK,CAAC,eAC5EO,KAAK,CAACC,aAAa,CAAClB,QAAQ,EAAE;IAAEqB,KAAK,EAAE;MAAEf,MAAM;MAAEC,aAAa;MAAEJ;IAAU;EAAE,CAAC,eACzEc,KAAK,CAACC,aAAa,CAACC,iBAAI,EAAE;IAAEX,KAAK,EAAEG;EAAgB,CAAC,EAAEF,QAAQ,CAAC,CAAC,CAAC;AAC7E,CAAC;AAAC,eACaP,aAAa;AAAA"}
@@ -13,8 +13,7 @@ var _utilities = require("../../utilities");
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
- let Direction;
16
+ var Direction;
18
17
  exports.Direction = Direction;
19
18
  (function (Direction) {
20
19
  Direction["Row"] = "row";
@@ -72,13 +71,14 @@ const CheckboxGroupRow = _ref => {
72
71
  textStyles,
73
72
  viewStyles
74
73
  } = (0, _utilities.extractStyles)(style);
75
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
74
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
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]
@@ -118,4 +118,21 @@ const styles = _reactNative.StyleSheet.create({
118
118
  });
119
119
  var _default = CheckboxGroupRow;
120
120
  exports.default = _default;
121
+ //# sourceMappingURL=CheckboxGroupRow.js.map 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 = CheckboxGroupRow;
137
+ exports.default = _default;
121
138
  //# sourceMappingURL=CheckboxGroupRow.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Direction","getCheckboxAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","CheckboxGroupRow","Icon","label","status","onPress","labelContainerStyle","checkboxStyle","disabled","style","color","uncheckedColor","rest","values","selectedValues","onValueChange","useCheckboxGroupContext","Array","isArray","isChecked","includes","handlePress","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxGroupRow.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AACA;AACA;AAGA;AAAgD;AAAA;AAAA;AAAA;AAAA,IAEpCA,SAAS;AAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,yBAATA,SAAS;AAiBrB,MAAMC,oBAAoB,GAAG,CAC3BC,eAA2C,EAC3CC,SAAoB,KACjB;EACH,IAAID,eAAe,KAAKE,kBAAc,CAACC,UAAU,EAAE;IACjD,OAAOF,SAAS,KAAKH,SAAS,CAACM,GAAG,GAAG,YAAY,GAAG,UAAU;EAChE,CAAC,MAAM,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAAU,EAAE;IAC7C,OAAO,YAAY;EACrB,CAAC,MAAM;IACL,OAAO,UAAU;EACnB;AACF,CAAC;AAED,MAAMC,WAAW,GAAG,CAClBC,KAA+B,EAC/BC,UAAgC,EAChCC,SAA+B,KAC5B;EACH,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC7B,oBAAO,oBAAC,aAAI;MAAC,KAAK,EAAE,CAACC,UAAU,EAAEC,SAAS;IAAE,GAAEF,KAAK,CAAQ;EAC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AG,GAAG,YAAY,GAAG;IAC3D,CAAC,EACDW,mBAAmB;EACnB,GAEDT,WAAW,CAACM,KAAK,EAAEJ,UAAU,EAAEuB,UAAU,CAAC,CACtC,eACP,oBAAC,iBAAI;IACH,KAAK,EAAE;MACLO,IAAI,EAAE,CAAC;MACPD,UAAU,EAAEtC,oBAAoB,CAACC,eAAe,EAAEC,SAAS;IAC7D;EAAE,gBAEF,oBAAC,iBAAQ;IACP,IAAI,EAAEU,IAAK;IACX,MAAM,EAAEiB,SAAU;IAClB,OAAO,EAAEE,WAAY;IACrB,KAAK,EAAEd,aAAc;IACrB,QAAQ,EAAEC,QAAS;IACnB,KAAK,EAAEE,KAAM;IACb,cAAc,EAAEC;EAAe,EAC/B,CACG,CACG;AAEhB,CAAC;AAED,MAAMc,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,UAAU,EAAE;IACVE,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE,cAAc;IAC9BC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,OAAO,EAAE,MAAM;IACf,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SAAS;QACjBC,UAAU,EAAE;MACd;IACF,CAAC;EACH,CAAC;EACDtC,KAAK,EAAE;IACL0B,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,eAEY5B,gBAAgB;AAAA"}
1
+ {"version":3,"names":["Direction","getCheckboxAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","React","createElement","Text","style","Fragment","CheckboxGroupRow","Icon","label","status","onPress","labelContainerStyle","checkboxStyle","disabled","color","uncheckedColor","rest","values","selectedValues","onValueChange","useCheckboxGroupContext","Array","isArray","isChecked","includes","handlePress","textStyles","viewStyles","extractStyles","Pressable","styles","mainParent","flexDirection","View","alignItems","flex","Checkbox","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxGroupRow.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAgD;AAAA;AAAA;AACzC,IAAIA,SAAS;AAAC;AACrB,CAAC,UAAUA,SAAS,EAAE;EAClBA,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK;EACxBA,SAAS,CAAC,YAAY,CAAC,GAAG,aAAa;AAC3C,CAAC,EAAEA,SAAS,yBAAKA,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,MAAMC,oBAAoB,GAAG,CAACC,eAAe,EAAEC,SAAS,KAAK;EACzD,IAAID,eAAe,KAAKE,kBAAc,CAACC,UAAU,EAAE;IAC/C,OAAOF,SAAS,KAAKH,SAAS,CAACM,GAAG,GAAG,YAAY,GAAG,UAAU;EAClE,CAAC,MACI,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAAU,EAAE;IACzC,OAAO,YAAY;EACvB,CAAC,MACI;IACD,OAAO,UAAU;EACrB;AACJ,CAAC;AACD,MAAMC,WAAW,GAAG,CAACC,KAAK,EAAEC,UAAU,EAAEC,SAAS,KAAK;EAClD,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC3B,oBAAOG,KAAK,CAACC,aAAa,CAACC,aAAI,EAAE;MAAEC,KAAK,EAAE,CAACL,UAAU,EAAEC,SAAS;IAAE,CAAC,EAAEF,KAAK,CAAC;EAC/E,CAAC,MACI;IACD,oBAAOG,KAAK,CAACC,aAAa,CAACD,KAAK,CAACI,QAAQ,EAAE,IAAI,EAAEP,KAAK,CAAC;EAC3D;AACJ,CAAC;AACD,MAAMQ,gBAAgB,GAAG,QAAmL;EAAA,IAAlL;IAAEC,IAAI;IAAEC,KAAK,GAAG,OAAO;IAAEC,MAAM;IAAEX,KAAK;IAAEY,OAAO;IAAEC,mBAAmB;IAAEZ,UAAU;IAAEa,aAAa;IAAEpB,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gB,mBAAmB;EACrB,CAAC,EAAEd,WAAW,CAACW,KAAK,EAAET,UAAU,EAAE2B,UAAU,CAAC,CAAC,eACpDzB,KAAK,CAACC,aAAa,CAAC+B,iBAAI,EAAE;IAAE7B,KAAK,EAAE;MAC3B+B,IAAI,EAAE,CAAC;MACPD,UAAU,EAAE5C,oBAAoB,CAACC,eAAe,EAAEC,SAAS;IAC/D;EAAE,CAAC,eACHS,KAAK,CAACC,aAAa,CAACkC,iBAAQ,EAAE;IAAE7B,IAAI,EAAEA,IAAI;IAAEE,MAAM,EAAEc,SAAS;IAAEb,OAAO,EAAEe,WAAW;IAAErB,KAAK,EAAEQ,aAAa;IAAEC,QAAQ,EAAEA,QAAQ;IAAEC,KAAK,EAAEA,KAAK;IAAEC,cAAc,EAAEA;EAAe,CAAC,CAAC,CAAC,CAAC;AAC5L,CAAC;AACD,MAAMe,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC7BP,UAAU,EAAE;IACRG,UAAU,EAAE,QAAQ;IACpBK,cAAc,EAAE,cAAc;IAC9BC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,OAAO,EAAE,MAAM;IACf,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACfC,GAAG,EAAE;QACDC,MAAM,EAAE,SAAS;QACjBC,UAAU,EAAE;MAChB;IACJ,CAAC;EACL,CAAC;EACDxC,KAAK,EAAE;IACH2B,IAAI,EAAE;EACV;AACJ,CAAC,CAAC;AAAC,eACY7B,gBAAgB;AAAA"}
@@ -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]
@@ -125,22 +126,4 @@ const styles = _reactNative.StyleSheet.create({
125
126
  });
126
127
  var _default = CheckboxRow;
127
128
  exports.default = _default;
128
- //# sourceMappingURL=CheckboxRow.js.mape-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
- exports.default = _default;
146
129
  //# sourceMappingURL=CheckboxRow.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Direction","renderLabel","value","labelStyle","textStyle","isString","React","createElement","Text","style","Fragment","CheckboxRow","label","labelContainerStyle","checkboxStyle","direction","Row","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","rest","internalValue","setInternalValue","useState","useEffect","previousDefaultValue","usePrevious","Boolean","handlePress","newValue","textStyles","viewStyles","extractStyles","Pressable","styles","mainParent","flexDirection","View","alignItems","Checkbox","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect","flex"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxRow.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAC3B,IAAIA,SAAS;AAAC;AACrB,CAAC,UAAUA,SAAS,EAAE;EAClBA,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK;EACxBA,SAAS,CAAC,YAAY,CAAC,GAAG,aAAa;AAC3C,CAAC,EAAEA,SAAS,yBAAKA,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,MAAMC,WAAW,GAAG,CAACC,KAAK,EAAEC,UAAU,EAAEC,S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EA,QAAQ;IAAEC,OAAO,EAAEiB,WAAW;IAAEd,KAAK,EAAEA,KAAK;IAAEC,cAAc,EAAEA,cAAc;IAAEE,WAAW,EAAEA,WAAW;IAAEC,aAAa,EAAEA,aAAa;IAAEC,IAAI,EAAEA;EAAK,CAAC,CAAC,CAAC;AAC/P,CAAC;AACD,MAAMe,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC7BN,UAAU,EAAE;IACRG,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE,cAAc;IAC9BC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,OAAO,EAAE,MAAM;IACf,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACfC,GAAG,EAAE;QACDC,MAAM,EAAE,SAAS;QACjBC,UAAU,EAAE;MAChB;IACJ,CAAC;EACL,CAAC;EACDhD,KAAK,EAAE;IACHiD,IAAI,EAAE;EACV;AACJ,CAAC,CAAC;AAAC,eACYlD,WAAW;AAAA"}
1
+ {"version":3,"names":["Direction","renderLabel","value","labelStyle","textStyle","isString","CheckboxRow","label","labelContainerStyle","checkboxStyle","direction","Row","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style","rest","internalValue","setInternalValue","React","useState","useEffect","previousDefaultValue","usePrevious","Boolean","handlePress","newValue","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect","flex"],"sourceRoot":"../../../../src","sources":["components/Checkbox/CheckboxRow.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AAGA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAAA;AAAA,IAEzCA,SAAS;AAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,yBAATA,SAAS;AAarB,MAAMC,WAAW,GAAG,CAClBC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BC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,OAAO,EAAE,MAAM;IACf,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SAAS;QACjBC,UAAU,EAAE;MACd;IACF,CAAC;EACH,CAAC;EACD/C,KAAK,EAAE;IACLgD,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,eAEYjD,WAAW;AAAA"}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _Pressable = _interopRequireDefault(require("../Pressable"));
10
+ var _utilities = require("../../utilities");
11
+ var _reactNativeSwipeListView = require("react-native-swipe-list-view");
12
+ var _theming = require("../../theming");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
+ const SwipeableView = _ref => {
16
+ let {
17
+ theme,
18
+ style,
19
+ children,
20
+ Icon,
21
+ closeOnPress,
22
+ leftOpenValue,
23
+ rightOpenValue,
24
+ leftActivationValue,
25
+ rightActivationValue,
26
+ swipeActivationPercentage = 80,
27
+ stopLeftSwipe,
28
+ stopRightSwipe,
29
+ friction = 20,
30
+ ...rest
31
+ } = _ref;
32
+ const instanceOfSwipeableViewButtonProps = object => {
33
+ return "title" in object && "side" in object && "onPress" in object;
34
+ };
35
+ const instanceOfSwipeableViewSwipeHandlerProps = object => {
36
+ return "title" in object && "side" in object && "onSwipe" in object;
37
+ };
38
+ const {
39
+ viewStyles,
40
+ textStyles
41
+ } = (0, _utilities.extractStyles)(style);
42
+ const {
43
+ borderStyles,
44
+ marginStyles
45
+ } = (0, _utilities.extractBorderAndMarginStyles)(viewStyles);
46
+ const parentContainerStyles = _reactNative.StyleSheet.flatten([borderStyles, marginStyles, (0, _utilities.extractFlexItemStyles)(viewStyles), (0, _utilities.extractPositionStyles)(viewStyles), (0, _utilities.extractEffectStyles)(viewStyles), (0, _utilities.extractSizeStyles)(viewStyles)]);
47
+
48
+ //Remove styles already consumed from viewStyles
49
+ Object.keys(parentContainerStyles).forEach(key => delete viewStyles[key]);
50
+ const surfaceContainerStyles = viewStyles;
51
+ const [componentWidth, setComponentWidth] = _react.default.useState(null);
52
+ const leftButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "left"), [children]);
53
+ const rightButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "right"), [children]);
54
+ const leftSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "left"), [children]);
55
+ const rightSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "right"), [children]);
56
+ const remainingChildren = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && !instanceOfSwipeableViewSwipeHandlerProps(child.props) && !instanceOfSwipeableViewButtonProps(child.props)), [children]);
57
+ if (leftButtons.length > 2 || rightButtons.length > 2) {
58
+ throw Error("Cannot have more than 2 buttons per side");
59
+ }
60
+ if (leftSwipeHandlers.length > 1 || rightSwipeHandlers.length > 1) {
61
+ throw Error("Cannot have more than 1 swiper handler per side");
62
+ }
63
+ if (leftButtons.length && leftSwipeHandlers.length || rightButtons.length && rightSwipeHandlers.length) {
64
+ throw Error("Cannot combine swiper handler and buttons on the same side");
65
+ }
66
+
67
+ //Renders a single button/item. Used for both buttons and swipe handler
68
+ const renderBehindItem = (props, index) => /*#__PURE__*/_react.default.createElement(_Pressable.default, {
69
+ key: index.toString(),
70
+ onPress: props.onPress,
71
+ style: [styles.buttonContainer, {
72
+ backgroundColor: props.backgroundColor || theme.colors.primary
73
+ }]
74
+ }, props.icon && /*#__PURE__*/_react.default.createElement(Icon, {
75
+ name: props.icon,
76
+ size: props.iconSize || 25,
77
+ color: props.color || theme.colors.surface
78
+ }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
79
+ style: [textStyles, {
80
+ color: props.color || theme.colors.surface
81
+ }]
82
+ }, props.title));
83
+ const isLeftSwipeHandler = !!leftSwipeHandlers.length;
84
+ const isRightSwipeHandler = !!rightSwipeHandlers.length;
85
+ const defaultLeftOpenValue = componentWidth ? componentWidth / 2 : 0;
86
+ const defaultRightOpenValue = componentWidth ? -componentWidth / 2 : 0;
87
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
88
+ onLayout: event => {
89
+ setComponentWidth(event.nativeEvent.layout.width);
90
+ },
91
+ style: [styles.parentContainer, parentContainerStyles]
92
+ }, /*#__PURE__*/_react.default.createElement(_reactNativeSwipeListView.SwipeRow, _extends({
93
+ leftOpenValue: isLeftSwipeHandler ? 0 : leftOpenValue || defaultLeftOpenValue //If in swiping mode, don't keep open
94
+ ,
95
+
96
+ rightOpenValue: isRightSwipeHandler ? 0 : rightOpenValue || defaultRightOpenValue,
97
+ leftActivationValue: leftActivationValue || isLeftSwipeHandler ? defaultLeftOpenValue * (swipeActivationPercentage / 100) //When swipe passes activation percentage then it should be considered activated (call onSwipe)
98
+ : defaultLeftOpenValue,
99
+ rightActivationValue: rightActivationValue || isRightSwipeHandler ? defaultRightOpenValue * (swipeActivationPercentage / 100) : defaultRightOpenValue,
100
+ stopLeftSwipe: stopLeftSwipe || defaultLeftOpenValue,
101
+ stopRightSwipe: stopRightSwipe || defaultRightOpenValue,
102
+ onLeftAction: isLeftSwipeHandler ? () => {
103
+ var _leftSwipeHandlers$0$, _leftSwipeHandlers$0$2;
104
+ return (_leftSwipeHandlers$0$ = (_leftSwipeHandlers$0$2 = leftSwipeHandlers[0].props).onSwipe) === null || _leftSwipeHandlers$0$ === void 0 ? void 0 : _leftSwipeHandlers$0$.call(_leftSwipeHandlers$0$2);
105
+ } : undefined,
106
+ onRightAction: isRightSwipeHandler ? () => {
107
+ var _rightSwipeHandlers$, _rightSwipeHandlers$2;
108
+ return (_rightSwipeHandlers$ = (_rightSwipeHandlers$2 = rightSwipeHandlers[0].props).onSwipe) === null || _rightSwipeHandlers$ === void 0 ? void 0 : _rightSwipeHandlers$.call(_rightSwipeHandlers$2);
109
+ } : undefined,
110
+ closeOnRowPress: closeOnPress,
111
+ friction: friction
112
+ }, rest), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
113
+ style: styles.behindContainer
114
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
115
+ style: styles.behindContainerItem
116
+ }, (isLeftSwipeHandler ? leftSwipeHandlers : leftButtons).map((item, index) => renderBehindItem(item.props, index))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
117
+ style: styles.behindContainerItem
118
+ }, (isRightSwipeHandler ? rightSwipeHandlers : rightButtons).map((item, index) => renderBehindItem(item.props, index)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
119
+ style: [styles.surfaceContainer, {
120
+ backgroundColor: theme.colors.background
121
+ }, surfaceContainerStyles]
122
+ }, remainingChildren)));
123
+ };
124
+ const styles = _reactNative.StyleSheet.create({
125
+ parentContainer: {
126
+ overflow: "hidden",
127
+ minHeight: 50
128
+ },
129
+ behindContainer: {
130
+ flex: 1,
131
+ width: "100%",
132
+ height: "100%",
133
+ flexDirection: "row"
134
+ },
135
+ behindContainerItem: {
136
+ flex: 1,
137
+ flexDirection: "row"
138
+ },
139
+ buttonContainer: {
140
+ flex: 1,
141
+ alignItems: "center",
142
+ justifyContent: "center"
143
+ },
144
+ surfaceContainer: {
145
+ flexDirection: "row",
146
+ width: "100%",
147
+ height: "100%",
148
+ padding: 10,
149
+ alignItems: "center",
150
+ overflow: "hidden"
151
+ }
152
+ });
153
+ var _default = (0, _theming.withTheme)(SwipeableView);
154
+ exports.default = _default;
155
+ //# sourceMappingURL=SwipeableView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SwipeableView","theme","style","children","Icon","closeOnPress","leftOpenValue","rightOpenValue","leftActivationValue","rightActivationValue","swipeActivationPercentage","stopLeftSwipe","stopRightSwipe","friction","rest","instanceOfSwipeableViewButtonProps","object","instanceOfSwipeableViewSwipeHandlerProps","viewStyles","textStyles","extractStyles","borderStyles","marginStyles","extractBorderAndMarginStyles","parentContainerStyles","StyleSheet","flatten","extractFlexItemStyles","extractPositionStyles","extractEffectStyles","extractSizeStyles","Object","keys","forEach","key","surfaceContainerStyles","componentWidth","setComponentWidth","React","useState","leftButtons","useMemo","Children","toArray","filter","child","isValidElement","props","side","rightButtons","leftSwipeHandlers","rightSwipeHandlers","remainingChildren","length","Error","renderBehindItem","index","toString","onPress","styles","buttonContainer","backgroundColor","colors","primary","icon","iconSize","color","surface","title","isLeftSwipeHandler","isRightSwipeHandler","defaultLeftOpenValue","defaultRightOpenValue","event","nativeEvent","layout","width","parentContainer","onSwipe","undefined","behindContainer","behindContainerItem","map","item","surfaceContainer","background","create","overflow","minHeight","flex","height","flexDirection","alignItems","justifyContent","padding","withTheme"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableView.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AACA;AAQA;AAGA;AAA0C;AAAA;AAyB1C,MAAMA,aAAoE,GAAG,QAevE;EAAA,IAfwE;IAC5EC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,IAAI;IACJC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,mBAAmB;I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;IACdC,aAAa,EAAE;EACjB,CAAC;EACDV,mBAAmB,EAAE;IACnBQ,IAAI,EAAE,CAAC;IACPE,aAAa,EAAE;EACjB,CAAC;EACD/B,eAAe,EAAE;IACf6B,IAAI,EAAE,CAAC;IACPG,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDT,gBAAgB,EAAE;IAChBO,aAAa,EAAE,KAAK;IACpBf,KAAK,EAAE,MAAM;IACbc,MAAM,EAAE,MAAM;IACdI,OAAO,EAAE,EAAE;IACXF,UAAU,EAAE,QAAQ;IACpBL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,eAEY,IAAAQ,kBAAS,EAAC/F,aAAa,CAAC;AAAA"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ //Renders nothing, acts as a wrapper be used by SwipeableView
8
+ const SwipeableViewButton = () => {
9
+ return null;
10
+ };
11
+ var _default = SwipeableViewButton;
12
+ exports.default = _default;
13
+ //# sourceMappingURL=SwipeableViewButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SwipeableViewButton"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewButton.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,mBAAuD,GAAG,MAAM;EACpE,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,mBAAmB;AAAA"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ //Renders nothing, acts as a wrapper to be used by SwipeableView
8
+ const SwipeableViewSwipeHandler = () => {
9
+ return null;
10
+ };
11
+ var _default = SwipeableViewSwipeHandler;
12
+ exports.default = _default;
13
+ //# sourceMappingURL=SwipeableViewSwipeHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SwipeableViewSwipeHandler"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewSwipeHandler.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,yBAEL,GAAG,MAAM;EACR,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,yBAAyB;AAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "SwipeableView", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _SwipeableView.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "SwipeableViewButton", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _SwipeableViewButton.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SwipeableViewSwipeHandler", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _SwipeableViewSwipeHandler.default;
22
+ }
23
+ });
24
+ var _SwipeableView = _interopRequireDefault(require("./SwipeableView"));
25
+ var _SwipeableViewButton = _interopRequireDefault(require("./SwipeableViewButton"));
26
+ var _SwipeableViewSwipeHandler = _interopRequireDefault(require("./SwipeableViewSwipeHandler"));
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/SwipeableView/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmF"}
@@ -333,6 +333,24 @@ Object.defineProperty(exports, "Surface", {
333
333
  return _Surface.default;
334
334
  }
335
335
  });
336
+ Object.defineProperty(exports, "SwipeableView", {
337
+ enumerable: true,
338
+ get: function () {
339
+ return _SwipeableView.SwipeableView;
340
+ }
341
+ });
342
+ Object.defineProperty(exports, "SwipeableViewButton", {
343
+ enumerable: true,
344
+ get: function () {
345
+ return _SwipeableView.SwipeableViewButton;
346
+ }
347
+ });
348
+ Object.defineProperty(exports, "SwipeableViewSwipeHandler", {
349
+ enumerable: true,
350
+ get: function () {
351
+ return _SwipeableView.SwipeableViewSwipeHandler;
352
+ }
353
+ });
336
354
  Object.defineProperty(exports, "Swiper", {
337
355
  enumerable: true,
338
356
  get: function () {
@@ -474,6 +492,7 @@ var _Markdown = _interopRequireDefault(require("./components/Markdown"));
474
492
  var _BottomSheet = require("./components/BottomSheet");
475
493
  var _YoutubePlayer = require("./components/YoutubePlayer");
476
494
  var _Table = require("./components/Table");
495
+ var _SwipeableView = require("./components/SwipeableView");
477
496
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
478
497
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
479
498
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAEA;AASA;AAOA;AAEA;AAEA;AACA;AAEA;AAEA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAyD;AAAA;AAAA"}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAEA;AASA;AAOA;AAEA;AAEA;AACA;AAEA;AAEA;AAEA;AAEA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAyD;AAAA;AAAA"}
@@ -17,16 +17,32 @@ const SEED_DATA = {
17
17
  label: "On settle",
18
18
  description: "Action to execute when sheet settles on a snap point"
19
19
  }),
20
- snapPoints: (0, _types.createArrayProp)({
21
- label: "Snap points",
22
- description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
23
- defaultValue: ["10%", "50%", "80%"]
20
+ topSnapPosition: (0, _types.createStaticNumberProp)({
21
+ label: "Top snap position",
22
+ description: "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
23
+ defaultValue: "10%",
24
+ required: false,
25
+ formType: _types.FORM_TYPES.numeric
24
26
  }),
25
- initialSnapIndex: (0, _types.createStaticNumberProp)({
26
- label: "Initial snap index",
27
- description: "Index of the snap point to be used as the initial point",
28
- defaultValue: 0,
29
- required: false
27
+ middleSnapPosition: (0, _types.createStaticNumberProp)({
28
+ label: "Middle snap position",
29
+ description: "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
30
+ defaultValue: "50%",
31
+ required: false,
32
+ formType: _types.FORM_TYPES.numeric
33
+ }),
34
+ bottomSnapPosition: (0, _types.createStaticNumberProp)({
35
+ label: "Bottom snap position",
36
+ description: "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
37
+ defaultValue: "80%",
38
+ required: false,
39
+ formType: _types.FORM_TYPES.numeric
40
+ }),
41
+ initialSnapPosition: (0, _types.createTextEnumProp)({
42
+ label: "Initial snap position",
43
+ description: "Initial snap position that bottom sheet will snap to",
44
+ options: ["top", "middle", "bottom"],
45
+ defaultValue: "bottom"
30
46
  }),
31
47
  showHandle: (0, _types.createStaticBoolProp)({
32
48
  label: "Show handle",
@@ -64,6 +80,18 @@ const SEED_DATA = {
64
80
  label: "Bounce",
65
81
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
66
82
  defaultValue: true
83
+ }),
84
+ snapPoints: (0, _types.createArrayProp)({
85
+ label: "Custom Snap points",
86
+ description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
87
+ defaultValue: null
88
+ }),
89
+ initialSnapIndex: (0, _types.createStaticNumberProp)({
90
+ label: "Initial snap index",
91
+ description: "Index of the snap point to be used as the initial point. Overrides initial snap position",
92
+ defaultValue: null,
93
+ required: false,
94
+ group: _types.GROUPS.advanced
67
95
  })
68
96
  }
69
97
  };