UNPKG

repoweaver

Version:

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

1 lines 4.23 kB
{"ast":null,"code":"import color from 'color';\nconst getUnderlayColor = ({\n theme,\n calculatedRippleColor,\n underlayColor\n}) => {\n if (underlayColor != null) {\n return underlayColor;\n }\n if (theme.isV3) {\n return color(calculatedRippleColor).rgb().string();\n }\n return color(calculatedRippleColor).fade(0.5).rgb().string();\n};\nconst getRippleColor = ({\n theme,\n rippleColor\n}) => {\n if (rippleColor) {\n return rippleColor;\n }\n if (theme.isV3) {\n return color(theme.colors.onSurface).alpha(0.12).rgb().string();\n }\n if (theme.dark) {\n return color(theme.colors.text).alpha(0.32).rgb().string();\n }\n return color(theme.colors.text).alpha(0.2).rgb().string();\n};\nexport const getTouchableRippleColors = ({\n theme,\n rippleColor,\n underlayColor\n}) => {\n const calculatedRippleColor = getRippleColor({\n theme,\n rippleColor\n });\n return {\n calculatedRippleColor,\n calculatedUnderlayColor: getUnderlayColor({\n theme,\n calculatedRippleColor,\n underlayColor\n })\n };\n};","map":{"version":3,"names":["color","getUnderlayColor","theme","calculatedRippleColor","underlayColor","isV3","rgb","string","fade","getRippleColor","rippleColor","colors","onSurface","alpha","dark","text","getTouchableRippleColors","calculatedUnderlayColor"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/TouchableRipple/utils.ts"],"sourcesContent":["import type { ColorValue } from 'react-native';\n\nimport color from 'color';\n\nimport type { InternalTheme } from '../../types';\n\nconst getUnderlayColor = ({\n theme,\n calculatedRippleColor,\n underlayColor,\n}: {\n theme: InternalTheme;\n calculatedRippleColor: ColorValue;\n underlayColor?: string;\n}) => {\n if (underlayColor != null) {\n return underlayColor;\n }\n\n if (theme.isV3) {\n return color(calculatedRippleColor).rgb().string();\n }\n\n return color(calculatedRippleColor).fade(0.5).rgb().string();\n};\n\nconst getRippleColor = ({\n theme,\n rippleColor,\n}: {\n theme: InternalTheme;\n rippleColor?: ColorValue;\n}) => {\n if (rippleColor) {\n return rippleColor;\n }\n\n if (theme.isV3) {\n return color(theme.colors.onSurface).alpha(0.12).rgb().string();\n }\n\n if (theme.dark) {\n return color(theme.colors.text).alpha(0.32).rgb().string();\n }\n return color(theme.colors.text).alpha(0.2).rgb().string();\n};\n\nexport const getTouchableRippleColors = ({\n theme,\n rippleColor,\n underlayColor,\n}: {\n theme: InternalTheme;\n rippleColor?: ColorValue;\n underlayColor?: string;\n}) => {\n const calculatedRippleColor = getRippleColor({ theme, rippleColor });\n return {\n calculatedRippleColor,\n calculatedUnderlayColor: getUnderlayColor({\n theme,\n calculatedRippleColor,\n underlayColor,\n }),\n };\n};\n"],"mappings":"AAEA,OAAOA,KAAK,MAAM,OAAO;AAIzB,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,KAAK;EACLC,qBAAqB;EACrBC;AAKF,CAAC,KAAK;EACJ,IAAIA,aAAa,IAAI,IAAI,EAAE;IACzB,OAAOA,aAAa;EACtB;EAEA,IAAIF,KAAK,CAACG,IAAI,EAAE;IACd,OAAOL,KAAK,CAACG,qBAAqB,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;EACpD;EAEA,OAAOP,KAAK,CAACG,qBAAqB,CAAC,CAACK,IAAI,CAAC,GAAG,CAAC,CAACF,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;AAC9D,CAAC;AAED,MAAME,cAAc,GAAGA,CAAC;EACtBP,KAAK;EACLQ;AAIF,CAAC,KAAK;EACJ,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW;EACpB;EAEA,IAAIR,KAAK,CAACG,IAAI,EAAE;IACd,OAAOL,KAAK,CAACE,KAAK,CAACS,MAAM,CAACC,SAAS,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC,CAACP,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;EACjE;EAEA,IAAIL,KAAK,CAACY,IAAI,EAAE;IACd,OAAOd,KAAK,CAACE,KAAK,CAACS,MAAM,CAACI,IAAI,CAAC,CAACF,KAAK,CAAC,IAAI,CAAC,CAACP,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;EAC5D;EACA,OAAOP,KAAK,CAACE,KAAK,CAACS,MAAM,CAACI,IAAI,CAAC,CAACF,KAAK,CAAC,GAAG,CAAC,CAACP,GAAG,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC;AAC3D,CAAC;AAED,OAAO,MAAMS,wBAAwB,GAAGA,CAAC;EACvCd,KAAK;EACLQ,WAAW;EACXN;AAKF,CAAC,KAAK;EACJ,MAAMD,qBAAqB,GAAGM,cAAc,CAAC;IAAEP,KAAK;IAAEQ;EAAY,CAAC,CAAC;EACpE,OAAO;IACLP,qBAAqB;IACrBc,uBAAuB,EAAEhB,gBAAgB,CAAC;MACxCC,KAAK;MACLC,qBAAqB;MACrBC;IACF,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}