@draftbit/core 47.2.1-a33ddf.2 → 47.2.2-f52b48.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.
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +16 -3
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +22 -5
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/commonjs/components/ResizeMode.js +2 -1
- package/lib/commonjs/components/ResizeMode.js.map +1 -1
- package/lib/commonjs/components/SwipeableView/SwipeableView.js +155 -0
- package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +13 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +13 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/index.js +28 -0
- package/lib/commonjs/components/SwipeableView/index.js.map +1 -0
- package/lib/commonjs/index.js +19 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/BottomSheet.js +37 -9
- package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
- package/lib/commonjs/mappings/FlatList.js +0 -3
- package/lib/commonjs/mappings/FlatList.js.map +1 -1
- package/lib/commonjs/mappings/SwipeableView.js +183 -0
- package/lib/commonjs/mappings/SwipeableView.js.map +1 -0
- package/lib/commonjs/utilities.js +27 -2
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/components/SwipeableView/SwipeableView.js +147 -0
- package/lib/module/components/SwipeableView/SwipeableView.js.map +1 -0
- package/lib/module/components/SwipeableView/SwipeableViewButton.js +6 -0
- package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +1 -0
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +6 -0
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
- package/lib/module/components/SwipeableView/index.js +4 -0
- package/lib/module/components/SwipeableView/index.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/BottomSheet.js +38 -10
- package/lib/module/mappings/BottomSheet.js.map +1 -1
- package/lib/module/mappings/FlatList.js +0 -3
- package/lib/module/mappings/FlatList.js.map +1 -1
- package/lib/module/mappings/SwipeableView.js +175 -0
- package/lib/module/mappings/SwipeableView.js.map +1 -0
- package/lib/module/utilities.js +18 -0
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +29 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +13 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +13 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/index.d.ts +4 -0
- package/lib/typescript/src/components/SwipeableView/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +0 -3
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/SwipeableView.d.ts +426 -0
- package/lib/typescript/src/mappings/SwipeableView.d.ts.map +1 -0
- package/lib/typescript/src/utilities.d.ts +6 -0
- package/lib/typescript/src/utilities.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/BottomSheet/BottomSheet.js +17 -2
- package/src/components/BottomSheet/BottomSheet.tsx +32 -4
- package/src/components/SwipeableView/SwipeableView.js +117 -0
- package/src/components/SwipeableView/SwipeableView.tsx +299 -0
- package/src/components/SwipeableView/SwipeableViewButton.js +5 -0
- package/src/components/SwipeableView/SwipeableViewButton.tsx +18 -0
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +5 -0
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +20 -0
- package/src/components/SwipeableView/index.js +3 -0
- package/src/components/SwipeableView/index.tsx +3 -0
- package/src/index.js +1 -0
- package/src/index.tsx +6 -0
- package/src/mappings/BottomSheet.js +37 -9
- package/src/mappings/BottomSheet.ts +43 -8
- package/src/mappings/FlatList.js +0 -3
- package/src/mappings/FlatList.ts +0 -3
- package/src/mappings/SwipeableView.js +181 -0
- package/src/mappings/SwipeableView.ts +210 -0
- package/src/utilities.js +41 -0
- 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
|
|
17
|
-
|
|
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","
|
|
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,IAAI;IACjBC,WAAW,GAAGT,KAAK,CAACU,MAAM,CAACC,OAAO;IAClCC,eAAe,GAAG,EAAE;IACpBC,WAAW,GAAG,CAAC;IACfC,WAAW,GAAGd,KAAK,CAACU,MAAM,CAACC,OAAO;IAClCI,QAAQ;IACRC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAMC,eAAe,GACnB,CAACH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAgBG,eAAe,KAAInB,KAAK,CAACU,MAAM,CAACU,UAAU;EAElE,MAAMnB,UAAU,GAAGC,cAAc,IAAI,CACnCC,eAAe,EACfC,kBAAkB,EAClBC,kBAAkB,CACnB;EAED,MAAMgB,wBAAwB,GAAIC,QAAsB,IAAK;IAC3D,QAAQA,QAAQ;MACd,KAAK,KAAK;QACR,OAAO,CAAC;MACV,KAAK,QAAQ;QACX,OAAO,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rBW,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,
|
|
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.
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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","
|
|
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,CA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Aa;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
|
|
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
|
-
|
|
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","
|
|
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,KAA+B,EAC/BC,UAAgC,EAChCC,SAA+B,KAC5B;EACH,IAAI,IAAAC,gBAAQ,EAACH,KAAK,CAAC,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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","Platform","OS","console","log","data"],"sourceRoot":"../../../../src","sources":["components/DatePicker/DatePickerComponent.
|
|
1
|
+
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","Platform","OS","React","createElement","DateTimePickerModal","date","isVisible","display","onCancel","console","log","onConfirm","data","DateTimePicker"],"sourceRoot":"../../../../src","sources":["components/DatePicker/DatePickerComponent.js"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAAqE;AACrE,MAAMA,mBAAmB,GAAG,QAAkD;EAAA,IAAjD;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAkB,CAAC;EACrE,OAAOC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAID,qBAAQ,CAACC,EAAE,KAAK,SAAS,gBAAIC,cAAK,CAACC,aAAa,CAACC,uCAAmB,EAAE;IAAEC,IAAI,EAAET,KAAK;IAAEE,IAAI,EAAEA,IAAI;IAAEQ,SAAS,EAAE,IAAI;IAAEC,OAAO,EAAEP,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS;IAAEO,QAAQ,EAAE,MAAM;MAClNC,OAAO,CAACC,GAAG,CAAC,6CAA6C,CAAC;MAC1DX,gBAAgB,EAAE;IACtB,CAAC;IAAEY,SAAS,EAAGC,IAAI,IAAK;MACpBf,QAAQ,CAAC,IAAI,EAAEe,IAAI,CAAC;IACxB;EAAE,CAAC,CAAC,gBAAKV,cAAK,CAACC,aAAa,CAACU,uBAAc,EAAE;IAAEjB,KAAK,EAAEA,KAAK;IAAEE,IAAI,EAAEA,IAAI;IAAED,QAAQ,EAAEA,QAAQ;IAAEU,OAAO,EAAE;EAAU,CAAC,CAAE;AAC3H,CAAC;AAAC,eACaZ,mBAAmB;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/ResizeMode.
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/ResizeMode.js"],"mappings":""}
|
|
@@ -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;IACnBC,oBAAoB;IACpBC,yBAAyB,GAAG,EAAE;IAC9BC,aAAa;IACbC,cAAc;IACdC,QAAQ,GAAG,EAAE;IACb,G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B,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"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -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":"
|
|
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"}
|