mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
1 line
9.0 KiB
JSON
1 line
9.0 KiB
JSON
|
{"ast":null,"code":"import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","map":{"version":3,"sources":["/app/node_modules/@material-ui/core/esm/ButtonBase/Ripple.js"],"names":["React","PropTypes","clsx","useEventCallback","useEnhancedEffect","window","useEffect","useLayoutEffect","Ripple","props","classes","_props$pulsate","pulsate","rippleX","rippleY","rippleSize","inProp","in","_props$onExited","onExited","timeout","_React$useState","useState","leaving","setLeaving","rippleClassName","ripple","rippleVisible","ripplePulsate","rippleStyles","width","height","top","left","childClassName","child","childLeaving","childPulsate","handleExited","timeoutId","setTimeout","clearTimeout","undefined","createElement","className","style","process","env","NODE_ENV","propTypes","object","isRequired","bool","func","number"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,gBAAP,MAA6B,2BAA7B;AACA,IAAIC,iBAAiB,GAAG,OAAOC,MAAP,KAAkB,WAAlB,GAAgCL,KAAK,CAACM,SAAtC,GAAkDN,KAAK,CAACO,eAAhF;AACA;AACA;AACA;;AAEA,SAASC,MAAT,CAAgBC,KAAhB,EAAuB;AACrB,MAAIC,OAAO,GAAGD,KAAK,CAACC,OAApB;AAAA,MACIC,cAAc,GAAGF,KAAK,CAACG,OAD3B;AAAA,MAEIA,OAAO,GAAGD,cAAc,KAAK,KAAK,CAAxB,GAA4B,KAA5B,GAAoCA,cAFlD;AA
|