@draftbit/core 46.11.1-99ce8e.2 → 46.11.1-c64d65.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/Checkbox/CheckboxGroup.js +3 -16
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -22
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/StepIndicator.js +57 -18
- package/lib/commonjs/components/TabView/TabView.js +14 -7
- package/lib/commonjs/index.js +0 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/MapMarker.js +1 -10
- package/lib/commonjs/mappings/MapMarker.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/module/components/Banner.js +23 -4
- package/lib/module/components/Banner.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.tsx.tmp +120 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.tsx.tmp +895 -0
- package/lib/module/components/Card.js.map +1 -1
- package/lib/module/components/CircleImage.js +15 -1
- package/lib/module/components/CircleImage.js.map +1 -1
- package/lib/module/components/Container.js +16 -4
- package/lib/module/components/Container.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +9 -13
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js +21 -3
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/module/components/Portal/PortalHost.js +44 -14
- package/lib/module/components/Portal/PortalHost.js.map +1 -1
- package/lib/module/components/ProgressCircle.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +23 -5
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/RadioButton/index.js.map +1 -1
- package/lib/module/components/Row.js.map +1 -1
- package/lib/module/components/RowBodyIcon.js.map +1 -1
- package/lib/module/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/module/components/Touchable.web.js.map +1 -1
- package/lib/module/components/YoutubePlayer/YoutubePlayerProps.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/AccordionItem.js.map +1 -1
- package/lib/module/mappings/AudioPlayer.js.map +1 -1
- package/lib/module/mappings/CardInline.js.map +1 -1
- package/lib/module/mappings/DeckSwiper.js.map +1 -1
- package/lib/module/mappings/Divider.js.map +1 -1
- package/lib/module/mappings/FlashList.js.map +1 -1
- package/lib/module/mappings/MapMarker.js +2 -11
- package/lib/module/mappings/MapMarker.js.map +1 -1
- package/lib/module/mappings/ProgressIndicator.js.map +1 -1
- package/lib/module/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/module/styles/shadow.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts +0 -9
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/components/BottomSheet/BottomSheet.tsx.tmp +120 -0
- package/src/components/BottomSheet/BottomSheetComponent.tsx.tmp +895 -0
- package/{lib/module/components/BottomSheet/index.js → src/components/BottomSheet/index.ts.tmp} +0 -1
- package/src/index.js +0 -1
- package/src/index.tsx +0 -2
- package/src/mappings/MapMarker.js +1 -10
- package/src/mappings/MapMarker.ts +0 -11
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +0 -89
- package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +0 -1
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -424
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +0 -1
- package/lib/commonjs/components/BottomSheet/index.js +0 -14
- package/lib/commonjs/components/BottomSheet/index.js.map +0 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +0 -81
- package/lib/module/components/BottomSheet/BottomSheet.js.map +0 -1
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -430
- package/lib/module/components/BottomSheet/BottomSheetComponent.js.map +0 -1
- package/lib/module/components/BottomSheet/index.js.map +0 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +0 -20
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +0 -170
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +0 -1
- package/lib/typescript/src/components/BottomSheet/index.d.ts +0 -2
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +0 -1
- package/src/components/BottomSheet/BottomSheet.js +0 -56
- package/src/components/BottomSheet/BottomSheetComponent.js +0 -437
- /package/{src/components/BottomSheet/BottomSheet.tsx → lib/commonjs/components/BottomSheet/BottomSheet.tsx.tmp} +0 -0
- /package/{src/components/BottomSheet/BottomSheetComponent.tsx → lib/commonjs/components/BottomSheet/BottomSheetComponent.tsx.tmp} +0 -0
- /package/{src/components/BottomSheet/index.js → lib/commonjs/components/BottomSheet/index.ts.tmp} +0 -0
- /package/{src/components/BottomSheet/index.ts → lib/module/components/BottomSheet/index.ts.tmp} +0 -0
|
@@ -9,6 +9,7 @@ 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); }
|
|
12
13
|
const {
|
|
13
14
|
Provider
|
|
14
15
|
} = _context.checkboxGroupContext;
|
|
@@ -30,24 +31,10 @@ const CheckboxGroup = _ref => {
|
|
|
30
31
|
alignItems: "center"
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
34
35
|
style: [{
|
|
35
36
|
minHeight: 40
|
|
36
|
-
}, style]
|
|
37
|
-
...rest
|
|
38
|
-
}, /*#__PURE__*/React.createElement(Provider, {
|
|
39
|
-
value: {
|
|
40
|
-
values,
|
|
41
|
-
onValueChange,
|
|
42
|
-
direction
|
|
43
|
-
}
|
|
44
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
45
|
-
style: _containerStyle
|
|
46
|
-
}, children)));
|
|
47
|
-
};
|
|
48
|
-
var _default = CheckboxGroup;
|
|
49
|
-
exports.default = _default;
|
|
50
|
-
//# sourceMappingURL=CheckboxGroup.js.map}, style]
|
|
37
|
+
}, style]
|
|
51
38
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
52
39
|
value: {
|
|
53
40
|
values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Provider","checkboxGroupContext","CheckboxGroup","direction","Direction","Vertical","values","onValueChange","style","children","rest","_containerStyle","flexDirection","Horizontal","overflow","push","alignItems","
|
|
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"}
|
|
@@ -13,7 +13,8 @@ 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
|
-
var
|
|
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;
|
|
17
18
|
exports.Direction = Direction;
|
|
18
19
|
(function (Direction) {
|
|
19
20
|
Direction["Row"] = "row";
|
|
@@ -71,14 +72,13 @@ const CheckboxGroupRow = _ref => {
|
|
|
71
72
|
textStyles,
|
|
72
73
|
viewStyles
|
|
73
74
|
} = (0, _utilities.extractStyles)(style);
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
75
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
75
76
|
onPress: handlePress,
|
|
76
77
|
style: [styles.mainParent, {
|
|
77
78
|
flexDirection: direction
|
|
78
79
|
}, viewStyles],
|
|
79
|
-
disabled: disabled
|
|
80
|
-
|
|
81
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
80
|
+
disabled: disabled
|
|
81
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
82
82
|
style: [styles.label, {
|
|
83
83
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
84
84
|
}, labelContainerStyle]
|
|
@@ -118,21 +118,4 @@ 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;
|
|
138
121
|
//# sourceMappingURL=CheckboxGroupRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Direction","getCheckboxAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","
|
|
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;EAC7D,CAAC,MAAM;IACL,oBAAO,0CAAGA,KAAK,CAAI;EACrB;AACF,CAAC;AAED,MAAMG,gBAA4D,GAAG,QAe/D;EAAA,IAfgE;IACpEC,IAAI;IACJC,KAAK,GAAG,OAAO;IACfC,MAAM;IACNN,KAAK;IACLO,OAAO;IACPC,mBAAmB;IACnBP,UAAU;IACVQ,aAAa;IACbf,SAAS,GAAGH,SAAS,CAACM,GAAG;IACzBa,QAAQ;IACRC,KAAK;IACLC,KAAK;IACLC,cAAc;IACd,GAAGC;EACL,CAAC;EACC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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"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.checkboxGroupContext = exports.Direction = void 0;
|
|
7
7
|
exports.useCheckboxGroupContext = useCheckboxGroupContext;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
9
|
+
var Direction;
|
|
10
10
|
exports.Direction = Direction;
|
|
11
11
|
(function (Direction) {
|
|
12
12
|
Direction["Horizontal"] = "horizontal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Direction","checkboxGroupContext","createContext","onValueChange","values","direction","undefined","useCheckboxGroupContext","useContext"],"sourceRoot":"../../../../src","sources":["components/Checkbox/context.
|
|
1
|
+
{"version":3,"names":["Direction","checkboxGroupContext","createContext","onValueChange","values","direction","undefined","useCheckboxGroupContext","useContext"],"sourceRoot":"../../../../src","sources":["components/Checkbox/context.js"],"mappings":";;;;;;;AAAA;AACO,IAAIA,SAAS;AAAC;AACrB,CAAC,UAAUA,SAAS,EAAE;EAClBA,SAAS,CAAC,YAAY,CAAC,GAAG,YAAY;EACtCA,SAAS,CAAC,UAAU,CAAC,GAAG,UAAU;AACtC,CAAC,EAAEA,SAAS,yBAAKA,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1B,MAAMC,oBAAoB,gBAAG,IAAAC,oBAAa,EAAC;EAC9CC,aAAa,EAAE,MAAM,CAAE,CAAC;EACxBC,MAAM,EAAE,EAAE;EACVC,SAAS,EAAEC;AACf,CAAC,CAAC;AAAC;AACI,SAASC,uBAAuB,GAAG;EACtC,OAAO,IAAAC,iBAAU,EAACP,oBAAoB,CAAC;AAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAuD"}
|
|
@@ -8,9 +8,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
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); }
|
|
10
10
|
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; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
// @ts-nocheck
|
|
12
|
+
|
|
14
13
|
const STEP_STATUS = {
|
|
15
14
|
CURRENT: "current",
|
|
16
15
|
FINISHED: "finished",
|
|
@@ -19,7 +18,7 @@ const STEP_STATUS = {
|
|
|
19
18
|
class StepIndicator extends _react.Component {
|
|
20
19
|
constructor(props) {
|
|
21
20
|
super(props);
|
|
22
|
-
|
|
21
|
+
this.renderProgressBarBackground = () => {
|
|
23
22
|
const {
|
|
24
23
|
stepCount,
|
|
25
24
|
direction
|
|
@@ -62,8 +61,8 @@ class StepIndicator extends _react.Component {
|
|
|
62
61
|
},
|
|
63
62
|
style: progressBarBackgroundStyle
|
|
64
63
|
});
|
|
65
|
-
}
|
|
66
|
-
|
|
64
|
+
};
|
|
65
|
+
this.renderProgressBar = () => {
|
|
67
66
|
const {
|
|
68
67
|
stepCount,
|
|
69
68
|
direction
|
|
@@ -93,8 +92,8 @@ class StepIndicator extends _react.Component {
|
|
|
93
92
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
94
93
|
style: progressBarStyle
|
|
95
94
|
});
|
|
96
|
-
}
|
|
97
|
-
|
|
95
|
+
};
|
|
96
|
+
this.renderStepIndicator = () => {
|
|
98
97
|
let steps = [];
|
|
99
98
|
const {
|
|
100
99
|
stepCount,
|
|
@@ -125,8 +124,8 @@ class StepIndicator extends _react.Component {
|
|
|
125
124
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
126
125
|
}]
|
|
127
126
|
}, steps);
|
|
128
|
-
}
|
|
129
|
-
|
|
127
|
+
};
|
|
128
|
+
this.renderStepLabels = () => {
|
|
130
129
|
const {
|
|
131
130
|
labels,
|
|
132
131
|
direction,
|
|
@@ -168,8 +167,8 @@ class StepIndicator extends _react.Component {
|
|
|
168
167
|
alignItems: this.state.customStyles.labelAlign
|
|
169
168
|
}]
|
|
170
169
|
}, labelViews);
|
|
171
|
-
}
|
|
172
|
-
|
|
170
|
+
};
|
|
171
|
+
this.renderStep = position => {
|
|
173
172
|
const {
|
|
174
173
|
renderStepIndicator
|
|
175
174
|
} = this.props;
|
|
@@ -236,8 +235,8 @@ class StepIndicator extends _react.Component {
|
|
|
236
235
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
237
236
|
style: indicatorLabelStyle
|
|
238
237
|
}, "".concat(position + 1)));
|
|
239
|
-
}
|
|
240
|
-
|
|
238
|
+
};
|
|
239
|
+
this.getStepStatus = stepPosition => {
|
|
241
240
|
const {
|
|
242
241
|
currentPosition
|
|
243
242
|
} = this.props;
|
|
@@ -248,8 +247,8 @@ class StepIndicator extends _react.Component {
|
|
|
248
247
|
} else {
|
|
249
248
|
return STEP_STATUS.UNFINISHED;
|
|
250
249
|
}
|
|
251
|
-
}
|
|
252
|
-
|
|
250
|
+
};
|
|
251
|
+
this.onCurrentPositionChanged = position => {
|
|
253
252
|
let {
|
|
254
253
|
stepCount
|
|
255
254
|
} = this.props;
|
|
@@ -269,7 +268,7 @@ class StepIndicator extends _react.Component {
|
|
|
269
268
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
270
269
|
duration: 100
|
|
271
270
|
})])]).start();
|
|
272
|
-
}
|
|
271
|
+
};
|
|
273
272
|
const defaultStyles = {
|
|
274
273
|
stepIndicatorSize: 30,
|
|
275
274
|
currentStepIndicatorSize: 40,
|
|
@@ -335,7 +334,6 @@ class StepIndicator extends _react.Component {
|
|
|
335
334
|
// ),
|
|
336
335
|
// }));
|
|
337
336
|
// }
|
|
338
|
-
|
|
339
337
|
if (prevProps.currentPosition !== this.props.currentPosition) {
|
|
340
338
|
this.onCurrentPositionChanged(this.props.currentPosition);
|
|
341
339
|
}
|
|
@@ -383,4 +381,45 @@ StepIndicator.defaultProps = {
|
|
|
383
381
|
customStyles: {},
|
|
384
382
|
direction: "horizontal"
|
|
385
383
|
};
|
|
384
|
+
//# sourceMappingURL=StepIndicator.js.maples = _reactNative.StyleSheet.create({
|
|
385
|
+
container: {
|
|
386
|
+
backgroundColor: "transparent"
|
|
387
|
+
},
|
|
388
|
+
stepIndicatorContainer: {
|
|
389
|
+
flexDirection: "row",
|
|
390
|
+
alignItems: "center",
|
|
391
|
+
justifyContent: "space-around",
|
|
392
|
+
backgroundColor: "transparent"
|
|
393
|
+
},
|
|
394
|
+
stepLabelsContainer: {
|
|
395
|
+
justifyContent: "space-around"
|
|
396
|
+
},
|
|
397
|
+
step: {
|
|
398
|
+
alignItems: "center",
|
|
399
|
+
justifyContent: "center",
|
|
400
|
+
zIndex: 2
|
|
401
|
+
},
|
|
402
|
+
stepContainer: {
|
|
403
|
+
flex: 1,
|
|
404
|
+
flexDirection: "row",
|
|
405
|
+
alignItems: "center",
|
|
406
|
+
justifyContent: "center"
|
|
407
|
+
},
|
|
408
|
+
stepLabel: {
|
|
409
|
+
fontSize: 12,
|
|
410
|
+
textAlign: "center",
|
|
411
|
+
fontWeight: "500"
|
|
412
|
+
},
|
|
413
|
+
stepLabelItem: {
|
|
414
|
+
flex: 1,
|
|
415
|
+
alignItems: "center",
|
|
416
|
+
justifyContent: "center"
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
StepIndicator.defaultProps = {
|
|
420
|
+
currentPosition: 0,
|
|
421
|
+
stepCount: 5,
|
|
422
|
+
customStyles: {},
|
|
423
|
+
direction: "horizontal"
|
|
424
|
+
};
|
|
386
425
|
//# sourceMappingURL=StepIndicator.js.map
|
|
@@ -10,7 +10,6 @@ var _theming = require("../../theming");
|
|
|
10
10
|
var _utilities = require("../../utilities");
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
13
|
const TabViewComponent = _ref => {
|
|
15
14
|
let {
|
|
16
15
|
Icon,
|
|
@@ -36,13 +35,11 @@ const TabViewComponent = _ref => {
|
|
|
36
35
|
textStyles,
|
|
37
36
|
viewStyles
|
|
38
37
|
} = (0, _utilities.extractStyles)(style);
|
|
39
|
-
|
|
40
38
|
//Check type of child using props
|
|
41
39
|
//Regular '.type' cannot work because Draftbit strips the type in Draft view
|
|
42
40
|
const instanceOfTabViewItemProps = object => {
|
|
43
41
|
return "title" in object;
|
|
44
42
|
};
|
|
45
|
-
|
|
46
43
|
//Populate routes and scenes based on children
|
|
47
44
|
React.useEffect(() => {
|
|
48
45
|
const newRoutes = [];
|
|
@@ -68,7 +65,8 @@ const TabViewComponent = _ref => {
|
|
|
68
65
|
}
|
|
69
66
|
};
|
|
70
67
|
const renderTabBar = props => {
|
|
71
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar,
|
|
68
|
+
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, {
|
|
69
|
+
...props,
|
|
72
70
|
activeColor: activeColor || theme.colors.primary,
|
|
73
71
|
inactiveColor: inactiveColor || theme.colors.divider,
|
|
74
72
|
pressColor: pressColor || theme.colors.primary,
|
|
@@ -82,7 +80,7 @@ const TabViewComponent = _ref => {
|
|
|
82
80
|
route,
|
|
83
81
|
color
|
|
84
82
|
} = _ref2;
|
|
85
|
-
return route
|
|
83
|
+
return (route === null || route === void 0 ? void 0 : route.icon) ? /*#__PURE__*/React.createElement(Icon, {
|
|
86
84
|
name: route.icon,
|
|
87
85
|
color: color,
|
|
88
86
|
size: 16
|
|
@@ -91,9 +89,8 @@ const TabViewComponent = _ref => {
|
|
|
91
89
|
style: {
|
|
92
90
|
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
93
91
|
}
|
|
94
|
-
})
|
|
92
|
+
});
|
|
95
93
|
};
|
|
96
|
-
|
|
97
94
|
//Cannot render TabView without at least one tab
|
|
98
95
|
if (!routes.length) {
|
|
99
96
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -114,4 +111,14 @@ const TabViewComponent = _ref => {
|
|
|
114
111
|
};
|
|
115
112
|
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
116
113
|
exports.default = _default;
|
|
114
|
+
//# sourceMappingURL=TabView.js.mapw.SceneMap)(tabScenes),
|
|
115
|
+
renderTabBar: renderTabBar,
|
|
116
|
+
onIndexChange: indexChangeHandler,
|
|
117
|
+
tabBarPosition: tabBarPosition,
|
|
118
|
+
keyboardDismissMode: keyboardDismissMode,
|
|
119
|
+
swipeEnabled: swipeEnabled
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
123
|
+
exports.default = _default;
|
|
117
124
|
//# sourceMappingURL=TabView.js.map
|
package/lib/commonjs/index.js
CHANGED
|
@@ -51,12 +51,6 @@ Object.defineProperty(exports, "Banner", {
|
|
|
51
51
|
return _Banner.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "BottomSheet", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _BottomSheet.BottomSheet;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
54
|
Object.defineProperty(exports, "Button", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function () {
|
|
@@ -471,7 +465,6 @@ var _Shadow = _interopRequireDefault(require("./components/Shadow"));
|
|
|
471
465
|
var _DeckSwiper = require("./components/DeckSwiper");
|
|
472
466
|
var _TabView = require("./components/TabView");
|
|
473
467
|
var _Markdown = _interopRequireDefault(require("./components/Markdown"));
|
|
474
|
-
var _BottomSheet = require("./components/BottomSheet");
|
|
475
468
|
var _YoutubePlayer = require("./components/YoutubePlayer");
|
|
476
469
|
var _Table = require("./components/Table");
|
|
477
470
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
@@ -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;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAyD;AAAA;AAAA"}
|
|
@@ -49,16 +49,7 @@ const SEED_DATA = {
|
|
|
49
49
|
pinColor: (0, _types.createColorProp)({
|
|
50
50
|
label: "Pin Color",
|
|
51
51
|
description: "Sets the color of the marker"
|
|
52
|
-
})
|
|
53
|
-
pinImage: {
|
|
54
|
-
group: _types.GROUPS.data,
|
|
55
|
-
label: "Pin image",
|
|
56
|
-
description: "Image to be used instead of the default pin",
|
|
57
|
-
editable: true,
|
|
58
|
-
required: false,
|
|
59
|
-
formType: _types.FORM_TYPES.image,
|
|
60
|
-
propType: _types.PROP_TYPES.ASSET
|
|
61
|
-
}
|
|
52
|
+
})
|
|
62
53
|
}
|
|
63
54
|
};
|
|
64
55
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","map","stylesPanelSections","StylesPanelSections","Size","Margins","Effects","layout","props","latitude","createNumberProp","label","required","precision","min","max","longitude","title","createTextProp","defaultValue","flat","createBoolProp","group","GROUPS","basic","pinColor","createColorProp"
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","packageName","description","category","COMPONENT_TYPES","map","stylesPanelSections","StylesPanelSections","Size","Margins","Effects","layout","props","latitude","createNumberProp","label","required","precision","min","max","longitude","title","createTextProp","defaultValue","flat","createBoolProp","group","GROUPS","basic","pinColor","createColorProp"],"sourceRoot":"../../../src","sources":["mappings/MapMarker.ts"],"mappings":";;;;;;AAAA;AAUO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,YAAY;EAClBC,GAAG,EAAE,WAAW;EAChBC,WAAW,EAAE,gBAAgB;EAC7BC,WAAW,EAAE,kCAAkC;EAC/CC,QAAQ,EAAEC,sBAAe,CAACC,GAAG;EAC7BC,mBAAmB,EAAE,CACnBC,0BAAmB,CAACC,IAAI,EACxBD,0BAAmB,CAACE,OAAO,EAC3BF,0BAAmB,CAACG,OAAO,CAC5B;EACDC,MAAM,EAAE,CAAC,CAAC;EACVC,KAAK,EAAE;IACLC,QAAQ,EAAE,IAAAC,uBAAgB,EAAC;MACzBC,KAAK,EAAE,UAAU;MACjBb,WAAW,EAAE,6CAA6C;MAC1Dc,QAAQ,EAAE,IAAI;MACdC,SAAS,EAAE,CAAC;MACZC,GAAG,EAAE,CAAC,EAAE;MACRC,GAAG,EAAE;IACP,CAAC,CAAC;IACFC,SAAS,EAAE,IAAAN,uBAAgB,EAAC;MAC1BC,KAAK,EAAE,WAAW;MAClBb,WAAW,EAAE,8CAA8C;MAC3Dc,QAAQ,EAAE,IAAI;MACdC,SAAS,EAAE,CAAC;MACZC,GAAG,EAAE,CAAC,GAAG;MACTC,GAAG,EAAE;IACP,CAAC,CAAC;IACFE,KAAK,EAAE,IAAAC,qBAAc,EAAC;MACpBP,KAAK,EAAE,OAAO;MACdb,WAAW,EAAE,qCAAqC;MAClDqB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFrB,WAAW,EAAE,IAAAoB,qBAAc,EAAC;MAC1BP,KAAK,EAAE,aAAa;MACpBb,WAAW,EAAE,qCAAqC;MAClDqB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFC,IAAI,EAAE,IAAAC,qBAAc,EAAC;MACnBV,KAAK,EAAE,MAAM;MACbb,WAAW,EACT,+GAA+G;MACjHwB,KAAK,EAAEC,aAAM,CAACC,KAAK;MACnBL,YAAY,EAAE;IAChB,CAAC,CAAC;IACFM,QAAQ,EAAE,IAAAC,sBAAe,EAAC;MACxBf,KAAK,EAAE,WAAW;MAClBb,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress"],"sourceRoot":"../../../../src","sources":["components/ActionSheet/ActionSheetCancel.
|
|
1
|
+
{"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress","createElement"],"sourceRoot":"../../../../src","sources":["components/ActionSheet/ActionSheetCancel.js"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,MAAMC,iBAAiB,GAAG,QAAkD;EAAA,IAAjD;IAAEC,KAAK,GAAG,QAAQ;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAS,CAAC;EACnE,oBAAQN,KAAK,CAACO,aAAa,CAACN,eAAe,EAAE;IAAEE,KAAK,EAAEA,KAAK;IAAEC,KAAK,EAAEA,KAAK,IAAI,SAAS;IAAEC,KAAK,EAAE,CAACA,KAAK,CAAC;IAAEC,OAAO,EAAEA;EAAQ,CAAC,CAAC;AAC/H,CAAC;AACD,eAAeJ,iBAAiB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Button, Text, View, StyleSheet, Animated } from "react-native";
|
|
4
3
|
import Surface from "./Surface";
|
|
@@ -61,7 +60,6 @@ const Banner = _ref => {
|
|
|
61
60
|
measured: true
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
|
-
|
|
65
63
|
// The banner animation has 2 parts:
|
|
66
64
|
// 1. Blank spacer element which animates its height to move the content
|
|
67
65
|
// 2. Actual banner which animates its translateY
|
|
@@ -71,9 +69,10 @@ const Banner = _ref => {
|
|
|
71
69
|
// However we can't animated banner's height directly as it'll also resize the content inside
|
|
72
70
|
const height = Animated.multiply(position, layout.height);
|
|
73
71
|
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
74
|
-
return /*#__PURE__*/React.createElement(Surface,
|
|
72
|
+
return /*#__PURE__*/React.createElement(Surface, {
|
|
73
|
+
...rest,
|
|
75
74
|
style: [styles.container, shadow(ELEVATION), style]
|
|
76
|
-
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
77
76
|
style: [styles.wrapper, contentStyle]
|
|
78
77
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
79
78
|
style: {
|
|
@@ -155,4 +154,24 @@ const styles = StyleSheet.create({
|
|
|
155
154
|
}
|
|
156
155
|
});
|
|
157
156
|
export default withTheme(Banner);
|
|
157
|
+
//# sourceMappingURL=Banner.js.mapn: "row",
|
|
158
|
+
justifyContent: "flex-start",
|
|
159
|
+
marginHorizontal: 8,
|
|
160
|
+
marginTop: 16,
|
|
161
|
+
marginBottom: 0
|
|
162
|
+
},
|
|
163
|
+
icon: {
|
|
164
|
+
margin: 8
|
|
165
|
+
},
|
|
166
|
+
message: {
|
|
167
|
+
flex: 1,
|
|
168
|
+
margin: 8
|
|
169
|
+
},
|
|
170
|
+
actions: {
|
|
171
|
+
flexDirection: "row",
|
|
172
|
+
justifyContent: "flex-end",
|
|
173
|
+
margin: 8
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
export default withTheme(Banner);
|
|
158
177
|
//# sourceMappingURL=Banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sourceRoot":"../../../src","sources":["components/Banner.
|
|
1
|
+
{"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","createElement","styles","container","wrapper","onLayout","absolute","transform","opacity","marginBottom","name","size","message","color","colors","text","accessibilityLiveRegion","accessibilityRole","actions","primary","title","onPress","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sourceRoot":"../../../src","sources":["components/Banner.js"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAS,cAAc;AACxE,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,MAAM,MAAM,kBAAkB;AACrC,SAASC,SAAS,QAAQ,YAAY;AACtC,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,MAAM,GAAG,QAA4H;EAAA,IAA3H;IAAEC,gBAAgB,GAAG,IAAI;IAAEC,WAAW,GAAG,IAAI;IAAEC,IAAI;IAAEC,WAAW;IAAEC,OAAO;IAAEC,YAAY;IAAEC,KAAK;IAAEC,KAAK;IAAEC,IAAI;IAAE,GAAGC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E;EACX,CAAC;EACDrD,OAAO,EAAE;IACLwD,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,gBAAgB,EAAE,CAAC;IACnBC,SAAS,EAAE,EAAE;IACbvB,YAAY,EAAE;EAClB,CAAC;EACDtC,IAAI,EAAE;IACF8D,MAAM,EAAE;EACZ,CAAC;EACDrB,OAAO,EAAE;IACLsB,IAAI,EAAE,CAAC;IACPD,MAAM,EAAE;EACZ,CAAC;EACDf,OAAO,EAAE;IACLW,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,UAAU;IAC1BG,MAAM,EAAE;EACZ;AACJ,CAAC,CAAC;AACF,eAAepE,SAAS,CAACG,MAAM,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
View,
|
|
5
|
+
StyleProp,
|
|
6
|
+
ViewStyle,
|
|
7
|
+
ScrollViewProps,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
|
|
10
|
+
import BottomSheetComponent from "./BottomSheetComponent";
|
|
11
|
+
import type { Theme } from "../../styles/DefaultTheme";
|
|
12
|
+
import { withTheme } from "../../theming";
|
|
13
|
+
|
|
14
|
+
export interface BottomSheetProps extends ScrollViewProps {
|
|
15
|
+
snapPoints?: (string | number)[];
|
|
16
|
+
initialSnapIndex?: number;
|
|
17
|
+
showHandle?: boolean;
|
|
18
|
+
handleColor?: string;
|
|
19
|
+
topBorderRadius?: number;
|
|
20
|
+
borderWidth?: number;
|
|
21
|
+
borderColor?: string;
|
|
22
|
+
onSettle?: (index: number) => void;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
theme: Theme;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const BottomSheet: React.FC<React.PropsWithChildren<BottomSheetProps>> = ({
|
|
28
|
+
theme,
|
|
29
|
+
snapPoints = ["10%", "50%", "80%"],
|
|
30
|
+
initialSnapIndex = 0,
|
|
31
|
+
showHandle = true,
|
|
32
|
+
handleColor = theme.colors.divider,
|
|
33
|
+
topBorderRadius = 20,
|
|
34
|
+
borderWidth = 1,
|
|
35
|
+
borderColor = theme.colors.divider,
|
|
36
|
+
onSettle,
|
|
37
|
+
style,
|
|
38
|
+
children,
|
|
39
|
+
...rest
|
|
40
|
+
}) => {
|
|
41
|
+
const backgroundColor =
|
|
42
|
+
(style as ViewStyle)?.backgroundColor || theme.colors.background;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<View style={styles.parentContainer} pointerEvents="box-none">
|
|
46
|
+
<BottomSheetComponent
|
|
47
|
+
componentType="ScrollView"
|
|
48
|
+
snapPoints={snapPoints}
|
|
49
|
+
initialSnapIndex={initialSnapIndex}
|
|
50
|
+
renderHandle={() => (
|
|
51
|
+
<>
|
|
52
|
+
{showHandle && (
|
|
53
|
+
<View
|
|
54
|
+
style={[
|
|
55
|
+
styles.handleContainer,
|
|
56
|
+
{
|
|
57
|
+
backgroundColor,
|
|
58
|
+
borderTopLeftRadius: topBorderRadius,
|
|
59
|
+
borderTopRightRadius: topBorderRadius,
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
>
|
|
63
|
+
<View
|
|
64
|
+
style={[styles.handle, { backgroundColor: handleColor }]}
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
)}
|
|
68
|
+
</>
|
|
69
|
+
)}
|
|
70
|
+
contentContainerStyle={[styles.contentContainerStyle, style]}
|
|
71
|
+
containerStyle={StyleSheet.flatten([
|
|
72
|
+
styles.containerStyle,
|
|
73
|
+
{
|
|
74
|
+
backgroundColor,
|
|
75
|
+
borderTopLeftRadius: topBorderRadius,
|
|
76
|
+
borderTopRightRadius: topBorderRadius,
|
|
77
|
+
borderWidth,
|
|
78
|
+
borderColor,
|
|
79
|
+
},
|
|
80
|
+
])}
|
|
81
|
+
onSettle={onSettle}
|
|
82
|
+
{...rest}
|
|
83
|
+
>
|
|
84
|
+
{children}
|
|
85
|
+
</BottomSheetComponent>
|
|
86
|
+
</View>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
//Render on top of everything
|
|
92
|
+
parentContainer: {
|
|
93
|
+
position: "absolute",
|
|
94
|
+
left: 0,
|
|
95
|
+
right: 0,
|
|
96
|
+
top: 0,
|
|
97
|
+
bottom: 0,
|
|
98
|
+
zIndex: 10,
|
|
99
|
+
overflow: "hidden",
|
|
100
|
+
},
|
|
101
|
+
contentContainerStyle: {
|
|
102
|
+
paddingHorizontal: 16,
|
|
103
|
+
paddingVertical: 10,
|
|
104
|
+
},
|
|
105
|
+
containerStyle: {
|
|
106
|
+
flex: 1,
|
|
107
|
+
overflow: "hidden",
|
|
108
|
+
},
|
|
109
|
+
handleContainer: {
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
paddingVertical: 20,
|
|
112
|
+
},
|
|
113
|
+
handle: {
|
|
114
|
+
width: 40,
|
|
115
|
+
height: 2,
|
|
116
|
+
borderRadius: 4,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export default withTheme(BottomSheet);
|