UNPKG

repoweaver

Version:

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

1 lines 6.21 kB
{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nconst _excluded = [\"leftInset\", \"horizontalInset\", \"style\", \"theme\", \"bold\"];\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nimport * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport color from 'color';\nimport { useInternalTheme } from \"../core/theming\";\nimport { black, white } from \"../styles/themes/v2/colors\";\nconst Divider = _ref => {\n let {\n leftInset,\n horizontalInset = false,\n style,\n theme: themeOverrides,\n bold = false\n } = _ref,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n const theme = useInternalTheme(themeOverrides);\n const {\n dark: isDarkTheme,\n isV3\n } = theme;\n const dividerColor = isV3 ? theme.colors.outlineVariant : color(isDarkTheme ? white : black).alpha(0.12).rgb().string();\n return React.createElement(View, _extends({}, rest, {\n style: [{\n height: StyleSheet.hairlineWidth,\n backgroundColor: dividerColor\n }, leftInset && (isV3 ? styles.v3LeftInset : styles.leftInset), isV3 && horizontalInset && styles.horizontalInset, isV3 && bold && styles.bold, style]\n }));\n};\nconst styles = StyleSheet.create({\n leftInset: {\n marginLeft: 72\n },\n v3LeftInset: {\n marginLeft: 16\n },\n horizontalInset: {\n marginLeft: 16,\n marginRight: 16\n },\n bold: {\n height: 1\n }\n});\nexport default Divider;","map":{"version":3,"names":["React","StyleSheet","View","color","useInternalTheme","black","white","Divider","_ref","leftInset","horizontalInset","style","theme","themeOverrides","bold","rest","_objectWithoutPropertiesLoose","_excluded","dark","isDarkTheme","isV3","dividerColor","colors","outlineVariant","alpha","rgb","string","createElement","_extends","height","hairlineWidth","backgroundColor","styles","v3LeftInset","create","marginLeft","marginRight"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Divider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport color from 'color';\n\nimport { useInternalTheme } from '../core/theming';\nimport { black, white } from '../styles/themes/v2/colors';\nimport type { $RemoveChildren, ThemeProp } from '../types';\n\nexport type Props = $RemoveChildren<typeof View> & {\n /**\n * @renamed Renamed from 'inset' to 'leftInset` in v5.x\n * Whether divider has a left inset.\n */\n leftInset?: boolean;\n /**\n * @supported Available in v5.x with theme version 3\n * Whether divider has a horizontal inset on both sides.\n */\n horizontalInset?: boolean;\n /**\n * @supported Available in v5.x with theme version 3\n * Whether divider should be bolded.\n */\n bold?: boolean;\n style?: StyleProp<ViewStyle>;\n /**\n * @optional\n */\n theme?: ThemeProp;\n};\n\n/**\n * A divider is a thin, lightweight separator that groups content in lists and page layouts.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { View } from 'react-native';\n * import { Divider, Text } from 'react-native-paper';\n *\n * const MyComponent = () => (\n * <View>\n * <Text>Lemon</Text>\n * <Divider />\n * <Text>Mango</Text>\n * <Divider />\n * </View>\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst Divider = ({\n leftInset,\n horizontalInset = false,\n style,\n theme: themeOverrides,\n bold = false,\n ...rest\n}: Props) => {\n const theme = useInternalTheme(themeOverrides);\n const { dark: isDarkTheme, isV3 } = theme;\n\n const dividerColor = isV3\n ? theme.colors.outlineVariant\n : color(isDarkTheme ? white : black)\n .alpha(0.12)\n .rgb()\n .string();\n\n return (\n <View\n {...rest}\n style={[\n { height: StyleSheet.hairlineWidth, backgroundColor: dividerColor },\n leftInset && (isV3 ? styles.v3LeftInset : styles.leftInset),\n isV3 && horizontalInset && styles.horizontalInset,\n isV3 && bold && styles.bold,\n style,\n ]}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n leftInset: {\n marginLeft: 72,\n },\n v3LeftInset: {\n marginLeft: 16,\n },\n horizontalInset: {\n marginLeft: 16,\n marginRight: 16,\n },\n bold: {\n height: 1,\n },\n});\n\nexport default Divider;\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAG9B,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,gBAAgB;AACzB,SAASC,KAAK,EAAEC,KAAK;AA+CrB,MAAMC,OAAO,GAAGC,IAAA,IAOH;EAAA,IAPI;MACfC,SAAS;MACTC,eAAe,GAAG,KAAK;MACvBC,KAAK;MACLC,KAAK,EAAEC,cAAc;MACrBC,IAAI,GAAG;IAEF,CAAC,GAAAN,IAAA;IADHO,IAAA,GAAAC,6BAAA,CAAAR,IAAA,EAAAS,SAAA;EAEH,MAAML,KAAK,GAAGR,gBAAgB,CAACS,cAAc,CAAC;EAC9C,MAAM;IAAEK,IAAI,EAAEC,WAAW;IAAEC;EAAK,CAAC,GAAGR,KAAK;EAEzC,MAAMS,YAAY,GAAGD,IAAI,GACrBR,KAAK,CAACU,MAAM,CAACC,cAAc,GAC3BpB,KAAK,CAACgB,WAAW,GAAGb,KAAK,GAAGD,KAAK,CAAC,CAC/BmB,KAAK,CAAC,IAAI,CAAC,CACXC,GAAG,CAAC,CAAC,CACLC,MAAM,CAAC,CAAC;EAEf,OACE1B,KAAA,CAAA2B,aAAA,CAACzB,IAAI,EAAA0B,QAAA,KACCb,IAAI;IACRJ,KAAK,EAAE,CACL;MAAEkB,MAAM,EAAE5B,UAAU,CAAC6B,aAAa;MAAEC,eAAe,EAAEV;IAAa,CAAC,EACnEZ,SAAS,KAAKW,IAAI,GAAGY,MAAM,CAACC,WAAW,GAAGD,MAAM,CAACvB,SAAS,CAAC,EAC3DW,IAAI,IAAIV,eAAe,IAAIsB,MAAM,CAACtB,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