7d3259d16394a7a26587fc5573392f3e.json
18.4 KB
{"ast":null,"code":"var _interopRequireWildcard=require(\"@babel/runtime/helpers/interopRequireWildcard\");var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));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 _possibleConstructorReturn2=_interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));var _getPrototypeOf3=_interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));var _inherits2=_interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));var React=_interopRequireWildcard(require(\"react\"));var _TouchableWithoutFeedback=_interopRequireDefault(require(\"react-native-web/dist/exports/TouchableWithoutFeedback\"));var _View=_interopRequireDefault(require(\"react-native-web/dist/exports/View\"));var _StyleSheet=_interopRequireDefault(require(\"react-native-web/dist/exports/StyleSheet\"));var _color=_interopRequireDefault(require(\"color\"));var _theming=require(\"../../core/theming\");var _jsxFileName=\"/Users/satya/Workspace/Callstack/react-native-paper/src/components/TouchableRipple/index.tsx\";var TouchableRipple=function(_React$Component){(0,_inherits2.default)(TouchableRipple,_React$Component);function TouchableRipple(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,TouchableRipple);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(TouchableRipple)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.handlePressIn=function(e){var _this$props=_this.props,centered=_this$props.centered,rippleColor=_this$props.rippleColor,onPressIn=_this$props.onPressIn,theme=_this$props.theme;onPressIn&&onPressIn(e);var dark=theme.dark,colors=theme.colors;var calculatedRippleColor=rippleColor||(0,_color.default)(colors.text).alpha(dark?0.32:0.2).rgb().string();var button=e.currentTarget;var style=window.getComputedStyle(button);var dimensions=button.getBoundingClientRect();var touchX;var touchY;if(centered){touchX=dimensions.width/2;touchY=dimensions.height/2;}else{var startX=e.nativeEvent.touches?e.nativeEvent.touches[0].pageX:e.pageX;var startY=e.nativeEvent.touches?e.nativeEvent.touches[0].pageY:e.pageY;touchX=startX-dimensions.left;touchY=startY-dimensions.top;}var size=centered?Math.min(dimensions.width,dimensions.height)*1.25:Math.max(dimensions.width,dimensions.height)*2;var container=document.createElement('span');container.setAttribute('data-paper-ripple','');(0,_extends2.default)(container.style,{position:'absolute',pointerEvents:'none',top:'0',left:'0',right:'0',bottom:'0',borderTopLeftRadius:style.borderTopLeftRadius,borderTopRightRadius:style.borderTopRightRadius,borderBottomRightRadius:style.borderBottomRightRadius,borderBottomLeftRadius:style.borderBottomLeftRadius,overflow:centered?'visible':'hidden'});var ripple=document.createElement('span');(0,_extends2.default)(ripple.style,{position:'absolute',pointerEvents:'none',backgroundColor:calculatedRippleColor,borderRadius:'50%',transitionProperty:'transform opacity',transitionDuration:Math.min(size*1.5,350)+\"ms\",transitionTimingFunction:'linear',transformOrigin:'center',transform:'translate3d(-50%, -50%, 0) scale3d(0.1, 0.1, 0.1)',opacity:'0.5',left:touchX+\"px\",top:touchY+\"px\",width:size+\"px\",height:size+\"px\"});container.appendChild(ripple);button.appendChild(container);requestAnimationFrame(function(){requestAnimationFrame(function(){(0,_extends2.default)(ripple.style,{transform:'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)',opacity:'1'});});});};_this.handlePressOut=function(e){_this.props.onPressOut&&_this.props.onPressOut(e);var containers=e.currentTarget.querySelectorAll('[data-paper-ripple]');requestAnimationFrame(function(){requestAnimationFrame(function(){containers.forEach(function(container){var ripple=container.firstChild;(0,_extends2.default)(ripple.style,{transitionDuration:'250ms',opacity:0});setTimeout(function(){var parentNode=container.parentNode;if(parentNode){parentNode.removeChild(container);}},500);});});});};return _this;}(0,_createClass2.default)(TouchableRipple,[{key:\"render\",value:function render(){var _this$props2=this.props,style=_this$props2.style,background=_this$props2.background,borderless=_this$props2.borderless,disabledProp=_this$props2.disabled,rippleColor=_this$props2.rippleColor,underlayColor=_this$props2.underlayColor,children=_this$props2.children,theme=_this$props2.theme,rest=(0,_objectWithoutProperties2.default)(_this$props2,[\"style\",\"background\",\"borderless\",\"disabled\",\"rippleColor\",\"underlayColor\",\"children\",\"theme\"]);var disabled=disabledProp||!this.props.onPress;return React.createElement(_TouchableWithoutFeedback.default,(0,_extends2.default)({},rest,{onPressIn:this.handlePressIn,onPressOut:this.handlePressOut,disabled:disabled,__source:{fileName:_jsxFileName,lineNumber:246}}),React.createElement(_View.default,{style:[styles.touchable,borderless&&styles.borderless,style],__source:{fileName:_jsxFileName,lineNumber:252}},React.Children.only(children)));}}]);return TouchableRipple;}(React.Component);TouchableRipple.defaultProps={borderless:false};TouchableRipple.supported=true;var styles=_StyleSheet.default.create({touchable:{position:'relative'},borderless:{overflow:'hidden'}});var _default=(0,_theming.withTheme)(TouchableRipple);exports.default=_default;","map":{"version":3,"sources":["index.tsx"],"names":["TouchableRipple","React","Component","defaultProps","borderless","supported","handlePressIn","centered","rippleColor","onPressIn","theme","dark","colors","calculatedRippleColor","color","button","e","style","window","dimensions","touchX","touchY","startX","startY","size","Math","container","document","position","pointerEvents","top","left","right","bottom","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","overflow","ripple","backgroundColor","borderRadius","transitionProperty","transitionDuration","transitionTimingFunction","transformOrigin","transform","opacity","width","height","requestAnimationFrame","handlePressOut","containers","setTimeout","parentNode","background","disabledProp","underlayColor","children","rest","disabled","styles","StyleSheet","touchable","withTheme"],"mappings":"k5BAAA,oD,oSAQA,oDACA,2C,gHAuEMA,GAAAA,CAAAA,e,sdAUIM,a,CAAgB,SAAA,CAAA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,CANF,CADF,C,8BApK0BA,KAAK,CAACC,S,CAA9BF,CAAAA,e,CACGG,YADHH,CACkB,CACpBI,UAAU,CADU,KAAA,CADlBJ,CAAAA,e,CAQGK,SARHL,CAQe,IARfA,CAqLN,GAAM6D,CAAAA,MAAM,CAAGC,oBAAAA,MAAAA,CAAkB,CAC/BC,SAAS,CAAE,CACTnC,QAAQ,CAFqB,UACpB,CADoB,CAI/BxB,UAAU,CAAE,CACVkC,QAAQ,CALZ,QAIc,CAJmB,CAAlBwB,CAAf,C,aASeE,uBAAf,eAAeA,C","sourcesContent":["import * as React from 'react';\nimport {\n TouchableWithoutFeedback,\n View,\n ViewStyle,\n StyleSheet,\n StyleProp,\n} from 'react-native';\nimport color from 'color';\nimport { withTheme } from '../../core/theming';\nimport { Theme } from '../../types';\n\ntype Props = React.ComponentProps<typeof TouchableWithoutFeedback> & {\n /**\n * Whether to render the ripple outside the view bounds.\n */\n borderless?: boolean;\n /**\n * Type of background drawabale to display the feedback (Android).\n * https://facebook.github.io/react-native/docs/touchablenativefeedback.html#background\n */\n background?: Object;\n /**\n * Whether to start the ripple at the center (Web).\n */\n centered?: boolean;\n /**\n * Whether to prevent interaction with the touchable.\n */\n disabled?: boolean;\n /**\n * Function to execute on press. If not set, will cause the touchable to be disabled.\n */\n onPress?: () => void | null;\n /**\n * Function to execute on long press.\n */\n onLongPress?: () => void;\n /**\n * Color of the ripple effect (Android >= 5.0 and Web).\n */\n rippleColor?: string;\n /**\n * Color of the underlay for the highlight effect (Android < 5.0 and iOS).\n */\n underlayColor?: string;\n /**\n * Content of the `TouchableRipple`.\n */\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n /**\n * @optional\n */\n theme: Theme;\n};\n\n/**\n * A wrapper for views that should respond to touches.\n * Provides a material \"ink ripple\" interaction effect for supported platforms (>= Android Lollipop).\n * On unsupported platforms, it falls back to a highlight effect.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { View } from 'react-native';\n * import { Text, TouchableRipple } from 'react-native-paper';\n *\n * const MyComponent = () => (\n * <TouchableRipple\n * onPress={() => console.log('Pressed')}\n * rippleColor=\"rgba(0, 0, 0, .32)\"\n * >\n * <Text>Press me</Text>\n * </TouchableRipple>\n * );\n *\n * export default MyComponent;\n * ```\n */\nclass TouchableRipple extends React.Component<Props> {\n static defaultProps = {\n borderless: false,\n };\n\n /**\n * Whether ripple effect is supported.\n */\n static supported = true;\n\n private handlePressIn = (e: any) => {\n const { centered, rippleColor, onPressIn, theme } = this.props;\n\n onPressIn && onPressIn(e);\n\n const { dark, colors } = theme;\n const calculatedRippleColor =\n rippleColor ||\n color(colors.text)\n .alpha(dark ? 0.32 : 0.2)\n .rgb()\n .string();\n\n const button = e.currentTarget;\n const style = window.getComputedStyle(button);\n const dimensions = button.getBoundingClientRect();\n\n let touchX;\n let touchY;\n\n if (centered) {\n touchX = dimensions.width / 2;\n touchY = dimensions.height / 2;\n } else {\n const startX = e.nativeEvent.touches\n ? e.nativeEvent.touches[0].pageX\n : e.pageX;\n const startY = e.nativeEvent.touches\n ? e.nativeEvent.touches[0].pageY\n : e.pageY;\n\n touchX = startX - dimensions.left;\n touchY = startY - dimensions.top;\n }\n\n // Get the size of the button to determine how big the ripple should be\n const size = centered\n ? // If ripple is always centered, we don't need to make it too big\n Math.min(dimensions.width, dimensions.height) * 1.25\n : // Otherwise make it twice as big so clicking on one end spreads ripple to other\n Math.max(dimensions.width, dimensions.height) * 2;\n\n // Create a container for our ripple effect so we don't need to change the parent's style\n const container = document.createElement('span');\n\n container.setAttribute('data-paper-ripple', '');\n\n Object.assign(container.style, {\n position: 'absolute',\n pointerEvents: 'none',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n borderTopLeftRadius: style.borderTopLeftRadius,\n borderTopRightRadius: style.borderTopRightRadius,\n borderBottomRightRadius: style.borderBottomRightRadius,\n borderBottomLeftRadius: style.borderBottomLeftRadius,\n overflow: centered ? 'visible' : 'hidden',\n });\n\n // Create span to show the ripple effect\n const ripple = document.createElement('span');\n\n Object.assign(ripple.style, {\n position: 'absolute',\n pointerEvents: 'none',\n backgroundColor: calculatedRippleColor,\n borderRadius: '50%',\n\n /* Transition configuration */\n transitionProperty: 'transform opacity',\n transitionDuration: `${Math.min(size * 1.5, 350)}ms`,\n transitionTimingFunction: 'linear',\n transformOrigin: 'center',\n\n /* We'll animate these properties */\n transform: 'translate3d(-50%, -50%, 0) scale3d(0.1, 0.1, 0.1)',\n opacity: '0.5',\n\n // Position the ripple where cursor was\n left: `${touchX}px`,\n top: `${touchY}px`,\n width: `${size}px`,\n height: `${size}px`,\n });\n\n // Finally, append it to DOM\n container.appendChild(ripple);\n button.appendChild(container);\n\n // rAF runs in the same frame as the event handler\n // Use double rAF to ensure the transition class is added in next frame\n // This will make sure that the transition animation is triggered\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n Object.assign(ripple.style, {\n transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)',\n opacity: '1',\n });\n });\n });\n };\n\n private handlePressOut = (e: any) => {\n this.props.onPressOut && this.props.onPressOut(e);\n\n const containers = e.currentTarget.querySelectorAll(\n '[data-paper-ripple]'\n ) as HTMLElement[];\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n containers.forEach(container => {\n // @ts-ignore\n const ripple = container.firstChild;\n\n // @ts-ignore\n Object.assign(ripple.style, {\n transitionDuration: '250ms',\n opacity: 0,\n });\n\n // Finally remove the span after the transition\n setTimeout(() => {\n // @ts-ignore\n const { parentNode } = container;\n\n if (parentNode) {\n parentNode.removeChild(container);\n }\n }, 500);\n });\n });\n });\n };\n\n render() {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n const {\n style,\n background,\n borderless,\n disabled: disabledProp,\n rippleColor,\n underlayColor,\n children,\n theme,\n ...rest\n } = this.props;\n /* eslint-enable @typescript-eslint/no-unused-vars */\n\n const disabled = disabledProp || !this.props.onPress;\n\n return (\n <TouchableWithoutFeedback\n {...rest}\n onPressIn={this.handlePressIn}\n onPressOut={this.handlePressOut}\n disabled={disabled}\n >\n <View\n style={[styles.touchable, borderless && styles.borderless, style]}\n >\n {React.Children.only(children)}\n </View>\n </TouchableWithoutFeedback>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n touchable: {\n position: 'relative',\n },\n borderless: {\n overflow: 'hidden',\n },\n});\n\nexport default withTheme(TouchableRipple);\n"]},"metadata":{},"sourceType":"script"}