@draftbit/core 43.7.2-244baf.0 → 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/commonjs/components/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +19 -4
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- 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/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/Card.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":["DeprecatedFAB.tsx"],"names":["React","ActivityIndicator","View","StyleSheet","color","Config","Text","Touchable","Elevation","withTheme","FAB","Icon","icon","disabled","type","loading","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,iBADF,EAEEC,IAFF,EAGEC,UAHF,QAQO,cARP;AASA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAuDA,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,EAAEc,SAFT;AAGE,IAAA,KAAK,EAAEoB;AAHT,IADM,GAMJ,IAhBN,EAiBGhC,KAAK,gBACJ,oBAAC,IAAD;AAAM,IAAA,aAAa,EAAE,CAArB;AAAwB,IAAA,KAAK,EAAE,CAAC8B,SAAD,EAAYtB,UAAU,CAACmB,MAAvB;AAA/B,KACG3B,KADH,CADI,GAIF,IArBN,CARF,CADF,CADF;AAoCD,CAvID;;AAyIA,MAAM0B,MAAM,GAAGxC,UAAU,CAAC0D,MAAX,CAAkB;AAC/BjB,EAAAA,MAAM,EAAE;AACNkB,IAAAA,WAAW,EAAE;AADP,GADuB;AAI/BhB,EAAAA,OAAO,EAAE;AACPiB,IAAAA,aAAa,EAAE,KADR;AAEPvB,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GAJsB;AAS/B7B,EAAAA,IAAI,EAAE;AACJ4B,IAAAA,UAAU,EAAE,QADR;AAEJC,IAAAA,cAAc,EAAE,QAFZ;AAGJS,IAAAA,KAAK,EAAE7C,MAAM,CAAC8C;AAHV,GATyB;AAc/Ba,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,CADD;AAELC,IAAAA,KAAK,EAAE,CAFF;AAGLC,IAAAA,MAAM,EAAE,CAHH;AAILd,IAAAA,MAAM,EAAE,EAJH;AAKLd,IAAAA,YAAY,EAAE;AALT;AAdwB,CAAlB,CAAf;AAuBA,eAAe9B,SAAS,CAACC,GAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A floating action button represents the primary action in an application.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/fab-1.png\" />\n * <img src=\"screenshots/fab-2.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { FAB } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <FAB\n * style={styles.fab}\n * type=\"outline\"\n * icon=\"add\"\n * onPress={() => console.log('Pressed')}\n * />\n * );\n *\n * const styles = StyleSheet.create({\n * fab: {\n * position: 'absolute',\n * margin: 16,\n * right: 0,\n * bottom: 0,\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"extended\" | \"outline\" | \"fixed\" | \"standard\";\n loading?: boolean;\n icon?: string;\n color?: string;\n label?: string;\n onPress: () => void;\n elevation?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst FAB: React.FC<Props> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n color: colorOverride,\n label,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle: StyleProp<ViewStyle> = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n const buttonStyles: StyleProp<ViewStyle>[] = [styles.button, buttonStyle];\n\n const contentStyle: StyleProp<ViewStyle>[] = [styles.content];\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n };\n\n const iconStyle: StyleProp<ViewStyle>[] = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n\n textStyle.margin = 16;\n }\n\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n\n return (\n <Elevation style={[{ elevation }, style]}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={buttonStyles}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n {label ? (\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {label}\n </Text>\n ) : null}\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\n\nexport default withTheme(FAB);\n"]}
|
|
1
|
+
{"version":3,"sources":["DeprecatedFAB.js"],"names":["React","ActivityIndicator","View","StyleSheet","color","Config","Text","Touchable","Elevation","withTheme","FAB","Icon","icon","disabled","type","loading","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","createElement","accessibilityState","accessibilityRole","name","size","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,iBAAT,EAA4BC,IAA5B,EAAkCC,UAAlC,QAAqD,cAArD;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AACA,MAAMC,GAAG,GAAG,QAAuM;AAAA,MAAtM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,QAAQ,GAAG,KAAzB;AAAgCC,IAAAA,IAAI,GAAG,OAAvC;AAAgDC,IAAAA,OAAO,GAAG,KAA1D;AAAiEX,IAAAA,KAAK,EAAEY,aAAxE;AAAuFC,IAAAA,KAAvF;AAA8FC,IAAAA,OAA9F;AAAuGC,IAAAA,SAAS,GAAG,CAAnH;AAAsHC,IAAAA,KAAtH;AAA6HC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAA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AAA,aAAa,EAAE,CAAjB;AAAoB9C,IAAAA,KAAK,EAAE,CAAC2B,SAAD,EAAYtB,UAAU,CAACmB,MAAvB;AAA3B,GAA1B,EAAuF3B,KAAvF,CAAJ,GAAqG,IAJ9G,CADJ,CADI,CAAR;AAOH,CAnFD;;AAoFA,MAAM0B,MAAM,GAAGxC,UAAU,CAACgE,MAAX,CAAkB;AAC7BvB,EAAAA,MAAM,EAAE;AACJwB,IAAAA,WAAW,EAAE;AADT,GADqB;AAI7BtB,EAAAA,OAAO,EAAE;AACLuB,IAAAA,aAAa,EAAE,KADV;AAEL7B,IAAAA,UAAU,EAAE,QAFP;AAGLC,IAAAA,cAAc,EAAE;AAHX,GAJoB;AAS7B7B,EAAAA,IAAI,EAAE;AACF4B,IAAAA,UAAU,EAAE,QADV;AAEFC,IAAAA,cAAc,EAAE,QAFd;AAGFS,IAAAA,KAAK,EAAE7C,MAAM,CAAC8C;AAHZ,GATuB;AAc7BmB,EAAAA,KAAK,EAAE;AACHC,IAAAA,IAAI,EAAE,CADH;AAEHC,IAAAA,KAAK,EAAE,CAFJ;AAGHC,IAAAA,MAAM,EAAE,CAHL;AAIHpB,IAAAA,MAAM,EAAE,EAJL;AAKHd,IAAAA,YAAY,EAAE;AALX;AAdsB,CAAlB,CAAf;AAsBA,eAAe9B,SAAS,CAACC,GAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\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 { StyleSheet, View } from "react-native";
|
|
5
3
|
import { withTheme } from "../theming";
|
|
@@ -13,6 +11,22 @@ const Divider = _ref => {
|
|
|
13
11
|
},
|
|
14
12
|
...rest
|
|
15
13
|
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
style: [{
|
|
16
|
+
backgroundColor: color || colors.divider,
|
|
17
|
+
height: StyleSheet.hairlineWidth
|
|
18
|
+
}, style],
|
|
19
|
+
...rest
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default withTheme(Divider);
|
|
24
|
+
//# sourceMappingURL=Divider.js.mapor,
|
|
25
|
+
theme: {
|
|
26
|
+
colors
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
} = _ref;
|
|
16
30
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
17
31
|
style: [{
|
|
18
32
|
backgroundColor: color || colors.divider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Divider.
|
|
1
|
+
{"version":3,"sources":["Divider.js"],"names":["React","StyleSheet","View","withTheme","Divider","style","color","theme","colors","rest","createElement","backgroundColor","divider","height","hairlineWidth"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAAiC,cAAjC;AACA,SAASC,SAAT,QAA0B,YAA1B;;AACA,MAAMC,OAAO,GAAG,QAAkD;AAAA,MAAjD;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,KAAK,EAAE;AAAEC,MAAAA;AAAF,KAAvB;AAAmC,OAAGC;AAAtC,GAAiD;AAC9D,sBAAQT,KAAK,CAACU,aAAN,CAAoBR,IAApB,EAA0B;AAAEG,IAAAA,KAAK,EAAE,CACnC;AACIM,MAAAA,eAAe,EAAEL,KAAK,IAAIE,MAAM,CAACI,OADrC;AAEIC,MAAAA,MAAM,EAAEZ,UAAU,CAACa;AAFvB,KADmC,EAKnCT,KALmC,CAAT;AAM3B,OAAGI;AANwB,GAA1B,CAAR;AAOH,CARD;;AASA,eAAeN,SAAS,CAACC,OAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst Divider = ({ style, color, theme: { colors }, ...rest }) => {\n return (React.createElement(View, { style: [\n {\n backgroundColor: color || colors.divider,\n height: StyleSheet.hairlineWidth,\n },\n style,\n ], ...rest }));\n};\nexport default withTheme(Divider);\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 { Text, StyleSheet } from "react-native";
|
|
5
3
|
import { extractStyles } from "../utilities";
|
|
@@ -18,12 +16,27 @@ export default function FormRow(_ref) {
|
|
|
18
16
|
textStyles,
|
|
19
17
|
viewStyles
|
|
20
18
|
} = extractStyles(style);
|
|
21
|
-
return /*#__PURE__*/React.createElement(Touchable,
|
|
19
|
+
return /*#__PURE__*/React.createElement(Touchable, {
|
|
22
20
|
disabled: disabled,
|
|
23
21
|
onPress: onPress,
|
|
24
22
|
style: [styles.row, {
|
|
25
23
|
flexDirection: direction
|
|
26
|
-
}, viewStyles]
|
|
24
|
+
}, viewStyles],
|
|
25
|
+
...rest
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
27
|
+
style: textStyles
|
|
28
|
+
}, label), children);
|
|
29
|
+
}
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
row: {
|
|
32
|
+
marginLeft: 8,
|
|
33
|
+
marginRight: 8,
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
justifyContent: "space-between",
|
|
36
|
+
alignItems: "center"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=FormRow.js.maptyles]
|
|
27
40
|
}, rest), /*#__PURE__*/React.createElement(Text, {
|
|
28
41
|
style: textStyles
|
|
29
42
|
}, label), children);
|
|
@@ -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":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,UAArB,QAAwC,cAAxC;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AACA,MAAMC,MAAM,GAAG,QAAqI;AAAA,MAApI;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,cAAR;AAAwBC,IAAAA,UAAxB;AAAoCC,IAAAA,KAApC;AAA2CC,IAAAA,UAA3C;AAAuDC,IAAAA,gBAAvD;AAAyEC,IAAAA,IAAzE;AAA+EC,IAAAA,OAA/E;AAAwFC,IAAAA,KAAxF;AAA+FC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAAtG,GAAoI;AAChJ,sBAAQpB,KAAK,CAACqB,aAAN,CAAoBpB,IAApB,EAA0B;AAAEgB,IAAAA,KAAK,EAAE,CAACK,MAAM,CAACC,SAAR,EAAmBN,KAAnB;AAAT,GAA1B,eACJjB,KAAK,CAACqB,aAAN,CAAoBpB,IAApB,EAA0B;AAAEgB,IAAAA,KAAK,EAAEK,MAAM,CAACE;AAAhB,GAA1B,eACIxB,KAAK,CAACqB,aAAN,CAAoBnB,IAApB,EAA0B;AAAEe,IAAAA,KAAK,EAAE,CAC3BP,cAD2B,EAE3B;AACIe,MAAAA,KAAK,EAAEd,UADX;AAEIe,MAAAA,IAAI,EAAE;AAFV,KAF2B,CAAT;AAMnBC,IAAAA,aAAa,EAAE;AANI,GAA1B,EAM2Bf,KAN3B,CADJ,EAQII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AAE;AACbS,IAAAA,aAAa,EAAE,KADF;AAEbC,IAAAA,cAAc,EAAE,QAFH;AAGbC,IAAAA,UAAU,EAAE;AAHC;AATY,CAAlB,CAAf;AAeA,eAAerC,SAAS,CAACI,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, 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;AAA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iC,EAAE,GAAGW,KAAL;AAAYH,MAAAA,MAAM,EAAEI,WAApB;AAAiCH,MAAAA,UAAU,EAAEA,UAA7C;AAAyDC,MAAAA,KAAK,EAAE,CACzFA,KADyF,EAEzF;AACIH,QAAAA,MAAM,EAAE,MADZ;AAEID,QAAAA,KAAK,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;AAAe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AAYK,IAAAA,cAAc,GAAG,YAA7B;AAA2CC,IAAAA,UAAU,GAAG,YAAxD;AAAsEJ,IAAAA,KAAtE;AAA6E,OAAGC;AAAhF,GAAwF;AAC1G;AAAA;AACA;AACAR,IAAAA,KAAK,CAACS,aAAN,CAAoBR,IAApB,EAA0B;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,EAA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BAAD,CAA3B;AACAd,IAAAA,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAGe,MAAH,CAAZ;AACH,GALD,CA7BqE,CAmCrE;;;AACAtB,EAAAA,SAAS,CAAC,MAAM;AACZ,UAAMwB,qBAAqB,GAAGX,yBAAyB,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,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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A6GJ,IAAAA,QAAQ,EAAEA,QAAvH;AAAiIK,IAAAA,OAAO,EAAEY,WAA1I;AAAuJX,IAAAA,IAAI,EAAEA,IAA7J;AAAmKI,IAAAA,KAAK,EAAEA,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"]}
|