repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 8.24 kB
JSON
{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport * as React from 'react';\nimport Animated from \"react-native-web/dist/exports/Animated\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport AnimatedText from \"../../Typography/AnimatedText\";\nvar LabelBackground = function LabelBackground(_ref) {\n var labeled = _ref.labeled,\n labelLayoutWidth = _ref.labelLayoutWidth,\n labelLayoutHeight = _ref.labelLayoutHeight,\n placeholderStyle = _ref.placeholderStyle,\n baseLabelTranslateX = _ref.baseLabelTranslateX,\n topPosition = _ref.topPosition,\n backgroundColor = _ref.backgroundColor,\n roundness = _ref.roundness,\n labelStyle = _ref.labelStyle,\n maxFontSizeMultiplier = _ref.maxFontSizeMultiplier,\n testID = _ref.testID;\n var opacity = labeled.interpolate({\n inputRange: [0, 0.6],\n outputRange: [1, 0]\n });\n var labelTranslationX = {\n translateX: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [-baseLabelTranslateX, 0]\n })\n };\n var labelTextScaleY = {\n scaleY: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [0.2, 1]\n })\n };\n var labelTextTransform = [].concat(_toConsumableArray(labelStyle.transform), [labelTextScaleY]);\n var isRounded = roundness > 6;\n var roundedEdgeCover = isRounded ? React.createElement(Animated.View, {\n key: \"labelBackground-view\",\n pointerEvents: \"none\",\n style: [StyleSheet.absoluteFill, styles.view, {\n backgroundColor: backgroundColor,\n maxHeight: Math.max(roundness / 3, 2),\n bottom: Math.max(roundness, 2),\n transform: [labelTranslationX],\n opacity: opacity\n }]\n }) : null;\n return [roundedEdgeCover, React.createElement(AnimatedText, {\n key: \"labelBackground-text\",\n testID: `${testID}-label-background`,\n style: [placeholderStyle, labelStyle, styles.outlinedLabel, {\n top: topPosition + 1,\n width: labelLayoutWidth - placeholderStyle.paddingHorizontal,\n height: labelLayoutHeight,\n backgroundColor: backgroundColor,\n opacity: opacity,\n transform: labelTextTransform\n }],\n numberOfLines: 1,\n maxFontSizeMultiplier: maxFontSizeMultiplier\n })];\n};\nexport default LabelBackground;\nvar styles = StyleSheet.create({\n view: {\n position: 'absolute',\n top: 6,\n left: 10,\n width: 12\n },\n outlinedLabel: {\n position: 'absolute',\n left: 8,\n paddingHorizontal: 0,\n color: 'transparent'\n }\n});","map":{"version":3,"names":["React","Animated","StyleSheet","AnimatedText","LabelBackground","_ref","labeled","labelLayoutWidth","labelLayoutHeight","placeholderStyle","baseLabelTranslateX","topPosition","backgroundColor","roundness","labelStyle","maxFontSizeMultiplier","testID","opacity","interpolate","inputRange","outputRange","labelTranslationX","translateX","labelTextScaleY","scaleY","labelTextTransform","concat","_toConsumableArray","transform","isRounded","roundedEdgeCover","createElement","View","key","pointerEvents","style","absoluteFill","styles","view","maxHeight","Math","max","bottom","outlinedLabel","top","width","paddingHorizontal","height","numberOfLines","create","position","left","color"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/TextInput/Label/LabelBackground.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated, StyleSheet } from 'react-native';\n\nimport AnimatedText from '../../Typography/AnimatedText';\nimport type { LabelBackgroundProps } from '../types';\n\nconst LabelBackground = ({\n labeled,\n labelLayoutWidth,\n labelLayoutHeight,\n placeholderStyle,\n baseLabelTranslateX,\n topPosition,\n backgroundColor,\n roundness,\n labelStyle,\n maxFontSizeMultiplier,\n testID,\n}: LabelBackgroundProps) => {\n const opacity = labeled.interpolate({\n inputRange: [0, 0.6],\n outputRange: [1, 0],\n });\n\n const labelTranslationX = {\n translateX: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [-baseLabelTranslateX, 0],\n }),\n };\n\n const labelTextScaleY = {\n scaleY: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [0.2, 1],\n }),\n };\n\n const labelTextTransform = [...labelStyle.transform, labelTextScaleY];\n\n const isRounded = roundness > 6;\n const roundedEdgeCover = isRounded ? (\n <Animated.View\n key=\"labelBackground-view\"\n pointerEvents=\"none\"\n style={[\n StyleSheet.absoluteFill,\n styles.view,\n {\n backgroundColor,\n maxHeight: Math.max(roundness / 3, 2),\n bottom: Math.max(roundness, 2),\n transform: [labelTranslationX],\n opacity,\n },\n ]}\n />\n ) : null;\n\n return [\n roundedEdgeCover,\n <AnimatedText\n key=\"labelBackground-text\"\n testID={`${testID}-label-background`}\n style={[\n placeholderStyle,\n labelStyle,\n styles.outlinedLabel,\n {\n top: topPosition + 1,\n width: labelLayoutWidth - placeholderStyle.paddingHorizontal,\n height: labelLayoutHeight,\n backgroundColor,\n opacity,\n transform: labelTextTransform,\n },\n ]}\n numberOfLines={1}\n maxFontSizeMultiplier={maxFontSizeMultiplier}\n />,\n ];\n};\n\nexport default LabelBackground;\n\nconst styles = StyleSheet.create({\n view: {\n position: 'absolute',\n top: 6,\n left: 10,\n width: 12,\n },\n // eslint-disable-next-line react-native/no-color-literals\n outlinedLabel: {\n position: 'absolute',\n left: 8,\n paddingHorizontal: 0,\n color: 'transparent',\n },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAG9B,OAAOC,YAAY;AAGnB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAYO;EAAA,IAX1BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAChBC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IACjBC,gBAAgB,GAAAJ,IAAA,CAAhBI,gBAAgB;IAChBC,mBAAmB,GAAAL,IAAA,CAAnBK,mBAAmB;IACnBC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IACXC,eAAe,GAAAP,IAAA,CAAfO,eAAe;IACfC,SAAS,GAAAR,IAAA,CAATQ,SAAS;IACTC,UAAU,GAAA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