<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import injectSheet from 'react-jss';

import getNotDeclaredProps from '../../get-not-declared-props';
import warning from 'warning';
import Ripple from '../ripple';
import Icon from '../icon';
import { easeInOutCubic } from '../../styles/timings';
import elevation from '../../styles/elevation';
import EventHandler from '../event-handler';

/**
 * A component to render a floating action button.
 *
 * @class
 * @extends PureComponent
 */
export class Fab extends PureComponent {
  static propTypes = {
    classes: PropTypes.shape({
      fab: PropTypes.string.isRequired,
      icon: PropTypes.string.isRequired,
      shadow: PropTypes.string.isRequired,
    }).isRequired,
    icon: PropTypes.string.isRequired,
    className: PropTypes.string,
    mini: PropTypes.bool,
    noink: PropTypes.bool,
    disabled: PropTypes.bool,
    animateIn: PropTypes.bool,
    onPress: PropTypes.func,
    onFocus: PropTypes.func,
    onBlur: PropTypes.func,
  };

  static defaultProps = {
    className: '',
    noink: false,
    disabled: false,
    mini: false,
    animateIn: false,
    onPress: () => {},
    onFocus: () => {},
    onBlur: () => {},
  };

  static keyCodes = [13, 32];

  /**
   * The styles for the component.
   *
   * @param {Object} theme - The theme provided by Jss.
   * @param {Object} theme.fab - The actual theme for the fab component.
   * @returns {Object} - Returns the styles which will be rendered.
   */
  static styles({ fab: theme }) {
    return {
      '@keyframes fab--scale-rotate-in': {
        from: { transform: 'scale(0) rotate(-45deg)' },
        to: { transform: 'scale(1) rotate(0deg)' },
      },

      fab: {
        composes: 'fab',
        zIndex: 16,
        position: 'relative',
        boxSizing: 'border-box',
        borderRadius: '50%',
        border: 0,
        outline: 'none',
        color: theme.iconColor,
        width: theme.normalSize,
        height: theme.normalSize,
        boxShadow: elevation(theme.elevation),
        padding: (theme.normalSize - theme.iconSize) / 2,
        backgroundColor: theme.backgroundColor,

        '&[aria-disabled=true]': {
          pointerEvents: 'none',
          backgroundColor: theme.disabledBackgroundColor,
          boxShadow: elevation(theme.disabledElevation),
        },
      },

      mini: {
        composes: 'fab--mini',
        width: theme.miniSize,
        height: theme.miniSize,
        padding: (theme.miniSize - theme.iconSize) / 2,
      },

      animateIn: {
        composes: 'fab--animte-in',
        animationName: 'fab--scale-rotate-in',
        animationFillMode: 'forwards',
        animationTimingFunction: easeInOutCubic,
        animationDuration: theme.animationDuration,
      },

      icon: {
        composes: 'fab--icon',
        userSelect: 'none',
        height: theme.iconSize,
        width: theme.iconSize,<commit_msg>Fixed animate-in class of the fab<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import injectSheet from 'react-jss';

import getNotDeclaredProps from '../../get-not-declared-props';
import warning from 'warning';
import Ripple from '../ripple';
import Icon from '../icon';
import { easeInOutCubic } from '../../styles/timings';
import elevation from '../../styles/elevation';
import EventHandler from '../event-handler';

/**
 * A component to render a floating action button.
 *
 * @class
 * @extends PureComponent
 */
export class Fab extends PureComponent {
  static propTypes = {
    classes: PropTypes.shape({
      fab: PropTypes.string.isRequired,
      icon: PropTypes.string.isRequired,
      shadow: PropTypes.string.isRequired,
    }).isRequired,
    icon: PropTypes.string.isRequired,
    className: PropTypes.string,
    mini: PropTypes.bool,
    noink: PropTypes.bool,
    disabled: PropTypes.bool,
    animateIn: PropTypes.bool,
    onPress: PropTypes.func,
    onFocus: PropTypes.func,
    onBlur: PropTypes.func,
  };

  static defaultProps = {
    className: '',
    noink: false,
    disabled: false,
    mini: false,
    animateIn: false,
    onPress: () => {},
    onFocus: () => {},
    onBlur: () => {},
  };

  static keyCodes = [13, 32];

  /**
   * The styles for the component.
   *
   * @param {Object} theme - The theme provided by Jss.
   * @param {Object} theme.fab - The actual theme for the fab component.
   * @returns {Object} - Returns the styles which will be rendered.
   */
  static styles({ fab: theme }) {
    return {
      '@keyframes fab--scale-rotate-in': {
        from: { transform: 'scale(0) rotate(-45deg)' },
        to: { transform: 'scale(1) rotate(0deg)' },
      },

      fab: {
        composes: 'fab',
        zIndex: 16,
        position: 'relative',
        boxSizing: 'border-box',
        borderRadius: '50%',
        border: 0,
        outline: 'none',
        color: theme.iconColor,
        width: theme.normalSize,
        height: theme.normalSize,
        boxShadow: elevation(theme.elevation),
        padding: (theme.normalSize - theme.iconSize) / 2,
        backgroundColor: theme.backgroundColor,

        '&[aria-disabled=true]': {
          pointerEvents: 'none',
          backgroundColor: theme.disabledBackgroundColor,
          boxShadow: elevation(theme.disabledElevation),
        },
      },

      mini: {
        composes: 'fab--mini',
        width: theme.miniSize,
        height: theme.miniSize,
        padding: (theme.miniSize - theme.iconSize) / 2,
      },

      animateIn: {
        composes: 'fab--animate-in',
        animationName: 'fab--scale-rotate-in',
        animationFillMode: 'forwards',
        animationTimingFunction: easeInOutCubic,
        animationDuration: theme.animationDuration,
      },

      icon: {
        composes: 'fab--icon',
        userSelect: 'none',
        height: theme.iconSize,
        width: theme.iconSize,
{'fraction_non_alphanumeric': 0.13374314670211, 'fraction_numerical': 0.005316497757102509, 'mean_word_length': 2.510204081632653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3365768', 'n_tokens_mistral': 1807, 'n_tokens_neox': 1768, 'n_words': 448}