@draftbit/core 43.7.2-49b1d4.1 → 43.7.2-5b80c5.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/module/components/AnimatedCircularProgress.js +10 -2
- package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/module/components/AvatarEdit.js +16 -5
- package/lib/module/components/AvatarEdit.js.map +1 -1
- package/lib/module/components/CardContainer.js +14 -5
- package/lib/module/components/CardContainer.js.map +1 -1
- package/lib/module/components/CardContainerShortImage.js +16 -5
- package/lib/module/components/CardContainerShortImage.js.map +1 -1
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +22 -6
- package/lib/module/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/module/components/DeprecatedFAB.js +19 -4
- package/lib/module/components/DeprecatedFAB.js.map +1 -1
- package/lib/module/components/Divider.js +16 -2
- package/lib/module/components/Divider.js.map +1 -1
- package/lib/module/components/FormRow.js +17 -4
- package/lib/module/components/FormRow.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/Image.js +18 -3
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/Justification.js +2 -2
- package/lib/module/components/Justification.js.map +1 -1
- package/lib/module/components/Layout.js +40 -21
- package/lib/module/components/Layout.js.map +1 -1
- package/lib/module/components/NumberInput.js +12 -2
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/Portal/Portal.js +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/module/components/ProgressIndicator.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButton.js +14 -3
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/components/Row.js.map +1 -1
- package/lib/module/components/StepIndicator.js.map +1 -1
- package/lib/module/components/Touchable.js +16 -3
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/module/components/useAuthState.js.map +1 -1
- package/lib/module/mappings/ActionSheetItem.js.map +1 -1
- package/lib/module/mappings/CardContainerShortImage.js.map +1 -1
- package/lib/module/mappings/CircleImage.js.map +1 -1
- package/lib/module/mappings/Divider.js.map +1 -1
- package/lib/module/mappings/Fetch.js.map +1 -1
- package/lib/module/mappings/HeaderOverline.js.map +1 -1
- package/lib/module/mappings/IconButton.js.map +1 -1
- package/lib/module/mappings/Picker.js.map +1 -1
- package/lib/module/mappings/StarRating.js +6 -2
- package/lib/module/mappings/StarRating.js.map +1 -1
- package/lib/module/mappings/Swiper.js.map +1 -1
- package/lib/module/mappings/ToggleButton.js.map +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FormRow.
|
|
1
|
+
{"version":3,"sources":["FormRow.js"],"names":["React","Text","StyleSheet","extractStyles","Touchable","FormRow","disabled","direction","children","label","style","onPress","rest","textStyles","viewStyles","createElement","styles","row","flexDirection","create","marginLeft","marginRight","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,cAAjC;AACA,SAASC,aAAT,QAA8B,cAA9B;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,eAAe,SAASC,OAAT,OAAoF;AAAA,MAAnE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,SAAZ;AAAuBC,IAAAA,QAAvB;AAAiCC,IAAAA,KAAjC;AAAwCC,IAAAA,KAAxC;AAA+CC,IAAAA,OAA/C;AAAwD,OAAGC;AAA3D,GAAmE;AAC/F,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BX,aAAa,CAACO,KAAD,CAAhD;AACA,sBAAQV,KAAK,CAACe,aAAN,CAAoBX,SAApB,EAA+B;AAAEE,IAAAA,QAAQ,EAAEA,QAAZ;AAAsBK,IAAAA,OAAO,EAAEA,OAA/B;AAAwCD,IAAAA,KAAK,EAAE,CAACM,MAAM,CAACC,GAAR,EAAa;AAAEC,MAAAA,aAAa,EAAEX;AAAjB,KAAb,EAA2CO,UAA3C,CAA/C;AAAuG,OAAGF;AAA1G,GAA/B,eACJZ,KAAK,CAACe,aAAN,CAAoBd,IAApB,EAA0B;AAAES,IAAAA,KAAK,EAAEG;AAAT,GAA1B,EAAiDJ,KAAjD,CADI,EAEJD,QAFI,CAAR;AAGH;AACD,MAAMQ,MAAM,GAAGd,UAAU,CAACiB,MAAX,CAAkB;AAC7BF,EAAAA,GAAG,EAAE;AACDG,IAAAA,UAAU,EAAE,CADX;AAEDC,IAAAA,WAAW,EAAE,CAFZ;AAGDH,IAAAA,aAAa,EAAE,KAHd;AAIDI,IAAAA,cAAc,EAAE,eAJf;AAKDC,IAAAA,UAAU,EAAE;AALX;AADwB,CAAlB,CAAf","sourcesContent":["import * as React from \"react\";\nimport { Text, StyleSheet } from \"react-native\";\nimport { extractStyles } from \"../utilities\";\nimport Touchable from \"./Touchable\";\nexport default function FormRow({ disabled, direction, children, label, style, onPress, ...rest }) {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Touchable, { disabled: disabled, onPress: onPress, style: [styles.row, { flexDirection: direction }, viewStyles], ...rest },\n React.createElement(Text, { style: textStyles }, label),\n children));\n}\nconst styles = StyleSheet.create({\n row: {\n marginLeft: 8,\n marginRight: 8,\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Header.
|
|
1
|
+
{"version":3,"sources":["Header.js"],"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","createElement","styles","container","topContainer","color","flex","numberOfLines","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","name","size","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"mappings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Text, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\nconst Header = ({ Icon, titleTypeStyle, titleColor, title, buttonText, dividerTopMargin, icon, onPress, style, theme: { colors, typography }, }) => {\n return (React.createElement(View, { style: [styles.container, style] },\n React.createElement(View, { style: styles.topContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ], numberOfLines: 1 }, title),\n onPress && (React.createElement(Touchable, { style: { alignSelf: \"center\", marginLeft: 12 }, onPress: onPress },\n React.createElement(View, { style: styles.buttonContainer },\n React.createElement(Text, { style: [\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ], numberOfLines: 1 }, buttonText),\n React.createElement(Icon, { name: icon, size: Config.headerIconSize, color: colors.light }))))),\n React.createElement(Divider, { style: { marginTop: dividerTopMargin || 16 } })));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n topContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n buttonContainer: {\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n});\nexport default withTheme(Header);\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
1
|
/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
|
|
4
2
|
import React from "react";
|
|
5
3
|
import { Image as NativeImage, StyleSheet } from "react-native";
|
|
@@ -64,13 +62,30 @@ const Image = _ref2 => {
|
|
|
64
62
|
height,
|
|
65
63
|
aspectRatio
|
|
66
64
|
}]
|
|
67
|
-
}, /*#__PURE__*/React.createElement(NativeImage,
|
|
65
|
+
}, /*#__PURE__*/React.createElement(NativeImage, { ...props,
|
|
68
66
|
source: imageSource,
|
|
69
67
|
resizeMode: resizeMode,
|
|
70
68
|
style: [style, {
|
|
71
69
|
height: "100%",
|
|
72
70
|
width: "100%"
|
|
73
71
|
}]
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return /*#__PURE__*/React.createElement(NativeImage, { ...props,
|
|
76
|
+
source: source,
|
|
77
|
+
resizeMode: resizeMode,
|
|
78
|
+
style: style
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default Image;
|
|
83
|
+
//# sourceMappingURL=Image.js.mapgeSource,
|
|
84
|
+
resizeMode: resizeMode,
|
|
85
|
+
style: [style, {
|
|
86
|
+
height: "100%",
|
|
87
|
+
width: "100%"
|
|
88
|
+
}]
|
|
74
89
|
})));
|
|
75
90
|
}
|
|
76
91
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Image.
|
|
1
|
+
{"version":3,"sources":["Image.js"],"names":["React","Image","NativeImage","StyleSheet","Config","AspectRatio","generateDimensions","aspectRatio","width","height","source","resizeMode","style","props","imageSource","undefined","placeholderImageURL","styles","flatten","createElement"],"mappings":"AAAA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,KAAK,IAAIC,WAAlB,EAA+BC,UAA/B,QAAkD,cAAlD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,WAAP,MAAwB,eAAxB;;AACA,MAAMC,kBAAkB,GAAG,QAAoC;AAAA,MAAnC;AAAEC,IAAAA,WAAF;AAAeC,IAAAA,KAAf;AAAsBC,IAAAA;AAAtB,GAAmC;;AAC3D,MAAIF,WAAW,IAAI,CAACC,KAAhB,IAAyB,CAACC,MAA9B,EAAsC;AAClC,WAAO;AACHF,MAAAA,WADG;AAEHC,MAAAA,KAAK,EAAE;AAFJ,KAAP;AAIH;;AACD,MAAID,WAAW,IAAIE,MAAnB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AAK,EAAE;AAFX,OAFyF;AAAhE,KAAjC,CADI,CAAR;AAQH;;AACD,sBAAQR,KAAK,CAACmB,aAAN,CAAoBjB,WAApB,EAAiC,EAAE,GAAGW,KAAL;AAAYH,IAAAA,MAAM,EAAEA,MAApB;AAA4BC,IAAAA,UAAU,EAAEA,UAAxC;AAAoDC,IAAAA,KAAK,EAAEA;AAA3D,GAAjC,CAAR;AACH,CAjBD;;AAkBA,eAAeX,KAAf","sourcesContent":["/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */\nimport React from \"react\";\nimport { Image as NativeImage, StyleSheet, } from \"react-native\";\nimport Config from \"./Config\";\nimport AspectRatio from \"./AspectRatio\";\nconst generateDimensions = ({ aspectRatio, width, height }) => {\n if (aspectRatio && !width && !height) {\n return {\n aspectRatio,\n width: \"100%\",\n };\n }\n if (aspectRatio && height) {\n return {\n aspectRatio,\n height,\n width: aspectRatio * height,\n };\n }\n if (aspectRatio && width) {\n return {\n aspectRatio,\n width,\n height: width / aspectRatio,\n };\n }\n return { width, height };\n};\nconst Image = ({ source, resizeMode = \"cover\", style, ...props }) => {\n let imageSource = source === null || source === undefined\n ? Config.placeholderImageURL\n : source;\n const styles = StyleSheet.flatten(style || {});\n const { aspectRatio, width, height } = generateDimensions(styles);\n if (aspectRatio) {\n return (React.createElement(AspectRatio, { style: [style, { width, height, aspectRatio }] },\n React.createElement(NativeImage, { ...props, source: imageSource, resizeMode: resizeMode, style: [\n style,\n {\n height: \"100%\",\n width: \"100%\",\n },\n ] })));\n }\n return (React.createElement(NativeImage, { ...props, source: source, resizeMode: resizeMode, style: style }));\n};\nexport default Image;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=Justification.js.
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=Justification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
1
|
+
{"version":3,"sources":["Justification.js"],"names":[],"mappings":"AAAA","sourcesContent":["export {};\n"]}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
|
-
import { View } from "react-native";
|
|
5
|
-
|
|
2
|
+
import { View } from "react-native";
|
|
6
3
|
export function Center(_ref) {
|
|
7
4
|
let {
|
|
8
5
|
width = 240,
|
|
@@ -12,15 +9,16 @@ export function Center(_ref) {
|
|
|
12
9
|
style,
|
|
13
10
|
...rest
|
|
14
11
|
} = _ref;
|
|
15
|
-
return /*#__PURE__*/React.createElement(View,
|
|
12
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
16
13
|
style: [{
|
|
17
14
|
justifyContent: "center",
|
|
18
15
|
alignItems: "center",
|
|
19
16
|
width,
|
|
20
17
|
height,
|
|
21
18
|
backgroundColor: bgColor
|
|
22
|
-
}, style]
|
|
23
|
-
|
|
19
|
+
}, style],
|
|
20
|
+
...rest
|
|
21
|
+
}, children);
|
|
24
22
|
}
|
|
25
23
|
export function Circle(_ref2) {
|
|
26
24
|
let {
|
|
@@ -31,7 +29,7 @@ export function Circle(_ref2) {
|
|
|
31
29
|
...rest
|
|
32
30
|
} = _ref2;
|
|
33
31
|
const borderRadius = 1000;
|
|
34
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
32
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
35
33
|
width: size,
|
|
36
34
|
height: size,
|
|
37
35
|
bgColor: bgColor,
|
|
@@ -39,8 +37,9 @@ export function Circle(_ref2) {
|
|
|
39
37
|
backgroundColor: bgColor,
|
|
40
38
|
borderRadius,
|
|
41
39
|
overflow: "hidden"
|
|
42
|
-
}]
|
|
43
|
-
|
|
40
|
+
}],
|
|
41
|
+
...rest
|
|
42
|
+
}, children);
|
|
44
43
|
}
|
|
45
44
|
export function Square(_ref3) {
|
|
46
45
|
let {
|
|
@@ -50,12 +49,13 @@ export function Square(_ref3) {
|
|
|
50
49
|
style,
|
|
51
50
|
...rest
|
|
52
51
|
} = _ref3;
|
|
53
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
52
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
54
53
|
style: style,
|
|
55
54
|
width: size,
|
|
56
55
|
height: size,
|
|
57
|
-
bgColor: bgColor
|
|
58
|
-
|
|
56
|
+
bgColor: bgColor,
|
|
57
|
+
...rest
|
|
58
|
+
}, children);
|
|
59
59
|
}
|
|
60
60
|
export function Row(_ref4) {
|
|
61
61
|
let {
|
|
@@ -65,14 +65,14 @@ export function Row(_ref4) {
|
|
|
65
65
|
style,
|
|
66
66
|
...rest
|
|
67
67
|
} = _ref4;
|
|
68
|
-
return /*#__PURE__*/React.createElement(View,
|
|
69
|
-
style: [style,
|
|
70
|
-
{
|
|
68
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
69
|
+
style: [style, {
|
|
71
70
|
alignItems,
|
|
72
71
|
flexDirection: "row",
|
|
73
72
|
justifyContent: justifyContent
|
|
74
|
-
}]
|
|
75
|
-
|
|
73
|
+
}],
|
|
74
|
+
...rest
|
|
75
|
+
}, children);
|
|
76
76
|
}
|
|
77
77
|
export function Spacer(_ref5) {
|
|
78
78
|
let {
|
|
@@ -84,14 +84,15 @@ export function Spacer(_ref5) {
|
|
|
84
84
|
style,
|
|
85
85
|
...rest
|
|
86
86
|
} = _ref5;
|
|
87
|
-
return /*#__PURE__*/React.createElement(View,
|
|
87
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
88
88
|
style: [style, {
|
|
89
89
|
paddingRight: right,
|
|
90
90
|
paddingTop: top,
|
|
91
91
|
paddingLeft: left,
|
|
92
92
|
paddingBottom: bottom
|
|
93
|
-
}]
|
|
94
|
-
|
|
93
|
+
}],
|
|
94
|
+
...rest
|
|
95
|
+
}, children);
|
|
95
96
|
}
|
|
96
97
|
export function Stack(_ref6) {
|
|
97
98
|
let {
|
|
@@ -101,6 +102,24 @@ export function Stack(_ref6) {
|
|
|
101
102
|
style,
|
|
102
103
|
...rest
|
|
103
104
|
} = _ref6;
|
|
105
|
+
return (
|
|
106
|
+
/*#__PURE__*/
|
|
107
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
108
|
+
React.createElement(View, {
|
|
109
|
+
style: [style, {
|
|
110
|
+
justifyContent,
|
|
111
|
+
alignItems
|
|
112
|
+
}],
|
|
113
|
+
...rest
|
|
114
|
+
}, children)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=Layout.js.mapren,
|
|
118
|
+
justifyContent = "flex-start",
|
|
119
|
+
alignItems = "flex-start",
|
|
120
|
+
style,
|
|
121
|
+
...rest
|
|
122
|
+
} = _ref6;
|
|
104
123
|
return (
|
|
105
124
|
/*#__PURE__*/
|
|
106
125
|
// style must go first since we don't want justifyContent, alignItems overridden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Layout.
|
|
1
|
+
{"version":3,"sources":["Layout.js"],"names":["React","View","Center","width","height","children","bgColor","style","rest","createElement","justifyContent","alignItems","backgroundColor","Circle","size","borderRadius","overflow","Square","Row","flexDirection","Spacer","top","right","bottom","left","paddingRight","paddingTop","paddingLeft","paddingBottom","Stack"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,OAAO,SAASC,MAAT,OAAkF;AAAA,MAAlE;AAAEC,IAAAA,KAAK,GAAG,GAAV;AAAeC,IAAAA,MAAM,GAAG,GAAxB;AAA6BC,IAAAA,QAA7B;AAAuCC,IAAAA,OAAvC;AAAgDC,IAAAA,KAAhD;AAAuD,OAAGC;AAA1D,GAAkE;AACrF,sBAAQR,KAAK,CAACS,aAAN,CAAoBR,IAApB,EAA0B;AAAEM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A0B;AAAEM,MAAAA,KAAK,EAAE,CAACA,KAAD,EAAQ;AAAEG,QAAAA,cAAF;AAAkBC,QAAAA;AAAlB,OAAR,CAAT;AAAkD,SAAGH;AAArD,KAA1B,EAAuFH,QAAvF;AAFA;AAGH","sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nexport function Center({ width = 240, height = 200, children, bgColor, style, ...rest }) {\n return (React.createElement(View, { style: [\n {\n justifyContent: \"center\",\n alignItems: \"center\",\n width,\n height,\n backgroundColor: bgColor,\n },\n style,\n ], ...rest }, children));\n}\nexport function Circle({ size = 50, bgColor, children, style, ...rest }) {\n const borderRadius = 1000;\n return (React.createElement(Center, { width: size, height: size, bgColor: bgColor, style: [\n style,\n { backgroundColor: bgColor, borderRadius, overflow: \"hidden\" },\n ], ...rest }, children));\n}\nexport function Square({ size = 50, bgColor, children, style, ...rest }) {\n return (React.createElement(Center, { style: style, width: size, height: size, bgColor: bgColor, ...rest }, children));\n}\nexport function Row({ justifyContent, alignItems, children, style, ...rest }) {\n return (React.createElement(View, { style: [\n style,\n {\n alignItems,\n flexDirection: \"row\",\n justifyContent: justifyContent,\n },\n ], ...rest }, children));\n}\nexport function Spacer({ top = 8, right = 8, bottom = 8, left = 8, children, style, ...rest }) {\n return (React.createElement(View, { style: [\n style,\n {\n paddingRight: right,\n paddingTop: top,\n paddingLeft: left,\n paddingBottom: bottom,\n },\n ], ...rest }, children));\n}\nexport function Stack({ children, justifyContent = \"flex-start\", alignItems = \"flex-start\", style, ...rest }) {\n return (\n // style must go first since we don't want justifyContent, alignItems overridden\n React.createElement(View, { style: [style, { justifyContent, alignItems }], ...rest }, children));\n}\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
1
|
import React, { useEffect, useState } from "react";
|
|
4
2
|
import { TextInput } from "react-native";
|
|
5
3
|
import { isString, isNumber, isNaN } from "lodash";
|
|
@@ -56,6 +54,18 @@ const NumberInput = _ref => {
|
|
|
56
54
|
handleChangeText(nextStringNumberValue);
|
|
57
55
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
56
|
|
|
57
|
+
}, [value]);
|
|
58
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
59
|
+
keyboardType: "numeric",
|
|
60
|
+
value: currentStringNumberValue,
|
|
61
|
+
onChangeText: handleChangeText,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default NumberInput;
|
|
67
|
+
//# sourceMappingURL=NumberInput.js.map// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
+
|
|
59
69
|
}, [value]);
|
|
60
70
|
return /*#__PURE__*/React.createElement(TextInput, _extends({
|
|
61
71
|
keyboardType: "numeric",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["NumberInput.
|
|
1
|
+
{"version":3,"sources":["NumberInput.js"],"names":["React","useEffect","useState","TextInput","isString","isNumber","isNaN","NumberInput","onChangeText","value","defaultValue","props","currentStringNumberValue","setCurrentStringNumberValue","formatValueToStringNumber","valueToFormat","test","slice","toString","defaultStringNumberValue","handleChangeText","newValue","newStringNumberValue","number","parseFloat","nextStringNumberValue","createElement","keyboardType"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,SAAT,QAA0B,cAA1B;AACA,SAASC,QAAT,EAAmBC,QAAnB,EAA6BC,KAA7B,QAA0C,QAA1C;;AACA,MAAMC,WAAW,GAAG,QAAqD;AAAA,MAApD;AAAEC,IAAAA,YAAF;AAAgBC,IAAAA,KAAhB;AAAuBC,IAAAA,YAAvB;AAAqC,OAAGC;AAAxC,GAAoD;AACrE,QAAM,CAACC,wB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BAAyB,CAACL,KAAD,CAAvD;;AACA,QAAIG,wBAAwB,KAAKa,qBAAjC,EAAwD;AACpDL,MAAAA,gBAAgB,CAACK,qBAAD,CAAhB;AACH,KAJW,CAKZ;;AACH,GANQ,EAMN,CAAChB,KAAD,CANM,CAAT;AAOA,sBAAQT,KAAK,CAAC0B,aAAN,CAAoBvB,SAApB,EAA+B;AAAEwB,IAAAA,YAAY,EAAE,SAAhB;AAA2BlB,IAAAA,KAAK,EAAEG,wBAAlC;AAA4DJ,IAAAA,YAAY,EAAEY,gBAA1E;AAA4F,OAAGT;AAA/F,GAA/B,CAAR;AACH,CA5CD;;AA6CA,eAAeJ,WAAf","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { TextInput } from \"react-native\";\nimport { isString, isNumber, isNaN } from \"lodash\";\nconst NumberInput = ({ onChangeText, value, defaultValue, ...props }) => {\n const [currentStringNumberValue, setCurrentStringNumberValue] = useState(\"0\");\n const formatValueToStringNumber = (valueToFormat) => {\n if (valueToFormat != null) {\n if (isString(valueToFormat) && valueToFormat !== \"\") {\n if (/^0[1-9]$/.test(valueToFormat)) {\n return valueToFormat.slice(1);\n }\n else if (/^[+-]?([0-9]+\\.?[0-9]*|\\.[0-9]+)$/.test(valueToFormat)) {\n return valueToFormat;\n }\n else {\n return currentStringNumberValue;\n }\n }\n else if (isNumber(valueToFormat) && !isNaN(valueToFormat)) {\n return valueToFormat.toString();\n }\n }\n return \"0\";\n };\n // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only\n useEffect(() => {\n const defaultStringNumberValue = formatValueToStringNumber(defaultValue);\n if (currentStringNumberValue !== defaultStringNumberValue) {\n setCurrentStringNumberValue(defaultStringNumberValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const handleChangeText = (newValue) => {\n const newStringNumberValue = formatValueToStringNumber(newValue);\n const number = parseFloat(newStringNumberValue);\n setCurrentStringNumberValue(newStringNumberValue);\n onChangeText?.(number);\n };\n // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)\n useEffect(() => {\n const nextStringNumberValue = formatValueToStringNumber(value);\n if (currentStringNumberValue !== nextStringNumberValue) {\n handleChangeText(nextStringNumberValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n return (React.createElement(TextInput, { keyboardType: \"numeric\", value: currentStringNumberValue, onChangeText: handleChangeText, ...props }));\n};\nexport default NumberInput;\n"]}
|
|
@@ -4,7 +4,6 @@ import * as React from "react";
|
|
|
4
4
|
import PortalConsumer from "./PortalConsumer";
|
|
5
5
|
import PortalHost, { PortalContext } from "./PortalHost";
|
|
6
6
|
import { ThemeProvider, withTheme } from "../../theming";
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Portal allows to render a component at a different place in the parent tree.
|
|
10
9
|
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
@@ -26,6 +25,7 @@ import { ThemeProvider, withTheme } from "../../theming";
|
|
|
26
25
|
* }
|
|
27
26
|
* ```
|
|
28
27
|
*/
|
|
28
|
+
|
|
29
29
|
class Portal extends React.Component {
|
|
30
30
|
// @component ./PortalHost.tsx
|
|
31
31
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Portal.
|
|
1
|
+
{"version":3,"sources":["Portal.js"],"names":["React","PortalConsumer","PortalHost","PortalContext","ThemeProvider","withTheme","Portal","Component","render","children","theme","props","createElement","Consumer","manager"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,OAAOC,UAAP,IAAqBC,aAArB,QAA0C,cAA1C;AACA,SAASC,aAAT,EAAwBC,SAAxB,QAAyC,eAAzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,MAAN,SAAqBN,KAAK,CAACO,SAA3B,CAAqC;AACjC;AAEAC,EAAAA,MAAM,GAAG;AACL,UAAM;AAAEC,MAAAA,QAAF;AAAYC,MAAAA;AAAZ,QAAsB,KAAKC,KAAjC;AACA,wBAAQX,KAAK,CAACY,aAAN,CAAoBT,aAAa,CAACU,QAAlC,EAA4C,IAA5C,EAAmDC,OAAD,iBAAcd,KAAK,CAACY,aAAN,CAAoBX,cAApB,EAAoC;AAAEa,MAAAA,OAAO,EAAEA;AAAX,KAApC,eACpEd,KAAK,CAACY,aAAN,CAAoBR,aAApB,EAAmC;AAAEM,MAAAA,KAAK,EAAEA;AAAT,KAAnC,EAAqDD,QAArD,CADoE,CAAhE,CAAR;AAEH;;AAPgC;;gBAA/BH,M,UAEYJ,U;;AAOlB,eAAeG,SAAS,CAACC,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport PortalConsumer from \"./PortalConsumer\";\nimport PortalHost, { PortalContext } from \"./PortalHost\";\nimport { ThemeProvider, withTheme } from \"../../theming\";\n/**\n * Portal allows to render a component at a different place in the parent tree.\n * You can use it to render content which should appear above other elements, similar to `Modal`.\n * It requires a [`Portal.Host`](portal-host.html) component to be rendered somewhere in the parent tree.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Portal, Text } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal>\n * <Text>This is rendered at a different place</Text>\n * </Portal>\n * );\n * }\n * }\n * ```\n */\nclass Portal extends React.Component {\n // @component ./PortalHost.tsx\n static Host = PortalHost;\n render() {\n const { children, theme } = this.props;\n return (React.createElement(PortalContext.Consumer, null, (manager) => (React.createElement(PortalConsumer, { manager: manager },\n React.createElement(ThemeProvider, { theme: theme }, children)))));\n }\n}\nexport default withTheme(Portal);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PortalConsumer.
|
|
1
|
+
{"version":3,"sources":["PortalConsumer.tsx"],"names":["React","PortalConsumer","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAQA,eAAe,MAAMC,cAAN,SAA6BD,KAAK,CAACE,SAAnC,CAAoD;AAAA;AAAA;;AAAA;AAAA;;AAC1C,QAAjBC,iBAAiB,GAAG;AACxB,SAAKC,YAAL,GADwB,CAGxB;;AACA,UAAMC,OAAO,CAACC,OAAR,EAAN;AAEA,SAAKC,GAAL,GAAW,KAAKC,KAAL,CAAWC,OAAX,CAAmBC,KAAnB,CAAyB,KAAKF,KAAL,CAAWG,QAApC,CAAX;AACD;;AAEDC,EAAAA,kBAAkB,GAAG;AACnB,SAAKR,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBI,MAAnB,CAA0B,KAAKN,GAA/B,EAAoC,KAAKC,KAAL,CAAWG,QAA/C;AACD;;AAEDG,EAAAA,oBAAoB,GAAG;AACrB,SAAKV,YAAL;AAEA,SAAKI,KAAL,CAAWC,OAAX,CAAmBM,OAAnB,CAA2B,KAAKR,GAAhC;AACD;;AAIOH,EAAAA,YAAY,GAAG;AACrB,QAAI,CAAC,KAAKI,KAAL,CAAWC,OAAhB,EAAyB;AACvB,YAAM,IAAIO,KAAJ,CACJ,+GACE,iGADF,GAEE,qEAHE,CAAN;AAKD;AACF;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,IAAP;AACD;;AApCgE","sourcesContent":["import * as React from \"react\";\nimport { PortalMethods } from \"./PortalHost\";\n\ntype Props = {\n manager: PortalMethods;\n children: React.ReactNode;\n};\n\nexport default class PortalConsumer extends React.Component<Props> {\n async componentDidMount() {\n this.checkManager();\n\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n\n this.key = this.props.manager.mount(this.props.children);\n }\n\n componentDidUpdate() {\n this.checkManager();\n\n this.props.manager.update(this.key, this.props.children);\n }\n\n componentWillUnmount() {\n this.checkManager();\n\n this.props.manager.unmount(this.key);\n }\n\n private key: any;\n\n private checkManager() {\n if (!this.props.manager) {\n throw new Error(\n \"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\"\n );\n }\n }\n\n render() {\n return null;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ProgressIndicator.
|
|
1
|
+
{"version":3,"sources":["ProgressIndicator.tsx"],"names":["React","StepIndicator","withTheme","ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAqBA,MAAMC,iBAAkC,GAAG,QAerC;AAAA,MAfsC;AAC1CC,IAAAA,aAD0C;AAE1CC,IAAAA,WAF0C;AAG1CC,IAAAA,sBAAsB,GAAG,CAHiB;AAI1CC,IAAAA,sBAAsB,GAAG,SAJiB;AAK1CC,IAAAA,iBAL0C;AAM1CC,IAAAA,wBAN0C;AAO1CC,IAAAA,yBAP0C;AAQ1CC,IAAAA,8BAR0C;AAS1CC,IAAAA,0BAA0B,GAAG,EATa;AAU1CC,IAAAA,uBAAuB,GAAG,eAVgB;AAW1CC,IAAAA,yBAAyB,GAAG,SAXc;AAY1CC,IAAAA,eAAe,GAAG,OAZwB;AAa1CC,IAAAA,aAAa,GAAG,SAb0B;AAc1CC,IAAAA;AAd0C,GAetC;AACJ,QAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;AACA,sBACE,oBAAC,aAAD;AACE,IAAA,SAAS,EAAED,aADb;AAEE,IAAA,eAAe,EAAEc,eAFnB;AAGE,IAAA,YAAY,EAAE;AACZV,MAAAA,iBADY;AAEZC,MAAAA,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;AAKZW,MAAAA,uBAAuB,EAAEH,aALb;AAMZI,MAAAA,yBAAyB,EAAEL,eANf;AAOZM,MAAAA,sBAAsB,EAAEL,aAPZ;AAQZM,MAAAA,wBAAwB,EAAEP,eARd;AASZQ,MAAAA,0BAA0B,EAAEP,aAThB;AAUZQ,MAAAA,4BAA4B,EAAET,eAVlB;AAWZT,MAAAA,sBAXY;AAYZC,MAAAA,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;AAcZe,MAAAA,iCAAiC,EAAEX,yBAdvB;AAeZY,MAAAA,+BAA+B,EAAEb,uBAfrB;AAgBZH,MAAAA,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;AAiBZJ,MAAAA,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;AAmBZF,MAAAA,0BAnBY;AAoBZe,MAAAA,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;AApB5B;AAHhB,IADF;AA4BD,CA7CD;;AA+CA,eAAe5B,SAAS,CAACC,iBAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<Props> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import Config from "../Config";
|
|
5
3
|
import IconButton from "../IconButton";
|
|
@@ -34,7 +32,20 @@ const RadioButton = _ref => {
|
|
|
34
32
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
35
33
|
};
|
|
36
34
|
|
|
37
|
-
return /*#__PURE__*/React.createElement(IconButton,
|
|
35
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
36
|
+
Icon: Icon,
|
|
37
|
+
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
38
|
+
color: isSelected ? color : unselectedColor,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
onPress: handlePress,
|
|
41
|
+
size: size,
|
|
42
|
+
style: style,
|
|
43
|
+
...rest
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default RadioButton;
|
|
48
|
+
//# sourceMappingURL=RadioButton.js.mapreateElement(IconButton, _extends({
|
|
38
49
|
Icon: Icon,
|
|
39
50
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
40
51
|
color: isSelected ? color : unselectedColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["RadioButton.
|
|
1
|
+
{"version":3,"sources":["RadioButton.js"],"names":["React","Config","IconButton","getValueForRadioButton","useRadioButtonGroupContext","RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","realContextValue","isSelected","handlePress","createElement","icon"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,0BAAT,QAA2C,WAA3C;;AACA,MAAMC,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EA,KAA1K;AAAiL,OAAGC;AAApL,GAAhC,CAAR;AACH,CAVD;;AAWA,eAAeb,WAAf","sourcesContent":["import * as React from \"react\";\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\nconst RadioButton = ({ Icon, disabled = false, color, value = \"\", selected, unselectedColor, onPress, size = Config.radioButtonSize, selectedIcon = \"MaterialIcons/radio-button-checked\", unselectedIcon = \"MaterialIcons/radio-button-unchecked\", style, ...rest }) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n return (React.createElement(IconButton, { Icon: Icon, icon: isSelected ? selectedIcon : unselectedIcon, color: isSelected ? color : unselectedColor, disabled: disabled, onPress: handlePress, size: size, style: style, ...rest }));\n};\nexport default RadioButton;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Row.
|
|
1
|
+
{"version":3,"sources":["Row.js"],"names":["React","View","Text","Image","StyleSheet","withTheme","Config","Row","titleTypeStyle","titleColor","subtitleTypeStyle","subtitleColor","title","subtitle","multilineSubtitle","image","right","style","createElement","styles","container","padding","leftContainer","source","uri","marginRight","width","rowMultiLineImageSize","rowSingleLineImageSize","height","textContainer","color","numberOfLines","marginTop","undefined","create","flexDirection","flex","justifyContent","alignItems"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,KAArB,EAA4BC,UAA5B,QAA+C,cAA/C;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AACA,MAAMC,GAAG,GAAG,QAAgI;AAAA,MAA/H;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,UAAl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ADJ,EAOIC,QAAQ,gBAAIb,KAAK,CAACkB,aAAN,CAAoBhB,IAApB,EAA0B;AAAEe,IAAAA,KAAK,EAAE,CACvCP,iBADuC,EAEvC;AACIqB,MAAAA,KAAK,EAAEpB,aADX;AAEIsB,MAAAA,SAAS,EAAE;AAFf,KAFuC,CAAT;AAM/BD,IAAAA,aAAa,EAAElB,iBAAiB,GAAGoB,SAAH,GAAe;AANhB,GAA1B,EAM+CrB,QAN/C,CAAJ,GAMgE,IAb5E,CAVJ,CADI,EAyBJG,KAAK,IAAIA,KAAK,EAzBV,CAAR;AA0BH,CA3BD;;AA4BA,MAAMG,MAAM,GAAGf,UAAU,CAAC+B,MAAX,CAAkB;AAC7Bb,EAAAA,aAAa,EAAE;AACXc,IAAAA,aAAa,EAAE,KADJ;AAEXC,IAAAA,IAAI,EAAE;AAFK,GADc;AAK7BjB,EAAAA,SAAS,EAAE;AACPgB,IAAAA,aAAa,EAAE,KADR;AAEPE,IAAAA,cAAc,EAAE,eAFT;AAGPC,IAAAA,UAAU,EAAE;AAHL,GALkB;AAU7BT,EAAAA,aAAa,EAAE;AACXO,IAAAA,IAAI,EAAE,CADK;AAEXC,IAAAA,cAAc,EAAE;AAFL;AAVc,CAAlB,CAAf;AAeA,eAAejC,SAAS,CAACE,GAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, Text, Image, StyleSheet, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {\n return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },\n React.createElement(View, { style: styles.leftContainer },\n image && (React.createElement(Image, { source: typeof image === \"string\" ? { uri: image } : image, style: {\n marginRight: 12,\n width: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n height: subtitle\n ? Config.rowMultiLineImageSize\n : Config.rowSingleLineImageSize,\n } })),\n React.createElement(View, { style: styles.textContainer },\n React.createElement(Text, { style: [\n titleTypeStyle,\n {\n color: titleColor,\n },\n ], numberOfLines: 1 }, title),\n subtitle ? (React.createElement(Text, { style: [\n subtitleTypeStyle,\n {\n color: subtitleColor,\n marginTop: 4,\n },\n ], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),\n right && right()));\n};\nconst styles = StyleSheet.create({\n leftContainer: {\n flexDirection: \"row\",\n flex: 1,\n },\n container: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textContainer: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(Row);\n"]}
|