<commit_before>import { SELECTORS } from './Dropdown.utils'
import styled from '../../styled'
import Card from '../../Card'
import baseStyles from '../../../styles/resets/baseStyles.css.js'
import { getColor, rgba } from '../../../styles/utilities/color'

export const DropdownUI = styled('div')`
  ${baseStyles};
  position: relative;
`

export const MenuContainerUI = styled('div')`
  ${baseStyles};
  position: absolute;

  &.is-dropUp {
    bottom: 100%;
  }

  &.is-dropLeft {
    right: 0%;
  }

  .c-DropdownV2Block + .c-DropdownV2Block {
    border-top: 1px solid ${getColor('grey.600')};
  }
`

export const CardUI = styled(Card)`
  display: flex;
  flex-direction: column;
  min-height: 30px;
  min-width: 160px;
  max-height: 360px;
`

CardUI.defaultProps = {
  floating: true,
  seamless: true,
}

export const MenuWrapperUI = styled('div')`
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  min-height: 0;
  height: 100%;
  width: 100%;
`

export const MenuUI = styled('div')`
  ${baseStyles};
  padding: 8px 0;
  width: 100%;
`

MenuUI.defaultProps = {
  [SELECTORS.menuAttribute]: true,
  floating: true,
}

export const BlockUI = styled('div')`
  flex: none;
  padding: 8px 16px;
  min-height: 0;
  max-height: 100%;

  &.is-seamless {
    padding: 0;
  }

  &.is-stretchy {
    flex: 1;
  }
`

export const WrapperUI = styled('div')`
  ${baseStyles};
  visibility: hidden;
  pointer-events: none;
  position: relative;

  &:before {
    content: '';
    position: absolute;
    width: 15%;
    right: calc(100% - 20px);
    top: 34px;
    height: 50%;
  }
`

WrapperUI.defaultProps = {
  [SELECTORS.wrapperAttribute]: true,
}

export const ActionUI = styled('div')`
  ${baseStyles};
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;

  &.is-open {
    background-color: ${rgba(getColor('grey.300'), 1)};
    color: ${getColor('link.base')};

    ${MenuUI} {
      color: initial;
    }
  }

  &:active {
    background-color: ${rgba(getColor('grey.400'), 1)};
  }
`

ActionUI.defaultProps = {
  [SELECTORS.actionAttribute]: true,
}

export const ActionContentUI = styled('div')`
  flex: 1;
  min-width: 0;
  max-width: 100%;
`

export const ItemUI = styled('div')`
  ${baseStyles};
  background-color: ${rgba(getColor('grey.400'), 0)};
  border-radius: 0 !important;
  color: ${getColor('charcoal.400')};
  cursor: pointer;
  display: block;
  outline: none;
  position: static;
  text-decoration: none;
  transition: background-color 0.1s ease;
  user-select: none;

  &.is-option {
    padding: 8px 16px;
  }

  &.is-active {
    > ${ActionUI}, &.is-option {
      font-weight: 500;
    }
  }

  &.c-SelectionClearerItem + .c-DropdownV2Item {
    padding-top: 12px;
  }

  &:focus {
    ${MenuUI} {
      color: initial;
    }
  }

  &:hover {
    text-decoration: none;
  }

  &:last-child {
    border: none;
  }

  ${WrapperUI} {
    position: absolute;
    padding-left: 20px;<commit_msg>Fix dropdown active item color (#751)<commit_after>import { SELECTORS } from './Dropdown.utils'
import styled from '../../styled'
import Card from '../../Card'
import baseStyles from '../../../styles/resets/baseStyles.css.js'
import { getColor, rgba } from '../../../styles/utilities/color'

export const DropdownUI = styled('div')`
  ${baseStyles};
  position: relative;
`

export const MenuContainerUI = styled('div')`
  ${baseStyles};
  position: absolute;

  &.is-dropUp {
    bottom: 100%;
  }

  &.is-dropLeft {
    right: 0%;
  }

  .c-DropdownV2Block + .c-DropdownV2Block {
    border-top: 1px solid ${getColor('grey.600')};
  }
`

export const CardUI = styled(Card)`
  display: flex;
  flex-direction: column;
  min-height: 30px;
  min-width: 160px;
  max-height: 360px;
`

CardUI.defaultProps = {
  floating: true,
  seamless: true,
}

export const MenuWrapperUI = styled('div')`
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  min-height: 0;
  height: 100%;
  width: 100%;
`

export const MenuUI = styled('div')`
  ${baseStyles};
  padding: 8px 0;
  width: 100%;
`

MenuUI.defaultProps = {
  [SELECTORS.menuAttribute]: true,
  floating: true,
}

export const BlockUI = styled('div')`
  flex: none;
  padding: 8px 16px;
  min-height: 0;
  max-height: 100%;

  &.is-seamless {
    padding: 0;
  }

  &.is-stretchy {
    flex: 1;
  }
`

export const WrapperUI = styled('div')`
  ${baseStyles};
  visibility: hidden;
  pointer-events: none;
  position: relative;

  &:before {
    content: '';
    position: absolute;
    width: 15%;
    right: calc(100% - 20px);
    top: 34px;
    height: 50%;
  }
`

WrapperUI.defaultProps = {
  [SELECTORS.wrapperAttribute]: true,
}

export const ActionUI = styled('div')`
  ${baseStyles};
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;

  &.is-open {
    background-color: ${rgba(getColor('grey.300'), 1)};
    color: ${getColor('link.base')};

    ${MenuUI} {
      color: initial;
    }
  }

  &:active {
    background-color: ${rgba(getColor('grey.400'), 1)};
  }
`

ActionUI.defaultProps = {
  [SELECTORS.actionAttribute]: true,
}

export const ActionContentUI = styled('div')`
  flex: 1;
  min-width: 0;
  max-width: 100%;
`

export const ItemUI = styled('div')`
  ${baseStyles};
  background-color: ${rgba(getColor('grey.400'), 0)};
  border-radius: 0 !important;
  color: ${getColor('charcoal.400')};
  cursor: pointer;
  display: block;
  outline: none;
  position: static;
  text-decoration: none;
  transition: background-color 0.1s ease;
  user-select: none;

  &.is-option {
    padding: 8px 16px;
  }

  &.is-active {
    > ${ActionUI}, &.is-option {
      font-weight: 500;
      color: ${getColor('charcoal.600')};
    }
  }

  &.c-SelectionClearerItem + .c-DropdownV2Item {
    padding-top: 12px;
  }

  &:focus {
    ${MenuUI} {
      color: initial;
    }
  }

  &:hover {
    text-decoration: none;
  }

  &:last-child {
    border: none;
  }

  ${WrapperUI} {
    position: absolute;
    padding-left: 20px;
{'fraction_non_alphanumeric': 0.170995670995671, 'fraction_numerical': 0.030969030969030968, 'mean_word_length': 3.0560432140445646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '516433', 'n_tokens_mistral': 2409, 'n_tokens_neox': 2228, 'n_words': 486}