repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 5.05 kB
JSON
{"ast":null,"code":"import * as React from 'react';\nimport Animated from \"react-native-web/dist/exports/Animated\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport { useInternalTheme } from \"../../../core/theming\";\nexport var Underline = function Underline(_ref) {\n var parentState = _ref.parentState,\n error = _ref.error,\n colors = _ref.colors,\n activeColor = _ref.activeColor,\n underlineColorCustom = _ref.underlineColorCustom,\n hasActiveOutline = _ref.hasActiveOutline,\n style = _ref.style,\n themeOverrides = _ref.theme;\n var _useInternalTheme = useInternalTheme(themeOverrides),\n isV3 = _useInternalTheme.isV3;\n var backgroundColor = parentState.focused ? activeColor : underlineColorCustom;\n if (error) backgroundColor = colors === null || colors === void 0 ? void 0 : colors.error;\n var activeScale = isV3 ? 2 : 1;\n return React.createElement(Animated.View, {\n testID: \"text-input-underline\",\n style: [styles.underline, isV3 && styles.md3Underline, {\n backgroundColor: backgroundColor,\n transform: [{\n scaleY: (isV3 ? hasActiveOutline : parentState.focused) ? activeScale : 0.5\n }]\n }, style]\n });\n};\nvar styles = StyleSheet.create({\n underline: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n zIndex: 1\n },\n md3Underline: {\n height: 1\n }\n});","map":{"version":3,"names":["React","Animated","StyleSheet","useInternalTheme","Underline","_ref","parentState","error","colors","activeColor","underlineColorCustom","hasActiveOutline","style","themeOverrides","theme","_useInternalTheme","isV3","backgroundColor","focused","activeScale","createElement","View","testID","styles","underline","md3Underline","transform","scaleY","create","position","left","right","bottom","height","zIndex"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/TextInput/Addons/Underline.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated, StyleSheet, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ThemeProp } from 'src/types';\n\nimport { useInternalTheme } from '../../../core/theming';\n\ntype UnderlineProps = {\n parentState: {\n focused: boolean;\n };\n error?: boolean;\n colors?: {\n error?: string;\n };\n activeColor: string;\n underlineColorCustom?: string;\n hasActiveOutline?: boolean;\n style?: StyleProp<ViewStyle>;\n theme?: ThemeProp;\n};\n\nexport const Underline = ({\n parentState,\n error,\n colors,\n activeColor,\n underlineColorCustom,\n hasActiveOutline,\n style,\n theme: themeOverrides,\n}: UnderlineProps) => {\n const { isV3 } = useInternalTheme(themeOverrides);\n\n let backgroundColor = parentState.focused\n ? activeColor\n : underlineColorCustom;\n\n if (error) backgroundColor = colors?.error;\n\n const activeScale = isV3 ? 2 : 1;\n\n return (\n <Animated.View\n testID=\"text-input-underline\"\n style={[\n styles.underline,\n isV3 && styles.md3Underline,\n {\n backgroundColor,\n // Underlines is thinner when input is not focused\n transform: [\n {\n scaleY: (isV3 ? hasActiveOutline : parentState.focused)\n ? activeScale\n : 0.5,\n },\n ],\n },\n style,\n ]}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n underline: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n zIndex: 1,\n },\n md3Underline: {\n height: 1,\n },\n});\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAK9B,SAASC,gBAAgB;AAiBzB,OAAO,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EASA;EAAA,IARpBC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,oBAAoB,GAAAL,IAAA,CAApBK,oBAAoB;IACpBC,gBAAgB,GAAAN,IAAA,CAAhBM,gBAAgB;IAChBC,KAAK,GAAAP,IAAA,CAALO,KAAK;IACEC,cAAA,GAAAR,IAAA,CAAPS,KAAK;EAEL,IAAAC,iBA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