<commit_before>#
React = require 'react'
$ = React.createElement

Component = require './component'
Link = require './link'

Focus = require './mixins/focus'

class Menu extends Component
  prepare: (props) =>
    super props

    props.classList.push 'm-menu'

  renderComponent: (props) =>
    $ 'div', props, props.children

class Menu.List extends Component
  prepare: (props) =>
    super props

    props.classList.push 'm-menu-list'

  renderComponent: (props) =>
    $ 'ul', props, props.children

class Menu.Item extends Component
  @include Focus

  @defaultProps =
    href: '#'
    role: 'button'
    tabIndex: -1

  prepare: (props) =>
    super props

    props.ref = '1'
    props.classList.push 'focus' if @state.focus

    props.onMouseMove = do (ref = props.ref, original = props.onMouseMove) =>
      (e) =>
        React.findDOMNode(@refs[ref]).focus?()
        original? e

  renderComponent: (props) =>
    $ 'li',
      className: 'm-menu-item'
      $ Link, props, props.children

module.exports = Menu
<commit_msg>Drop obscure focusing from menu items<commit_after>#
React = require 'react'
$ = React.createElement

Component = require './component'
Link = require './link'

Focus = require './mixins/focus'

class Menu extends Component
  prepare: (props) =>
    super props

    props.classList.push 'm-menu'

  renderComponent: (props) =>
    $ 'div', props, props.children

class Menu.List extends Component
  prepare: (props) =>
    super props

    props.classList.push 'm-menu-list'

  renderComponent: (props) =>
    $ 'ul', props, props.children

class Menu.Item extends Component
  @include Focus

  @defaultProps =
    href: '#'
    role: 'button'
    tabIndex: -1

  renderComponent: (props) =>
    $ 'li',
      className: 'm-menu-item'
      $ Link, props, props.children

module.exports = Menu

{'fraction_non_alphanumeric': 0.1346782988004362, 'fraction_numerical': 0.0016357688113413304, 'mean_word_length': 3.015317286652079, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '4774879', 'n_tokens_mistral': 580, 'n_tokens_neox': 570, 'n_words': 157}