@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":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"sources":["StarRating.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<Props
|
|
1
|
+
{"version":3,"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"sources":["StarRating.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n starSize = 16,\n maxStars = 5,\n rating = 0,\n defaultValue,\n isEditable = false,\n activeColor,\n inactiveColor,\n style,\n onPress,\n ...rest\n}) => {\n const [localRating, setLocalRating] = React.useState<number>(\n rating || defaultValue || 0\n );\n\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n\n const ratingHandler = React.useCallback(\n (r: number) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n },\n [onPress]\n );\n\n const ratingRounded = Math.round(localRating * 2) / 2;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {[...Array(maxStars)].map((_, i) => (\n <View key={i} style={{ display: \"flex\" }}>\n <Icon\n name={\n ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\"\n }\n size={starSize}\n color={ratingRounded > i ? activeColor : inactiveColor}\n />\n {isEditable && (\n <View style={styles.touchContainer}>\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 0.5)}\n />\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 1)}\n />\n </View>\n )}\n </View>\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\n\nexport default withTheme(StarRating);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAOA;;;;;;;;AAiBA,MAAMA,UAAoD,GAAG,QAYvD;EAAA,IAZwD;IAC5DC,IAD4D;IAE5DC,QAAQ,GAAG,EAFiD;IAG5DC,QAAQ,GAAG,CAHiD;IAI5DC,MAAM,GAAG,CAJmD;IAK5DC,YAL4D;IAM5DC,UAAU,GAAG,KAN+C;IAO5DC,WAP4D;IAQ5DC,aAR4D;IAS5DC,KAT4D;IAU5DC,OAV4D;IAW5D,GAAGC;EAXyD,CAYxD;EACJ,MAAM,CAACC,WAAD,EAAcC,cAAd,IAAgCC,KAAK,CAACC,QAAN,CACpCX,MAAM,IAAIC,YAAV,IAA0B,CADU,CAAtC;EAIAS,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIZ,MAAM,IAAI,IAAd,EAAoB;MAClBS,cAAc,CAACT,MAAD,CAAd;IACD;EACF,CAJD,EAIG,CAACA,MAAD,CAJH;EAMAU,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIX,YAAY,IAAI,IAApB,EAA0B;MACxBQ,cAAc,CAACR,YAAD,CAAd;IACD;EACF,CAJD,EAIG,CAACA,YAAD,CAJH;EAMA,MAAMY,aAAa,GAAGH,KAAK,CAACI,WAAN,CACnBC,CAAD,IAAe;IACbN,cAAc,CAACM,CAAD,CAAd;IACA,CAAC,CAACT,OAAF,IAAaA,OAAO,CAACS,CAAD,CAApB;EACD,CAJmB,EAKpB,CAACT,OAAD,CALoB,CAAtB;EAQA,MAAMU,aAA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AE,CAPM;IAQdC,MAAM,EAAE;EARM,CALe;EAe/BV,SAAS,EAAE;IACTW,IAAI,EAAE,CADG;IAETC,MAAM,EAAE,MAFC;IAGTC,KAAK,EAAE;EAHE;AAfoB,CAAlB,CAAf;;eAsBe,IAAAC,kBAAA,EAAU7C,UAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"sources":["Surface.tsx"],"sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<Props
|
|
1
|
+
{"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"sources":["Surface.tsx"],"sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<React.PropsWithChildren<Props>> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"],"mappings":";;;;;;;AACA;;AACA;;AAQA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,OAAiD,GAAG,QAMpD;EAAA,IANqD;IACzDC,SAAS,EAAEC,aAD8C;IAEzDC,KAFyD;IAGzDC,KAHyD;IAIzDC,QAJyD;IAKzD,GAAGC;EALsD,CAMrD;EACJ,MAAM;IACJL,SAAS,EAAEM,cAAc,GAAG,CADxB;IAEJC,eAFI;IAGJ,GAAGC;EAHC,IAIDC,uBAAA,CAAWC,OAAX,CAAmBR,KAAnB,KAA6B,EAJlC;EAMA,MAAM;IAAES,IAAI,EAAEC,WAAR;IAAqBC,IAArB;IAA2BC;EAA3B,IAAsCX,KAA5C;EAEA,MAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAnC;EAEA,MAAMS,eAAe,GAAGf,SAAS,GAAG,IAAAgB,eAAA,EAAOhB,SAAP,CAAH,GAAuB,EAAxD;;EAEA,MAAMiB,kBAAkB,GAAG,MAAM;IAC/B,IAAIV,eAAJ,EAAqB;MACnB,OAAOA,eAAP;IACD,CAFD,MAEO,IAAIK,WAAW,IAAIC,IAAI,KAAK,UAA5B,EAAwC;MAC7C,OAAO,IAAAK,gBAAA,EAAQlB,SAAR,EAAmBc,MAAM,CAACK,OAA1B,CAAP;IACD,CAFM,MAEA;MACL,OAAOL,MAAM,CAACK,OAAd;IACD;EACF,CARD;;EAUA,oBACE,oBAAC,qBAAD,CAAU,IAAV,eACMd,IADN;IAEE,KAAK,EAAE,CACL;MACEE,eAAe,EAAEU,kBAAkB,EADrC;MAEEjB,SAFF;MAGE,GAAGe,eAHL;MAIE,GAAGP;IAJL,CADK;EAFT,IAWGJ,QAXH,CADF;AAeD,CA5CD;;eA8Ce,IAAAgB,kBAAA,EAAUrB,OAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"sources":["Swiper.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) => {\n const component = renderItem({ item, index });\n\n if (!component) {\n return null;\n }\n\n const key = keyExtractor ? keyExtractor(item, index) : index;\n return React.cloneElement(component, {\n key,\n });\n })\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAqBA,MAAMA,MAAM,GAAG;EAAA,IAAC;IACdC,QAAQ,GAAG,KADG;IAEdC,IAAI,GAAG,KAFO;IAGdC,OAAO,GAAG,CAHI;IAIdC,IAAI,GAAG,CAJO;IAKdC,SAAS,GAAG,EALE;IAMdC,SAAS,GAAG,EANE;IAOdC,cAPc;IAQdC,cARc;IASdC,aAAa,GAAG,IATF;IAUdC,QAVc;IAWdC,cAXc;IAYdC,IAZc;IAadC,YAbc;IAcdC,UAdc;IAedC,QAfc;IAgBdC;EAhBc,CAAD;EAAA,oBAkBb,6BAAC,iBAAD;IAAM,KAAK,EAAEA;EAAb,
|
|
1
|
+
{"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"sources":["Swiper.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n {/* @ts-ignore */}\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) => {\n const component = renderItem({ item, index });\n\n if (!component) {\n return null;\n }\n\n const key = keyExtractor ? keyExtractor(item, index) : index;\n return React.cloneElement(component, {\n key,\n });\n })\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAqBA,MAAMA,MAAM,GAAG;EAAA,IAAC;IACdC,QAAQ,GAAG,KADG;IAEdC,IAAI,GAAG,KAFO;IAGdC,OAAO,GAAG,CAHI;IAIdC,IAAI,GAAG,CAJO;IAKdC,SAAS,GAAG,EALE;IAMdC,SAAS,GAAG,EANE;IAOdC,cAPc;IAQdC,cARc;IASdC,aAAa,GAAG,IATF;IAUdC,QAVc;IAWdC,cAXc;IAYdC,IAZc;IAadC,YAbc;IAcdC,UAdc;IAedC,QAfc;IAgBdC;EAhBc,CAAD;EAAA,oBAkBb,6BAAC,iBAAD;IAAM,KAAK,EAAEA;EAAb,gBAEE,6BAAC,6BAAD;IACE,IAAI,EAAEZ,IADR;IAEE,IAAI,EAAEF,IAFR;IAGE,OAAO,EAAEC,OAHX;IAIE,QAAQ,EAAEF,QAJZ;IAKE,aAAa,EAAE;MACbI,SADa;MAEbC,SAFa;MAGbW,cAAc,EAAE;QAAEC,KAAK,EAAEX;MAAT,CAHH;MAIbY,cAAc,EAAE;QAAED,KAAK,EAAEV;MAAT,CAJH;MAKbC,aALa;MAMb,IAAIC,QAAQ,GACR;QAAEU,QAAQ,EAAE;UAAEC,UAAU,EAAE;YAAEC,eAAe,EAAEZ;UAAnB;QAAd;MAAZ,CADQ,GAER,EAFJ,CANa;MASb,IAAIC,cAAc,GACd;QAAEY,cAAc,EAAE;UAAED,eAAe,EAAEX;QAAnB;MAAlB,CADc,GAEd,EAFJ;IATa;EALjB,GAmBGC,IAAI,IAAIE,UAAR,GACGF,IAAI,CAACY,GAAL,CAAS,CAACC,IAAD,EAAOC,KAAP,KAAiB;IACxB,MAAMC,SAAS,GAAGb,UAAU,CAAC;MAAEW,IAAF;MAAQC;IAAR,CAAD,CAA5B;;IAEA,IAAI,CAACC,SAAL,EAAgB;MACd,OAAO,IAAP;IACD;;IAED,MAAMC,GAAG,GAAGf,YAAY,GAAGA,YAAY,CAACY,IAAD,EAAOC,KAAP,CAAf,GAA+BA,KAAvD;IACA,oBAAOG,cAAA,CAAMC,YAAN,CAAmBH,SAAnB,EAA8B;MACnCC;IADmC,CAA9B,CAAP;EAGD,CAXD,CADH,GAaGb,QAhCN,CAFF,CAlBa;AAAA,CAAf;;eAyDef,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth","withTheme"],"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<Props
|
|
1
|
+
{"version":3,"names":["ToggleButton","Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","colors","style","rest","internalValue","setInternalValue","React","useState","useEffect","handlePress","styles","mainContainer","backgroundColor","StyleSheet","create","borderWidth","withTheme"],"sources":["ToggleButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport { colorTypes } from \"@draftbit/types\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\nimport IconButton from \"./IconButton\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n icon: string;\n toggled?: boolean;\n onPress?: (value: boolean) => void;\n defaultValue?: boolean;\n disabled?: boolean;\n color?: colorTypes;\n colorSecondary?: colorTypes;\n borderColor?: colorTypes;\n iconSize?: number;\n width?: number;\n height?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst ToggleButton: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n toggled = false,\n onPress = () => {},\n defaultValue,\n disabled = false,\n color = \"primary\",\n colorSecondary = \"surface\",\n borderColor = \"divider\",\n iconSize = 25,\n width = 50,\n height = 50,\n theme: { colors },\n style,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState<boolean>(\n toggled || defaultValue || false\n );\n\n React.useEffect(() => {\n if (toggled != null) {\n setInternalValue(toggled);\n }\n }, [toggled]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const handlePress = () => {\n setInternalValue(!internalValue);\n onPress(!internalValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={icon}\n size={iconSize}\n color={internalValue ? colors[color] : colors[colorSecondary]}\n onPress={handlePress}\n disabled={disabled}\n style={[\n styles.mainContainer,\n {\n width,\n height,\n backgroundColor: internalValue\n ? colors[colorSecondary]\n : colors[color],\n borderColor: colors[borderColor],\n },\n style,\n ]}\n {...rest}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n mainContainer: {\n borderWidth: 1,\n },\n});\n\nexport default withTheme(ToggleButton);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;AAoBA,MAAMA,YAAsD,GAAG,QAgBzD;EAAA,IAhB0D;IAC9DC,IAD8D;IAE9DC,IAF8D;IAG9DC,OAAO,GAAG,KAHoD;IAI9DC,OAAO,GAAG,MAAM,CAAE,CAJ4C;IAK9DC,YAL8D;IAM9DC,QAAQ,GAAG,KANmD;IAO9DC,KAAK,GAAG,SAPsD;IAQ9DC,cAAc,GAAG,SAR6C;IAS9DC,WAAW,GAAG,SATgD;IAU9DC,QAAQ,GAAG,EAVmD;IAW9DC,KAAK,GAAG,EAXsD;IAY9DC,MAAM,GAAG,EAZqD;IAa9DC,KAAK,EAAE;MAAEC;IAAF,CAbuD;IAc9DC,KAd8D;IAe9D,GAAGC;EAf2D,CAgB1D;EACJ,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CACxCjB,OAAO,IAAIE,YAAX,IAA2B,KADa,CAA1C;EAIAc,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIlB,OAAO,IAAI,IAAf,EAAqB;MACnBe,gBAAgB,CAACf,OAAD,CAAhB;IACD;EACF,CAJD,EAIG,CAACA,OAAD,CAJH;EAMAgB,KAAK,CAACE,SAAN,CAAgB,MAAM;IACpB,IAAIhB,YAAY,IAAI,IAApB,EAA0B;MACxBa,gBAAgB,CAACb,YAAD,CAAhB;IACD;EACF,CAJD,EAIG,CAACA,YAAD,CAJH;;EAMA,MAAMiB,WAAW,GAAG,MAAM;IACxBJ,gBAAgB,CAAC,CAACD,aAAF,CAAhB;IACAb,OAAO,CAAC,CAACa,aAAF,CAAP;EACD,CAHD;;EAKA,oBACE,oBAAC,mBAAD;IACE,IAAI,EAAEhB,IADR;IAEE,IAAI,EAAEC,IAFR;IAGE,IAAI,EAAEQ,QAHR;IAIE,KAAK,EAAEO,aAAa,GAAGH,MAAM,CAACP,KAAD,CAAT,GAAmBO,MAAM,CAACN,cAAD,CAJ/C;IAKE,OAAO,EAAEc,WALX;IAME,QAAQ,EAAEhB,QANZ;IAOE,KAAK,EAAE,CACLiB,MAAM,CAACC,aADF,EAEL;MACEb,KADF;MAEEC,MAFF;MAGEa,eAAe,EAAER,aAAa,GAC1BH,MAAM,CAACN,cAAD,CADoB,GAE1BM,MAAM,CAACP,KAAD,CALZ;MAMEE,WAAW,EAAEK,MAAM,CAACL,WAAD;IANrB,CAFK,EAULM,KAVK;EAPT,GAmBMC,IAnBN,EADF;AAuBD,CA7DD;;AA+DA,MAAMO,MAAM,GAAGG,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,aAAa,EAAE;IACbI,WAAW,EAAE;EADA;AADgB,CAAlB,CAAf;;eAMe,IAAAC,kBAAA,EAAU7B,YAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["injectIcon","Component","Icon","props","React","createElement"],"sources":["Icon.ts"],"sourcesContent":["/**\n * This is an interface for a hybrid component.\n *\n * Its public implementation is `@draftbit/native`, and it is injected inside\n * `@draftbit/ui`.\n */\nimport React from \"react\";\nimport { ViewProps, StyleProp, ImageStyle } from \"react-native\";\n\nimport { Subtract } from \"utility-types\";\n\ntype Props = {\n name: string
|
|
1
|
+
{"version":3,"names":["injectIcon","Component","Icon","props","React","createElement"],"sources":["Icon.ts"],"sourcesContent":["/**\n * This is an interface for a hybrid component.\n *\n * Its public implementation is `@draftbit/native`, and it is injected inside\n * `@draftbit/ui`.\n */\nimport React from \"react\";\nimport { ViewProps, StyleProp, ImageStyle } from \"react-native\";\n\nimport { Subtract } from \"utility-types\";\n\ntype Props = {\n name: string;\n color?: string;\n size: number;\n style?: StyleProp<ImageStyle>;\n} & ViewProps;\n\nexport type IconI = React.ComponentType<Props>;\n\nexport interface IconSlot {\n Icon: IconI;\n}\n\nexport const injectIcon =\n <P extends IconSlot>(Component: React.ComponentType<P>, Icon: IconI) =>\n (props: Subtract<P, IconSlot>) =>\n React.createElement(Component, { ...(props as P), Icon });\n"],"mappings":";;;;;;;AAMA;;;;AANA;AACA;AACA;AACA;AACA;AACA;AAmBO,MAAMA,UAAU,GACrB,CAAqBC,SAArB,EAAwDC,IAAxD,KACCC,KAAD,iBACEC,cAAA,CAAMC,aAAN,CAAoBJ,SAApB,EAA+B,EAAE,GAAIE,KAAN;EAAmBD;AAAnB,CAA/B,CAHG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ThemeProvider","PortalHost","Provider","Component","render","props","theme","children"],"sources":["Provider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider } from \"./theming\";\nimport PortalHost from \"./components/Portal/PortalHost\";\nimport { Theme } from \"@draftbit/types\";\n\ntype Props = {\n children: React.ReactNode;\n theme?: Theme;\n};\n\nexport default class Provider extends React.Component<Props> {\n render() {\n return (\n <PortalHost>\n <ThemeProvider theme={this.props.theme}>\n {this.props.children}\n </ThemeProvider>\n </PortalHost>\n );\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,aAAT,QAA8B,WAA9B;AACA,OAAOC,UAAP,MAAuB,gCAAvB;AAQA,eAAe,MAAMC,QAAN,SAAuBH,KAAK,CAACI,SAA7B,CAA8C;EAC3DC,MAAM,GAAG;IACP,oBACE,oBAAC,UAAD,
|
|
1
|
+
{"version":3,"names":["React","ThemeProvider","PortalHost","Provider","Component","render","props","theme","children"],"sources":["Provider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ThemeProvider } from \"./theming\";\nimport PortalHost from \"./components/Portal/PortalHost\";\nimport { Theme } from \"@draftbit/types\";\n\ntype Props = {\n children: React.ReactNode;\n theme?: Theme;\n};\n\nexport default class Provider extends React.Component<Props> {\n render() {\n return (\n <PortalHost>\n {/* @ts-ignore */}\n <ThemeProvider theme={this.props.theme}>\n {this.props.children}\n </ThemeProvider>\n </PortalHost>\n );\n }\n}\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,aAAT,QAA8B,WAA9B;AACA,OAAOC,UAAP,MAAuB,gCAAvB;AAQA,eAAe,MAAMC,QAAN,SAAuBH,KAAK,CAACI,SAA7B,CAA8C;EAC3DC,MAAM,GAAG;IACP,oBACE,oBAAC,UAAD,qBAEE,oBAAC,aAAD;MAAe,KAAK,EAAE,KAAKC,KAAL,CAAWC;IAAjC,GACG,KAAKD,KAAL,CAAWE,QADd,CAFF,CADF;EAQD;;AAV0D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress"],"sources":["ActionSheetCancel.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","ActionSheetItem","ActionSheetCancel","label","color","style","onPress"],"sources":["ActionSheetCancel.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport ActionSheetItem from \"./ActionSheetItem\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetCancel: React.FC<React.PropsWithChildren<Props>> = ({\n label = \"Cancel\",\n color,\n style,\n onPress,\n}) => {\n return (\n <ActionSheetItem\n label={label}\n color={color || \"#FF453A\"}\n style={[style]}\n onPress={onPress}\n />\n );\n};\n\nexport default ActionSheetCancel;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,eAAP,MAA4B,mBAA5B;;AASA,MAAMC,iBAA2D,GAAG,QAK9D;EAAA,IAL+D;IACnEC,KAAK,GAAG,QAD2D;IAEnEC,KAFmE;IAGnEC,KAHmE;IAInEC;EAJmE,CAK/D;EACJ,oBACE,oBAAC,eAAD;IACE,KAAK,EAAEH,KADT;IAEE,KAAK,EAAEC,KAAK,IAAI,SAFlB;IAGE,KAAK,EAAE,CAACC,KAAD,CAHT;IAIE,OAAO,EAAEC;EAJX,EADF;AAQD,CAdD;;AAgBA,eAAeJ,iBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","StyleSheet","TouchableOpacity","extractStyles","ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"sources":["ActionSheetItem.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","Text","StyleSheet","TouchableOpacity","extractStyles","ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"sources":["ActionSheetItem.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<React.PropsWithChildren<Props>> = ({\n label,\n style,\n color,\n onPress,\n}) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <TouchableOpacity\n activeOpacity={0.7}\n style={[styles.wrapper, viewStyles]}\n onPress={onPress}\n >\n <Text style={[styles.label, textStyles, { color }]}>{label}</Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\n\nexport default ActionSheetItem;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,EAIEC,gBAJF,QAOO,cAPP;AAQA,SAASC,aAAT,QAA8B,iBAA9B;;AASA,MAAMC,eAAyD,GAAG,QAK5D;EAAA,IAL6D;IACjEC,KADiE;IAEjEC,KAFiE;IAGjEC,KAHiE;IAIjEC;EAJiE,CAK7D;EACJ,MAAM;IAAEC,UAAF;IAAcC;EAAd,IAA6BP,aAAa,CAACG,KAAD,CAAhD;EACA,oBACE,oBAAC,gBAAD;IACE,aAAa,EAAE,GADjB;IAEE,KAAK,EAAE,CAACK,MAAM,CAACC,OAAR,EAAiBF,UAAjB,CAFT;IAGE,OAAO,EAAEF;EAHX,gBAKE,oBAAC,IAAD;IAAM,KAAK,EAAE,CAACG,MAAM,CAACN,KAAR,EAAeI,UAAf,EAA2B;MAAEF;IAAF,CAA3B;EAAb,GAAqDF,KAArD,CALF,CADF;AASD,CAhBD;;AAkBA,MAAMM,MAAM,GAAGV,UAAU,CAACY,MAAX,CAAkB;EAC/BD,OAAO,EAAE;IACPE,iBAAiB,EAAEb,UAAU,CAACc,aADvB;IAEPC,iBAAiB,EAAE,SAFZ;IAGPC,eAAe,EAAE,SAHV;IAIPC,SAAS,EAAE,EAJJ;IAKPC,QAAQ,EAAE,QALH;IAMPC,OAAO,EAAE,MANF;IAOPC,cAAc,EAAE;EAPT,CADsB;EAU/BhB,KAAK,EAAE;IACLiB,QAAQ,EAAE,EADL;IAELC,SAAS,EAAE,QAFN;IAGLhB,KAAK,EAAE,SAHF;IAILiB,UAAU,EAAE,KAJP;IAKLL,QAAQ,EAAE,QALL;IAMLM,iBAAiB,EAAE,EANd;IAOLC,eAAe,EAAE,EAPZ;IAQLC,SAAS,EAAE;EARN;AAVwB,CAAlB,CAAf;AAsBA,eAAevB,eAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Easing","CircularProgress","AnimatedProgress","createAnimatedComponent","AnimatedCircularProgress","duration","easing","out","ease","fill","prefill","useNativeDriver","tintColorSecondary","onAnimationComplete","tintColor","other","fillAnimation","useState","Value","animate","useCallback","toVal","dur","toValue","dura","eas","useNative","anim","timing","start","animateColor","tintAnimation","interpolate","inputRange","outputRange","useEffect","style","childrenContainerStyle"],"sources":["AnimatedCircularProgress.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n Easing,\n EasingFunction,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport CircularProgress, {\n Props as CircularProgressProps,\n} from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\n\ntype Props = {\n duration?: number;\n easing?: EasingFunction;\n prefill?: number;\n useNativeDriver?: boolean;\n tintColorSecondary?: string;\n onAnimationComplete?: Animated.EndCallback | undefined;\n} & CircularProgressProps;\n\nconst AnimatedCircularProgress: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","Animated","Easing","CircularProgress","AnimatedProgress","createAnimatedComponent","AnimatedCircularProgress","duration","easing","out","ease","fill","prefill","useNativeDriver","tintColorSecondary","onAnimationComplete","tintColor","other","fillAnimation","useState","Value","animate","useCallback","toVal","dur","toValue","dura","eas","useNative","anim","timing","start","animateColor","tintAnimation","interpolate","inputRange","outputRange","useEffect","style","childrenContainerStyle"],"sources":["AnimatedCircularProgress.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Animated,\n Easing,\n EasingFunction,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport CircularProgress, {\n Props as CircularProgressProps,\n} from \"./CircularProgress\";\nconst AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);\n\ntype Props = {\n duration?: number;\n easing?: EasingFunction;\n prefill?: number;\n useNativeDriver?: boolean;\n tintColorSecondary?: string;\n onAnimationComplete?: Animated.EndCallback | undefined;\n} & CircularProgressProps;\n\nconst AnimatedCircularProgress: React.FC<React.PropsWithChildren<Props>> = ({\n duration = 500,\n easing = Easing.out(Easing.ease),\n fill,\n prefill = 0,\n useNativeDriver = false,\n tintColorSecondary,\n onAnimationComplete,\n tintColor = \"black\",\n ...other\n}) => {\n const [fillAnimation] = React.useState<Animated.Value>(\n new Animated.Value(prefill)\n );\n\n const animate = React.useCallback(\n (\n toVal: number = -1,\n dur?: number,\n ease?: EasingFunction\n ): Animated.CompositeAnimation => {\n const toValue = toVal >= 0 ? toVal : fill;\n const dura = dur || duration;\n const eas = ease || easing;\n const useNative = useNativeDriver;\n\n const anim = Animated.timing(fillAnimation, {\n useNativeDriver: useNative,\n toValue,\n easing: eas,\n duration: dura,\n });\n anim.start(onAnimationComplete);\n\n return anim;\n },\n [\n duration,\n easing,\n fill,\n useNativeDriver,\n fillAnimation,\n onAnimationComplete,\n ]\n );\n\n const animateColor = () => {\n if (!tintColorSecondary) {\n return tintColor;\n }\n\n const tintAnimation = fillAnimation.interpolate({\n inputRange: [0, 100],\n outputRange: [tintColor, tintColorSecondary],\n });\n\n return tintAnimation;\n };\n\n React.useEffect(() => {\n animate();\n }, [fill, animate]);\n\n return (\n <AnimatedProgress\n {...other}\n style={other.style as Animated.WithAnimatedValue<StyleProp<ViewStyle>>}\n childrenContainerStyle={\n other.childrenContainerStyle as Animated.WithAnimatedValue<\n StyleProp<ViewStyle>\n >\n }\n fill={fillAnimation}\n tintColor={animateColor()}\n />\n );\n};\n\nexport default AnimatedCircularProgress;\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,MAFF,QAMO,cANP;AAOA,OAAOC,gBAAP,MAEO,oBAFP;AAGA,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,uBAAT,CAAiCF,gBAAjC,CAAzB;;AAWA,MAAMG,wBAAkE,GAAG,QAUrE;EAAA,IAVsE;IAC1EC,QAAQ,GAAG,GAD+D;IAE1EC,MAAM,GAAGN,MAAM,CAACO,GAAP,CAAWP,MAAM,CAACQ,IAAlB,CAFiE;IAG1EC,IAH0E;IAI1EC,OAAO,GAAG,CAJgE;IAK1EC,eAAe,GAAG,KALwD;IAM1EC,kBAN0E;IAO1EC,mBAP0E;IAQ1EC,SAAS,GAAG,OAR8D;IAS1E,GAAGC;EATuE,CAUtE;EACJ,MAAM,CAACC,aAAD,IAAkBlB,KAAK,CAACmB,QAAN,CACtB,IAAIlB,QAAQ,CAACmB,KAAb,CAAmB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,KAAK,CAACsB,sBAJV;IAQE,IAAI,EAAErB,aARR;IASE,SAAS,EAAEc,YAAY;EATzB,GADF;AAaD,CA5ED;;AA8EA,eAAe1B,wBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","AspectRatio","props","layout","setLayout","useState","aspectRatio","inputStyle","flatten","style","width","height","push","nativeEvent","l","children"],"sources":["AspectRatio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n StyleSheet,\n LayoutRectangle,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\ntype Props = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst AspectRatio: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","AspectRatio","props","layout","setLayout","useState","aspectRatio","inputStyle","flatten","style","width","height","push","nativeEvent","l","children"],"sources":["AspectRatio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n StyleSheet,\n LayoutRectangle,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\ntype Props = {\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n};\n\nconst AspectRatio: React.FC<React.PropsWithChildren<Props>> = (props) => {\n const [layout, setLayout] = React.useState<LayoutRectangle | null>(null);\n const { aspectRatio = 1, ...inputStyle } =\n StyleSheet.flatten(props.style) || {};\n const style = [inputStyle, { aspectRatio }];\n\n if (layout) {\n const { width = 0, height = 0 } = layout;\n if (width === 0) {\n style.push({ width: height * (1 / aspectRatio), height });\n } else {\n style.push({ width, height: width * (1 / aspectRatio) });\n }\n }\n return (\n <View\n {...props}\n style={style}\n onLayout={({ nativeEvent: { layout: l } }) => setLayout(l)}\n >\n {props.children}\n </View>\n );\n};\n\nexport default AspectRatio;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAEEC,UAFF,QAMO,cANP;;AAaA,MAAMC,WAAqD,GAAIC,KAAD,IAAW;EACvE,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBN,KAAK,CAACO,QAAN,CAAuC,IAAvC,CAA5B;EACA,MAAM;IAAEC,WAAW,GAAG,CAAhB;IAAmB,GAAGC;EAAtB,IACJP,UAAU,CAACQ,OAAX,CAAmBN,KAAK,CAACO,KAAzB,KAAmC,EADrC;EAEA,MAAMA,KAAK,GAAG,CAACF,UAAD,EAAa;IAAED;EAAF,CAAb,CAAd;;EAEA,IAAIH,MAAJ,EAAY;IACV,MAAM;MAAEO,KAAK,GAAG,CAAV;MAAaC,MAAM,GAAG;IAAtB,IAA4BR,MAAlC;;IACA,IAAIO,KAAK,KAAK,CAAd,EAAiB;MACfD,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAK,EAAEC,MAAM,IAAI,IAAIL,WAAR,CAAf;QAAqCK;MAArC,CAAX;IACD,CAFD,MAEO;MACLF,KAAK,CAACG,IAAN,CAAW;QAAEF,KAAF;QAASC,MAAM,EAAED,KAAK,IAAI,IAAIJ,WAAR;MAAtB,CAAX;IACD;EACF;;EACD,oBACE,oBAAC,IAAD,eACMJ,KADN;IAEE,KAAK,EAAEO,KAFT;IAGE,QAAQ,EAAE;MAAA,IAAC;QAAEI,WAAW,EAAE;UAAEV,MAAM,EAAEW;QAAV;MAAf,CAAD;MAAA,OAAoCV,SAAS,CAACU,CAAD,CAA7C;IAAA;EAHZ,IAKGZ,KAAK,CAACa,QALT,CADF;AASD,CAvBD;;AAyBA,eAAed,WAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Touchable","CircleImage","withTheme","AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding"],"sources":["AvatarEdit.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport Touchable from \"./Touchable\";\nimport CircleImage from \"./CircleImage\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n image: string | ImageSourcePropType;\n size?: number;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AvatarEdit: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","Touchable","CircleImage","withTheme","AvatarEdit","Icon","image","size","onPress","style","theme","rest","colorStyles","editBackgroundColor","colors","primary","editIconColor","surface","editBorderColor","dimensions","width","height","position","top","right","borderColor","backgroundColor","borderRadius","padding"],"sources":["AvatarEdit.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, ImageSourcePropType, StyleProp, ViewStyle } from \"react-native\";\nimport Touchable from \"./Touchable\";\nimport CircleImage from \"./CircleImage\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n image: string | ImageSourcePropType;\n size?: number;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AvatarEdit: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n image,\n size = 80,\n onPress = () => {},\n style,\n theme,\n ...rest\n}) => {\n const colorStyles = {\n editBackgroundColor: theme.colors.primary,\n editIconColor: theme.colors.surface,\n editBorderColor: theme.colors.surface,\n };\n\n const dimensions = {\n width: size,\n height: size,\n };\n\n return (\n <View style={[style, dimensions]} {...rest}>\n <Touchable onPress={onPress}>\n <CircleImage source={image} size={size} />\n <View\n style={{\n position: \"absolute\",\n top: -3,\n right: -3,\n borderColor: colorStyles.editBorderColor,\n backgroundColor: colorStyles.editBackgroundColor,\n borderRadius: size * (3 / 16),\n padding: size * (3 / 32),\n }}\n >\n <Icon\n name=\"MaterialIcons/edit\"\n color={colorStyles.editIconColor}\n size={size * (3 / 16)}\n />\n </View>\n </Touchable>\n </View>\n );\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E,IAAI,EAAC,oBADP;IAEE,KAAK,EAAEK,WAAW,CAACI,aAFrB;IAGE,IAAI,EAAET,IAAI,IAAI,IAAI,EAAR;EAHZ,EAXF,CAFF,CADF,CADF;AAwBD,CA5CD;;AA8CA,eAAeJ,SAAS,CAACC,UAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sources":["Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Button,\n Text,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n Animated,\n} from \"react-native\";\nimport Surface from \"./Surface\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\n\ntype Props = {\n initiallyVisible: boolean;\n dismissable: boolean;\n buttonColor?: string;\n icon?: string;\n content?: string;\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n ref?: React.RefObject<View>;\n /**\n * @optional\n */\n theme: Theme;\n} & IconSlot;\n\ntype NativeEvent = {\n nativeEvent: {\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n };\n};\n\nconst Banner: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","Button","Text","View","StyleSheet","Animated","Surface","shadow","withTheme","ELEVATION","DEFAULT_MAX_WIDTH","Banner","initiallyVisible","dismissable","icon","buttonColor","content","contentStyle","style","theme","Icon","rest","visible","setVisible","useState","useEffect","current","position","useRef","Value","layout","setLayout","height","measured","timing","duration","toValue","useNativeDriver","start","handleLayout","nativeEvent","multiply","translateY","add","styles","container","wrapper","absolute","transform","opacity","marginBottom","message","color","colors","text","actions","primary","create","elevation","overflow","alignSelf","width","maxWidth","top","flexDirection","justifyContent","marginHorizontal","marginTop","margin","flex"],"sources":["Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Button,\n Text,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n Animated,\n} from \"react-native\";\nimport Surface from \"./Surface\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport shadow from \"../styles/shadow\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\nconst ELEVATION = 1;\nconst DEFAULT_MAX_WIDTH = 960;\n\ntype Props = {\n initiallyVisible: boolean;\n dismissable: boolean;\n buttonColor?: string;\n icon?: string;\n content?: string;\n contentStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<ViewStyle>;\n ref?: React.RefObject<View>;\n /**\n * @optional\n */\n theme: Theme;\n} & IconSlot;\n\ntype NativeEvent = {\n nativeEvent: {\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n };\n };\n};\n\nconst Banner: React.FC<React.PropsWithChildren<Props>> = ({\n initiallyVisible = true,\n dismissable = true,\n icon,\n buttonColor,\n content,\n contentStyle,\n style,\n theme,\n Icon,\n ...rest\n}) => {\n const [visible, setVisible] = React.useState(initiallyVisible);\n\n React.useEffect(() => {\n if (initiallyVisible) {\n setVisible(true);\n }\n }, [initiallyVisible]);\n\n const { current: position } = React.useRef<Animated.Value>(\n new Animated.Value(visible ? 1 : 0)\n );\n const [layout, setLayout] = React.useState<{\n height: number;\n measured: boolean;\n }>({\n height: 0,\n measured: false,\n });\n\n React.useEffect(() => {\n if (visible) {\n // show\n Animated.timing(position, {\n duration: 250,\n toValue: 1,\n useNativeDriver: false,\n }).start();\n } else {\n // hide\n Animated.timing(position, {\n duration: 200,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n }\n }, [visible, position]);\n\n const handleLayout = ({ nativeEvent }: NativeEvent) => {\n const { height } = nativeEvent.layout;\n setLayout({ height, measured: true });\n };\n\n // The banner animation has 2 parts:\n // 1. Blank spacer element which animates its height to move the content\n // 2. Actual banner which animates its translateY\n // In initial render, we position everything normally and measure the height of the banner\n // Once we have the height, we apply the height to the spacer and switch the banner to position: absolute\n // We need this because we need to move the content below as if banner's height was being animated\n // However we can't animated banner's height directly as it'll also resize the content inside\n const height = Animated.multiply(position, layout.height);\n\n const translateY = Animated.multiply(\n Animated.add(position, -1),\n layout.height\n );\n\n return (\n <Surface\n {...rest}\n style={[styles.container, shadow(ELEVATION) as ViewStyle, style]}\n >\n <View style={[styles.wrapper, contentStyle]}>\n <Animated.View style={{ height }} />\n <Animated.View\n onLayout={handleLayout}\n style={[\n layout.measured || !visible\n ? // If we have measured banner's height or it's invisible,\n // Position it absolutely, the layout will be taken care of the spacer\n [styles.absolute, { transform: [{ translateY }] }]\n : // Otherwise position it normally\n null,\n !layout.measured && !visible\n ? // If we haven't measured banner's height yet and it's invisible,\n // hide it with opacity: 0 so user doesn't see it\n { opacity: 0 }\n : null,\n ]}\n >\n <View\n style={[styles.content, { marginBottom: dismissable ? 0 : 16 }]}\n >\n {icon ? (\n <View style={styles.icon}>\n <Icon name={icon} size={40} />\n </View>\n ) : null}\n <Text\n style={[styles.message, { color: theme.colors.text }]}\n accessibilityLiveRegion={visible ? \"polite\" : \"none\"}\n accessibilityRole=\"alert\"\n >\n {content}\n </Text>\n </View>\n {dismissable ? (\n <View style={styles.actions}>\n <Button\n color={buttonColor || theme.colors.primary}\n title=\"Close\"\n onPress={() => setVisible(false)}\n />\n </View>\n ) : null}\n </Animated.View>\n </View>\n </Surface>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n elevation: ELEVATION,\n },\n wrapper: {\n overflow: \"hidden\",\n alignSelf: \"center\",\n width: \"100%\",\n maxWidth: DEFAULT_MAX_WIDTH,\n },\n absolute: {\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n },\n content: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n marginHorizontal: 8,\n marginTop: 16,\n marginBottom: 0,\n },\n icon: {\n margin: 8,\n },\n message: {\n flex: 1,\n margin: 8,\n },\n actions: {\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n margin: 8,\n },\n});\n\nexport default withTheme(Banner);\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,MADF,EAEEC,IAFF,EAGEC,IAHF,EAKEC,UALF,EAOEC,QAPF,QAQO,cARP;AASA,OAAOC,OAAP,MAAoB,WAApB;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAGA,MAAMC,SAAS,GAAG,CAAlB;AACA,MAAMC,iBAAiB,GAAG,GAA1B;;AA4BA,MAAMC,MAAgD,GAAG,QAWnD;EAAA,IAXoD;IACxDC,gBAAgB,GAAG,IADqC;IAExDC,WAAW,GAAG,IAF0C;IAGxDC,IAHwD;IAIxDC,WAJwD;IAKxDC,OALwD;IAMxDC,YANwD;IAOxDC,KAPwD;IAQxDC,KARwD;IASxDC,IATwD;IAUxD,GAAGC;EAVqD,CAWpD;EACJ,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBvB,KAAK,CAACwB,QAAN,CAAeZ,gBAAf,CAA9B;EAEAZ,KAAK,CAACyB,SAAN,CAAgB,MAAM;IACpB,IAAIb,gBAAJ,EAAsB;MACpBW,UAAU,CAAC,IAAD,CAAV;IACD;EACF,CAJD,EAIG,CAACX,gBAAD,CAJH;EAMA,MAAM;IAAEc,OAAO,EAAEC;EAAX,IAAwB3B,KAAK,CAAC4B,MAAN,CAC5B,IAAIvB,QAAQ,CAACwB,KAAb,CAAmBP,OAAO,GAAG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AN,CAAaG,OADrC;IAEE,KAAK,EAAC,OAFR;IAGE,OAAO,EAAE,MAAMjC,UAAU,CAAC,KAAD;EAH3B,EADF,CADU,GAQR,IAxCN,CAFF,CAJF,CADF;AAoDD,CAxHD;;AA0HA,MAAMqB,MAAM,GAAGxC,UAAU,CAACqD,MAAX,CAAkB;EAC/BZ,SAAS,EAAE;IACTa,SAAS,EAAEjD;EADF,CADoB;EAI/BqC,OAAO,EAAE;IACPa,QAAQ,EAAE,QADH;IAEPC,SAAS,EAAE,QAFJ;IAGPC,KAAK,EAAE,MAHA;IAIPC,QAAQ,EAAEpD;EAJH,CAJsB;EAU/BqC,QAAQ,EAAE;IACRpB,QAAQ,EAAE,UADF;IAERoC,GAAG,EAAE,CAFG;IAGRF,KAAK,EAAE;EAHC,CAVqB;EAe/B7C,OAAO,EAAE;IACPgD,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,YAFT;IAGPC,gBAAgB,EAAE,CAHX;IAIPC,SAAS,EAAE,EAJJ;IAKPjB,YAAY,EAAE;EALP,CAfsB;EAsB/BpC,IAAI,EAAE;IACJsD,MAAM,EAAE;EADJ,CAtByB;EAyB/BjB,OAAO,EAAE;IACPkB,IAAI,EAAE,CADC;IAEPD,MAAM,EAAE;EAFD,CAzBsB;EA6B/Bb,OAAO,EAAE;IACPS,aAAa,EAAE,KADR;IAEPC,cAAc,EAAE,UAFT;IAGPG,MAAM,EAAE;EAHD;AA7BsB,CAAlB,CAAf;AAoCA,eAAe5D,SAAS,CAACG,MAAD,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 { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
|
|
5
3
|
import { withTheme } from "../theming";
|
|
@@ -57,7 +55,7 @@ function Base(_ref) {
|
|
|
57
55
|
buttonStyles.justifyContent = "flex-end";
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
58
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
61
59
|
onPress: onPress,
|
|
62
60
|
disabled: disabled || loading,
|
|
63
61
|
style: _ref2 => {
|
|
@@ -67,8 +65,9 @@ function Base(_ref) {
|
|
|
67
65
|
return [styles.base, {
|
|
68
66
|
opacity: pressed || disabled ? 0.75 : 1
|
|
69
67
|
}, buttonStyles];
|
|
70
|
-
}
|
|
71
|
-
|
|
68
|
+
},
|
|
69
|
+
...props
|
|
70
|
+
}, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
72
71
|
size: "small",
|
|
73
72
|
color: color,
|
|
74
73
|
style: styles.loading
|
|
@@ -88,13 +87,14 @@ const Solid = _ref3 => {
|
|
|
88
87
|
theme,
|
|
89
88
|
...props
|
|
90
89
|
} = _ref3;
|
|
91
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
90
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
92
91
|
style: [{
|
|
93
92
|
color: "#FFF",
|
|
94
93
|
borderRadius: theme.roundness,
|
|
95
94
|
backgroundColor: theme.colors.primary
|
|
96
|
-
}, style]
|
|
97
|
-
|
|
95
|
+
}, style],
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const ButtonSolid = withTheme(Solid);
|
|
@@ -106,13 +106,14 @@ const Outline = _ref4 => {
|
|
|
106
106
|
theme,
|
|
107
107
|
...props
|
|
108
108
|
} = _ref4;
|
|
109
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
109
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
110
110
|
style: [styles.outline, {
|
|
111
111
|
borderRadius: theme.roundness,
|
|
112
112
|
borderColor: theme.colors.primary,
|
|
113
113
|
color: theme.colors.primary
|
|
114
|
-
}, style]
|
|
115
|
-
|
|
114
|
+
}, style],
|
|
115
|
+
...props
|
|
116
|
+
});
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
const ButtonOutline = withTheme(Outline);
|
|
@@ -160,4 +161,24 @@ const styles = StyleSheet.create({
|
|
|
160
161
|
})
|
|
161
162
|
}
|
|
162
163
|
});
|
|
164
|
+
//# sourceMappingURL=Button.js.map: 0,
|
|
165
|
+
minHeight: undefined
|
|
166
|
+
},
|
|
167
|
+
loading: {
|
|
168
|
+
marginRight: 6
|
|
169
|
+
},
|
|
170
|
+
icon: { ...Platform.select({
|
|
171
|
+
web: {
|
|
172
|
+
marginTop: 1,
|
|
173
|
+
marginRight: 4,
|
|
174
|
+
alignSelf: "center"
|
|
175
|
+
},
|
|
176
|
+
default: {
|
|
177
|
+
marginBottom: 2,
|
|
178
|
+
marginRight: 4,
|
|
179
|
+
alignSelf: "center"
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
});
|
|
163
184
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","Pressable","Platform","StyleSheet","ActivityIndicator","withTheme","CONSTANTS","baseHeight","borderRadius","padding","icon","Base","Icon","title","onPress","loading","disabled","style","props","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","buttonStyles","flatten","titleStyles","justifyContent","pressed","styles","base","opacity","Solid","theme","roundness","backgroundColor","colors","primary","ButtonSolid","Outline","outline","borderColor","ButtonOutline","create","position","flexDirection","alignItems","minHeight","paddingHorizontal","select","web","cursor","userSelect","borderWidth","bare","undefined","marginRight","marginTop","alignSelf","default","marginBottom"],"sources":["Button.
|
|
1
|
+
{"version":3,"names":["React","Text","Pressable","Platform","StyleSheet","ActivityIndicator","withTheme","CONSTANTS","baseHeight","borderRadius","padding","icon","Base","Icon","title","onPress","loading","disabled","style","props","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","buttonStyles","flatten","titleStyles","justifyContent","createElement","pressed","styles","base","opacity","size","name","Solid","theme","roundness","backgroundColor","colors","primary","ButtonSolid","Outline","outline","borderColor","ButtonOutline","create","position","flexDirection","alignItems","minHeight","paddingHorizontal","select","web","cursor","userSelect","borderWidth","bare","undefined","marginRight","marginTop","alignSelf","default","marginBottom"],"sources":["Button.js"],"sourcesContent":["import * as React from \"react\";\nimport { Text, Pressable, Platform, StyleSheet, ActivityIndicator, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst CONSTANTS = {\n baseHeight: 42,\n borderRadius: 4,\n padding: 8,\n icon: 24,\n};\nfunction Base({ Icon, icon, title, onPress, loading, disabled, style, ...props }) {\n const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});\n const titleStyles = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n if (textAlign === \"left\") {\n buttonStyles.justifyContent = \"flex-start\";\n }\n if (textAlign === \"right\") {\n buttonStyles.justifyContent = \"flex-end\";\n }\n return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {\n return [\n styles.base,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n },\n buttonStyles,\n ];\n }, ...props },\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: color, style: styles.loading })) : null,\n icon && !loading ? (React.createElement(Icon, { name: icon, color: color, style: styles.icon, size: CONSTANTS.icon })) : null,\n React.createElement(Text, { style: titleStyles }, title)));\n}\nconst Solid = ({ style, theme, ...props }) => {\n return (React.createElement(Base, { style: [\n {\n color: \"#FFF\",\n borderRadius: theme.roundness,\n backgroundColor: theme.colors.primary,\n },\n style,\n ], ...props }));\n};\nconst ButtonSolid = withTheme(Solid);\nexport { ButtonSolid };\nconst Outline = ({ style, theme, ...props }) => {\n return (React.createElement(Base, { style: [\n styles.outline,\n {\n borderRadius: theme.roundness,\n borderColor: theme.colors.primary,\n color: theme.colors.primary,\n },\n style,\n ], ...props }));\n};\nconst ButtonOutline = withTheme(Outline);\nexport { ButtonOutline };\nconst styles = StyleSheet.create({\n base: {\n position: \"relative\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: CONSTANTS.baseHeight,\n paddingHorizontal: 12,\n fontFamily: \"System\",\n fontWeight: \"700\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n outline: {\n backgroundColor: \"transparent\",\n borderWidth: 1,\n },\n bare: {\n backgroundColor: \"transparent\",\n padding: 0,\n minHeight: undefined,\n },\n loading: {\n marginRight: 6,\n },\n icon: {\n ...Platform.select({\n web: {\n marginTop: 1,\n marginRight: 4,\n alignSelf: \"center\",\n },\n default: {\n marginBottom: 2,\n marginRight: 4,\n alignSelf: \"center\",\n },\n }),\n },\n});\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,SAAf,EAA0BC,QAA1B,EAAoCC,UAApC,EAAgDC,iBAAhD,QAA0E,cAA1E;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,MAAMC,SAAS,GAAG;EACdC,UAAU,EAAE,EADE;EAEdC,YAAY,EAAE,CAFA;EAGdC,OAAO,EAAE,CAHK;EAIdC,IAAI,EAAE;AAJQ,CAAlB;;AAMA,SAASC,IAAT,OAAkF;EAAA,IAApE;IAAEC,IAAF;IAAQF,IAAR;IAAcG,KAAd;IAAqBC,OAArB;IAA8BC,OAA9B;IAAuCC,QAAvC;IAAiDC,KAAjD;IAAwD,GAAGC;EAA3D,CAAo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,MAAMiC,aAAa,GAAG9C,SAAS,CAAC2C,OAAD,CAA/B;AACA,SAASG,aAAT;AACA,MAAMf,MAAM,GAAGjC,UAAU,CAACiD,MAAX,CAAkB;EAC7Bf,IAAI,EAAE;IACFgB,QAAQ,EAAE,UADR;IAEFC,aAAa,EAAE,KAFb;IAGFC,UAAU,EAAE,QAHV;IAIFtB,cAAc,EAAE,QAJd;IAKFuB,SAAS,EAAElD,SAAS,CAACC,UALnB;IAMFkD,iBAAiB,EAAE,EANjB;IAOFrC,UAAU,EAAE,QAPV;IAQFC,UAAU,EAAE,KARV;IASF,GAAGnB,QAAQ,CAACwD,MAAT,CAAgB;MACfC,GAAG,EAAE;QACDC,MAAM,EAAE,SADP;QAEDC,UAAU,EAAE;MAFX;IADU,CAAhB;EATD,CADuB;EAiB7BZ,OAAO,EAAE;IACLL,eAAe,EAAE,aADZ;IAELkB,WAAW,EAAE;EAFR,CAjBoB;EAqB7BC,IAAI,EAAE;IACFnB,eAAe,EAAE,aADf;IAEFnC,OAAO,EAAE,CAFP;IAGF+C,SAAS,EAAEQ;EAHT,CArBuB;EA0B7BjD,OAAO,EAAE;IACLkD,WAAW,EAAE;EADR,CA1BoB;EA6B7BvD,IAAI,EAAE,EACF,GAAGR,QAAQ,CAACwD,MAAT,CAAgB;MACfC,GAAG,EAAE;QACDO,SAAS,EAAE,CADV;QAEDD,WAAW,EAAE,CAFZ;QAGDE,SAAS,EAAE;MAHV,CADU;MAMfC,OAAO,EAAE;QACLC,YAAY,EAAE,CADT;QAELJ,WAAW,EAAE,CAFR;QAGLE,SAAS,EAAE;MAHN;IANM,CAAhB;EADD;AA7BuB,CAAlB,CAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","Pressable","Image","Surface","Title","Subtitle","Caption","withTheme","Config","ICON_SIZE","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","pressed","opacity","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","Pressable","Image","Surface","Title","Subtitle","Caption","withTheme","Config","ICON_SIZE","cardIconSize","ICON_CONTAINER_SIZE","ICON_CONTAINER_PADDING","ICON_ELEVATION","cardIconElevation","TopRightCircleIcon","Icon","icon","theme","onPress","createElement","style","justifyContent","alignItems","elevation","position","top","right","width","height","padding","borderRadius","backgroundColor","disabled","pressed","opacity","name","size","color","colors","surface","Card","image","cardImageUrl","title","subtitle","description","textCentered","aspectRatio","onPressIcon","titleStyle","subtitleStyle","descriptionStyle","children","bgColor","styles","flatten","innerPadding","source","uri","resizeMode","text","marginTop"],"sources":["Card.js"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet, View, Pressable, } from \"react-native\";\nimport Image from \"./Image\";\nimport Surface from \"./Surface\";\nimport { Title, Subtitle, Caption } from \"./Typography\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nconst ICON_SIZE = Config.cardIconSize;\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\nconst ICON_ELEVATION = Config.cardIconElevation;\nexport const TopRightCircleIcon = withTheme(({ Icon, icon, theme, onPress, }) => {\n return (React.createElement(Surface, { style: {\n justifyContent: \"center\",\n alignItems: \"center\",\n elevation: ICON_ELEVATION,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: \"rgba(0, 0, 0, 0.1)\",\n } },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Icon, { name: icon, size: ICON_SIZE, color: theme.colors.surface }))));\n});\nconst Card = ({ Icon, image = Config.cardImageUrl, title, subtitle, description, textCentered, icon, aspectRatio = 1.5, elevation = 2, style, onPress, onPressIcon, titleStyle, subtitleStyle, descriptionStyle, theme, children, }) => {\n const { backgroundColor: bgColor, padding, ...styles } = StyleSheet.flatten(style || {});\n const backgroundColor = bgColor ? bgColor : theme.colors.surface;\n const innerPadding = padding ? padding : 12;\n return (React.createElement(Surface, { style: [{ elevation, backgroundColor }, styles] },\n React.createElement(Pressable, { disabled: !onPress, onPress: onPress, style: ({ pressed }) => {\n return [\n {\n opacity: pressed ? 0.8 : 1,\n },\n ];\n } },\n React.createElement(Image, { style: { aspectRatio }, source: typeof image === \"string\" ? { uri: image } : image, resizeMode: \"cover\" }),\n React.createElement(View, { style: { padding: innerPadding } },\n React.createElement(View, { style: { alignItems: textCentered ? \"center\" : \"flex-start\" } },\n title || (title && title !== \"\") ? (React.createElement(Title, { text: title, style: titleStyle })) : null,\n subtitle || (subtitle && subtitle !== \"\") ? (React.createElement(Subtitle, { text: subtitle, style: subtitleStyle })) : null,\n description || (description && description !== \"\") ? (React.createElement(View, { style: { marginTop: 4 } },\n React.createElement(Caption, { text: description, style: descriptionStyle }))) : null,\n children)),\n icon ? (React.createElement(TopRightCircleIcon, { Icon: Icon, icon: icon, onPress: onPressIcon })) : null)));\n};\nexport default withTheme(Card);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,UAAT,EAAqBC,IAArB,EAA2BC,SAA3B,QAA6C,cAA7C;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,SAASC,KAAT,EAAgBC,QAAhB,EAA0BC,OAA1B,QAAyC,cAAzC;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,MAAMC,SAAS,GAAGD,MAAM,CAACE,YAAzB;AACA,MAAMC,mBAA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eAAe1C,SAAS,CAACkC,IAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardBlock","image","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","backgroundColor","background","borderRadius","uri","flexDirection","alignItems","justifyContent","marginTop","strong","body2","medium"],"sources":["CardBlock.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ImageSourcePropType,\n View,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\nimport { justificationType } from \"./Justification\";\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n titleCentered: boolean;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: typeof theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n};\n\nconst CardBlock: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","Text","Image","Card","Elevation","withTheme","Config","CardBlock","image","cardImageUrl","title","leftDescription","rightDescription","titleCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","titleJustification","titleStyle","button","headline6","headline5","rightDescriptionStyles","subtitle2","color","light","backgroundColor","background","borderRadius","uri","flexDirection","alignItems","justifyContent","marginTop","strong","body2","medium"],"sources":["CardBlock.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n ImageSourcePropType,\n View,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport Config from \"./Config\";\nimport theme from \"../styles/DefaultTheme\";\nimport { justificationType } from \"./Justification\";\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n titleCentered: boolean;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: typeof theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n};\n\nconst CardBlock: React.FC<React.PropsWithChildren<Props>> = ({\n image = Config.cardImageUrl,\n title,\n leftDescription,\n rightDescription,\n titleCentered,\n aspectRatio = 1.5,\n elevation = 2,\n numColumns = 3,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n let titleJustification: justificationType;\n\n let titleStyle;\n if (titleCentered && !leftDescription && !rightDescription) {\n titleJustification = \"center\";\n } else {\n titleJustification = \"space-between\";\n }\n\n if (numColumns === 1) {\n titleStyle = typography.button;\n } else if (numColumns === 2) {\n titleStyle = typography.headline6;\n } else {\n titleStyle = typography.headline5;\n }\n\n const rightDescriptionStyles = [\n typography.subtitle2,\n { color: colors.light },\n ];\n\n return (\n <Card style={style} onPress={onPress} numColumns={numColumns} {...rest}>\n <View style={{ backgroundColor: colors.background }}>\n <Elevation style={{ elevation, borderRadius: roundness }}>\n <Image\n style={{\n borderRadius: roundness,\n aspectRatio,\n }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n </Elevation>\n {title ? (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: titleJustification,\n marginTop: numColumns === 3 ? 16 : 12,\n }}\n >\n <Text\n numberOfLines={1}\n style={[titleStyle, { color: colors.strong }]}\n >\n {title}\n </Text>\n {!leftDescription && rightDescription ? (\n <Text style={rightDescriptionStyles}>{rightDescription}</Text>\n ) : null}\n </View>\n ) : null}\n {leftDescription ? (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.body2, { color: colors.medium }]}\n >\n {leftDescription}\n </Text>\n {rightDescription ? (\n <Text numberOfLines={1} style={rightDescriptionStyles}>\n {rightDescription}\n </Text>\n ) : null}\n </View>\n ) : null}\n </View>\n </Card>\n );\n};\n\nexport default withTheme(CardBlock);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,IAFF,EAGEC,IAHF,QAMO,cANP;AAOA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,OAAOC,MAAP,MAAmB,UAAnB;;AAkBA,MAAMC,SAAmD,GAAG,QAatD;EAAA,IAbuD;IAC3DC,KAAK,GAAGF,MAAM,CAACG,YAD4C;IAE3DC,KAF2D;IAG3DC,eAH2D;IAI3DC,gBAJ2D;IAK3DC,aAL2D;IAM3DC,WAAW,GAAG,GAN6C;IAO3DC,SAAS,GAAG,CAP+C;IAQ3DC,UAAU,GAAG,CAR8C;IAS3DC,KAAK,EAAE;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,CAToD;IAU3DC,KAV2D;IAW3DC,OAX2D;IAY3D,GAAGC;EAZwD,CAavD;EACJ,IAAIC,kBAAJ;EAEA,IAAIC,UAAJ;;EACA,IAAIZ,aAAa,IAAI,CAACF,eAAlB,IAAqC,CAACC,gBAA1C,EAA4D;IAC1DY,kBAAkB,GAAG,QAArB;EACD,CAFD,MAEO;IACLA,kBAAkB,GAAG,eAArB;EACD;;EAED,IAAIR,UAAU,KAAK,CAAnB,EAAsB;IACpBS,UAAU,GAAGL,UAAU,CAACM,MAAxB;EACD,CAFD,MAEO,IAAIV,UAAU,KAAK,CAAnB,EAAsB;IAC3BS,UAAU,GAAGL,UAAU,CAACO,SAAxB;EACD,CAFM,MAEA;IACLF,UAAU,GAAGL,UAAU,CAACQ,SAAxB;EACD;;EAED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E,SAAS,EAAExB,UAAU,KAAK,CAAf,GAAmB,CAAnB,GAAuB,IAAI;IAJjC;EADT,gBAQE,oBAAC,IAAD;IACE,aAAa,EAAE,CADjB;IAEE,KAAK,EAAE,CAACI,UAAU,CAACsB,KAAZ,EAAmB;MAAEX,KAAK,EAAEb,MAAM,CAACyB;IAAhB,CAAnB;EAFT,GAIGhC,eAJH,CARF,EAcGC,gBAAgB,gBACf,oBAAC,IAAD;IAAM,aAAa,EAAE,CAArB;IAAwB,KAAK,EAAEiB;EAA/B,GACGjB,gBADH,CADe,GAIb,IAlBN,CADc,GAqBZ,IApDN,CADF,CADF;AA0DD,CA9FD;;AAgGA,eAAeP,SAAS,CAACE,SAAD,CAAxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","color","Image","Card","Elevation","withTheme","Config","ICON_CONTAINER_SIZE","cardIconSize","ICON_CONTAINER_PADDING","CardContainer","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","textCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","textJustification","titleStyle","headline6","headline5","borderRadius","overflow","backgroundColor","surface","uri","padding","flexDirection","alignItems","justifyContent","strong","marginTop","body2","medium","subtitle2","light","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string"],"sources":["CardContainer.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n ImageSourcePropType,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Config from \"./Config\";\nimport { justificationType } from \"./Justification\";\n\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n textCentered: boolean;\n icon?: string;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n} & IconSlot;\n\nconst CardContainer: React.FC<Props
|
|
1
|
+
{"version":3,"names":["React","View","Text","color","Image","Card","Elevation","withTheme","Config","ICON_CONTAINER_SIZE","cardIconSize","ICON_CONTAINER_PADDING","CardContainer","Icon","icon","image","cardImageUrl","title","leftDescription","rightDescription","textCentered","aspectRatio","elevation","numColumns","theme","colors","roundness","typography","style","onPress","rest","textJustification","titleStyle","headline6","headline5","borderRadius","overflow","backgroundColor","surface","uri","padding","flexDirection","alignItems","justifyContent","strong","marginTop","body2","medium","subtitle2","light","cardIconElevation","position","top","right","width","height","alpha","cardIconBackgroundOpacity","rgb","string"],"sources":["CardContainer.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n ImageSourcePropType,\n Text,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Image from \"./Image\";\nimport Card from \"./DeprecatedCardWrapper\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nimport Config from \"./Config\";\nimport { justificationType } from \"./Justification\";\n\nconst ICON_CONTAINER_SIZE = Config.cardIconSize * 2;\nconst ICON_CONTAINER_PADDING = Config.cardIconSize / 2 - 1;\n\ntype Props = {\n image?: string | ImageSourcePropType;\n title?: string;\n leftDescription?: string;\n rightDescription?: string;\n textCentered: boolean;\n icon?: string;\n aspectRatio?: number;\n elevation?: number;\n numColumns?: number;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress: () => void;\n} & IconSlot;\n\nconst CardContainer: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n image = Config.cardImageUrl,\n title,\n leftDescription,\n rightDescription,\n textCentered,\n aspectRatio = 1.5,\n elevation = 2,\n numColumns = 3,\n theme: { colors, roundness, typography },\n style,\n onPress,\n ...rest\n}) => {\n let textJustification: justificationType;\n\n let titleStyle;\n\n if (textCentered && !rightDescription) {\n textJustification = \"center\";\n } else {\n textJustification = \"space-between\";\n }\n\n switch (numColumns) {\n case 2:\n titleStyle = typography.headline6;\n break;\n case 3:\n titleStyle = typography.headline5;\n break;\n }\n\n return (\n <Card style={style} onPress={onPress} numColumns={numColumns} {...rest}>\n <Elevation style={{ elevation, borderRadius: roundness }}>\n <View\n style={{\n borderRadius: roundness,\n overflow: \"hidden\",\n backgroundColor: colors.surface,\n }}\n >\n <Image\n style={{ aspectRatio }}\n source={typeof image === \"string\" ? { uri: image } : image}\n resizeMode=\"cover\"\n />\n <View\n style={{\n padding: numColumns === 1 ? 8 : 16,\n }}\n >\n {title ? (\n <View\n style={{\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: textJustification,\n }}\n >\n <Text\n numberOfLines={1}\n style={[titleStyle, { color: colors.strong }]}\n >\n {title}\n </Text>\n </View>\n ) : null}\n {leftDescription ? (\n <View\n style={{\n flexDirection: \"row\",\n justifyContent: textJustification,\n alignItems: \"center\",\n marginTop: numColumns === 3 ? 4 : 4 / 2,\n }}\n >\n <Text\n numberOfLines={1}\n style={[typography.body2, { color: colors.medium }]}\n >\n {leftDescription}\n </Text>\n {rightDescription ? (\n <Text\n numberOfLines={1}\n style={[typography.subtitle2, { color: colors.light }]}\n >\n {rightDescription}\n </Text>\n ) : null}\n </View>\n ) : null}\n </View>\n {icon ? (\n <Elevation\n style={{\n elevation: Config.cardIconElevation,\n position: \"absolute\",\n top: 12,\n right: 12,\n width: ICON_CONTAINER_SIZE,\n height: ICON_CONTAINER_SIZE,\n padding: ICON_CONTAINER_PADDING,\n borderRadius: ICON_CONTAINER_SIZE,\n backgroundColor: color(colors.strong)\n .alpha(Config.cardIconBackgroundOpacity)\n .rgb()\n .string(),\n }}\n >\n <Icon\n name={icon}\n size={Config.cardIconSize}\n color={colors.surface}\n />\n </Elevation>\n ) : null}\n </View>\n </Elevation>\n </Card>\n );\n};\n\nexport default withTheme(CardContainer);\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,IADF,EAGEC,IAHF,QAMO,cANP;AAOA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,IAAP,MAAiB,yBAAjB;AACA,OAAOC,SAAP,MAAsB,aAAtB;AACA,SAASC,SAAT,QAA0B,YAA1B;AAIA,OAAOC,MAAP,MAAmB,UAAnB;AAGA,MAAMC,mBAAmB,GAAGD,MAAM,CAACE,YAAP,GAAsB,CAAlD;AACA,MAAMC,sBAAsB,GAAGH,MAAM,CAACE,YAAP,GAAsB,CAAtB,GAA0B,CAAzD;;AAiBA,MAAME,aAAuD,GAAG,QAe1D;EAAA,IAf2D;IAC/DC,IAD+D;IAE/DC,IAF+D;IAG/DC,KAAK,GAAGP,MAAM,CAACQ,YAHgD;IAI/DC,KAJ+D;IAK/DC,eAL+D;IAM/DC,gBAN+D;IAO/DC,YAP+D;IAQ/DC,WAAW,GAAG,GARiD;IAS/DC,SAAS,GAAG,CATmD;IAU/DC,UAAU,GAAG,CAVkD;IAW/DC,KAAK,EAAE;MAAEC,MAAF;MAAUC,SAAV;MAAqBC;IAArB,CAXwD;IAY/DC,KAZ+D;IAa/DC,OAb+D;IAc/D,GAAGC;EAd4D,CAe3D;EACJ,IAAIC,iBAAJ;EAEA,IAAIC,UAAJ;;EAEA,IAAIZ,YAAY,IAAI,CAACD,gBAArB,EAAuC;IACrCY,iBAAiB,GAAG,QAApB;EACD,CAFD,MAEO;IACLA,iBAAiB,GAAG,eAApB;EACD;;EAED,QAAQR,UAAR;IACE,KAAK,CAAL;MACES,UAAU,GAAGL,UAAU,CAACM,SAAxB;MACA;;IACF,KAAK,CAAL;MACED,UAAU,GAAGL,UAAU,CAACO,SAAxB;MACA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