UNPKG

repoweaver

Version:

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

1 lines 9.97 kB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"title\", \"theme\", \"style\", \"showDivider\", \"titleMaxFontSizeMultiplier\"];\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\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 { MD3Colors } from \"../../styles/themes/v3/tokens\";\nimport Divider from \"../Divider\";\nimport Text from \"../Typography/Text\";\nvar DrawerSection = function DrawerSection(_ref) {\n var children = _ref.children,\n title = _ref.title,\n themeOverrides = _ref.theme,\n style = _ref.style,\n _ref$showDivider = _ref.showDivider,\n showDivider = _ref$showDivider === void 0 ? true : _ref$showDivider,\n titleMaxFontSizeMultiplier = _ref.titleMaxFontSizeMultiplier,\n rest = _objectWithoutProperties(_ref, _excluded);\n var theme = useInternalTheme(themeOverrides);\n var isV3 = theme.isV3;\n var titleColor = isV3 ? theme.colors.onSurfaceVariant : color(theme.colors.text).alpha(0.54).rgb().string();\n var titleMargin = isV3 ? 28 : 16;\n var font = isV3 ? theme.fonts.titleSmall : theme.fonts.medium;\n return React.createElement(View, _extends({\n style: [styles.container, style]\n }, rest), title && React.createElement(View, {\n style: [styles.titleContainer, isV3 && styles.v3TitleContainer]\n }, title && React.createElement(Text, {\n variant: \"titleSmall\",\n numberOfLines: 1,\n style: [_objectSpread({\n color: titleColor,\n marginLeft: titleMargin\n }, font)],\n maxFontSizeMultiplier: titleMaxFontSizeMultiplier\n }, title)), children, showDivider && React.createElement(Divider, _extends({}, isV3 && {\n horizontalInset: true,\n bold: true\n }, {\n style: [styles.divider, isV3 && styles.v3Divider],\n theme: theme\n })));\n};\nDrawerSection.displayName = 'Drawer.Section';\nvar styles = StyleSheet.create({\n container: {\n marginBottom: 4\n },\n titleContainer: {\n height: 40,\n justifyContent: 'center'\n },\n v3TitleContainer: {\n height: 56\n },\n divider: {\n marginTop: 4\n },\n v3Divider: {\n backgroundColor: MD3Colors.neutralVariant50\n }\n});\nexport default DrawerSection;","map":{"version":3,"names":["React","StyleSheet","View","color","useInternalTheme","MD3Colors","Divider","Text","DrawerSection","_ref","children","title","themeOverrides","theme","style","_ref$showDivider","showDivider","titleMaxFontSizeMultiplier","rest","_objectWithoutProperties","_excluded","isV3","titleColor","colors","onSurfaceVariant","text","alpha","rgb","string","titleMargin","font","fonts","titleSmall","medium","createElement","_extends","styles","container","titleContainer","v3TitleContainer","variant","numberOfLines","_objectSpread","marginLeft","maxFontSizeMultiplier","horizontalInset","bold","divider","v3Divider","displayName","create","marginBottom","height","justifyContent","marginTop","backgroundColor","neutralVariant50"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Drawer/DrawerSection.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 { MD3Colors } from '../../styles/themes/v3/tokens';\nimport type { ThemeProp } from '../../types';\nimport Divider from '../Divider';\nimport Text from '../Typography/Text';\n\nexport type Props = React.ComponentPropsWithRef<typeof View> & {\n /**\n * Title to show as the header for the section.\n */\n title?: string;\n /**\n * Content of the `Drawer.Section`.\n */\n children: React.ReactNode;\n /**\n * Whether to show `Divider` at the end of the section. True by default.\n */\n showDivider?: boolean;\n /**\n * Specifies the largest possible scale a title font can reach.\n */\n titleMaxFontSizeMultiplier?: number;\n style?: StyleProp<ViewStyle>;\n /**\n * @optional\n */\n theme?: ThemeProp;\n};\n\n/**\n * A component to group content inside a navigation drawer.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Drawer } from 'react-native-paper';\n *\n * const MyComponent = () => {\n * const [active, setActive] = React.useState('');\n *\n * return (\n * <Drawer.Section title=\"Some title\">\n * <Drawer.Item\n * label=\"First Item\"\n * active={active === 'first'}\n * onPress={() => setActive('first')}\n * />\n * <Drawer.Item\n * label=\"Second Item\"\n * active={active === 'second'}\n * onPress={() => setActive('second')}\n * />\n * </Drawer.Section>\n * );\n * };\n *\n * export default MyComponent;\n * ```\n */\nconst DrawerSection = ({\n children,\n title,\n theme: themeOverrides,\n style,\n showDivider = true,\n titleMaxFontSizeMultiplier,\n ...rest\n}: Props) => {\n const theme = useInternalTheme(themeOverrides);\n const { isV3 } = theme;\n const titleColor = isV3\n ? theme.colors.onSurfaceVariant\n : color(theme.colors.text).alpha(0.54).rgb().string();\n const titleMargin = isV3 ? 28 : 16;\n const font = isV3 ? theme.fonts.titleSmall : theme.fonts.medium;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {title && (\n <View style={[styles.titleContainer, isV3 && styles.v3TitleContainer]}>\n {title && (\n <Text\n variant=\"titleSmall\"\n numberOfLines={1}\n style={[\n {\n color: titleColor,\n marginLeft: titleMargin,\n ...font,\n },\n ]}\n maxFontSizeMultiplier={titleMaxFontSizeMultiplier}\n >\n {title}\n </Text>\n )}\n </View>\n )}\n {children}\n {showDivider && (\n <Divider\n {...(isV3 && { horizontalInset: true, bold: true })}\n style={[styles.divider, isV3 && styles.v3Divider]}\n theme={theme}\n />\n )}\n </View>\n );\n};\n\nDrawerSection.displayName = 'Drawer.Section';\n\nconst styles = StyleSheet.create({\n container: {\n marginBottom: 4,\n },\n titleContainer: {\n height: 40,\n justifyContent: 'center',\n },\n v3TitleContainer: {\n height: 56,\n },\n divider: {\n marginTop: 4,\n },\n v3Divider: {\n backgroundColor: MD3Colors.neutralVariant50,\n },\n});\n\nexport default DrawerSection;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAG9B,OAAOC,KAAK,MAAM,OAAO;AAEzB,SAASC,gBAAgB;AACzB,SAASC,SAAS;AAElB,OAAOC,OAAO;AACd,OAAOC,IAAI;AAwDX,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAQN;EAAA,IAPXC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACEC,cAAc,GAAAH,IAAA,CAArBI,KAAK;IACLC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAAC,gBAAA,GAAAN,IAAA,CACLO,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,IAAI,GAAAA,gBAAA;IAClBE,0BAA0B,GAAAR,IAAA,CAA1BQ,0BAA0B;IACvBC,IAAA,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAEH,IAAMP,KAAK,GAAGT,gBAAgB,CAACQ,cAAc,CAAC;EAC9C,IAAQS,IAAA,GAASR,KAAK,CAAdQ,IAAA;EACR,IAAMC,UAAU,GAAGD,IAAI,GACnBR,KAAK,CAACU,MAAM,CAACC,gBA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