@adiraku/react-native-ui 0.2.0 → 0.2.1
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/Appbar/Appbar.component.js +9 -6
- package/lib/commonjs/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js +9 -6
- package/lib/commonjs/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/module/components/Appbar/Appbar.component.js +9 -6
- package/lib/module/components/Appbar/Appbar.component.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.component.js +9 -6
- package/lib/module/components/BottomSheet/BottomSheet.component.js.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.component.d.ts.map +1 -1
- package/lib/typescript/components/Appbar/Appbar.type.d.ts +4 -0
- package/lib/typescript/components/Appbar/Appbar.type.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.component.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet/BottomSheet.type.d.ts +4 -0
- package/lib/typescript/components/BottomSheet/BottomSheet.type.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Appbar/Appbar.component.tsx +9 -1
- package/src/components/Appbar/Appbar.type.ts +7 -0
- package/src/components/BottomSheet/BottomSheet.component.tsx +9 -3
- package/src/components/BottomSheet/BottomSheet.type.ts +8 -0
|
@@ -12,6 +12,7 @@ var _icons = require("../../icons");
|
|
|
12
12
|
var _typography = require("../typography/typography.component");
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
16
|
const Appbar = props => {
|
|
16
17
|
const {
|
|
17
18
|
backIcon = /*#__PURE__*/React.createElement(_icons.IconArrowLeft, {
|
|
@@ -24,26 +25,28 @@ const Appbar = props => {
|
|
|
24
25
|
containerStyle,
|
|
25
26
|
onBackPress = () => {},
|
|
26
27
|
buttonActions = [],
|
|
27
|
-
withShadow = true
|
|
28
|
+
withShadow = true,
|
|
29
|
+
backIconProps = {},
|
|
30
|
+
titleProps = {}
|
|
28
31
|
} = props;
|
|
29
32
|
const computedStyle = (0, _Appbar.getStyle)();
|
|
30
33
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
31
34
|
style: [computedStyle.container, containerStyle, withShadow && _themes.Shadow['shadow-elevation-2']]
|
|
32
|
-
}, customHeader || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, {
|
|
35
|
+
}, customHeader || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, _extends({
|
|
33
36
|
onPress: onBackPress,
|
|
34
37
|
style: [computedStyle.iconWrapper],
|
|
35
38
|
underlayColor: _themes.Palettes.grey[50]
|
|
36
|
-
}, backIcon), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
39
|
+
}, backIconProps), backIcon), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
37
40
|
style: [computedStyle.contentWrapper]
|
|
38
|
-
}, /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
39
42
|
variant: "subtitle1",
|
|
40
43
|
style: [computedStyle.title]
|
|
41
|
-
}, title), buttonActions.length > 0 && buttonActions.map((action, idx) => /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, {
|
|
44
|
+
}, titleProps), title), buttonActions.length > 0 && buttonActions.map((action, idx) => /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, _extends({
|
|
42
45
|
key: idx,
|
|
43
46
|
onPress: action.onPress,
|
|
44
47
|
style: [computedStyle.iconWrapper],
|
|
45
48
|
underlayColor: _themes.Palettes.grey[50]
|
|
46
|
-
}, action.icon)))));
|
|
49
|
+
}, action.props), action.icon)))));
|
|
47
50
|
};
|
|
48
51
|
exports.Appbar = Appbar;
|
|
49
52
|
//# sourceMappingURL=Appbar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Appbar","props","backIcon","Palettes","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","computedStyle","getStyle","container","Shadow","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"..\\..\\src","sources":["Appbar.component.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAgE;AAAA;AAIhE,MAAMA,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,oBAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEC,gBAAQ,CAACC,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG;
|
|
1
|
+
{"version":3,"names":["Appbar","props","backIcon","Palettes","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","backIconProps","titleProps","computedStyle","getStyle","container","Shadow","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"..\\..\\src","sources":["Appbar.component.tsx"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAgE;AAAA;AAAA;AAIhE,MAAMA,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,oBAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEC,gBAAQ,CAACC,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG,IAAI;IACjBC,aAAa,GAAG,CAAC,CAAC;IAClBC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGX,KAAK;EAET,MAAMY,aAAa,GAAG,IAAAC,gBAAQ,GAAE;EAEhC,oBACE,oBAAC,iBAAI;IACH,KAAK,EAAE,CACLD,aAAa,CAACE,SAAS,EACvBR,cAAc,EACdG,UAAU,IAAIM,cAAM,CAAC,oBAAoB,CAAC;EAC1C,GAEDV,YAAY,iBACX,uDACE,oBAAC,+BAAkB;IACjB,OAAO,EAAEE,WAAY;IACrB,KAAK,EAAE,CAACK,aAAa,CAACI,WAAW,CAAE;IACnC,aAAa,EAAEd,gBAAQ,CAACe,IAAI,CAAC,EAAE;EAAE,GAC7BP,aAAa,GAEhBT,QAAQ,CACU,eACrB,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACW,aAAa,CAACM,cAAc;EAAE,gBAC1C,oBAAC,sBAAU;IACT,OAAO,EAAC,WAAW;IACnB,KAAK,EAAE,CAACN,aAAa,CAACR,KAAK;EAAE,GACzBO,UAAU,GAEbP,KAAK,CACK,EACZI,aAAa,CAACW,MAAM,GAAG,CAAC,IACvBX,aAAa,CAACY,GAAG,CAAC,CAACC,MAAM,EAAEC,GAAG,kBAC5B,oBAAC,+BAAkB;IACjB,GAAG,EAAEA,GAAI;IACT,OAAO,EAAED,MAAM,CAACE,OAAQ;IACxB,KAAK,EAAE,CAACX,aAAa,CAACI,WAAW,CAAE;IACnC,aAAa,EAAEd,gBAAQ,CAACe,IAAI,CAAC,EAAE;EAAE,GAC7BI,MAAM,CAACrB,KAAK,GAEfqB,MAAM,CAACG,IAAI,CAEf,CAAC,CACC,CAEV,CACI;AAEX,CAAC;AAAC"}
|
|
@@ -15,9 +15,12 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
15
15
|
const {
|
|
16
16
|
onDismiss,
|
|
17
17
|
title,
|
|
18
|
+
titleProps = {},
|
|
18
19
|
subtitle,
|
|
20
|
+
subtitleProps = {},
|
|
19
21
|
isOverlayDismissDisabled = false,
|
|
20
22
|
dismissIcon = null,
|
|
23
|
+
dismissIconProps = {},
|
|
21
24
|
action = null,
|
|
22
25
|
largeIcon = null,
|
|
23
26
|
largeIconContainerHeight = 50,
|
|
@@ -85,29 +88,29 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
85
88
|
maxWidth: (screenWidth - 32) / 8 * 2,
|
|
86
89
|
minWidth: (screenWidth - 32) / 8 * 2
|
|
87
90
|
}]
|
|
88
|
-
}, dismissIcon && /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, {
|
|
91
|
+
}, !!dismissIcon && /*#__PURE__*/React.createElement(_reactNative.TouchableHighlight, _extends({
|
|
89
92
|
onPress: handleDismiss,
|
|
90
93
|
style: [computedStyle.sheetDismissIconWrapper],
|
|
91
94
|
underlayColor: 'transparent'
|
|
92
|
-
}, dismissIcon)), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
95
|
+
}, dismissIconProps), dismissIcon)), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
96
|
style: [{
|
|
94
97
|
maxWidth: (screenWidth - 32) / 8 * 4,
|
|
95
98
|
minWidth: (screenWidth - 32) / 8 * 4
|
|
96
99
|
}]
|
|
97
|
-
}, title && /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
100
|
+
}, !!title && /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
98
101
|
variant: "subtitle1",
|
|
99
102
|
style: [computedStyle.textCenter],
|
|
100
103
|
numberOfLines: 2
|
|
101
|
-
}, title)), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
104
|
+
}, titleProps), title)), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
102
105
|
style: [{
|
|
103
106
|
maxWidth: (screenWidth - 32) / 8 * 2,
|
|
104
107
|
minWidth: (screenWidth - 32) / 8 * 2
|
|
105
108
|
}, computedStyle.sheetActionWrapper]
|
|
106
|
-
}, action || null)), subtitle && /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
109
|
+
}, action || null)), !!subtitle && /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
107
110
|
variant: "body2",
|
|
108
111
|
numberOfLines: 2,
|
|
109
112
|
style: [computedStyle.textCenter]
|
|
110
|
-
}, subtitle));
|
|
113
|
+
}, subtitleProps), subtitle));
|
|
111
114
|
};
|
|
112
115
|
const renderLargeIconComponent = () => {
|
|
113
116
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BottomSheet","React","forwardRef","props","ref","onDismiss","title","subtitle","isOverlayDismissDisabled","dismissIcon","action","largeIcon","largeIconContainerHeight","animationType","children","screenHeight","Dimensions","get","height","screenWidth","width","panY","useRef","Animated","Value","current","visibility","setVisibility","useState","useImperativeHandle","open","close","computedStyle","getStyle","resetPositionAnim","timing","toValue","duration","useNativeDriver","closeAnim","translateY","interpolate","inputRange","outputRange","handleDismiss","start","useEffect","panResponders","PanResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","event","dy","onPanResponderRelease","_","gs","vy","renderSheetHeader","sheetHeaderWrapper","sheetHeader","maxWidth","minWidth","sheetDismissIconWrapper","textCenter","sheetActionWrapper","renderLargeIconComponent","largeIconContainer","largeIconAbsoluteWrapper","flex","overlayColor","overlay","container","transform","sheetIndicatorWrapper","panHandlers","sliderIndicator"],"sourceRoot":"..\\..\\src","sources":["BottomSheet.component.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AACA;AAAgE;AAAA;AAAA;AAYhE,MAAMA,WAAW,gBAAGC,KAAK,CAACC,UAAU,CAClC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,MAAM;IACJC,SAAS;IACTC,KAAK;IACLC,QAAQ;IACRC,wBAAwB,GAAG,KAAK;IAChCC,WAAW,GAAG,IAAI;IAClBC,MAAM,GAAG,IAAI;IACbC,SAAS,GAAG,IAAI;IAChBC,wBAAwB,GAAG,EAAE;IAC7BC,aAAa,GAAG,OAAO;IACvBC;EACF,CAAC,
|
|
1
|
+
{"version":3,"names":["BottomSheet","React","forwardRef","props","ref","onDismiss","title","titleProps","subtitle","subtitleProps","isOverlayDismissDisabled","dismissIcon","dismissIconProps","action","largeIcon","largeIconContainerHeight","animationType","children","screenHeight","Dimensions","get","height","screenWidth","width","panY","useRef","Animated","Value","current","visibility","setVisibility","useState","useImperativeHandle","open","close","computedStyle","getStyle","resetPositionAnim","timing","toValue","duration","useNativeDriver","closeAnim","translateY","interpolate","inputRange","outputRange","handleDismiss","start","useEffect","panResponders","PanResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","event","dy","onPanResponderRelease","_","gs","vy","renderSheetHeader","sheetHeaderWrapper","sheetHeader","maxWidth","minWidth","sheetDismissIconWrapper","textCenter","sheetActionWrapper","renderLargeIconComponent","largeIconContainer","largeIconAbsoluteWrapper","flex","overlayColor","overlay","container","transform","sheetIndicatorWrapper","panHandlers","sliderIndicator"],"sourceRoot":"..\\..\\src","sources":["BottomSheet.component.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AACA;AAAgE;AAAA;AAAA;AAYhE,MAAMA,WAAW,gBAAGC,KAAK,CAACC,UAAU,CAClC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,MAAM;IACJC,SAAS;IACTC,KAAK;IACLC,UAAU,GAAG,CAAC,CAAC;IACfC,QAAQ;IACRC,aAAa,GAAG,CAAC,CAAC;IAClBC,wBAAwB,GAAG,KAAK;IAChCC,WAAW,GAAG,IAAI;IAClBC,gBAAgB,GAAG,CAAC,CAAC;IACrBC,MAAM,GAAG,IAAI;IACbC,SAAS,GAAG,IAAI;IAChBC,wBAAwB,GAAG,EAAE;IAC7BC,aAAa,GAAG,OAAO;IACvBC;EACF,CAAC,GAAGd,KAAK;EACT,MAAMe,YAAY,GAAGC,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;EACpD,MAAMC,WAAW,GAAGH,uBAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACG,KAAK;EAClD,MAAMC,IAAI,GAAGvB,KAAK,CAACwB,MAAM,CAAC,IAAIC,qBAAQ,CAACC,KAAK,CAACT,YAAY,CAAC,CAAC,CAACU,OAAO;EAEnE,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG7B,KAAK,CAAC8B,QAAQ,CAAC,KAAK,CAAC;EAEzD9B,KAAK,CAAC+B,mBAAmB,CACvB5B,GAAG,EACH,MAAM;IACJ,OAAO;MACL6B,IAAI,GAAG;QACLH,aAAa,CAAC,IAAI,CAAC;MACrB,CAAC;MACDI,KAAK,GAAG;QACNJ,aAAa,CAAC,KAAK,CAAC;MACtB;IACF,CAAC;EACH,CAAC,EACD,EAAE,CACH;EAED,MAAMK,aAAa,GAAG,I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I,oBAAC,iBAAI;IAAC,KAAK,EAAEqB,aAAa,CAAC6C;EAAgB,EAAG,CACxD,EACNlE,SAAS,GAAGwD,wBAAwB,EAAE,GAAGR,iBAAiB,EAAE,CACxD,EAEN7C,QAAQ,CACK,CACX,CACD;AAEZ,CAAC,CACF;AAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
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); }
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { TouchableHighlight, View } from 'react-native';
|
|
3
4
|
import { getStyle } from './Appbar.style';
|
|
@@ -16,26 +17,28 @@ const Appbar = props => {
|
|
|
16
17
|
containerStyle,
|
|
17
18
|
onBackPress = () => {},
|
|
18
19
|
buttonActions = [],
|
|
19
|
-
withShadow = true
|
|
20
|
+
withShadow = true,
|
|
21
|
+
backIconProps = {},
|
|
22
|
+
titleProps = {}
|
|
20
23
|
} = props;
|
|
21
24
|
const computedStyle = getStyle();
|
|
22
25
|
return /*#__PURE__*/React.createElement(View, {
|
|
23
26
|
style: [computedStyle.container, containerStyle, withShadow && Shadow['shadow-elevation-2']]
|
|
24
|
-
}, customHeader || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableHighlight, {
|
|
27
|
+
}, customHeader || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
25
28
|
onPress: onBackPress,
|
|
26
29
|
style: [computedStyle.iconWrapper],
|
|
27
30
|
underlayColor: Palettes.grey[50]
|
|
28
|
-
}, backIcon), /*#__PURE__*/React.createElement(View, {
|
|
31
|
+
}, backIconProps), backIcon), /*#__PURE__*/React.createElement(View, {
|
|
29
32
|
style: [computedStyle.contentWrapper]
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Typography, _extends({
|
|
31
34
|
variant: "subtitle1",
|
|
32
35
|
style: [computedStyle.title]
|
|
33
|
-
}, title), buttonActions.length > 0 && buttonActions.map((action, idx) => /*#__PURE__*/React.createElement(TouchableHighlight, {
|
|
36
|
+
}, titleProps), title), buttonActions.length > 0 && buttonActions.map((action, idx) => /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
34
37
|
key: idx,
|
|
35
38
|
onPress: action.onPress,
|
|
36
39
|
style: [computedStyle.iconWrapper],
|
|
37
40
|
underlayColor: Palettes.grey[50]
|
|
38
|
-
}, action.icon)))));
|
|
41
|
+
}, action.props), action.icon)))));
|
|
39
42
|
};
|
|
40
43
|
export { Appbar };
|
|
41
44
|
//# sourceMappingURL=Appbar.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TouchableHighlight","View","getStyle","Palettes","Shadow","IconArrowLeft","Typography","Appbar","props","backIcon","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","computedStyle","container","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"..\\..\\src","sources":["Appbar.component.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,IAAI,QAAQ,cAAc;AAEvD,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAC/C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,UAAU,QAAQ,oCAAoC;AAI/D,MAAMC,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,aAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEN,QAAQ,CAACO,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG;
|
|
1
|
+
{"version":3,"names":["React","TouchableHighlight","View","getStyle","Palettes","Shadow","IconArrowLeft","Typography","Appbar","props","backIcon","black","title","customHeader","containerStyle","onBackPress","buttonActions","withShadow","backIconProps","titleProps","computedStyle","container","iconWrapper","grey","contentWrapper","length","map","action","idx","onPress","icon"],"sourceRoot":"..\\..\\src","sources":["Appbar.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,EAAEC,IAAI,QAAQ,cAAc;AAEvD,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AAC/C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,UAAU,QAAQ,oCAAoC;AAI/D,MAAMC,MAA4C,GAAIC,KAAK,IAAK;EAC9D,MAAM;IACJC,QAAQ,gBACN,oBAAC,aAAa;MAAC,KAAK,EAAE,EAAG;MAAC,MAAM,EAAE,EAAG;MAAC,IAAI,EAAEN,QAAQ,CAACO,KAAK,CAAC,GAAG;IAAE,EACjE;IACDC,KAAK,GAAG,EAAE;IACVC,YAAY,GAAG,IAAI;IACnBC,cAAc;IACdC,WAAW,GAAG,MAAM,CAAC,CAAC;IACtBC,aAAa,GAAG,EAAE;IAClBC,UAAU,GAAG,IAAI;IACjBC,aAAa,GAAG,CAAC,CAAC;IAClBC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGV,KAAK;EAET,MAAMW,aAAa,GAAGjB,QAAQ,EAAE;EAEhC,oBACE,oBAAC,IAAI;IACH,KAAK,EAAE,CACLiB,aAAa,CAACC,SAAS,EACvBP,cAAc,EACdG,UAAU,IAAIZ,MAAM,CAAC,oBAAoB,CAAC;EAC1C,GAEDQ,YAAY,iBACX,uDACE,oBAAC,kBAAkB;IACjB,OAAO,EAAEE,WAAY;IACrB,KAAK,EAAE,CAACK,aAAa,CAACE,WAAW,CAAE;IACnC,aAAa,EAAElB,QAAQ,CAACmB,IAAI,CAAC,EAAE;EAAE,GAC7BL,aAAa,GAEhBR,QAAQ,CACU,eACrB,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACU,aAAa,CAACI,cAAc;EAAE,gBAC1C,oBAAC,UAAU;IACT,OAAO,EAAC,WAAW;IACnB,KAAK,EAAE,CAACJ,aAAa,CAACR,KAAK;EAAE,GACzBO,UAAU,GAEbP,KAAK,CACK,EACZI,aAAa,CAACS,MAAM,GAAG,CAAC,IACvBT,aAAa,CAACU,GAAG,CAAC,CAACC,MAAM,EAAEC,GAAG,kBAC5B,oBAAC,kBAAkB;IACjB,GAAG,EAAEA,GAAI;IACT,OAAO,EAAED,MAAM,CAACE,OAAQ;IACxB,KAAK,EAAE,CAACT,aAAa,CAACE,WAAW,CAAE;IACnC,aAAa,EAAElB,QAAQ,CAACmB,IAAI,CAAC,EAAE;EAAE,GAC7BI,MAAM,CAAClB,KAAK,GAEfkB,MAAM,CAACG,IAAI,CAEf,CAAC,CACC,CAEV,CACI;AAEX,CAAC;AAED,SAAStB,MAAM"}
|
|
@@ -8,9 +8,12 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
8
8
|
const {
|
|
9
9
|
onDismiss,
|
|
10
10
|
title,
|
|
11
|
+
titleProps = {},
|
|
11
12
|
subtitle,
|
|
13
|
+
subtitleProps = {},
|
|
12
14
|
isOverlayDismissDisabled = false,
|
|
13
15
|
dismissIcon = null,
|
|
16
|
+
dismissIconProps = {},
|
|
14
17
|
action = null,
|
|
15
18
|
largeIcon = null,
|
|
16
19
|
largeIconContainerHeight = 50,
|
|
@@ -78,29 +81,29 @@ const BottomSheet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
78
81
|
maxWidth: (screenWidth - 32) / 8 * 2,
|
|
79
82
|
minWidth: (screenWidth - 32) / 8 * 2
|
|
80
83
|
}]
|
|
81
|
-
}, dismissIcon && /*#__PURE__*/React.createElement(TouchableHighlight, {
|
|
84
|
+
}, !!dismissIcon && /*#__PURE__*/React.createElement(TouchableHighlight, _extends({
|
|
82
85
|
onPress: handleDismiss,
|
|
83
86
|
style: [computedStyle.sheetDismissIconWrapper],
|
|
84
87
|
underlayColor: 'transparent'
|
|
85
|
-
}, dismissIcon)), /*#__PURE__*/React.createElement(View, {
|
|
88
|
+
}, dismissIconProps), dismissIcon)), /*#__PURE__*/React.createElement(View, {
|
|
86
89
|
style: [{
|
|
87
90
|
maxWidth: (screenWidth - 32) / 8 * 4,
|
|
88
91
|
minWidth: (screenWidth - 32) / 8 * 4
|
|
89
92
|
}]
|
|
90
|
-
}, title && /*#__PURE__*/React.createElement(Typography, {
|
|
93
|
+
}, !!title && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
91
94
|
variant: "subtitle1",
|
|
92
95
|
style: [computedStyle.textCenter],
|
|
93
96
|
numberOfLines: 2
|
|
94
|
-
}, title)), /*#__PURE__*/React.createElement(View, {
|
|
97
|
+
}, titleProps), title)), /*#__PURE__*/React.createElement(View, {
|
|
95
98
|
style: [{
|
|
96
99
|
maxWidth: (screenWidth - 32) / 8 * 2,
|
|
97
100
|
minWidth: (screenWidth - 32) / 8 * 2
|
|
98
101
|
}, computedStyle.sheetActionWrapper]
|
|
99
|
-
}, action || null)), subtitle && /*#__PURE__*/React.createElement(Typography, {
|
|
102
|
+
}, action || null)), !!subtitle && /*#__PURE__*/React.createElement(Typography, _extends({
|
|
100
103
|
variant: "body2",
|
|
101
104
|
numberOfLines: 2,
|
|
102
105
|
style: [computedStyle.textCenter]
|
|
103
|
-
}, subtitle));
|
|
106
|
+
}, subtitleProps), subtitle));
|
|
104
107
|
};
|
|
105
108
|
const renderLargeIconComponent = () => {
|
|
106
109
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Dimensions","PanResponder","Modal","TouchableWithoutFeedback","View","getStyle","Typography","TouchableHighlight","BottomSheet","forwardRef","props","ref","onDismiss","title","subtitle","isOverlayDismissDisabled","dismissIcon","action","largeIcon","largeIconContainerHeight","animationType","children","screenHeight","get","height","screenWidth","width","panY","useRef","Value","current","visibility","setVisibility","useState","useImperativeHandle","open","close","computedStyle","resetPositionAnim","timing","toValue","duration","useNativeDriver","closeAnim","translateY","interpolate","inputRange","outputRange","handleDismiss","start","useEffect","panResponders","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","event","dy","onPanResponderRelease","_","gs","vy","renderSheetHeader","sheetHeaderWrapper","sheetHeader","maxWidth","minWidth","sheetDismissIconWrapper","textCenter","sheetActionWrapper","renderLargeIconComponent","largeIconContainer","largeIconAbsoluteWrapper","flex","overlayColor","overlay","container","transform","sheetIndicatorWrapper","panHandlers","sliderIndicator"],"sourceRoot":"..\\..\\src","sources":["BottomSheet.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,IAAI,QACC,cAAc;AAErB,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,UAAU,QAAQ,oCAAoC;AAG/D,SAASC,kBAAkB,QAAQ,cAAc;AASjD,MAAMC,WAAW,gBAAGV,KAAK,CAACW,UAAU,CAClC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,MAAM;IACJC,SAAS;IACTC,KAAK;IACLC,QAAQ;IACRC,wBAAwB,GAAG,KAAK;IAChCC,WAAW,GAAG,IAAI;IAClBC,MAAM,GAAG,IAAI;IACbC,SAAS,GAAG,IAAI;IAChBC,wBAAwB,GAAG,EAAE;IAC7BC,aAAa,GAAG,OAAO;IACvBC;EACF,CAAC,
|
|
1
|
+
{"version":3,"names":["React","Animated","Dimensions","PanResponder","Modal","TouchableWithoutFeedback","View","getStyle","Typography","TouchableHighlight","BottomSheet","forwardRef","props","ref","onDismiss","title","titleProps","subtitle","subtitleProps","isOverlayDismissDisabled","dismissIcon","dismissIconProps","action","largeIcon","largeIconContainerHeight","animationType","children","screenHeight","get","height","screenWidth","width","panY","useRef","Value","current","visibility","setVisibility","useState","useImperativeHandle","open","close","computedStyle","resetPositionAnim","timing","toValue","duration","useNativeDriver","closeAnim","translateY","interpolate","inputRange","outputRange","handleDismiss","start","useEffect","panResponders","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderMove","event","dy","onPanResponderRelease","_","gs","vy","renderSheetHeader","sheetHeaderWrapper","sheetHeader","maxWidth","minWidth","sheetDismissIconWrapper","textCenter","sheetActionWrapper","renderLargeIconComponent","largeIconContainer","largeIconAbsoluteWrapper","flex","overlayColor","overlay","container","transform","sheetIndicatorWrapper","panHandlers","sliderIndicator"],"sourceRoot":"..\\..\\src","sources":["BottomSheet.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,IAAI,QACC,cAAc;AAErB,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,UAAU,QAAQ,oCAAoC;AAG/D,SAASC,kBAAkB,QAAQ,cAAc;AASjD,MAAMC,WAAW,gBAAGV,KAAK,CAACW,UAAU,CAClC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACd,MAAM;IACJC,SAAS;IACTC,KAAK;IACLC,UAAU,GAAG,CAAC,CAAC;IACfC,QAAQ;IACRC,aAAa,GAAG,CAAC,CAAC;IAClBC,wBAAwB,GAAG,KAAK;IAChCC,WAAW,GAAG,IAAI;IAClBC,gBAAgB,GAAG,CAAC,CAAC;IACrBC,MAAM,GAAG,IAAI;IACbC,SAAS,GAAG,IAAI;IAChBC,wBAAwB,GAAG,EAAE;IAC7BC,aAAa,GAAG,OAAO;IACvBC;EACF,CAAC,GAAGd,KAAK;EAC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X,cAAc,EAAEiB;EAAc,gBAE9B,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACX,aAAa,CAACoC,IAAI,EAAEpC,aAAa,CAACqC,YAAY;EAAE,gBAC5D,oBAAC,wBAAwB;IACvB,OAAO,EAAE1B,aAAc;IACvB,QAAQ,EAAElC;EAAyB,gBAEnC,oBAAC,IAAI;IAAC,KAAK,EAAE,CAACuB,aAAa,CAACsC,OAAO;EAAE,EAAG,CACf,eAC3B,oBAAC,QAAQ,CAAC,IAAI;IACZ,KAAK,EAAE;MACL,GAAGtC,aAAa,CAACuC,SAAS;MAC1BC,SAAS,EAAE,CAAC;QAAEjC,UAAU,EAAEA;MAAW,CAAC;IACxC;EAAE,gBAEF,oBAAC,IAAI,qBACH,oBAAC,IAAI;IACH,KAAK,EAAE,CAACP,aAAa,CAACyC,qBAAqB;EAAE,GACzC3B,aAAa,CAAC4B,WAAW,GAE5B,CAAC7D,SAAS,iBAAI,oBAAC,IAAI;IAAC,KAAK,EAAEmB,aAAa,CAAC2C;EAAgB,EAAG,CACxD,EACN9D,SAAS,GAAGoD,wBAAwB,EAAE,GAAGR,iBAAiB,EAAE,CACxD,EAENzC,QAAQ,CACK,CACX,CACD;AAEZ,CAAC,CACF;AAED,SAAShB,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Appbar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/Appbar/Appbar.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"Appbar.component.d.ts","sourceRoot":"","sources":["../../../../src/components/Appbar/Appbar.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CA4DhD,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
+
import type { TouchableHighlightProps, TextProps } from 'react-native';
|
|
3
4
|
export interface AppbarProps {
|
|
4
5
|
title?: string;
|
|
5
6
|
onBackPress: () => void;
|
|
6
7
|
backIcon?: ReactNode;
|
|
8
|
+
backIconProps?: TouchableHighlightProps;
|
|
9
|
+
titleProps?: TextProps;
|
|
7
10
|
customHeader?: ReactNode;
|
|
8
11
|
containerStyle?: ViewStyle;
|
|
9
12
|
withShadow?: boolean;
|
|
10
13
|
buttonActions?: {
|
|
11
14
|
icon: ReactNode;
|
|
12
15
|
onPress: () => void;
|
|
16
|
+
props?: TouchableHighlightProps;
|
|
13
17
|
}[];
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=Appbar.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Appbar.type.d.ts","sourceRoot":"","sources":["../../../../src/components/Appbar/Appbar.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,aAAa,CAAC,EAAE;QACd,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Appbar.type.d.ts","sourceRoot":"","sources":["../../../../src/components/Appbar/Appbar.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,aAAa,CAAC,EAAE,uBAAuB,CAAC;IAExC,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,aAAa,CAAC,EAAE;QACd,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,KAAK,CAAC,EAAE,uBAAuB,CAAC;KACjC,EAAE,CAAC;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.component.d.ts","sourceRoot":"","sources":["../../../../src/components/BottomSheet/BottomSheet.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,aAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtE,QAAA,MAAM,WAAW,+
|
|
1
|
+
{"version":3,"file":"BottomSheet.component.d.ts","sourceRoot":"","sources":["../../../../src/components/BottomSheet/BottomSheet.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,aAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtE,QAAA,MAAM,WAAW,+FA0MhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import type { TextProps, TouchableHighlightProps } from 'react-native';
|
|
2
3
|
export interface BottomSheetProps {
|
|
3
4
|
onDismiss?: () => void;
|
|
4
5
|
sheetHeader?: ReactNode;
|
|
5
6
|
title: string;
|
|
7
|
+
titleProps?: TextProps;
|
|
6
8
|
subtitle?: string;
|
|
9
|
+
subtitleProps?: TextProps;
|
|
7
10
|
isOverlayDismissDisabled?: boolean;
|
|
8
11
|
dismissIcon?: ReactNode;
|
|
12
|
+
dismissIconProps?: TouchableHighlightProps;
|
|
9
13
|
action?: ReactNode;
|
|
10
14
|
largeIcon?: ReactNode;
|
|
11
15
|
largeIconContainerHeight?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.type.d.ts","sourceRoot":"","sources":["../../../../src/components/BottomSheet/BottomSheet.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,C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tB;AAED,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -19,6 +19,8 @@ const Appbar: React.FunctionComponent<AppbarProps> = (props) => {
|
|
|
19
19
|
onBackPress = () => {},
|
|
20
20
|
buttonActions = [],
|
|
21
21
|
withShadow = true,
|
|
22
|
+
backIconProps = {},
|
|
23
|
+
titleProps = {},
|
|
22
24
|
} = props;
|
|
23
25
|
|
|
24
26
|
const computedStyle = getStyle();
|
|
@@ -37,11 +39,16 @@ const Appbar: React.FunctionComponent<AppbarProps> = (props) => {
|
|
|
37
39
|
onPress={onBackPress}
|
|
38
40
|
style={[computedStyle.iconWrapper]}
|
|
39
41
|
underlayColor={Palettes.grey[50]}
|
|
42
|
+
{...backIconProps}
|
|
40
43
|
>
|
|
41
44
|
{backIcon}
|
|
42
45
|
</TouchableHighlight>
|
|
43
46
|
<View style={[computedStyle.contentWrapper]}>
|
|
44
|
-
<Typography
|
|
47
|
+
<Typography
|
|
48
|
+
variant="subtitle1"
|
|
49
|
+
style={[computedStyle.title]}
|
|
50
|
+
{...titleProps}
|
|
51
|
+
>
|
|
45
52
|
{title}
|
|
46
53
|
</Typography>
|
|
47
54
|
{buttonActions.length > 0 &&
|
|
@@ -51,6 +58,7 @@ const Appbar: React.FunctionComponent<AppbarProps> = (props) => {
|
|
|
51
58
|
onPress={action.onPress}
|
|
52
59
|
style={[computedStyle.iconWrapper]}
|
|
53
60
|
underlayColor={Palettes.grey[50]}
|
|
61
|
+
{...action.props}
|
|
54
62
|
>
|
|
55
63
|
{action.icon}
|
|
56
64
|
</TouchableHighlight>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import type { TouchableHighlightProps, TextProps } from 'react-native';
|
|
5
|
+
|
|
4
6
|
export interface AppbarProps {
|
|
5
7
|
title?: string;
|
|
6
8
|
|
|
@@ -8,6 +10,10 @@ export interface AppbarProps {
|
|
|
8
10
|
|
|
9
11
|
backIcon?: ReactNode;
|
|
10
12
|
|
|
13
|
+
backIconProps?: TouchableHighlightProps;
|
|
14
|
+
|
|
15
|
+
titleProps?: TextProps;
|
|
16
|
+
|
|
11
17
|
customHeader?: ReactNode;
|
|
12
18
|
|
|
13
19
|
containerStyle?: ViewStyle;
|
|
@@ -17,5 +23,6 @@ export interface AppbarProps {
|
|
|
17
23
|
buttonActions?: {
|
|
18
24
|
icon: ReactNode;
|
|
19
25
|
onPress: () => void;
|
|
26
|
+
props?: TouchableHighlightProps;
|
|
20
27
|
}[];
|
|
21
28
|
}
|
|
@@ -26,9 +26,12 @@ const BottomSheet = React.forwardRef<BottomSheetRefHandle, BottomSheetProps>(
|
|
|
26
26
|
const {
|
|
27
27
|
onDismiss,
|
|
28
28
|
title,
|
|
29
|
+
titleProps = {},
|
|
29
30
|
subtitle,
|
|
31
|
+
subtitleProps = {},
|
|
30
32
|
isOverlayDismissDisabled = false,
|
|
31
33
|
dismissIcon = null,
|
|
34
|
+
dismissIconProps = {},
|
|
32
35
|
action = null,
|
|
33
36
|
largeIcon = null,
|
|
34
37
|
largeIconContainerHeight = 50,
|
|
@@ -112,11 +115,12 @@ const BottomSheet = React.forwardRef<BottomSheetRefHandle, BottomSheetProps>(
|
|
|
112
115
|
},
|
|
113
116
|
]}
|
|
114
117
|
>
|
|
115
|
-
{dismissIcon && (
|
|
118
|
+
{!!dismissIcon && (
|
|
116
119
|
<TouchableHighlight
|
|
117
120
|
onPress={handleDismiss}
|
|
118
121
|
style={[computedStyle.sheetDismissIconWrapper]}
|
|
119
122
|
underlayColor={'transparent'}
|
|
123
|
+
{...dismissIconProps}
|
|
120
124
|
>
|
|
121
125
|
{dismissIcon}
|
|
122
126
|
</TouchableHighlight>
|
|
@@ -130,11 +134,12 @@ const BottomSheet = React.forwardRef<BottomSheetRefHandle, BottomSheetProps>(
|
|
|
130
134
|
},
|
|
131
135
|
]}
|
|
132
136
|
>
|
|
133
|
-
{title && (
|
|
137
|
+
{!!title && (
|
|
134
138
|
<Typography
|
|
135
139
|
variant="subtitle1"
|
|
136
140
|
style={[computedStyle.textCenter]}
|
|
137
141
|
numberOfLines={2}
|
|
142
|
+
{...titleProps}
|
|
138
143
|
>
|
|
139
144
|
{title}
|
|
140
145
|
</Typography>
|
|
@@ -152,11 +157,12 @@ const BottomSheet = React.forwardRef<BottomSheetRefHandle, BottomSheetProps>(
|
|
|
152
157
|
{action || null}
|
|
153
158
|
</View>
|
|
154
159
|
</View>
|
|
155
|
-
{subtitle && (
|
|
160
|
+
{!!subtitle && (
|
|
156
161
|
<Typography
|
|
157
162
|
variant="body2"
|
|
158
163
|
numberOfLines={2}
|
|
159
164
|
style={[computedStyle.textCenter]}
|
|
165
|
+
{...subtitleProps}
|
|
160
166
|
>
|
|
161
167
|
{subtitle}
|
|
162
168
|
</Typography>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
import type { TextProps, TouchableHighlightProps } from 'react-native';
|
|
4
|
+
|
|
3
5
|
export interface BottomSheetProps {
|
|
4
6
|
onDismiss?: () => void;
|
|
5
7
|
|
|
@@ -7,12 +9,18 @@ export interface BottomSheetProps {
|
|
|
7
9
|
|
|
8
10
|
title: string;
|
|
9
11
|
|
|
12
|
+
titleProps?: TextProps;
|
|
13
|
+
|
|
10
14
|
subtitle?: string;
|
|
11
15
|
|
|
16
|
+
subtitleProps?: TextProps;
|
|
17
|
+
|
|
12
18
|
isOverlayDismissDisabled?: boolean;
|
|
13
19
|
|
|
14
20
|
dismissIcon?: ReactNode;
|
|
15
21
|
|
|
22
|
+
dismissIconProps?: TouchableHighlightProps;
|
|
23
|
+
|
|
16
24
|
action?: ReactNode;
|
|
17
25
|
|
|
18
26
|
largeIcon?: ReactNode;
|