@bigbinary/neetoui-rn 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ParentView.js +1 -1
- package/package.json +1 -1
package/components/ParentView.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ParentView=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _native=require("styled-components/native");var _Container=require("./Container");var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ParentView=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNativeSafeAreaContext=require("react-native-safe-area-context");var _native=require("styled-components/native");var _Container=require("./Container");var _excluded=["barStyle","children","backgroundColor","bg","topInset","rightInset","leftInset","bottomInset","shouldDismissKeyboardOnTap"];var _this=this,_jsxFileName="/home/runner/work/neeto-ui-rn/neeto-ui-rn/src/components/ParentView.jsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ParentView=exports.ParentView=function ParentView(_ref){var _ref$barStyle=_ref.barStyle,barStyle=_ref$barStyle===void 0?"light-content":_ref$barStyle,children=_ref.children,backgroundColor=_ref.backgroundColor,bg=_ref.bg,_ref$topInset=_ref.topInset,topInset=_ref$topInset===void 0?true:_ref$topInset,_ref$rightInset=_ref.rightInset,rightInset=_ref$rightInset===void 0?true:_ref$rightInset,_ref$leftInset=_ref.leftInset,leftInset=_ref$leftInset===void 0?true:_ref$leftInset,_ref$bottomInset=_ref.bottomInset,bottomInset=_ref$bottomInset===void 0?true:_ref$bottomInset,_ref$shouldDismissKey=_ref.shouldDismissKeyboardOnTap,shouldDismissKeyboardOnTap=_ref$shouldDismissKey===void 0?true:_ref$shouldDismissKey,rest=(0,_objectWithoutProperties2.default)(_ref,_excluded);var theme=(0,_react.useContext)(_native.ThemeContext);var safeAreaViewProps={edges:[].concat((0,_toConsumableArray2.default)(topInset?["top"]:[]),(0,_toConsumableArray2.default)(rightInset?["right"]:[]),(0,_toConsumableArray2.default)(leftInset?["left"]:[]))};var newBackgroundColor=backgroundColor||bg||theme.colors.background.parentView;var statusBarColors={default:theme.colors.background.white,"dark-content":theme.colors.background.white,"light-content":theme.colors.background.base};var statusBarColor=statusBarColors[barStyle]||statusBarColors["default"];var insets=(0,_reactNativeSafeAreaContext.useSafeAreaInsets)();return _react.default.createElement(_reactNativeSafeAreaContext.SafeAreaView,(0,_extends2.default)({flex:1},safeAreaViewProps,{style:{backgroundColor:statusBarColor},__self:_this,__source:{fileName:_jsxFileName,lineNumber:70,columnNumber:5}}),_react.default.createElement(_reactNative.StatusBar,{backgroundColor:statusBarColor,barStyle:barStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:7}}),_react.default.createElement(_Container.Container,(0,_extends2.default)({},shouldDismissKeyboardOnTap?{onTouchStart:function onTouchStart(e){var focusedInput=_reactNative.TextInput.State.currentlyFocusedInput();if(focusedInput&&e.target!==focusedInput){_reactNative.Keyboard.dismiss();}}}:{},{backgroundColor:newBackgroundColor,flex:1},rest,bottomInset&&{pb:insets.bottom},{__self:_this,__source:{fileName:_jsxFileName,lineNumber:76,columnNumber:7}}),children));};ParentView.propTypes={barStyle:_propTypes.default.string,children:_propTypes.default.node,backgroundColor:_propTypes.default.string,bg:_propTypes.default.string,topInset:_propTypes.default.bool,rightInset:_propTypes.default.bool,leftInset:_propTypes.default.bool,bottomInset:_propTypes.default.bool,shouldDismissKeyboardOnTap:_propTypes.default.bool};
|