@draftbit/core 44.2.3-c421ea.2 → 46.0.1-eb73d2.0
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/Provider.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/AspectRatio.js.map +1 -1
- package/lib/commonjs/components/AvatarEdit.js.map +1 -1
- package/lib/commonjs/components/Banner.js.map +1 -1
- package/lib/commonjs/components/Card.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/CardContainer.js.map +1 -1
- package/lib/commonjs/components/CardContainerRating.js.map +1 -1
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/commonjs/components/CardInline.js.map +1 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/CircularProgress.js.map +1 -1
- package/lib/commonjs/components/Container.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/FAB.js.map +1 -1
- package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/HeaderMedium.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/components/Portal/Portal.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle.js.map +1 -1
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/Row.js.map +1 -1
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/interfaces/Icon.js.map +1 -1
- package/lib/module/Provider.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/module/components/AspectRatio.js.map +1 -1
- package/lib/module/components/AvatarEdit.js.map +1 -1
- package/lib/module/components/Banner.js.map +1 -1
- package/lib/module/components/Button.js +32 -11
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/components/Card.js.map +1 -1
- package/lib/module/components/CardBlock.js.map +1 -1
- package/lib/module/components/CardContainer.js.map +1 -1
- package/lib/module/components/CardContainerRating.js.map +1 -1
- package/lib/module/components/CardContainerShortImage.js.map +1 -1
- package/lib/module/components/CardInline.js.map +1 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/CircleImage.js +16 -2
- package/lib/module/components/CircleImage.js.map +1 -1
- package/lib/module/components/CircularProgress.js.map +1 -1
- package/lib/module/components/Container.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/module/components/DeprecatedButton.js.map +1 -1
- package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/module/components/DeprecatedFAB.js +20 -4
- package/lib/module/components/DeprecatedFAB.js.map +1 -1
- package/lib/module/components/Divider.js.map +1 -1
- package/lib/module/components/Elevation.js.map +1 -1
- package/lib/module/components/FAB.js.map +1 -1
- package/lib/module/components/FieldSearchBarFull.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/HeaderLarge.js.map +1 -1
- package/lib/module/components/HeaderMedium.js.map +1 -1
- package/lib/module/components/HeaderOverline.js.map +1 -1
- package/lib/module/components/IconButton.js.map +1 -1
- package/lib/module/components/NumberInput.js +13 -2
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Portal/PortalManager.js +1 -1
- package/lib/module/components/Portal/PortalManager.js.map +1 -1
- package/lib/module/components/ProgressCircle.js.map +1 -1
- package/lib/module/components/ProgressIndicator.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -4
- package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +23 -6
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/Row.js.map +1 -1
- package/lib/module/components/RowBodyIcon.js.map +1 -1
- package/lib/module/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/module/components/ScreenContainer.js +21 -5
- package/lib/module/components/ScreenContainer.js.map +1 -1
- package/lib/module/components/StarRating.js.map +1 -1
- package/lib/module/components/Surface.js.map +1 -1
- package/lib/module/components/Swiper/Swiper.js.map +1 -1
- package/lib/module/components/ToggleButton.js.map +1 -1
- package/lib/module/interfaces/Icon.js.map +1 -1
- package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +2 -3022
- package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +2 -3010
- package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +1 -1
- package/lib/typescript/src/components/AspectRatio.d.ts +1 -1
- package/lib/typescript/src/components/AvatarEdit.d.ts +2 -2
- package/lib/typescript/src/components/Banner.d.ts +2 -2
- package/lib/typescript/src/components/Card.d.ts +2 -2
- package/lib/typescript/src/components/CardBlock.d.ts +2 -2
- package/lib/typescript/src/components/CardContainer.d.ts +2 -2
- package/lib/typescript/src/components/CardContainerRating.d.ts +2 -2
- package/lib/typescript/src/components/CardContainerShortImage.d.ts +2 -2
- package/lib/typescript/src/components/CardInline.d.ts +2 -2
- package/lib/typescript/src/components/Carousel.d.ts +4 -7
- package/lib/typescript/src/components/CircleImage.d.ts +1 -1
- package/lib/typescript/src/components/Container.d.ts +2 -2
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -2
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/Divider.d.ts +2 -2
- package/lib/typescript/src/components/Elevation.d.ts +2 -2
- package/lib/typescript/src/components/FAB.d.ts +2 -2
- package/lib/typescript/src/components/FieldSearchBarFull.d.ts +2 -2
- package/lib/typescript/src/components/Header.d.ts +2 -2
- package/lib/typescript/src/components/HeaderLarge.d.ts +2 -2
- package/lib/typescript/src/components/HeaderMedium.d.ts +2 -2
- package/lib/typescript/src/components/HeaderOverline.d.ts +2 -2
- package/lib/typescript/src/components/IconButton.d.ts +2 -2
- package/lib/typescript/src/components/ProgressCircle.d.ts +2 -2
- package/lib/typescript/src/components/ProgressIndicator.d.ts +2 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +2 -2
- package/lib/typescript/src/components/Row.d.ts +2 -2
- package/lib/typescript/src/components/RowBodyIcon.d.ts +2 -2
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +2 -2
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +2 -2
- package/lib/typescript/src/components/Slider.d.ts +2 -3032
- package/lib/typescript/src/components/StarRating.d.ts +2 -2
- package/lib/typescript/src/components/Surface.d.ts +2 -2
- package/lib/typescript/src/components/Switch.d.ts +2 -3018
- package/lib/typescript/src/components/ToggleButton.d.ts +2 -2
- package/lib/typescript/src/interfaces/Icon.d.ts +1 -3
- package/package.json +5 -5
- package/src/Provider.tsx +1 -0
- package/src/components/ActionSheet/ActionSheetCancel.tsx +1 -1
- package/src/components/ActionSheet/ActionSheetItem.js +1 -1
- package/src/components/ActionSheet/ActionSheetItem.tsx +6 -1
- package/src/components/AnimatedCircularProgress.tsx +1 -1
- package/src/components/AspectRatio.tsx +1 -1
- package/src/components/AvatarEdit.tsx +1 -1
- package/src/components/Banner.tsx +1 -1
- package/src/components/Card.tsx +1 -1
- package/src/components/CardBlock.tsx +1 -1
- package/src/components/CardContainer.tsx +1 -1
- package/src/components/CardContainerRating.tsx +1 -1
- package/src/components/CardContainerShortImage.tsx +1 -1
- package/src/components/CardInline.tsx +1 -1
- package/src/components/Carousel.tsx +2 -1
- package/src/components/CircleImage.tsx +1 -1
- package/src/components/CircularProgress.tsx +1 -0
- package/src/components/Container.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/DatePicker/DatePickerComponent.tsx +1 -1
- package/src/components/DeprecatedButton.tsx +1 -1
- package/src/components/DeprecatedCardWrapper.tsx +1 -1
- package/src/components/DeprecatedFAB.tsx +1 -1
- package/src/components/Divider.tsx +1 -1
- package/src/components/Elevation.tsx +6 -1
- package/src/components/FAB.tsx +1 -1
- package/src/components/FieldSearchBarFull.tsx +1 -1
- package/src/components/Header.tsx +1 -1
- package/src/components/HeaderLarge.tsx +1 -1
- package/src/components/HeaderMedium.tsx +1 -1
- package/src/components/HeaderOverline.tsx +1 -1
- package/src/components/IconButton.tsx +1 -1
- package/src/components/Portal/Portal.tsx +1 -0
- package/src/components/ProgressCircle.tsx +2 -1
- package/src/components/ProgressIndicator.tsx +1 -1
- package/src/components/RadioButton/RadioButtonFieldGroup.tsx +1 -1
- package/src/components/Row.tsx +1 -1
- package/src/components/RowBodyIcon.tsx +1 -1
- package/src/components/RowHeadlineImageCaption.tsx +1 -1
- package/src/components/RowHeadlineImageIcon.tsx +1 -1
- package/src/components/StarRating.tsx +2 -2
- package/src/components/Surface.tsx +1 -1
- package/src/components/Swiper/Swiper.tsx +1 -0
- package/src/components/ToggleButton.tsx +1 -1
- package/src/interfaces/Icon.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"sources":["DeprecatedFAB.tsx"],"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,\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AAa,EAAE,CAArB;IAAwB,KAAK,EAAE,CAAC8B,SAAD,EAAYtB,UAAU,CAACmB,MAAvB;EAA/B,GACG3B,KADH,CADI,GAIF,IArBN,CARF,CADF,CADF;AAoCD,CAvID;;AAyIA,MAAM0B,MAAM,GAAGxC,UAAU,CAAC0D,MAAX,CAAkB;EAC/BjB,MAAM,EAAE;IACNkB,WAAW,EAAE;EADP,CADuB;EAI/BhB,OAAO,EAAE;IACPiB,aAAa,EAAE,KADR;IAEPvB,UAAU,EAAE,QAFL;IAGPC,cAAc,EAAE;EAHT,CAJsB;EAS/B7B,IAAI,EAAE;IACJ4B,UAAU,EAAE,QADR;IAEJC,cAAc,EAAE,QAFZ;IAGJS,KAAK,EAAE7C,MAAM,CAAC8C;EAHV,CATyB;EAc/Ba,KAAK,EAAE;IACLC,IAAI,EAAE,CADD;IAELC,KAAK,EAAE,CAFF;IAGLC,MAAM,EAAE,CAHH;IAILd,MAAM,EAAE,EAJH;IAKLd,YAAY,EAAE;EALT;AAdwB,CAAlB,CAAf;AAuBA,eAAe9B,SAAS,CAACC,GAAD,CAAxB"}
|
|
1
|
+
{"version":3,"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"],"sources":["DeprecatedFAB.js"],"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"],"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;EAAA,IAAtM;IAAEC,IAAF;IAAQC,IAAR;IAAcC,QAAQ,GAAG,KAAzB;IAAgCC,IAAI,GAAG,OAAvC;IAAgDC,OAAO,GAAG,KAA1D;IAAiEX,KAAK,EAAEY,aAAxE;IAAuFC,KAAvF;IAA8FC,OAA9F;IAAuGC,SAAS,GAAG,CAAnH;IAAsHC,KAAtH;IAA6HC,KAAK,EAAE;MAAEC,MAAF;MAAUC,eAAV;MAA2BC,SAA3B;MAAsCC;IAAtC,CAApI;IAAwL,GAAGC;EAA3L,CAAsM;EAC/M,IAA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ACF4B,UAAU,EAAE,QADV;IAEFC,cAAc,EAAE,QAFd;IAGFS,KAAK,EAAE7C,MAAM,CAAC8C;EAHZ,CATuB;EAc7BmB,KAAK,EAAE;IACHC,IAAI,EAAE,CADH;IAEHC,KAAK,EAAE,CAFJ;IAGHC,MAAM,EAAE,CAHL;IAIHpB,MAAM,EAAE,EAJL;IAKHd,YAAY,EAAE;EALX;AAdsB,CAAlB,CAAf;AAsBA,eAAe9B,SAAS,CAACC,GAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","withTheme","Divider","style","color","theme","colors","rest","backgroundColor","divider","height","hairlineWidth"],"sources":["Divider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n color?: string;\n theme: typeof theme;\n};\n\nconst Divider: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","withTheme","Divider","style","color","theme","colors","rest","backgroundColor","divider","height","hairlineWidth"],"sources":["Divider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleSheet, View, StyleProp, ViewStyle } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n color?: string;\n theme: typeof theme;\n};\n\nconst Divider: React.FC<React.PropsWithChildren<Props>> = ({\n style,\n color,\n theme: { colors },\n ...rest\n}) => {\n return (\n <View\n style={[\n {\n backgroundColor: color || colors.divider,\n height: StyleSheet.hairlineWidth,\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nexport default withTheme(Divider);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,UAAT,EAAqBC,IAArB,QAAuD,cAAvD;AACA,SAASC,SAAT,QAA0B,YAA1B;;AASA,MAAMC,OAAiD,GAAG,QAKpD;EAAA,IALqD;IACzDC,KADyD;IAEzDC,KAFyD;IAGzDC,KAAK,EAAE;MAAEC;IAAF,CAHkD;IAIzD,GAAGC;EAJsD,CAKrD;EACJ,oBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACL;MACEC,eAAe,EAAEJ,KAAK,IAAIE,MAAM,CAACG,OADnC;MAEEC,MAAM,EAAEX,UAAU,CAACY;IAFrB,CADK,EAKLR,KALK;EADT,GAQMI,IARN,EADF;AAYD,CAlBD;;AAoBA,eAAeN,SAAS,CAACC,OAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","backgroundColor","surface","overflow"],"sources":["Elevation.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","Animated","StyleSheet","View","shadow","withTheme","Elevation","style","theme","children","rest","elevation","borderRadius","radius","flatten","colors","backgroundColor","surface","overflow"],"sources":["Elevation.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\n/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */\nconst Elevation: React.FC<React.PropsWithChildren<Props>> = ({\n style,\n theme,\n children,\n ...rest\n}) => {\n const { elevation = 4, borderRadius: radius } =\n StyleSheet.flatten(style) || {};\n const { colors } = theme;\n const borderRadius = radius;\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n borderRadius,\n backgroundColor: colors.surface,\n },\n elevation ? shadow(elevation) : null,\n style,\n ]}\n >\n <View style={{ overflow: \"hidden\", borderRadius }}>{children}</View>\n </Animated.View>\n );\n};\n\nexport default withTheme(Elevation);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,UAFF,EAMEC,IANF,QAOO,cAPP;AAQA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAQA;AACA,MAAMC,SAAmD,GAAG,QAKtD;EAAA,IALuD;IAC3DC,KAD2D;IAE3DC,KAF2D;IAG3DC,QAH2D;IAI3D,GAAGC;EAJwD,CAKvD;EACJ,MAAM;IAAEC,SAAS,GAAG,CAAd;IAAiBC,YAAY,EAAEC;EAA/B,IACJX,UAAU,CAACY,OAAX,CAAmBP,KAAnB,KAA6B,EAD/B;EAEA,MAAM;IAAEQ;EAAF,IAAaP,KAAnB;EACA,MAAMI,YAAY,GAAGC,MAArB;EAEA,oBACE,oBAAC,QAAD,CAAU,IAAV,eACMH,IADN;IAEE,KAAK,EAAE,CACL;MACEE,YADF;MAEEI,eAAe,EAAED,MAAM,CAACE;IAF1B,CADK,EAKLN,SAAS,GAAGP,MAAM,CAACO,SAAD,CAAT,GAAuB,IAL3B,EAMLJ,KANK;EAFT,iBAWE,oBAAC,IAAD;IAAM,KAAK,EAAE;MAAEW,QAAQ,EAAE,QAAZ;MAAsBN;IAAtB;EAAb,GAAoDH,QAApD,CAXF,CADF;AAeD,CA1BD;;AA4BA,eAAeJ,SAAS,CAACC,SAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","Pressable","ActivityIndicator","Platform","withTheme","FAB","onPress","disabled","loading","iconName","style","theme","iconColor","bgColor","size","Icon","props","backgroundColor","colors","primary","color","width","height","borderRadius","overflow","radius","pressed","styles","button","opacity","marginTop","marginLeft","undefined","create","justifyContent","alignItems","select","web","cursor","userSelect"],"sources":["FAB.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n Pressable,\n ActivityIndicator,\n StyleProp,\n ViewStyle,\n PressableProps,\n Platform,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n disabled?: boolean;\n loading?: boolean;\n size?: number;\n bgColor?: string;\n iconColor?: string;\n iconName?: string;\n onPress: () => void;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & PressableProps &\n IconSlot;\n\nconst FAB: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Pressable","ActivityIndicator","Platform","withTheme","FAB","onPress","disabled","loading","iconName","style","theme","iconColor","bgColor","size","Icon","props","backgroundColor","colors","primary","color","width","height","borderRadius","overflow","radius","pressed","styles","button","opacity","marginTop","marginLeft","undefined","create","justifyContent","alignItems","select","web","cursor","userSelect"],"sources":["FAB.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n Pressable,\n ActivityIndicator,\n StyleProp,\n ViewStyle,\n PressableProps,\n Platform,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n disabled?: boolean;\n loading?: boolean;\n size?: number;\n bgColor?: string;\n iconColor?: string;\n iconName?: string;\n onPress: () => void;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & PressableProps &\n IconSlot;\n\nconst FAB: React.FC<React.PropsWithChildren<Props>> = ({\n onPress,\n disabled,\n loading,\n iconName = \"MaterialIcons/add\",\n style,\n theme,\n iconColor,\n bgColor,\n size = 50,\n Icon,\n ...props\n}) => {\n const backgroundColor = bgColor || theme.colors.primary;\n const color = iconColor || \"#FFF\";\n\n return (\n <View\n style={[\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: \"hidden\",\n },\n style,\n ]}\n >\n <Pressable\n onPress={onPress}\n disabled={loading || disabled}\n android_ripple={{\n color: \"#333\",\n radius: size / 4,\n }}\n style={({ pressed }) => {\n return [\n styles.button,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor,\n },\n ];\n }}\n {...props}\n >\n <View>\n {loading ? (\n <ActivityIndicator\n style={size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined}\n size={size <= 50 ? \"small\" : \"large\"}\n color={color}\n />\n ) : (\n <Icon name={iconName} size={size} color={color} />\n )}\n </View>\n </Pressable>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n backgroundColor: \"#5a45ff\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\n\nexport default withTheme(FAB);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,UAFF,EAGEC,SAHF,EAIEC,iBAJF,EAQEC,QARF,QASO,cATP;AAUA,SAASC,SAAT,QAA0B,YAA1B;;AAiBA,MAAMC,GAA6C,GAAG,QAYhD;EAAA,IAZiD;IACrDC,OADqD;IAErDC,QAFqD;IAGrDC,OAHqD;IAIrDC,QAAQ,GAAG,mBAJ0C;IAKrDC,KALqD;IAMrDC,KANqD;IAOrDC,SAPqD;IAQrDC,OARqD;IASrDC,IAAI,GAAG,EAT8C;IAUrDC,IAVqD;IAWrD,GAAGC;EAXkD,CAYjD;EACJ,MAAMC,eAAe,GAAGJ,O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;IACNX,eAAe,EAAE,SADX;IAENiB,cAAc,EAAE,QAFV;IAGNC,UAAU,EAAE,QAHN;IAIN,GAAGhC,QAAQ,CAACiC,MAAT,CAAgB;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SADL;QAEHC,UAAU,EAAE;MAFT;IADY,CAAhB;EAJG;AADuB,CAAlB,CAAf;AAcA,eAAenC,SAAS,CAACC,GAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","TextInput","StyleSheet","withTheme","Config","FieldSearchBarFull","showIcon","Icon","icon","placeholder","style","theme","colors","typography","onChange","changeOverride","onSubmit","submitOverride","value","defaultValue","focused","setIsFocused","useState","onBlur","internalValue","setInternalValue","useEffect","useCallback","text","onFocus","e","lineHeight","typeStyles","body2","handleChangeText","newValue","styles","container","fieldSearchBarFullIconSize","primary","light","marginLeft","flex","color","medium","create","flexDirection","alignItems"],"sources":["FieldSearchBarFull.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n TextInput,\n StyleSheet,\n StyleProp,\n ViewStyle,\n NativeSyntheticEvent,\n TextInputSubmitEditingEventData,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport Config from \"./Config\";\n\ntype Props = {\n showIcon: boolean;\n icon?: string;\n placeholder?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n onChange?: (text: string) => void;\n onSubmit?: (e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void;\n value?: string;\n defaultValue?: string;\n} & IconSlot;\n\nconst FieldSearchBarFull: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","TextInput","StyleSheet","withTheme","Config","FieldSearchBarFull","showIcon","Icon","icon","placeholder","style","theme","colors","typography","onChange","changeOverride","onSubmit","submitOverride","value","defaultValue","focused","setIsFocused","useState","onBlur","internalValue","setInternalValue","useEffect","useCallback","text","onFocus","e","lineHeight","typeStyles","body2","handleChangeText","newValue","styles","container","fieldSearchBarFullIconSize","primary","light","marginLeft","flex","color","medium","create","flexDirection","alignItems"],"sources":["FieldSearchBarFull.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n TextInput,\n StyleSheet,\n StyleProp,\n ViewStyle,\n NativeSyntheticEvent,\n TextInputSubmitEditingEventData,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport Config from \"./Config\";\n\ntype Props = {\n showIcon: boolean;\n icon?: string;\n placeholder?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n onChange?: (text: string) => void;\n onSubmit?: (e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void;\n value?: string;\n defaultValue?: string;\n} & IconSlot;\n\nconst FieldSearchBarFull: React.FC<React.PropsWithChildren<Props>> = ({\n showIcon,\n Icon,\n icon = \"search\",\n placeholder = \"\",\n style,\n theme: { colors, typography },\n onChange: changeOverride,\n onSubmit: submitOverride,\n value,\n defaultValue,\n}) => {\n const [focused, setIsFocused] = React.useState(false);\n\n const onBlur = () => {\n setIsFocused(false);\n };\n\n const [internalValue, setInternalValue] = React.useState<string | undefined>(\n value || defaultValue\n );\n\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const onChange = React.useCallback(\n (text: string) => {\n changeOverride && changeOverride(text);\n },\n [changeOverride]\n );\n\n const onFocus = () => {\n setIsFocused(true);\n };\n\n const onSubmit = (\n e: NativeSyntheticEvent<TextInputSubmitEditingEventData>\n ) => {\n submitOverride && submitOverride(e);\n };\n\n const { lineHeight, ...typeStyles } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n const handleChangeText = (newValue: string) => {\n setInternalValue(newValue);\n if (onChange) {\n onChange(newValue);\n }\n };\n\n return (\n <View style={[styles.container, style]}>\n {showIcon && (\n <Icon\n name={icon}\n size={Config.fieldSearchBarFullIconSize}\n color={focused ? colors.primary : colors.light}\n />\n )}\n <View style={{ marginLeft: showIcon ? 12 : 0, flex: 1 }}>\n <TextInput\n clearButtonMode=\"while-editing\"\n placeholder={placeholder}\n value={internalValue}\n onBlur={onBlur}\n onFocus={onFocus}\n onChangeText={handleChangeText}\n onSubmitEditing={onSubmit}\n placeholderTextColor={colors.light}\n style={[\n {\n color: colors.medium,\n },\n typeStyles,\n ]}\n />\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n});\n\nexport default withTheme(FieldSearchBarFull);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,SAFF,EAGEC,UAHF,QAQO,cARP;AASA,SAASC,SAAT,QAA0B,YAA1B;AAGA,OAAOC,MAAP,MAAmB,UAAnB;;AAcA,MAAMC,kBAA4D,GAAG,QAW/D;EAAA,IAXgE;IACpEC,QADoE;IAEpEC,IAFoE;IAGpEC,IAAI,GAAG,QAH6D;IAIpEC,WAAW,GAAG,EAJsD;IAKpEC,KALoE;IAMpEC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV,CAN6D;IAOpEC,QAAQ,EAAEC,cAP0D;IAQpEC,QAAQ,EAAEC,cAR0D;IASpEC,KAToE;IAUpEC;EAVoE,CAWhE;EACJ,MAAM,CAACC,OAAD,EAAUC,YAAV,IAA0BtB,KAAK,CAACuB,QAAN,CAAe,KAAf,CAAhC;;EAEA,MAAMC,MAAM,GAAG,MAAM;IACnBF,YAAY,CAAC,KAAD,CAAZ;EACD,CAFD;;EAIA,MAAM,CAACG,aAAD,EAAgBC,gBAAhB,IAAoC1B,KAAK,CAACuB,QAAN,CACxCJ,KAAK,IAAIC,YAD+B,CAA1C;EAIApB,KAAK,CAAC2B,SAAN,CAAgB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I,EAAE;IAAvC;EAAb,gBACE,oBAAC,SAAD;IACE,eAAe,EAAC,eADlB;IAEE,WAAW,EAAEjC,WAFf;IAGE,KAAK,EAAEe,aAHT;IAIE,MAAM,EAAED,MAJV;IAKE,OAAO,EAAEM,OALX;IAME,YAAY,EAAEK,gBANhB;IAOE,eAAe,EAAElB,QAPnB;IAQE,oBAAoB,EAAEJ,MAAM,CAAC4B,KAR/B;IASE,KAAK,EAAE,CACL;MACEG,KAAK,EAAE/B,MAAM,CAACgC;IADhB,CADK,EAILZ,UAJK;EATT,EADF,CARF,CADF;AA6BD,CAzFD;;AA2FA,MAAMI,MAAM,GAAGlC,UAAU,CAAC2C,MAAX,CAAkB;EAC/BR,SAAS,EAAE;IACTS,aAAa,EAAE,KADN;IAETC,UAAU,EAAE;EAFH;AADoB,CAAlB,CAAf;AAOA,eAAe5C,SAAS,CAACE,kBAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","styles","container","topContainer","color","flex","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"sources":["Header.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor: string;\n title: string;\n buttonText: string;\n dividerTopMargin?: number;\n icon: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst Header: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","withTheme","Divider","Touchable","Config","Header","Icon","titleTypeStyle","titleColor","title","buttonText","dividerTopMargin","icon","onPress","style","theme","colors","typography","styles","container","topContainer","color","flex","alignSelf","marginLeft","buttonContainer","subtitle2","light","marginRight","headerIconSize","marginTop","create","flexDirection","justifyContent","alignItems"],"sources":["Header.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Text,\n StyleSheet,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport Divider from \"./Divider\";\nimport Touchable from \"./Touchable\";\nimport Config from \"./Config\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n titleTypeStyle?: StyleProp<TextStyle>;\n titleColor: string;\n title: string;\n buttonText: string;\n dividerTopMargin?: number;\n icon: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst Header: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n titleTypeStyle,\n titleColor,\n title,\n buttonText,\n dividerTopMargin,\n icon,\n onPress,\n style,\n theme: { colors, typography },\n}) => {\n return (\n <View style={[styles.container, style]}>\n <View style={styles.topContainer}>\n <Text\n style={[\n titleTypeStyle,\n {\n color: titleColor,\n flex: 1,\n },\n ]}\n numberOfLines={1}\n >\n {title}\n </Text>\n {onPress && (\n <Touchable\n style={{ alignSelf: \"center\", marginLeft: 12 }}\n onPress={onPress}\n >\n <View style={styles.buttonContainer}>\n <Text\n style={[\n typography.subtitle2,\n {\n color: colors.light,\n marginRight: 8,\n },\n ]}\n numberOfLines={1}\n >\n {buttonText}\n </Text>\n <Icon\n name={icon}\n size={Config.headerIconSize}\n color={colors.light}\n />\n </View>\n </Touchable>\n )}\n </View>\n <Divider style={{ marginTop: dividerTopMargin || 16 }} />\n </View>\n );\n};\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});\n\nexport default withTheme(Header);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,IAFF,EAGEC,UAHF,QAOO,cAPP;AAQA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAiBA,MAAMC,MAAgD,GAAG,QAWnD;EAAA,IAXoD;IACxDC,IADwD;IAExDC,cAFwD;IAGxDC,UAHwD;IAIxDC,KAJwD;IAKxDC,UALwD;IAMxDC,gBANwD;IAOxDC,IAPwD;IAQxDC,OARwD;IASxDC,KATwD;IAUxDC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAViD,CAWpD;EACJ,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmBL,KAAnB;EAAb,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEI,MAAM,CAACE;EAApB,gBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLb,cADK,EAEL;MACEc,KAAK,EAAEb,UADT;MAEEc,IAAI,EAAE;IAFR,CAFK,CADT;IAQE,aAAa,EAAE;EARjB,GAUGb,KAVH,CADF,EAaGI,OAAO,iBACN,oBAAC,SAAD;IACE,KAAK,EAAE;MAAEU,SAAS,EAAE,QAAb;MAAuBC,UAAU,EAAE;IAAnC,CADT;IAEE,OAAO,EAAEX;EAFX,gBAIE,oBAAC,IAAD;IAAM,KAAK,EAAEK,MAAM,CAACO;EAApB,gBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACLR,UAAU,CAACS,SADN,EAEL;MACEL,KAAK,EAAEL,MAAM,CAACW,KADhB;MAEEC,WAAW,EAAE;IAFf,CAFK,CADT;IAQE,aAAa,EAAE;EARjB,GAUGlB,UAVH,CADF,eAaE,oBAAC,IAAD;IACE,IAAI,EAAEE,IADR;IAEE,IAAI,EAAER,MAAM,CAACyB,cAFf;IAGE,KAAK,EAAEb,MAAM,CAACW;EAHhB,EAbF,CAJF,CAdJ,CADF,eAyCE,oBAAC,OAAD;IAAS,KAAK,EAAE;MAAEG,SAAS,EAAEnB,gBAAgB,IAAI;IAAjC;EAAhB,EAzCF,CADF;AA6CD,CAzDD;;AA2DA,MAAMO,MAAM,GAAGlB,UAAU,CAAC+B,MAAX,CAAkB;EAC/BZ,SAAS,EAAE;IACTI,SAAS,EAAE;EADF,CADoB;EAI/BH,YAAY,EAAE;IACZY,aAAa,EAAE,KADH;IAEZC,cAAc,EAAE,eAFJ;IAGZC,UAAU,EAAE;EAHA,CAJiB;EAS/BT,eAAe,EAAE;IACfO,aAAa,EAAE,KADA;IAEfC,cAAc,EAAE,QAFD;IAGfC,UAAU,EAAE;EAHG;AATc,CAAlB,CAAf;AAgBA,eAAejC,SAAS,CAACI,MAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withTheme","Header","HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline4","strong"],"sources":["HeaderLarge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderLarge: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","withTheme","Header","HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline4","strong"],"sources":["HeaderLarge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderLarge: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n title,\n buttonText,\n icon,\n onPress = () => {},\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Header\n Icon={Icon}\n titleTypeStyle={typography.headline4}\n titleColor={colors.strong}\n title={title}\n buttonText={buttonText}\n icon={icon}\n onPress={onPress}\n style={style}\n />\n );\n};\n\nexport default withTheme(HeaderLarge);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAGA,OAAOC,MAAP,MAAmB,UAAnB;;AAYA,MAAMC,WAAqD,GAAG,QAQxD;EAAA,IARyD;IAC7DC,IAD6D;IAE7DC,KAF6D;IAG7DC,UAH6D;IAI7DC,IAJ6D;IAK7DC,OAAO,GAAG,MAAM,CAAE,CAL2C;IAM7DC,KAN6D;IAO7DC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAPsD,CAQzD;EACJ,oBACE,oBAAC,MAAD;IACE,IAAI,EAAER,IADR;IAEE,cAAc,EAAEQ,UAAU,CAACC,SAF7B;IAGE,UAAU,EAAEF,MAAM,CAACG,MAHrB;IAIE,KAAK,EAAET,KAJT;IAKE,UAAU,EAAEC,UALd;IAME,IAAI,EAAEC,IANR;IAOE,OAAO,EAAEC,OAPX;IAQE,KAAK,EAAEC;EART,EADF;AAYD,CArBD;;AAuBA,eAAeR,SAAS,CAACE,WAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withTheme","Header","HeaderMedium","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline6","strong"],"sources":["HeaderMedium.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderMedium: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","withTheme","Header","HeaderMedium","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline6","strong"],"sources":["HeaderMedium.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderMedium: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n title,\n buttonText,\n icon,\n onPress = () => {},\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Header\n Icon={Icon}\n titleTypeStyle={typography.headline6}\n titleColor={colors.strong}\n title={title}\n buttonText={buttonText}\n icon={icon}\n onPress={onPress}\n style={style}\n />\n );\n};\n\nexport default withTheme(HeaderMedium);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAIA,OAAOC,MAAP,MAAmB,UAAnB;;AAYA,MAAMC,YAAsD,GAAG,QAQzD;EAAA,IAR0D;IAC9DC,IAD8D;IAE9DC,KAF8D;IAG9DC,UAH8D;IAI9DC,IAJ8D;IAK9DC,OAAO,GAAG,MAAM,CAAE,CAL4C;IAM9DC,KAN8D;IAO9DC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAPuD,CAQ1D;EACJ,oBACE,oBAAC,MAAD;IACE,IAAI,EAAER,IADR;IAEE,cAAc,EAAEQ,UAAU,CAACC,SAF7B;IAGE,UAAU,EAAEF,MAAM,CAACG,MAHrB;IAIE,KAAK,EAAET,KAJT;IAKE,UAAU,EAAEC,UALd;IAME,IAAI,EAAEC,IANR;IAOE,OAAO,EAAEC,OAPX;IAQE,KAAK,EAAEC;EART,EADF;AAYD,CArBD;;AAuBA,eAAeR,SAAS,CAACE,YAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","withTheme","Header","HeaderOverline","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","overline","light","toUpperCase"],"sources":["HeaderOverline.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderOverline: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","withTheme","Header","HeaderOverline","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","overline","light","toUpperCase"],"sources":["HeaderOverline.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Header from \"./Header\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\ntype Props = {\n title: string;\n buttonText: string;\n icon: string;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst HeaderOverline: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n title,\n buttonText,\n icon,\n onPress = () => {},\n style,\n theme: { colors, typography },\n}) => {\n return (\n <Header\n Icon={Icon}\n titleTypeStyle={typography.overline}\n titleColor={colors.light}\n title={title && title.toUpperCase()}\n buttonText={buttonText}\n icon={icon}\n dividerTopMargin={12}\n onPress={onPress}\n style={style}\n />\n );\n};\n\nexport default withTheme(HeaderOverline);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAIA,OAAOC,MAAP,MAAmB,UAAnB;;AAYA,MAAMC,cAAwD,GAAG,QAQ3D;EAAA,IAR4D;IAChEC,IADgE;IAEhEC,KAFgE;IAGhEC,UAHgE;IAIhEC,IAJgE;IAKhEC,OAAO,GAAG,MAAM,CAAE,CAL8C;IAMhEC,KANgE;IAOhEC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAPyD,CAQ5D;EACJ,oBACE,oBAAC,MAAD;IACE,IAAI,EAAER,IADR;IAEE,cAAc,EAAEQ,UAAU,CAACC,QAF7B;IAGE,UAAU,EAAEF,MAAM,CAACG,KAHrB;IAIE,KAAK,EAAET,KAAK,IAAIA,KAAK,CAACU,WAAN,EAJlB;IAKE,UAAU,EAAET,UALd;IAME,IAAI,EAAEC,IANR;IAOE,gBAAgB,EAAE,EAPpB;IAQE,OAAO,EAAEC,OARX;IASE,KAAK,EAAEC;EATT,EADF;AAaD,CAtBD;;AAwBA,eAAeR,SAAS,CAACE,cAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","ActivityIndicator","Pressable","Platform","withTheme","IconButton","Icon","icon","color","customColor","size","disabled","loading","onPress","theme","style","props","iconColor","colors","primary","pressed","styles","container","opacity","width","height","alignItems","justifyContent","create","select","web","cursor","userSelect"],"sources":["IconButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n ActivityIndicator,\n StyleProp,\n ViewStyle,\n Pressable,\n PressableProps,\n Platform,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon?: string;\n color?: string;\n size?: number;\n disabled?: boolean;\n loading?: boolean;\n onPress: () => void;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & PressableProps &\n IconSlot;\n\nconst IconButton: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","ActivityIndicator","Pressable","Platform","withTheme","IconButton","Icon","icon","color","customColor","size","disabled","loading","onPress","theme","style","props","iconColor","colors","primary","pressed","styles","container","opacity","width","height","alignItems","justifyContent","create","select","web","cursor","userSelect"],"sources":["IconButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n ActivityIndicator,\n StyleProp,\n ViewStyle,\n Pressable,\n PressableProps,\n Platform,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon?: string;\n color?: string;\n size?: number;\n disabled?: boolean;\n loading?: boolean;\n onPress: () => void;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n} & PressableProps &\n IconSlot;\n\nconst IconButton: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n color: customColor,\n size = 32,\n disabled = false,\n loading = false,\n onPress,\n theme,\n style,\n ...props\n}) => {\n const iconColor = customColor || theme.colors.primary;\n\n return (\n <Pressable\n onPress={onPress}\n disabled={disabled || loading}\n style={({ pressed }) => {\n return [\n styles.container,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n style,\n ];\n }}\n {...props}\n >\n <View>\n {icon && !loading ? (\n <Icon name={icon} size={size - 2} color={iconColor} />\n ) : null}\n {loading ? <ActivityIndicator size=\"small\" color={iconColor} /> : null}\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: \"center\",\n justifyContent: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\n\nexport default withTheme(IconButton);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,IADF,EAEEC,UAFF,EAGEC,iBAHF,EAMEC,SANF,EAQEC,QARF,QASO,cATP;AAUA,SAASC,SAAT,QAA0B,YAA1B;;AAgBA,MAAMC,UAAoD,GAAG,QAWvD;EAAA,IAXwD;IAC5DC,IAD4D;IAE5DC,IAF4D;IAG5DC,KAAK,EAAEC,WAHqD;IAI5DC,IAAI,GAAG,EAJqD;IAK5DC,QAAQ,GAAG,KALiD;IAM5DC,OAAO,GAAG,KANkD;IAO5DC,OAP4D;IAQ5DC,KAR4D;IAS5DC,KAT4D;IAU5D,GAAGC;EAVyD,CAWxD;EACJ,MAAMC,SAAS,GAAGR,WAAW,IAAIK,KAAK,CAACI,MAAN,CAAaC,OAA9C;EAEA,oBACE,oBAAC,SAAD;IACE,OAAO,EAAEN,OADX;IAEE,QAAQ,EAAEF,QAAQ,IAAIC,OAFxB;IAGE,KAAK,EAAE,SAAiB;MAAA,IAAhB;QAAEQ;MAAF,CAAgB;MACtB,OAAO,CACLC,MAAM,CAACC,SADF,EAEL;QACEC,OAAO,EAAEH,OAAO,IAAIT,QAAX,GAAsB,IAAtB,GAA6B,CADxC;QAEEa,KAAK,EAAEd,IAFT;QAGEe,MAAM,EAAEf,IAHV;QAIEgB,UAAU,EAAE,QAJd;QAKEC,cAAc,EAAE;MALlB,CAFK,EASLZ,KATK,CAAP;IAWD;EAfH,GAgBMC,KAhBN,gBAkBE,oBAAC,IAAD,QACGT,IAAI,IAAI,CAACK,OAAT,gBACC,oBAAC,IAAD;IAAM,IAAI,EAAEL,IAAZ;IAAkB,IAAI,EAAEG,IAAI,GAAG,CAA/B;IAAkC,KAAK,EAAEO;EAAzC,EADD,GAEG,IAHN,EAIGL,OAAO,gBAAG,oBAAC,iBAAD;IAAmB,IAAI,EAAC,OAAxB;IAAgC,KAAK,EAAEK;EAAvC,EAAH,GAA0D,IAJpE,CAlBF,CADF;AA2BD,CAzCD;;AA2CA,MAAMI,MAAM,GAAGrB,UAAU,CAAC4B,MAAX,CAAkB;EAC/BN,SAAS,EAAE;IACTI,UAAU,EAAE,QADH;IAETC,cAAc,EAAE,QAFP;IAGT,GAAGxB,QAAQ,CAAC0B,MAAT,CAAgB;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SADL;QAEHC,UAAU,EAAE;MAFT;IADY,CAAhB;EAHM;AADoB,CAAlB,CAAf;AAaA,eAAe5B,SAAS,CAACC,UAAD,CAAxB"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
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,19 @@ 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.mapngNumberValue);
|
|
68
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
+
|
|
59
70
|
}, [value]);
|
|
60
71
|
return /*#__PURE__*/React.createElement(TextInput, _extends({
|
|
61
72
|
keyboardType: "numeric",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"sources":["NumberInput.
|
|
1
|
+
{"version":3,"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"],"sources":["NumberInput.js"],"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"],"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;EAAA,IAApD;IAAEC,YAAF;IAAgBC,KAAhB;IAAuBC,YAAvB;IAAqC,GAAGC;EAAxC,CAAoD;EACrE,MAAM,CAACC,wBAAD,EAA2BC,2BAA3B,IAA0DX,QAAQ,CAAC,GAAD,CAAxE;;EACA,MAAMY,yBAAyB,GAAIC,aAAD,IAAmB;IACjD,IAAIA,aAAa,IAAI,IAArB,EAA2B;MACvB,IAAIX,QAAQ,CAACW,aAAD,CAAR,IAA2BA,aAAa,KAAK,EAAjD,EAAqD;QACjD,IAAI,WAAWC,IAAX,CAAgBD,aAAhB,CAAJ,EAAoC;UAChC,OAAOA,aAAa,CAACE,KAAd,CAAoB,CAApB,CAAP;QACH,CAFD,MAGK,IAAI,oCAAoCD,IAApC,CAAyCD,aAAzC,CAAJ,EAA6D;UAC9D,OAAOA,aAAP;QACH,CAFI,MAGA;UACD,OAAOH,wBAAP;QACH;MACJ,CAVD,MAWK,IAAIP,QAAQ,CAACU,aAAD,CAAR,IAA2B,CAACT,KAAK,CAACS,aAAD,CAArC,EAAsD;QACvD,OAAOA,aAAa,CAACG,QAAd,EAAP;MACH;IACJ;;IACD,OAAO,GAAP;EACH,CAlBD,CAFqE,CAqBrE;;;EACAjB,SAAS,CAAC,MAAM;IACZ,MAAMkB,wBAAwB,GAAGL,yBAAyB,CAACJ,YAAD,CAA1D;;IACA,IAAIE,wBAAwB,KAAKO,wBAAjC,EAA2D;MACvDN,2BAA2B,CAACM,wBAAD,CAA3B;IACH,CAJW,CAKZ;;EACH,CANQ,EAMN,EANM,CAAT;;EAOA,MAAMC,gBAAgB,GAAIC,QAAD,IAAc;IACnC,MAAMC,oBAAoB,GAAGR,yBAAyB,CAACO,QAAD,CAAtD;IACA,MAAME,MAAM,GAAGC,UAAU,CAACF,oBAAD,CAAzB;IACAT,2BAA2B,CAACS,oBAAD,CAA3B;IACAd,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAGe,MAAH,CAAZ;EACH,CALD,CA7BqE,CAmCrE;;;EACAtB,SAAS,CAAC,MAAM;IACZ,MAAMwB,qBAAqB,GAAGX,yBAAyB,CAACL,KAAD,CAAvD;;IACA,IAAIG,wBAAwB,KAAKa,qBAAjC,EAAwD;MACpDL,gBAAgB,CAACK,qBAAD,CAAhB;IACH,CAJW,CAKZ;;EACH,CANQ,EAMN,CAAChB,KAAD,CANM,CAAT;EAOA,oBAAQT,KAAK,CAAC0B,aAAN,CAAoBvB,SAApB,EAA+B;IAAEwB,YAAY,EAAE,SAAhB;IAA2BlB,KAAK,EAAEG,wBAAlC;IAA4DJ,YAAY,EAAEY,gBAA1E;IAA4F,GAAGT;EAA/F,CAA/B,CAAR;AACH,CA5CD;;AA6CA,eAAeJ,WAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PortalConsumer","PortalHost","PortalContext","ThemeProvider","withTheme","Portal","Component","render","children","theme","props","manager"],"sources":["Portal.tsx"],"sourcesContent":["import * as React from \"react\";\nimport PortalConsumer from \"./PortalConsumer\";\nimport PortalHost, { PortalContext, PortalMethods } from \"./PortalHost\";\nimport { ThemeProvider, withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n /**\n * Content of the `Portal`.\n */\n children: React.ReactNode;\n /**\n * @optional\n */\n theme: Theme;\n};\n\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<Props> {\n // @component ./PortalHost.tsx\n static Host = PortalHost;\n\n render() {\n const { children, theme } = this.props;\n\n return (\n <PortalContext.Consumer>\n {(manager) => (\n <PortalConsumer manager={manager as PortalMethods}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </PortalConsumer>\n )}\n </PortalContext.Consumer>\n );\n }\n}\n\nexport default withTheme(Portal);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,OAAOC,UAAP,IAAqBC,aAArB,QAAyD,cAAzD;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,CAA4C;EAC1C;EAGAC,MAAM,GAAG;IACP,MAAM;MAAEC,QAAF;MAAYC;IAAZ,IAAsB,KAAKC,KAAjC;IAEA,oBACE,oBAAC,aAAD,CAAe,QAAf,QACIC,OAAD,iBACC,oBAAC,cAAD;MAAgB,OAAO,EAAEA;IAAzB,
|
|
1
|
+
{"version":3,"names":["React","PortalConsumer","PortalHost","PortalContext","ThemeProvider","withTheme","Portal","Component","render","children","theme","props","manager"],"sources":["Portal.tsx"],"sourcesContent":["import * as React from \"react\";\nimport PortalConsumer from \"./PortalConsumer\";\nimport PortalHost, { PortalContext, PortalMethods } from \"./PortalHost\";\nimport { ThemeProvider, withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n /**\n * Content of the `Portal`.\n */\n children: React.ReactNode;\n /**\n * @optional\n */\n theme: Theme;\n};\n\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<Props> {\n // @component ./PortalHost.tsx\n static Host = PortalHost;\n\n render() {\n const { children, theme } = this.props;\n\n return (\n <PortalContext.Consumer>\n {(manager) => (\n <PortalConsumer manager={manager as PortalMethods}>\n {/* @ts-ignore */}\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </PortalConsumer>\n )}\n </PortalContext.Consumer>\n );\n }\n}\n\nexport default withTheme(Portal);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,OAAOC,UAAP,IAAqBC,aAArB,QAAyD,cAAzD;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,CAA4C;EAC1C;EAGAC,MAAM,GAAG;IACP,MAAM;MAAEC,QAAF;MAAYC;IAAZ,IAAsB,KAAKC,KAAjC;IAEA,oBACE,oBAAC,aAAD,CAAe,QAAf,QACIC,OAAD,iBACC,oBAAC,cAAD;MAAgB,OAAO,EAAEA;IAAzB,gBAEE,oBAAC,aAAD;MAAe,KAAK,EAAEF;IAAtB,GAA8BD,QAA9B,CAFF,CAFJ,CADF;EAUD;;AAjByC;;gBAAtCH,M,UAEUJ,U;;AAkBhB,eAAeG,SAAS,CAACC,MAAD,CAAxB"}
|
|
@@ -2,10 +2,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { View, StyleSheet } from "react-native";
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Portal host is the component which actually renders all Portals.
|
|
8
7
|
*/
|
|
8
|
+
|
|
9
9
|
export default class PortalManager extends React.PureComponent {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","PortalManager","PureComponent","portals","key","children","setState","state","map","item","filter","render","absoluteFill"],"sources":["PortalManager.
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","PortalManager","PureComponent","portals","key","children","setState","state","map","item","filter","render","createElement","collapsable","pointerEvents","style","absoluteFill"],"sources":["PortalManager.js"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\n/**\n * Portal host is the component which actually renders all Portals.\n */\nexport default class PortalManager extends React.PureComponent {\n state = {\n portals: [],\n };\n mount = (key, children) => {\n this.setState((state) => ({\n portals: [...state.portals, { key, children }],\n }));\n };\n update = (key, children) => this.setState((state) => ({\n portals: state.portals.map((item) => {\n if (item.key === key) {\n return { ...item, children };\n }\n return item;\n }),\n }));\n unmount = (key) => this.setState((state) => ({\n portals: state.portals.filter((item) => item.key !== key),\n }));\n render() {\n return this.state.portals.map(({ key, children }) => (React.createElement(View, { key: key, collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */, pointerEvents: \"box-none\", style: StyleSheet.absoluteFill }, children)));\n }\n}\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,cAAjC;AACA;AACA;AACA;;AACA,eAAe,MAAMC,aAAN,SAA4BH,KAAK,CAACI,aAAlC,CAAgD;EAAA;IAAA;;IAAA,+BACnD;MACJC,OAAO,EAAE;IADL,CADmD;;IAAA,+BAInD,CAACC,GAAD,EAAMC,QAAN,KAAmB;MACvB,KAAKC,QAAL,CAAeC,KAAD,KAAY;QACtBJ,OAAO,EAAE,CAAC,GAAGI,KAAK,CAACJ,OAAV,EAAmB;UAAEC,GAAF;UAAOC;QAAP,CAAnB;MADa,CAAZ,CAAd;IAGH,CAR0D;;IAAA,gCASlD,CAACD,GAAD,EAAMC,QAAN,KAAmB,KAAKC,QAAL,CAAeC,KAAD,KAAY;MAClDJ,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcK,GAAd,CAAmBC,IAAD,IAAU;QACjC,IAAIA,IAAI,CAACL,GAAL,KAAaA,GAAjB,EAAsB;UAClB,OAAO,EAAE,GAAGK,IAAL;YAAWJ;UAAX,CAAP;QACH;;QACD,OAAOI,IAAP;MACH,CALQ;IADyC,CAAZ,CAAd,CAT+B;;IAAA,iCAiBhDL,GAAD,IAAS,KAAKE,QAAL,CAAeC,KAAD,KAAY;MACzCJ,OAAO,EAAEI,KAAK,CAACJ,OAAN,CAAcO,MAAd,CAAsBD,IAAD,IAAUA,IAAI,CAACL,GAAL,KAAaA,GAA5C;IADgC,CAAZ,CAAd,CAjBwC;EAAA;;EAoB3DO,MAAM,GAAG;IACL,OAAO,KAAKJ,KAAL,CAAWJ,OAAX,CAAmBK,GAAnB,CAAuB;MAAA,IAAC;QAAEJ,GAAF;QAAOC;MAAP,CAAD;MAAA,oBAAwBP,KAAK,CAACc,aAAN,CAAoBb,IAApB,EAA0B;QAAEK,GAAG,EAAEA,GAAP;QAAYS,WAAW,EAAE;QAAM;QAA/B;QAAyIC,aAAa,EAAE,UAAxJ;QAAoKC,KAAK,EAAEf,UAAU,CAACgB;MAAtL,CAA1B,EAAgOX,QAAhO,CAAxB;IAAA,CAAvB,CAAP;EACH;;AAtB0D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","AnimatedCircularProgress","withTheme","ProgressCircle","progress","style","color","size","showsText","unfilledColor","strokeCap","textStyle","thickness","theme","progressNum","Math","round","tintColor","colors","primary","backgroundColor","secondary","fill","fontSize"],"sources":["ProgressCircle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport AnimatedCircularProgress from \"./AnimatedCircularProgress\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n progress?: number;\n style?: StyleProp<ViewStyle>;\n color?: colorTypes;\n size?: number;\n showsText?: boolean;\n unfilledColor?: colorTypes;\n strokeCap?: \"butt\" | \"square\" | \"round\" | undefined;\n textStyle?: StyleProp<TextStyle>;\n thickness?: number;\n theme: typeof themeT;\n};\n\nconst ProgressCircle: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","Text","AnimatedCircularProgress","withTheme","ProgressCircle","progress","style","color","size","showsText","unfilledColor","strokeCap","textStyle","thickness","theme","progressNum","Math","round","tintColor","colors","primary","backgroundColor","secondary","fill","fontSize"],"sources":["ProgressCircle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport AnimatedCircularProgress from \"./AnimatedCircularProgress\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n progress?: number;\n style?: StyleProp<ViewStyle>;\n color?: colorTypes;\n size?: number;\n showsText?: boolean;\n unfilledColor?: colorTypes;\n strokeCap?: \"butt\" | \"square\" | \"round\" | undefined;\n textStyle?: StyleProp<TextStyle>;\n thickness?: number;\n theme: typeof themeT;\n};\n\nconst ProgressCircle: React.FC<React.PropsWithChildren<Props>> = ({\n progress = 0.5,\n style,\n color = \"primary\",\n size = 100,\n showsText = true,\n unfilledColor,\n strokeCap = \"butt\",\n textStyle,\n thickness = 1,\n theme,\n}) => {\n const progressNum = Math.round(progress * 100);\n\n const tintColor = color || theme.colors.primary;\n const backgroundColor = unfilledColor || theme.colors.secondary;\n\n return (\n <AnimatedCircularProgress\n size={size}\n width={thickness}\n backgroundWidth={thickness}\n fill={progressNum}\n tintColor={tintColor}\n backgroundColor={backgroundColor}\n rotation={0}\n lineCap={strokeCap}\n style={style}\n >\n {/* @ts-ignore */}\n {(fill) =>\n showsText ? (\n <Text\n style={[{ fontSize: size * 0.275, color: tintColor }, textStyle]}\n >\n {Math.round(fill)}%\n </Text>\n ) : null\n }\n </AnimatedCircularProgress>\n );\n};\n\nexport default withTheme(ProgressCircle);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAsD,cAAtD;AACA,OAAOC,wBAAP,MAAqC,4BAArC;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAiBA,MAAMC,cAAwD,GAAG,QAW3D;EAAA,IAX4D;IAChEC,QAAQ,GAAG,GADqD;IAEhEC,KAFgE;IAGhEC,KAAK,GAAG,SAHwD;IAIhEC,IAAI,GAAG,GAJyD;IAKhEC,SAAS,GAAG,IALoD;IAMhEC,aANgE;IAOhEC,SAAS,GAAG,MAPoD;IAQhEC,SARgE;IAShEC,SAAS,GAAG,CAToD;IAUhEC;EAVgE,CAW5D;EACJ,MAAMC,WAAW,GAAGC,IAAI,CAACC,KAAL,CAAWZ,QAAQ,GAAG,GAAtB,CAApB;EAEA,MAAMa,SAAS,GAAGX,KAAK,IAAIO,KAAK,CAACK,MAAN,CAAaC,OAAxC;EACA,MAAMC,eAAe,GAAGX,aAAa,IAAII,KAAK,CAACK,MAAN,CAAaG,SAAtD;EAEA,oBACE,oBAAC,wBAAD;IACE,IAAI,EAAEd,IADR;IAEE,KAAK,EAAEK,SAFT;IAGE,eAAe,EAAEA,SAHnB;IAIE,IAAI,EAAEE,WAJR;IAKE,SAAS,EAAEG,SALb;IAME,eAAe,EAAEG,eANnB;IAOE,QAAQ,EAAE,CAPZ;IAQE,OAAO,EAAEV,SARX;IASE,KAAK,EAAEL;EATT,GAYIiB,IAAD,IACCd,SAAS,gBACP,oBAAC,IAAD;IACE,KAAK,EAAE,CAAC;MAAEe,QAAQ,EAAEhB,IAAI,GAAG,KAAnB;MAA0BD,KAAK,EAAEW;IAAjC,CAAD,EAA+CN,SAA/C;EADT,GAGGI,IAAI,CAACC,KAAL,CAAWM,IAAX,CAHH,MADO,GAML,IAnBR,CADF;AAwBD,CAzCD;;AA2CA,eAAepB,SAAS,CAACC,cAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"sources":["ProgressIndicator.tsx"],"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
|
|
1
|
+
{"version":3,"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"],"sources":["ProgressIndicator.tsx"],"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<React.PropsWithChildren<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"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAqBA,MAAMC,iBAA2D,GAAG,QAe9D;EAAA,IAf+D;IACnEC,aADmE;IAEnEC,WAFmE;IAGnEC,sBAAsB,GAAG,CAH0C;IAInEC,sBAAsB,GAAG,SAJ0C;IAKnEC,iBALmE;IAMnEC,wBANmE;IAOnEC,yBAPmE;IAQnEC,8BARmE;IASnEC,0BAA0B,GAAG,EATsC;IAUnEC,uBAAuB,GAAG,eAVyC;IAWnEC,yBAAyB,GAAG,SAXuC;IAYnEC,eAAe,GAAG,OAZiD;IAanEC,aAAa,GAAG,SAbmD;IAcnEC;EAdmE,CAe/D;EACJ,MAAMC,eAAe,GAAGb,WAAW,GAAG,CAAtC;EACA,oBACE,oBAAC,aAAD;IACE,SAAS,EAAED,aADb;IAEE,eAAe,EAAEc,eAFnB;IAGE,YAAY,EAAE;MACZV,iBADY;MAEZC,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAD8C,GAE9CD,iBAJQ;MAKZW,uBAAuB,EAAEH,aALb;MAMZI,yBAAyB,EAAEL,eANf;MAOZM,sBAAsB,EAAEL,aAPZ;MAQZM,wBAAwB,EAAEP,eARd;MASZQ,0BAA0B,EAAEP,aAThB;MAUZQ,4BAA4B,EAAET,eAVlB;MAWZT,sBAXY;MAYZC,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAbhB;MAcZe,iCAAiC,EAAEX,yBAdvB;MAeZY,+BAA+B,EAAEb,uBAfrB;MAgBZH,yBAAyB,EAAEA,yBAAyB,IAAIK,eAhB5C;MAiBZJ,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAlBxB;MAmBZF,0BAnBY;MAoBZe,eAAe,EAAEV,KAAK,CAACW,UAAN,CAAiBC,KAAjB,CAAuBC;IApB5B;EAHhB,EADF;AA4BD,CA7CD;;AA+CA,eAAe5B,SAAS,CAACC,iBAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","withTheme","RadioButtonGroup","RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color"],"sources":["RadioButtonFieldGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","Text","withTheme","RadioButtonGroup","RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color"],"sources":["RadioButtonFieldGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<React.PropsWithChildren<Props>> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAsD,cAAtD;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,SAAT,QAA0B,eAA1B;AACA,OAAOC,gBAAP,MAAwD,oBAAxD;;AAQA,MAAMC,qBAA+D,GAAG,QAOlE;EAAA,IAPmE;IACvEC,KADuE;IAEvEC,QAFuE;IAGvEC,KAHuE;IAIvEC,UAJuE;IAKvEC,KALuE;IAMvE,GAAGC;EANoE,CAOnE;EACJ,oBACE,oBAAC,IAAD;IAAM,KAAK,EAAED;EAAb,gBACE,oBAAC,IAAD;IACE,KAAK,EAAE,CACL;MACEE,QAAQ,EAAEJ,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BF,QADvC;MAEEG,KAAK,EAAEP,KAAK,CAACK,UAAN,CAAiBC,SAAjB,CAA2BC;IAFpC,CADK,EAKLN,UALK;EADT,GASGH,KATH,CADF,eAYE,oBAAC,gBAAD;IAAkB,KAAK,EAAEE;EAAzB,GAAoCG,IAApC,GACGJ,QADH,CAZF,CADF;AAkBD,CA1BD;;AA4BA,eAAeJ,SAAS,CAACE,qBAAD,CAAxB"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { View } from "react-native";
|
|
5
3
|
import { getValueForRadioButton } from "../../utilities";
|
|
@@ -48,10 +46,24 @@ const RadioButtonGroup = _ref => {
|
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
return /*#__PURE__*/React.createElement(View,
|
|
49
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
52
50
|
style: [{
|
|
53
51
|
minHeight: 40
|
|
54
|
-
}, style]
|
|
52
|
+
}, style],
|
|
53
|
+
...rest
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
55
|
+
value: {
|
|
56
|
+
value: internalValue,
|
|
57
|
+
onValueChange: handleValueChange,
|
|
58
|
+
direction
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
61
|
+
style: _containerStyle
|
|
62
|
+
}, children)));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default RadioButtonGroup;
|
|
66
|
+
//# sourceMappingURL=RadioButtonGroup.js.map }, style]
|
|
55
67
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
56
68
|
value: {
|
|
57
69
|
value: internalValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","getValueForRadioButton","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"sources":["RadioButtonGroup.
|
|
1
|
+
{"version":3,"names":["React","View","getValueForRadioButton","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","createElement","minHeight"],"sources":["RadioButtonGroup.js"],"sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nconst { Provider } = radioButtonGroupContext;\nconst RadioButtonGroup = ({ direction = Direction.Vertical, value = \"\", onValueChange, defaultValue, style, children, ...rest }) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n setInternalValue(realValue);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n const handleValueChange = (newValue) => {\n const realNewValue = getValueForRadioButton(newValue);\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n const _containerStyle = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },\n React.createElement(Provider, { value: {\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n } },\n React.createElement(View, { style: _containerStyle }, children))));\n};\nexport default RadioButtonGroup;\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,uBAAT,EAAkCC,SAAlC,QAAmD,WAAnD;AACA,MAAM;EAAEC;AAAF,IAAeF,uBAArB;;AACA,MAAMG,gBAAgB,GAAG,QAA2G;EAAA,IAA1G;IAAEC,SAAS,GAAGH,SAAS,CAACI,QAAxB;IAAkCC,KAAK,GAAG,EAA1C;IAA8CC,aAA9C;IAA6DC,YAA7D;IAA2EC,KAA3E;IAAkFC,QAAlF;IAA4F,GAAGC;EAA/F,CAA0G;EAChI,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoChB,KAAK,CAACiB,QAAN,CAAe,EAAf,CAA1C;EACAjB,KAAK,CAACkB,SAAN,CAAgB,MAAM;IAClB,IAAIT,KAAK,IAAI,IAAb,EAAmB;MACf,MAAMU,SAAS,GAAGjB,sBAAsB,CAACO,KAAD,CAAxC;MACAO,gBAAgB,CAACG,SAAD,CAAhB;IACH;EACJ,CALD,EAKG,CAACV,KAAD,CALH;EAMAT,KAAK,CAACkB,SAAN,CAAgB,MAAM;IAClB,IAAIP,YAAY,IAAI,IAApB,EAA0B;MACtB,MAAMS,gBAAgB,GAAGlB,sBAAsB,CAACS,YAAD,CAA/C;MACAK,gBAAgB,CAACI,gBAAD,CAAhB;IACH;EACJ,CALD,EAKG,CAACT,YAAD,CALH;;EAMA,MAAMU,iBAAiB,GAAIC,QAAD,IAAc;IACpC,MAAMC,YAAY,GAAGrB,sBAAsB,CAACoB,QAAD,CAA3C;IACAN,gBAAgB,CAACO,YAAD,CAAhB;IACAb,aAAa,SAAb,IAAAA,aAAa,WAAb,YAAAA,aAAa,CAAGa,YAAH,CAAb;EACH,CAJD;;EAKA,MAAMC,eAAe,GAAG,CACpB;IACIC,aAAa,EAAElB,SAAS,KAAKH,SAAS,CAACsB,UAAxB,GAAqC,KAArC,GAA6C;EADhE,CADoB,CAAxB;;EAKA,IAAInB,SAAS,KAAKH,SAAS,CAACI,QAA5B,EAAsC;IAClCgB,eAAe,CAACG,IAAhB,CAAqB;MACjBC,UAAU,EAAE;IADK,CAArB;EAGH;;EACD,oBAAQ5B,KAAK,CAAC6B,aAAN,CAAoB5B,IAApB,EAA0B;IAAEW,KAAK,EAAE,CAAC;MAAEkB,SAAS,EAAE;IAAb,CAAD,EAAoBlB,KAApB,CAAT;IAAqC,GAAGE;EAAxC,CAA1B,eACJd,KAAK,CAAC6B,aAAN,CAAoBxB,QAApB,EAA8B;IAAEI,KAAK,EAAE;MAC/BA,KAAK,EAAEM,aADwB;MAE/BL,aAAa,EAAEW,iBAFgB;MAG/Bd;IAH+B;EAAT,CAA9B,eAKIP,KAAK,CAAC6B,aAAN,CAAoB5B,IAApB,EAA0B;IAAEW,KAAK,EAAEY;EAAT,CAA1B,EAAsDX,QAAtD,CALJ,CADI,CAAR;AAOH,CApCD;;AAqCA,eAAeP,gBAAf"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { StyleSheet, View, Platform } from "react-native";
|
|
5
3
|
import RadioButton from "./RadioButton";
|
|
@@ -8,7 +6,7 @@ import { useRadioButtonGroupContext } from "./context";
|
|
|
8
6
|
import { Direction as GroupDirection } from "./context";
|
|
9
7
|
import Touchable from "../Touchable";
|
|
10
8
|
import { extractStyles, getValueForRadioButton } from "../../utilities";
|
|
11
|
-
export
|
|
9
|
+
export var Direction;
|
|
12
10
|
|
|
13
11
|
(function (Direction) {
|
|
14
12
|
Direction["Row"] = "row";
|
|
@@ -70,13 +68,14 @@ const RadioButtonRow = _ref => {
|
|
|
70
68
|
textStyles,
|
|
71
69
|
viewStyles
|
|
72
70
|
} = extractStyles(style);
|
|
73
|
-
return /*#__PURE__*/React.createElement(Touchable,
|
|
71
|
+
return /*#__PURE__*/React.createElement(Touchable, {
|
|
74
72
|
onPress: handlePress,
|
|
75
73
|
style: [styles.mainParent, {
|
|
76
74
|
flexDirection: direction
|
|
77
75
|
}, viewStyles],
|
|
78
|
-
disabled: disabled
|
|
79
|
-
|
|
76
|
+
disabled: disabled,
|
|
77
|
+
...rest
|
|
78
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
80
79
|
style: [styles.label, {
|
|
81
80
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
82
81
|
}, labelContainerStyle]
|
|
@@ -115,4 +114,22 @@ const styles = StyleSheet.create({
|
|
|
115
114
|
}
|
|
116
115
|
});
|
|
117
116
|
export default RadioButtonRow;
|
|
117
|
+
//# sourceMappingURL=RadioButtonRow.js.map"center",
|
|
118
|
+
justifyContent: "space-around",
|
|
119
|
+
paddingStart: 20,
|
|
120
|
+
minHeight: 50,
|
|
121
|
+
paddingEnd: 20,
|
|
122
|
+
display: "flex",
|
|
123
|
+
...Platform.select({
|
|
124
|
+
web: {
|
|
125
|
+
cursor: "pointer",
|
|
126
|
+
userSelect: "none"
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
label: {
|
|
131
|
+
flex: 3
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
export default RadioButtonRow;
|
|
118
135
|
//# sourceMappingURL=RadioButtonRow.js.map
|