UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 7.3 kB
{"ast":null,"code":"import StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport color from 'color';\nexport const getLeftStyles = (alignToTop, description, isV3) => {\n const stylesV3 = {\n marginRight: 0,\n marginLeft: 16,\n alignSelf: alignToTop ? 'flex-start' : 'center'\n };\n if (!description) {\n return Object.assign({}, styles.iconMarginLeft, styles.marginVerticalNone, isV3 && Object.assign({}, stylesV3));\n }\n if (!isV3) {\n return styles.iconMarginLeft;\n }\n return Object.assign({}, styles.iconMarginLeft, stylesV3);\n};\nexport const getRightStyles = (alignToTop, description, isV3) => {\n const stylesV3 = {\n marginLeft: 16,\n alignSelf: alignToTop ? 'flex-start' : 'center'\n };\n if (!description) {\n return Object.assign({}, styles.iconMarginRight, styles.marginVerticalNone, isV3 && Object.assign({}, stylesV3));\n }\n if (!isV3) {\n return styles.iconMarginRight;\n }\n return Object.assign({}, styles.iconMarginRight, stylesV3);\n};\nconst styles = StyleSheet.create({\n marginVerticalNone: {\n marginVertical: 0\n },\n iconMarginLeft: {\n marginLeft: 0,\n marginRight: 16\n },\n iconMarginRight: {\n marginRight: 0\n }\n});\nexport const getAccordionColors = ({\n theme,\n isExpanded,\n customRippleColor\n}) => {\n var _theme$colors;\n const titleColor = theme.isV3 ? theme.colors.onSurface : color(theme.colors.text).alpha(0.87).rgb().string();\n const descriptionColor = theme.isV3 ? theme.colors.onSurfaceVariant : color(theme.colors.text).alpha(0.54).rgb().string();\n const titleTextColor = isExpanded ? (_theme$colors = theme.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary : titleColor;\n const rippleColor = customRippleColor || color(titleTextColor).alpha(0.12).rgb().string();\n return {\n titleColor,\n descriptionColor,\n titleTextColor,\n rippleColor\n };\n};","map":{"version":3,"names":["color","getLeftStyles","alignToTop","description","isV3","stylesV3","marginRight","marginLeft","alignSelf","Object","assign","styles","iconMarginLeft","marginVerticalNone","getRightStyles","iconMarginRight","StyleSheet","create","marginVertical","getAccordionColors","theme","isExpanded","customRippleColor","_theme$colors","titleColor","colors","onSurface","text","alpha","rgb","string","descriptionColor","onSurfaceVariant","titleTextColor","primary","rippleColor"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/List/utils.ts"],"sourcesContent":["import {\n FlexAlignType,\n ColorValue,\n StyleSheet,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport color from 'color';\nimport type { EllipsizeProp, InternalTheme, ThemeProp } from 'src/types';\n\ntype Description =\n | React.ReactNode\n | ((props: {\n selectable: boolean;\n ellipsizeMode: EllipsizeProp | undefined;\n color: string;\n fontSize: number;\n }) => React.ReactNode);\n\nexport type ListChildProps = {\n left?: React.ReactNode;\n right?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme?: ThemeProp;\n};\n\nexport type Style = {\n marginLeft?: number;\n marginRight?: number;\n marginVertical?: number;\n alignSelf?: FlexAlignType;\n};\n\nexport const getLeftStyles = (\n alignToTop: boolean,\n description: Description,\n isV3: boolean\n) => {\n const stylesV3 = {\n marginRight: 0,\n marginLeft: 16,\n alignSelf: alignToTop ? 'flex-start' : 'center',\n };\n\n if (!description) {\n return {\n ...styles.iconMarginLeft,\n ...styles.marginVerticalNone,\n ...(isV3 && { ...stylesV3 }),\n };\n }\n\n if (!isV3) {\n return styles.iconMarginLeft;\n }\n\n return {\n ...styles.iconMarginLeft,\n ...stylesV3,\n };\n};\n\nexport const getRightStyles = (\n alignToTop: boolean,\n description: Description,\n isV3: boolean\n) => {\n const stylesV3 = {\n marginLeft: 16,\n alignSelf: alignToTop ? 'flex-start' : 'center',\n };\n\n if (!description) {\n return {\n ...styles.iconMarginRight,\n ...styles.marginVerticalNone,\n ...(isV3 && { ...stylesV3 }),\n };\n }\n\n if (!isV3) {\n return styles.iconMarginRight;\n }\n\n return {\n ...styles.iconMarginRight,\n ...stylesV3,\n };\n};\n\nconst styles = StyleSheet.create({\n marginVerticalNone: { marginVertical: 0 },\n iconMarginLeft: { marginLeft: 0, marginRight: 16 },\n iconMarginRight: { marginRight: 0 },\n});\n\nexport const getAccordionColors = ({\n theme,\n isExpanded,\n customRippleColor,\n}: {\n theme: InternalTheme;\n isExpanded?: boolean;\n customRippleColor?: ColorValue;\n}) => {\n const titleColor = theme.isV3\n ? theme.colors.onSurface\n : color(theme.colors.text).alpha(0.87).rgb().string();\n\n const descriptionColor = theme.isV3\n ? theme.colors.onSurfaceVariant\n : color(theme.colors.text).alpha(0.54).rgb().string();\n\n const titleTextColor = isExpanded ? theme.colors?.primary : titleColor;\n\n const rippleColor =\n customRippleColor || color(titleTextColor).alpha(0.12).rgb().string();\n\n return {\n titleColor,\n descriptionColor,\n titleTextColor,\n rippleColor,\n };\n};\n"],"mappings":";AAQA,OAAOA,KAAK,MAAM,OAAO;AA0BzB,OAAO,MAAMC,aAAa,GAAGA,CAC3BC,UAAmB,EACnBC,WAAwB,EACxBC,IAAa,KACV;EACH,MAAMC,QAAQ,GAAG;IACfC,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAEN,UAAU,GAAG,YAAY,GAAG;EACzC,CAAC;EAED,IAAI,CAACC,WAAW,EAAE;IAChB,OAAAM,MAAA,CAAAC,MAAA,KACKC,MAAM,CAACC,cAAc,EACrBD,MAAM,CAACE,kBAAkB,EACxBT,IAAI,IAAAK,MAAA,CAAAC,MAAA,KAASL,QAAA,CAAU;EAE/B;EAEA,IAAI,CAACD,IAAI,EAAE;IACT,OAAOO,MAAM,CAACC,cAAc;EAC9B;EAEA,OAAAH,MAAA,CAAAC,MAAA,KACKC,MAAM,CAACC,cAAc,EACrBP,QAAA;AAEP,CAAC;AAED,OAAO,MAAMS,cAAc,GAAGA,CAC5BZ,UAAmB,EACnBC,WAAwB,EACxBC,IAAa,KACV;EACH,MAAMC,QAAQ,GAAG;IACfE,UAAU,EAAE,EAAE;IACdC,SAAS,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