You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nvar _excluded = [\"style\", \"iconStyle\", \"children\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nimport React, { PureComponent } from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport Text from \"react-native-web/dist/exports/Text\";\nimport TouchableHighlight from \"react-native-web/dist/exports/TouchableHighlight\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { pick, omit } from \"./object-utils\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nvar styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n padding: 8\n },\n touchable: {\n overflow: 'hidden'\n },\n icon: {\n marginRight: 10\n },\n text: {\n fontWeight: '600',\n backgroundColor: 'transparent'\n }\n});\nvar IOS7_BLUE = '#007AFF';\nvar TEXT_PROP_NAMES = ['ellipsizeMode', 'numberOfLines', 'textBreakStrategy', 'selectable', 'suppressHighlighting', 'allowFontScaling', 'adjustsFontSizeToFit', 'minimumFontScale'];\nvar TOUCHABLE_PROP_NAMES = ['accessible', 'accessibilityLabel', 'accessibilityHint', 'accessibilityComponentType', 'accessibilityRole', 'accessibilityStates', 'accessibilityTraits', 'onFocus', 'onBlur', 'disabled', 'onPress', 'onPressIn', 'onPressOut', 'onLayout', 'onLongPress', 'nativeID', 'testID', 'delayPressIn', 'delayPressOut', 'delayLongPress', 'activeOpacity', 'underlayColor', 'selectionColor', 'onShowUnderlay', 'onHideUnderlay', 'hasTVPreferredFocus', 'tvParallaxProperties'];\nexport default function createIconButtonComponent(Icon) {\n var _class;\n return _class = function (_PureComponent) {\n _inherits(IconButton, _PureComponent);\n var _super = _createSuper(IconButton);\n function IconButton() {\n _classCallCheck(this, IconButton);\n return _super.apply(this, arguments);\n }\n _createClass(IconButton, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n style = _this$props.style,\n iconStyle = _this$props.iconStyle,\n children = _this$props.children,\n restProps = _objectWithoutProperties(_this$props, _excluded);\n var iconProps = pick(restProps, TEXT_PROP_NAMES, 'style', 'name', 'size', 'color');\n var touchableProps = pick(restProps, TOUCHABLE_PROP_NAMES);\n var props = omit(restProps, Object.keys(iconProps), Object.keys(touchableProps), 'iconStyle', 'borderRadius', 'backgroundColor');\n iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;\n var colorStyle = pick(this.props, 'color');\n var blockStyle = pick(this.props, 'backgroundColor', 'borderRadius');\n return _jsx(TouchableHighlight, _objectSpread(_objectSpread({\n style: [styles.touchable, blockStyle]\n }, touchableProps), {}, {\n children: _jsxs(View, _objectSpread(_objectSpread({\n style: [styles.container, blockStyle, style]\n }, props), {}, {\n children: [_jsx(Icon, _objectSpread({}, iconProps)), typeof children === 'string' ? _jsx(Text, {\n style: [styles.text, colorStyle],\n selectable: false,\n children: children\n }) : children]\n }))\n }));\n }\n }]);\n return IconButton;\n }(PureComponent), _class.defaultProps = {\n backgroundColor: IOS7_BLUE,\n borderRadius: 5,\n color: 'white',\n size: 20\n }, _class;\n}","map":{"version":3,"names":["React","PureComponent","pick","omit","styles","StyleSheet","create","container","flexDirection","justifyContent","alignItems","padding","touchable","overflow","icon","marginRight","text","fontWeight","backgroundColor","IOS7_BLUE","TEXT_PROP_NAMES","TOUCHABLE_PROP_NAMES","createIconButtonComponent","Icon","props","style","iconStyle","children","restProps","iconProps","touchableProps","Object","keys","colorStyle","blockStyle","defaultProps","borderRadius","color","size"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/icon-button.js"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { StyleSheet, Text, TouchableHighlight, View } from 'react-native';\nimport { pick, omit } from './object-utils';\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n padding: 8,\n },\n touchable: {\n overflow: 'hidden',\n },\n icon: {\n marginRight: 10,\n },\n text: {\n fontWeight: '600',\n backgroundColor: 'transparent',\n },\n});\n\nconst IOS7_BLUE = '#007AFF';\n\nconst TEXT_PROP_NAMES = [\n 'ellipsizeMode',\n 'numberOfLines',\n 'textBreakStrategy',\n 'selectable',\n 'suppressHighlighting',\n 'allowFontScaling',\n 'adjustsFontSizeToFit',\n 'minimumFontScale',\n];\n\nconst TOUCHABLE_PROP_NAMES = [\n 'accessible',\n 'accessibilityLabel',\n 'accessibilityHint',\n 'accessibilityComponentType',\n 'accessibilityRole',\n 'accessibilityStates',\n 'accessibilityTraits',\n 'onFocus',\n 'onBlur',\n 'disabled',\n 'onPress',\n 'onPressIn',\n 'onPressOut',\n 'onLayout',\n 'onLongPress',\n 'nativeID',\n 'testID',\n 'delayPressIn',\n 'delayPressOut',\n 'delayLongPress',\n 'activeOpacity',\n 'underlayColor',\n 'selectionColor',\n 'onShowUnderlay',\n 'onHideUnderlay',\n 'hasTVPreferredFocus',\n 'tvParallaxProperties',\n];\n\nexport default function createIconButtonComponent(Icon) {\n return class IconButton extends PureComponent {\n static defaultProps = {\n backgroundColor: IOS7_BLUE,\n borderRadius: 5,\n color: 'white',\n size: 20,\n };\n\n render() {\n const { style, iconStyle, children, ...restProps } = this.props;\n\n const iconProps = pick(\n restProps,\n TEXT_PROP_NAMES,\n 'style',\n 'name',\n 'size',\n 'color'\n );\n const touchableProps = pick(restProps, TOUCHABLE_PROP_NAMES);\n const props = omit(\n restProps,\n Object.keys(iconProps),\n Object.keys(touchableProps),\n 'iconStyle',\n 'borderRadius',\n 'backgroundColor'\n );\n iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;\n\n const colorStyle = pick(this.props, 'color');\n const blockStyle = pick(this.props, 'backgroundColor', 'borderRadius');\n\n return (\n <TouchableHighlight\n style={[styles.touchable, blockStyle]}\n {...touchableProps}\n >\n <View style={[styles.container, blockStyle, style]} {...props}>\n <Icon {...iconProps} />\n {typeof children === 'string' ? (\n <Text style={[styles.text, colorStyle]} selectable={false}>\n {children}\n </Text>\n ) : (\n children\n )}\n </View>\n </TouchableHighlight>\n );\n }\n };\n}\n"],"mappings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