Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@expo/react-native-action-sheet

Package Overview
Dependencies
Maintainers
26
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/react-native-action-sheet - npm Package Compare versions

Comparing version 3.12.0 to 3.13.0

15

CHANGELOG.md
# Changelog
# [3.13.0](https://github.com/expo/react-native-action-sheet/compare/v3.12.0...v3.13.0) (2022-01-10)
### Bug Fixes
* defer calling onSelect until after animation ([#248](https://github.com/expo/react-native-action-sheet/issues/248)) ([1fb3411](https://github.com/expo/react-native-action-sheet/commit/1fb3411f575b4fa1cb762a804fc38cf3e2a5c73b)), closes [#203](https://github.com/expo/react-native-action-sheet/issues/203)
* stabilize the identity of the context provider value ([#251](https://github.com/expo/react-native-action-sheet/issues/251)) ([55005ba](https://github.com/expo/react-native-action-sheet/commit/55005ba0fb4bc6aff546390cf324619bf2e0ed2a))
### Features
* support closing actionsheet with Esc key on web ([#247](https://github.com/expo/react-native-action-sheet/issues/247)) ([c4c3f8b](https://github.com/expo/react-native-action-sheet/commit/c4c3f8b873d76ff40daf8d2061d9f43346a3577f)), closes [#194](https://github.com/expo/react-native-action-sheet/issues/194)
# [3.12.0](https://github.com/expo/react-native-action-sheet/compare/v3.11.0...v3.12.0) (2021-10-14)

@@ -13,3 +26,3 @@

* adds support for disabledButtonIndicies ([#246](https://github.com/expo/react-native-action-sheet/issues/246)) ([feed1f7](https://github.com/expo/react-native-action-sheet/commit/feed1f78b4c85855d48c1742fe9f8a67c0604609)), closes [#224](https://github.com/expo/react-native-action-sheet/issues/224)
* adds support for disabledButtonIndices ([#246](https://github.com/expo/react-native-action-sheet/issues/246)) ([feed1f7](https://github.com/expo/react-native-action-sheet/commit/feed1f78b4c85855d48c1742fe9f8a67c0604609)), closes [#224](https://github.com/expo/react-native-action-sheet/issues/224)

@@ -16,0 +29,0 @@ # [3.11.0](https://github.com/expo/react-native-action-sheet/compare/v3.10.0...v3.11.0) (2021-09-07)

2

lib/commonjs/ActionSheet/ActionGroup.js

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _TouchableNativeFeedbackSafe=_interopRequireDefault(require("./TouchableNativeFeedbackSafe"));var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var focusViewOnRender=function focusViewOnRender(ref){if(ref){var reactTag=(0,_reactNative.findNodeHandle)(ref);if(reactTag){if(_reactNative.Platform.OS==='android'){_reactNative.UIManager.sendAccessibilityEvent(reactTag,_reactNative.UIManager.AccessibilityEventTypes.typeViewFocused);}else{_reactNative.AccessibilityInfo.setAccessibilityFocus(reactTag);}}}};var isIndexDestructive=function isIndexDestructive(index,destructiveIndex){if(Array.isArray(destructiveIndex)){return destructiveIndex.includes(index);}return index===destructiveIndex;};var isIndexDisabled=function isIndexDisabled(index){var disabledButtonIndices=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return disabledButtonIndices.includes(index);};var ActionGroup=function(_React$Component){(0,_inherits2.default)(ActionGroup,_React$Component);var _super=_createSuper(ActionGroup);function ActionGroup(){var _this;(0,_classCallCheck2.default)(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._renderRowSeparator=function(key){return React.createElement(_reactNative.View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.createElement(_reactNative.View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:95,columnNumber:9}},!!title&&React.createElement(_reactNative.Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:23}},title),!!message&&React.createElement(_reactNative.Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:97,columnNumber:25}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(_reactNative.Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:14}});}else{return React.createElement(_reactNative.View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:14}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,disabledButtonIndices=_this$props2.disabledButtonIndices,_this$props2$destruct=_this$props2.destructiveColor,destructiveColor=_this$props2$destruct===void 0?DESTRUCTIVE_COLOR:_this$props2$destruct,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,autoFocus=_this$props2.autoFocus,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=_TouchableNativeFeedbackSafe.default.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var disabled=isIndexDisabled(_i,disabledButtonIndices);var color=isIndexDestructive(_i,destructiveButtonIndex)?destructiveColor:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(_TouchableNativeFeedbackSafe.default,{ref:autoFocus&&_i===0?focusViewOnRender:undefined,key:_i,pressInDelay:0,background:nativeFeedbackBackground,disabled:disabled,onPress:function onPress(){return onSelect(_i);},style:[styles.button,disabled&&styles.disabledButton],accessibilityRole:"button",accessibilityLabel:options[_i],__source:{fileName:_jsxFileName,lineNumber:148,columnNumber:9}},_this._renderIconElement(iconSource,color),React.createElement(_reactNative.Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}(0,_createClass2.default)(ActionGroup,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:[styles.groupContainer,this.props.containerStyle],__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},this._renderTitleContent(),React.createElement(_reactNative.ScrollView,{__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:9}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);exports.default=ActionGroup;ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};var styles=_reactNative.StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},disabledButton:{opacity:0.5},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32,justifyContent:'center'},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _TouchableNativeFeedbackSafe=_interopRequireDefault(require("./TouchableNativeFeedbackSafe"));var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var focusViewOnRender=function focusViewOnRender(ref){if(ref){var reactTag=(0,_reactNative.findNodeHandle)(ref);if(reactTag){if(_reactNative.Platform.OS==='android'){_reactNative.UIManager.sendAccessibilityEvent(reactTag,_reactNative.UIManager.AccessibilityEventTypes.typeViewFocused);}else{_reactNative.AccessibilityInfo.setAccessibilityFocus(reactTag);}}}};var isIndexDestructive=function isIndexDestructive(index,destructiveIndex){if(Array.isArray(destructiveIndex)){return destructiveIndex.includes(index);}return index===destructiveIndex;};var isIndexDisabled=function isIndexDisabled(index){var disabledButtonIndices=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return disabledButtonIndices.includes(index);};var ActionGroup=function(_React$Component){(0,_inherits2.default)(ActionGroup,_React$Component);var _super=_createSuper(ActionGroup);function ActionGroup(){var _this;(0,_classCallCheck2.default)(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._renderRowSeparator=function(key){return React.createElement(_reactNative.View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.createElement(_reactNative.View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:95,columnNumber:9}},!!title&&React.createElement(_reactNative.Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:23}},title),!!message&&React.createElement(_reactNative.Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:97,columnNumber:25}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(_reactNative.Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:14}});}else{return React.createElement(_reactNative.View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:14}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,disabledButtonIndices=_this$props2.disabledButtonIndices,_this$props2$destruct=_this$props2.destructiveColor,destructiveColor=_this$props2$destruct===void 0?DESTRUCTIVE_COLOR:_this$props2$destruct,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,autoFocus=_this$props2.autoFocus,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=_TouchableNativeFeedbackSafe.default.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var disabled=isIndexDisabled(_i,disabledButtonIndices);var color=isIndexDestructive(_i,destructiveButtonIndex)?destructiveColor:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(_TouchableNativeFeedbackSafe.default,{ref:autoFocus&&_i===0?focusViewOnRender:undefined,key:_i,pressInDelay:0,background:nativeFeedbackBackground,disabled:disabled,onPress:function onPress(){return onSelect(_i);},style:[styles.button,disabled&&styles.disabledButton],accessibilityRole:"button",accessibilityLabel:options[_i],__source:{fileName:_jsxFileName,lineNumber:148,columnNumber:9}},_this._renderIconElement(iconSource,color),React.createElement(_reactNative.Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}(0,_createClass2.default)(ActionGroup,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:[styles.groupContainer,this.props.containerStyle],__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},this._renderTitleContent(),React.createElement(_reactNative.ScrollView,{__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:9}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);exports.default=ActionGroup;ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};var styles=_reactNative.StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},disabledButton:{opacity:0.5},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32,justifyContent:'center'},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
//# sourceMappingURL=ActionGroup.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){(0,_classCallCheck2.default)(this,ActionSheet);return _super.apply(this,arguments);}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{pointerEvents:this.props.pointerEvents,style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:7}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(dataOptions,onSelect){var cancelButtonIndex=dataOptions.cancelButtonIndex,destructiveButtonIndex=dataOptions.destructiveButtonIndex,options=dataOptions.options,tintColor=dataOptions.tintColor,disabledButtonIndices=dataOptions.disabledButtonIndices;var iosOptions={cancelButtonIndex:cancelButtonIndex,destructiveButtonIndex:destructiveButtonIndex,options:options,tintColor:tintColor,disabledButtonIndices:disabledButtonIndices,title:dataOptions.title||undefined,message:dataOptions.message||undefined,anchor:dataOptions.anchor||undefined,userInterfaceStyle:dataOptions.userInterfaceStyle||undefined};_reactNative.ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){(0,_classCallCheck2.default)(this,ActionSheet);return _super.apply(this,arguments);}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{pointerEvents:this.props.pointerEvents,style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:7}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(dataOptions,onSelect){var cancelButtonIndex=dataOptions.cancelButtonIndex,destructiveButtonIndex=dataOptions.destructiveButtonIndex,options=dataOptions.options,tintColor=dataOptions.tintColor,disabledButtonIndices=dataOptions.disabledButtonIndices;var iosOptions={cancelButtonIndex:cancelButtonIndex,destructiveButtonIndex:destructiveButtonIndex,options:options,tintColor:tintColor,disabledButtonIndices:disabledButtonIndices,title:dataOptions.title||undefined,message:dataOptions.message||undefined,anchor:dataOptions.anchor||undefined,userInterfaceStyle:dataOptions.userInterfaceStyle||undefined};_reactNative.ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;
//# sourceMappingURL=index.ios.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _ActionGroup=_interopRequireDefault(require("./ActionGroup"));var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/index.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=_reactNative.Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=_reactNative.Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){var _this;(0,_classCallCheck2.default)(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new _reactNative.Animated.Value(0),sheetOpacity:new _reactNative.Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferNextShow=_this.showActionSheetWithOptions.bind((0,_assertThisInitialized2.default)(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});_reactNative.BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return false;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}_reactNative.BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity,options=_this$state4.options;var useModal=options?options.autoFocus||options.useModal===true:false;var overlay=isVisible?React.createElement(_reactNative.Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:61,columnNumber:7}}):null;var appContent=React.createElement(_reactNative.View,{style:styles.flexContainer,importantForAccessibility:isVisible?'no-hide-descendants':'auto',__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},React.Children.only(this.props.children));return React.createElement(_reactNative.View,{pointerEvents:this.props.pointerEvents,style:styles.flexContainer,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:7}},appContent,isVisible&&!useModal&&React.createElement(React.Fragment,null,overlay,this._renderSheet()),isVisible&&useModal&&React.createElement(_reactNative.Modal,{animationType:"none",transparent:true,onRequestClose:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:90,columnNumber:11}},overlay,this._renderSheet()));}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,disabledButtonIndices=options.disabledButtonIndices,destructiveColor=options.destructiveColor,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,autoFocus=options.autoFocus,showSeparators=options.showSeparators,containerStyle=options.containerStyle,separatorStyle=options.separatorStyle;return React.createElement(_reactNative.TouchableWithoutFeedback,{importantForAccessibility:"yes",onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:7}},React.createElement(_reactNative.Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:9}},React.createElement(_reactNative.View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:11}},React.createElement(_ActionGroup.default,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,destructiveColor:destructiveColor,disabledButtonIndices:disabledButtonIndices,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,autoFocus:autoFocus,showSeparators:showSeparators,containerStyle:containerStyle,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:13}}))));}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;ActionSheet.defaultProps={useNativeDriver:true};var styles=_reactNative.StyleSheet.create({flexContainer:{flex:1},overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _ActionGroup=_interopRequireDefault(require("./ActionGroup"));var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=_reactNative.Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=_reactNative.Easing.out(EASING_OUT);var ESCAPE_KEY='Escape';var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){var _this;(0,_classCallCheck2.default)(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new _reactNative.Animated.Value(0),sheetOpacity:new _reactNative.Animated.Value(0)};_this._deferAfterAnimation=undefined;_this._handleWebKeyDown=function(event){if(event.key===ESCAPE_KEY&&_this.state.isVisible){event.preventDefault();_this._selectCancelButton();}};_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferAfterAnimation=_this.showActionSheetWithOptions.bind((0,_assertThisInitialized2.default)(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferAfterAnimation=undefined;}});_reactNative.BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return false;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}if(onSelect){_this._deferAfterAnimation=onSelect.bind((0,_assertThisInitialized2.default)(_this),index);}return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}_reactNative.BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferAfterAnimation){_this._deferAfterAnimation();}}});return true;};return _this;}(0,_createClass2.default)(ActionSheet,[{key:"componentDidMount",value:function componentDidMount(){if(_reactNative.Platform.OS==='web'){document.addEventListener('keydown',this._handleWebKeyDown);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(_reactNative.Platform.OS==='web'){document.removeEventListener('keydown',this._handleWebKeyDown);}}},{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity,options=_this$state4.options;var useModal=options?options.autoFocus||options.useModal===true:false;var overlay=isVisible?React.createElement(_reactNative.Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}}):null;var appContent=React.createElement(_reactNative.View,{style:styles.flexContainer,importantForAccessibility:isVisible?'no-hide-descendants':'auto',__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.Children.only(this.props.children));return React.createElement(_reactNative.View,{pointerEvents:this.props.pointerEvents,style:styles.flexContainer,__source:{fileName:_jsxFileName,lineNumber:102,columnNumber:7}},appContent,isVisible&&!useModal&&React.createElement(React.Fragment,null,overlay,this._renderSheet()),isVisible&&useModal&&React.createElement(_reactNative.Modal,{animationType:"none",transparent:true,onRequestClose:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:11}},overlay,this._renderSheet()));}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,disabledButtonIndices=options.disabledButtonIndices,destructiveColor=options.destructiveColor,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,autoFocus=options.autoFocus,showSeparators=options.showSeparators,containerStyle=options.containerStyle,separatorStyle=options.separatorStyle;return React.createElement(_reactNative.TouchableWithoutFeedback,{importantForAccessibility:"yes",onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:146,columnNumber:7}},React.createElement(_reactNative.Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:9}},React.createElement(_reactNative.View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:163,columnNumber:11}},React.createElement(_ActionGroup.default,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,destructiveColor:destructiveColor,disabledButtonIndices:disabledButtonIndices,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,autoFocus:autoFocus,showSeparators:showSeparators,containerStyle:containerStyle,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:164,columnNumber:13}}))));}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;ActionSheet.defaultProps={useNativeDriver:true};var styles=_reactNative.StyleSheet.create({flexContainer:{flex:1},overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var CustomTouchableOpacity=function(_React$Component){(0,_inherits2.default)(CustomTouchableOpacity,_React$Component);var _super=_createSuper(CustomTouchableOpacity);function CustomTouchableOpacity(){(0,_classCallCheck2.default)(this,CustomTouchableOpacity);return _super.apply(this,arguments);}(0,_createClass2.default)(CustomTouchableOpacity,[{key:"render",value:function render(){return React.createElement(_reactNative.TouchableOpacity,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:17,columnNumber:12}}),this.props.children);}}]);return CustomTouchableOpacity;}(React.Component);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=_reactNative.Platform.select({web:CustomTouchableOpacity,default:_reactNative.Platform.Version<=20?CustomTouchableOpacity:_reactNative.TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component2){(0,_inherits2.default)(TouchableNativeFeedbackSafe,_React$Component2);var _super2=_createSuper(TouchableNativeFeedbackSafe);function TouchableNativeFeedbackSafe(){(0,_classCallCheck2.default)(this,TouchableNativeFeedbackSafe);return _super2.apply(this,arguments);}(0,_createClass2.default)(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===_reactNative.TouchableNativeFeedback){return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}}),React.createElement(_reactNative.View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:11}},this.props.children));}return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:12}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);exports.default=TouchableNativeFeedbackSafe;TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var CustomTouchableOpacity=function(_React$Component){(0,_inherits2.default)(CustomTouchableOpacity,_React$Component);var _super=_createSuper(CustomTouchableOpacity);function CustomTouchableOpacity(){(0,_classCallCheck2.default)(this,CustomTouchableOpacity);return _super.apply(this,arguments);}(0,_createClass2.default)(CustomTouchableOpacity,[{key:"render",value:function render(){return React.createElement(_reactNative.TouchableOpacity,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:17,columnNumber:12}}),this.props.children);}}]);return CustomTouchableOpacity;}(React.Component);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=_reactNative.Platform.select({web:CustomTouchableOpacity,default:_reactNative.Platform.Version<=20?CustomTouchableOpacity:_reactNative.TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component2){(0,_inherits2.default)(TouchableNativeFeedbackSafe,_React$Component2);var _super2=_createSuper(TouchableNativeFeedbackSafe);function TouchableNativeFeedbackSafe(){(0,_classCallCheck2.default)(this,TouchableNativeFeedbackSafe);return _super2.apply(this,arguments);}(0,_createClass2.default)(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===_reactNative.TouchableNativeFeedback){return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}}),React.createElement(_reactNative.View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:11}},this.props.children));}return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:12}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);exports.default=TouchableNativeFeedbackSafe;TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;
//# sourceMappingURL=TouchableNativeFeedbackSafe.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _context=require("./context");var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheetProvider.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var ActionSheetProvider=function(_React$Component){(0,_inherits2.default)(ActionSheetProvider,_React$Component);var _super=_createSuper(ActionSheetProvider);function ActionSheetProvider(props){var _this;(0,_classCallCheck2.default)(this,ActionSheetProvider);_this=_super.call(this,props);_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}(0,_createClass2.default)(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(_context.Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:31,columnNumber:7}},React.createElement(_ActionSheet.default,{ref:this._actionSheetRef,useNativeDriver:this.props.useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:32,columnNumber:9}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);exports.default=ActionSheetProvider;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _context=require("./context");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var ActionSheetProvider=function(_React$Component){(0,_inherits2.default)(ActionSheetProvider,_React$Component);var _super=_createSuper(ActionSheetProvider);function ActionSheetProvider(props){var _this;(0,_classCallCheck2.default)(this,ActionSheetProvider);_this=_super.call(this,props);_this._actionSheetRef=React.createRef();_this._context={showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(_this._actionSheetRef.current!=null){_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};return _this;}(0,_createClass2.default)(ActionSheetProvider,[{key:"getContext",value:function getContext(){return this._context;}},{key:"render",value:function render(){return React.createElement(_context.Provider,{value:this._context,__source:{fileName:_jsxFileName,lineNumber:34,columnNumber:7}},React.createElement(_ActionSheet.default,{ref:this._actionSheetRef,useNativeDriver:this.props.useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:35,columnNumber:9}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);exports.default=ActionSheetProvider;
//# sourceMappingURL=ActionSheetProvider.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=connectActionSheet;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _hoistNonReactStatics=_interopRequireDefault(require("hoist-non-react-statics"));var React=_interopRequireWildcard(require("react"));var _context=require("./context");var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/connectActionSheet.tsx";function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(_context.Consumer,{__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:7}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,(0,_extends2.default)({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:15,columnNumber:13}}));});};return(0,_hoistNonReactStatics.default)(ConnectedActionSheet,WrappedComponent);}
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=connectActionSheet;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _hoistNonReactStatics=_interopRequireDefault(require("hoist-non-react-statics"));var React=_interopRequireWildcard(require("react"));var _context=require("./context");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/connectActionSheet.tsx";function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(_context.Consumer,{__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:7}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,(0,_extends2.default)({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:15,columnNumber:13}}));});};return(0,_hoistNonReactStatics.default)(ConnectedActionSheet,WrappedComponent);}
//# sourceMappingURL=connectActionSheet.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{AccessibilityInfo,findNodeHandle,Image,Platform,ScrollView,StyleSheet,Text,UIManager,View}from'react-native';import TouchableNativeFeedbackSafe from'./TouchableNativeFeedbackSafe';var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var focusViewOnRender=function focusViewOnRender(ref){if(ref){var reactTag=findNodeHandle(ref);if(reactTag){if(Platform.OS==='android'){UIManager.sendAccessibilityEvent(reactTag,UIManager.AccessibilityEventTypes.typeViewFocused);}else{AccessibilityInfo.setAccessibilityFocus(reactTag);}}}};var isIndexDestructive=function isIndexDestructive(index,destructiveIndex){if(Array.isArray(destructiveIndex)){return destructiveIndex.includes(index);}return index===destructiveIndex;};var isIndexDisabled=function isIndexDisabled(index){var disabledButtonIndices=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return disabledButtonIndices.includes(index);};var ActionGroup=function(_React$Component){_inherits(ActionGroup,_React$Component);var _super=_createSuper(ActionGroup);function ActionGroup(){var _this;_classCallCheck(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._renderRowSeparator=function(key){return React.createElement(View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(View,{__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.createElement(View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:95,columnNumber:9}},!!title&&React.createElement(Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:23}},title),!!message&&React.createElement(Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:97,columnNumber:25}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:14}});}else{return React.createElement(View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:14}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,disabledButtonIndices=_this$props2.disabledButtonIndices,_this$props2$destruct=_this$props2.destructiveColor,destructiveColor=_this$props2$destruct===void 0?DESTRUCTIVE_COLOR:_this$props2$destruct,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,autoFocus=_this$props2.autoFocus,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=TouchableNativeFeedbackSafe.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var disabled=isIndexDisabled(_i,disabledButtonIndices);var color=isIndexDestructive(_i,destructiveButtonIndex)?destructiveColor:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(TouchableNativeFeedbackSafe,{ref:autoFocus&&_i===0?focusViewOnRender:undefined,key:_i,pressInDelay:0,background:nativeFeedbackBackground,disabled:disabled,onPress:function onPress(){return onSelect(_i);},style:[styles.button,disabled&&styles.disabledButton],accessibilityRole:"button",accessibilityLabel:options[_i],__source:{fileName:_jsxFileName,lineNumber:148,columnNumber:9}},_this._renderIconElement(iconSource,color),React.createElement(Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}_createClass(ActionGroup,[{key:"render",value:function render(){return React.createElement(View,{style:[styles.groupContainer,this.props.containerStyle],__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},this._renderTitleContent(),React.createElement(ScrollView,{__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:9}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};export{ActionGroup as default};var styles=StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},disabledButton:{opacity:0.5},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32,justifyContent:'center'},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{AccessibilityInfo,findNodeHandle,Image,Platform,ScrollView,StyleSheet,Text,UIManager,View}from'react-native';import TouchableNativeFeedbackSafe from'./TouchableNativeFeedbackSafe';var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var focusViewOnRender=function focusViewOnRender(ref){if(ref){var reactTag=findNodeHandle(ref);if(reactTag){if(Platform.OS==='android'){UIManager.sendAccessibilityEvent(reactTag,UIManager.AccessibilityEventTypes.typeViewFocused);}else{AccessibilityInfo.setAccessibilityFocus(reactTag);}}}};var isIndexDestructive=function isIndexDestructive(index,destructiveIndex){if(Array.isArray(destructiveIndex)){return destructiveIndex.includes(index);}return index===destructiveIndex;};var isIndexDisabled=function isIndexDisabled(index){var disabledButtonIndices=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return disabledButtonIndices.includes(index);};var ActionGroup=function(_React$Component){_inherits(ActionGroup,_React$Component);var _super=_createSuper(ActionGroup);function ActionGroup(){var _this;_classCallCheck(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._renderRowSeparator=function(key){return React.createElement(View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(View,{__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.createElement(View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:95,columnNumber:9}},!!title&&React.createElement(Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:23}},title),!!message&&React.createElement(Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:97,columnNumber:25}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:14}});}else{return React.createElement(View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:114,columnNumber:14}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,disabledButtonIndices=_this$props2.disabledButtonIndices,_this$props2$destruct=_this$props2.destructiveColor,destructiveColor=_this$props2$destruct===void 0?DESTRUCTIVE_COLOR:_this$props2$destruct,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,autoFocus=_this$props2.autoFocus,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=TouchableNativeFeedbackSafe.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var disabled=isIndexDisabled(_i,disabledButtonIndices);var color=isIndexDestructive(_i,destructiveButtonIndex)?destructiveColor:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(TouchableNativeFeedbackSafe,{ref:autoFocus&&_i===0?focusViewOnRender:undefined,key:_i,pressInDelay:0,background:nativeFeedbackBackground,disabled:disabled,onPress:function onPress(){return onSelect(_i);},style:[styles.button,disabled&&styles.disabledButton],accessibilityRole:"button",accessibilityLabel:options[_i],__source:{fileName:_jsxFileName,lineNumber:148,columnNumber:9}},_this._renderIconElement(iconSource,color),React.createElement(Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:11}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}_createClass(ActionGroup,[{key:"render",value:function render(){return React.createElement(View,{style:[styles.groupContainer,this.props.containerStyle],__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},this._renderTitleContent(),React.createElement(ScrollView,{__source:{fileName:_jsxFileName,lineNumber:75,columnNumber:9}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};export{ActionGroup as default};var styles=StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},disabledButton:{opacity:0.5},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32,justifyContent:'center'},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
//# sourceMappingURL=ActionGroup.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{ActionSheetIOS,View}from'react-native';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){_classCallCheck(this,ActionSheet);return _super.apply(this,arguments);}_createClass(ActionSheet,[{key:"render",value:function render(){return React.createElement(View,{pointerEvents:this.props.pointerEvents,style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:7}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(dataOptions,onSelect){var cancelButtonIndex=dataOptions.cancelButtonIndex,destructiveButtonIndex=dataOptions.destructiveButtonIndex,options=dataOptions.options,tintColor=dataOptions.tintColor,disabledButtonIndices=dataOptions.disabledButtonIndices;var iosOptions={cancelButtonIndex:cancelButtonIndex,destructiveButtonIndex:destructiveButtonIndex,options:options,tintColor:tintColor,disabledButtonIndices:disabledButtonIndices,title:dataOptions.title||undefined,message:dataOptions.message||undefined,anchor:dataOptions.anchor||undefined,userInterfaceStyle:dataOptions.userInterfaceStyle||undefined};ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);export{ActionSheet as default};
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{ActionSheetIOS,View}from'react-native';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){_classCallCheck(this,ActionSheet);return _super.apply(this,arguments);}_createClass(ActionSheet,[{key:"render",value:function render(){return React.createElement(View,{pointerEvents:this.props.pointerEvents,style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:7}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(dataOptions,onSelect){var cancelButtonIndex=dataOptions.cancelButtonIndex,destructiveButtonIndex=dataOptions.destructiveButtonIndex,options=dataOptions.options,tintColor=dataOptions.tintColor,disabledButtonIndices=dataOptions.disabledButtonIndices;var iosOptions={cancelButtonIndex:cancelButtonIndex,destructiveButtonIndex:destructiveButtonIndex,options:options,tintColor:tintColor,disabledButtonIndices:disabledButtonIndices,title:dataOptions.title||undefined,message:dataOptions.message||undefined,anchor:dataOptions.anchor||undefined,userInterfaceStyle:dataOptions.userInterfaceStyle||undefined};ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);export{ActionSheet as default};
//# sourceMappingURL=index.ios.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/index.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{Animated,BackHandler,Easing,Modal,StyleSheet,TouchableWithoutFeedback,View}from'react-native';import ActionGroup from'./ActionGroup';var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){var _this;_classCallCheck(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new Animated.Value(0),sheetOpacity:new Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferNextShow=_this.showActionSheetWithOptions.bind(_assertThisInitialized(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);Animated.parallel([Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return false;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});Animated.parallel([Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}_createClass(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity,options=_this$state4.options;var useModal=options?options.autoFocus||options.useModal===true:false;var overlay=isVisible?React.createElement(Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:61,columnNumber:7}}):null;var appContent=React.createElement(View,{style:styles.flexContainer,importantForAccessibility:isVisible?'no-hide-descendants':'auto',__source:{fileName:_jsxFileName,lineNumber:73,columnNumber:7}},React.Children.only(this.props.children));return React.createElement(View,{pointerEvents:this.props.pointerEvents,style:styles.flexContainer,__source:{fileName:_jsxFileName,lineNumber:81,columnNumber:7}},appContent,isVisible&&!useModal&&React.createElement(React.Fragment,null,overlay,this._renderSheet()),isVisible&&useModal&&React.createElement(Modal,{animationType:"none",transparent:true,onRequestClose:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:90,columnNumber:11}},overlay,this._renderSheet()));}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,disabledButtonIndices=options.disabledButtonIndices,destructiveColor=options.destructiveColor,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,autoFocus=options.autoFocus,showSeparators=options.showSeparators,containerStyle=options.containerStyle,separatorStyle=options.separatorStyle;return React.createElement(TouchableWithoutFeedback,{importantForAccessibility:"yes",onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:7}},React.createElement(Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:9}},React.createElement(View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:142,columnNumber:11}},React.createElement(ActionGroup,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,destructiveColor:destructiveColor,disabledButtonIndices:disabledButtonIndices,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,autoFocus:autoFocus,showSeparators:showSeparators,containerStyle:containerStyle,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:13}}))));}}]);return ActionSheet;}(React.Component);ActionSheet.defaultProps={useNativeDriver:true};export{ActionSheet as default};var styles=StyleSheet.create({flexContainer:{flex:1},overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{Animated,BackHandler,Easing,Modal,Platform,StyleSheet,TouchableWithoutFeedback,View}from'react-native';import ActionGroup from'./ActionGroup';var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=Easing.out(EASING_OUT);var ESCAPE_KEY='Escape';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){var _this;_classCallCheck(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new Animated.Value(0),sheetOpacity:new Animated.Value(0)};_this._deferAfterAnimation=undefined;_this._handleWebKeyDown=function(event){if(event.key===ESCAPE_KEY&&_this.state.isVisible){event.preventDefault();_this._selectCancelButton();}};_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferAfterAnimation=_this.showActionSheetWithOptions.bind(_assertThisInitialized(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);Animated.parallel([Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferAfterAnimation=undefined;}});BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return false;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}if(onSelect){_this._deferAfterAnimation=onSelect.bind(_assertThisInitialized(_this),index);}return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});Animated.parallel([Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferAfterAnimation){_this._deferAfterAnimation();}}});return true;};return _this;}_createClass(ActionSheet,[{key:"componentDidMount",value:function componentDidMount(){if(Platform.OS==='web'){document.addEventListener('keydown',this._handleWebKeyDown);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){if(Platform.OS==='web'){document.removeEventListener('keydown',this._handleWebKeyDown);}}},{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity,options=_this$state4.options;var useModal=options?options.autoFocus||options.useModal===true:false;var overlay=isVisible?React.createElement(Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:82,columnNumber:7}}):null;var appContent=React.createElement(View,{style:styles.flexContainer,importantForAccessibility:isVisible?'no-hide-descendants':'auto',__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},React.Children.only(this.props.children));return React.createElement(View,{pointerEvents:this.props.pointerEvents,style:styles.flexContainer,__source:{fileName:_jsxFileName,lineNumber:102,columnNumber:7}},appContent,isVisible&&!useModal&&React.createElement(React.Fragment,null,overlay,this._renderSheet()),isVisible&&useModal&&React.createElement(Modal,{animationType:"none",transparent:true,onRequestClose:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:11}},overlay,this._renderSheet()));}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,disabledButtonIndices=options.disabledButtonIndices,destructiveColor=options.destructiveColor,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,autoFocus=options.autoFocus,showSeparators=options.showSeparators,containerStyle=options.containerStyle,separatorStyle=options.separatorStyle;return React.createElement(TouchableWithoutFeedback,{importantForAccessibility:"yes",onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:146,columnNumber:7}},React.createElement(Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:9}},React.createElement(View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:163,columnNumber:11}},React.createElement(ActionGroup,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,destructiveColor:destructiveColor,disabledButtonIndices:disabledButtonIndices,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,autoFocus:autoFocus,showSeparators:showSeparators,containerStyle:containerStyle,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:164,columnNumber:13}}))));}}]);return ActionSheet;}(React.Component);ActionSheet.defaultProps={useNativeDriver:true};export{ActionSheet as default};var styles=StyleSheet.create({flexContainer:{flex:1},overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{Platform,TouchableNativeFeedback,TouchableOpacity,View}from'react-native';var CustomTouchableOpacity=function(_React$Component){_inherits(CustomTouchableOpacity,_React$Component);var _super=_createSuper(CustomTouchableOpacity);function CustomTouchableOpacity(){_classCallCheck(this,CustomTouchableOpacity);return _super.apply(this,arguments);}_createClass(CustomTouchableOpacity,[{key:"render",value:function render(){return React.createElement(TouchableOpacity,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:17,columnNumber:12}}),this.props.children);}}]);return CustomTouchableOpacity;}(React.Component);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=Platform.select({web:CustomTouchableOpacity,default:Platform.Version<=20?CustomTouchableOpacity:TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component2){_inherits(TouchableNativeFeedbackSafe,_React$Component2);var _super2=_createSuper(TouchableNativeFeedbackSafe);function TouchableNativeFeedbackSafe(){_classCallCheck(this,TouchableNativeFeedbackSafe);return _super2.apply(this,arguments);}_createClass(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===TouchableNativeFeedback){return React.createElement(TouchableComponent,_extends({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}}),React.createElement(View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:11}},this.props.children));}return React.createElement(TouchableComponent,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:12}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;export{TouchableNativeFeedbackSafe as default};
import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{Platform,TouchableNativeFeedback,TouchableOpacity,View}from'react-native';var CustomTouchableOpacity=function(_React$Component){_inherits(CustomTouchableOpacity,_React$Component);var _super=_createSuper(CustomTouchableOpacity);function CustomTouchableOpacity(){_classCallCheck(this,CustomTouchableOpacity);return _super.apply(this,arguments);}_createClass(CustomTouchableOpacity,[{key:"render",value:function render(){return React.createElement(TouchableOpacity,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:17,columnNumber:12}}),this.props.children);}}]);return CustomTouchableOpacity;}(React.Component);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=Platform.select({web:CustomTouchableOpacity,default:Platform.Version<=20?CustomTouchableOpacity:TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component2){_inherits(TouchableNativeFeedbackSafe,_React$Component2);var _super2=_createSuper(TouchableNativeFeedbackSafe);function TouchableNativeFeedbackSafe(){_classCallCheck(this,TouchableNativeFeedbackSafe);return _super2.apply(this,arguments);}_createClass(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===TouchableNativeFeedback){return React.createElement(TouchableComponent,_extends({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}}),React.createElement(View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:11}},this.props.children));}return React.createElement(TouchableComponent,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:12}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;export{TouchableNativeFeedbackSafe as default};
//# sourceMappingURL=TouchableNativeFeedbackSafe.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/ActionSheetProvider.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import ActionSheet from'./ActionSheet';import{Provider}from'./context';var ActionSheetProvider=function(_React$Component){_inherits(ActionSheetProvider,_React$Component);var _super=_createSuper(ActionSheetProvider);function ActionSheetProvider(props){var _this;_classCallCheck(this,ActionSheetProvider);_this=_super.call(this,props);_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}_createClass(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:31,columnNumber:7}},React.createElement(ActionSheet,{ref:this._actionSheetRef,useNativeDriver:this.props.useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:32,columnNumber:9}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);export{ActionSheetProvider as default};
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";function _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);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import ActionSheet from'./ActionSheet';import{Provider}from'./context';var ActionSheetProvider=function(_React$Component){_inherits(ActionSheetProvider,_React$Component);var _super=_createSuper(ActionSheetProvider);function ActionSheetProvider(props){var _this;_classCallCheck(this,ActionSheetProvider);_this=_super.call(this,props);_this._actionSheetRef=React.createRef();_this._context={showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(_this._actionSheetRef.current!=null){_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};return _this;}_createClass(ActionSheetProvider,[{key:"getContext",value:function getContext(){return this._context;}},{key:"render",value:function render(){return React.createElement(Provider,{value:this._context,__source:{fileName:_jsxFileName,lineNumber:34,columnNumber:7}},React.createElement(ActionSheet,{ref:this._actionSheetRef,useNativeDriver:this.props.useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:35,columnNumber:9}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);export{ActionSheetProvider as default};
//# sourceMappingURL=ActionSheetProvider.js.map

@@ -1,2 +0,2 @@

import _extends from"@babel/runtime/helpers/extends";var _jsxFileName="/home/bradley/Code/react-native-action-sheet/src/connectActionSheet.tsx";import hoistNonReactStatic from'hoist-non-react-statics';import*as React from'react';import{Consumer}from'./context';export default function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(Consumer,{__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:7}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,_extends({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:15,columnNumber:13}}));});};return hoistNonReactStatic(ConnectedActionSheet,WrappedComponent);}
import _extends from"@babel/runtime/helpers/extends";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/connectActionSheet.tsx";import hoistNonReactStatic from'hoist-non-react-statics';import*as React from'react';import{Consumer}from'./context';export default function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(Consumer,{__source:{fileName:_jsxFileName,lineNumber:12,columnNumber:7}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,_extends({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:15,columnNumber:13}}));});};return hoistNonReactStatic(ConnectedActionSheet,WrappedComponent);}
//# sourceMappingURL=connectActionSheet.js.map

@@ -18,3 +18,3 @@ import * as React from 'react';

render(): JSX.Element;
_renderRowSeparator: (key: string | number) => JSX.Element;
_renderRowSeparator: (key: React.ReactText) => JSX.Element;
_renderTitleContent: () => JSX.Element | null;

@@ -21,0 +21,0 @@ _renderIconElement: (iconSource: React.ReactNode, color: string) => JSX.Element | null;

@@ -22,3 +22,6 @@ import * as React from 'react';

state: State;
_deferNextShow?: () => void;
_deferAfterAnimation?: () => void;
componentDidMount(): void;
componentWillUnmount(): void;
_handleWebKeyDown: (event: KeyboardEvent) => void;
_setActionSheetHeight: ({ nativeEvent }: any) => any;

@@ -25,0 +28,0 @@ render(): JSX.Element;

import * as React from 'react';
import ActionSheet from './ActionSheet';
import { ActionSheetOptions } from './types';
import { ActionSheetProps } from './types';
interface Props {

@@ -10,8 +10,7 @@ children: React.ReactNode;

_actionSheetRef: React.RefObject<ActionSheet>;
_context: ActionSheetProps;
constructor(props: Props);
getContext: () => {
showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i: number) => void) => void;
};
getContext(): ActionSheetProps;
render(): JSX.Element;
}
export {};
{
"name": "@expo/react-native-action-sheet",
"version": "3.12.0",
"version": "3.13.0",
"description": "A cross-platform ActionSheet for React Native",

@@ -17,2 +17,3 @@ "react-native": "lib/module/index.js",

"lint": "eslint . --fix",
"lint-check": "eslint",
"semantic-release": "semantic-release"

@@ -19,0 +20,0 @@ },

@@ -98,3 +98,3 @@ # react-native-action-sheet

The same options available on React Native's [ActionSheetIOS](https://reactnative.dev/docs/0.64/actionsheetios#showactionsheetwithoptions) component exist for both iOS and Android in this library. Note: `disabledButtonIndicies` is only available for iOS in Expo 43+ or RN 0.64.0+.
The same options available on React Native's [ActionSheetIOS](https://reactnative.dev/docs/0.64/actionsheetios#showactionsheetwithoptions) component exist for both iOS and Android in this library. Note: `disabledButtonIndices` is only available for iOS in Expo 43+ or RN 0.64.0+.

@@ -101,0 +101,0 @@ ### iOS Only Props

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc