styles.less 2.39 KB
@import '~@qx/ui/src/style/variable.less';

@prefix: ~'qx-input-select';

.@{prefix} {
  &-dropdown {
    position: relative;
    width: 100%;
    padding: 0 0 48px 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 12%),
      0 6px 16px 0 rgba(0, 0, 0, 8%), 0 9px 28px 8px rgba(0, 0, 0, 5%);

    &__list {
      max-height: 192px;
      margin-top: 5px;
      overflow-y: auto;
      .ant-dropdown-menu {
        box-shadow: none;
      }
    }

    &__list-empty {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      overflow: hidden;
      height: 100px;
    }

    &__list-content {
      width: 100%;

      :global {
        .ant-menu-item {
          margin-bottom: 0;

          &:hover {
            background-color: @N3;
          }
        }
      }
    }

    &__list-content-bottom {
      position: absolute;
      bottom: 0;
      width: 100%;
    }

    &__input {
      height: 32px;
      border-bottom: 1px solid @N4 !important;

      .anticon {
        margin-right: 4px;
        font-size: 16px;
        color: @N6;
      }
    }
  }
}

.qx-input-select__input {
  .qx-input-select__input-suffix {
    color: @N6;
  }
}

.qx-input-select__button {
  height: 32px;
  border-radius: 4px;
  padding: 4px 11px;
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: text;
  transition: all .3s;
  width: 100%;

  .qx-form-select__input-prefix {
    color: @B8;
  }

  .qx-input-select__button-main {
    height: 22px;
    line-height: 22px;
    margin: 0 4px;
    flex: 1;
    color: @N9;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    .qx-input-select__button-svg {
      color: @N7;
      transform: rotate(180deg);
      font-size: 16px;
      margin: 0 4px;
    }

  }
  .qx-input-select__button-placeholder {
    color: @N6;
  }
  .qx-input-select__input-suffix {
    color: @N6;
  }
  .qx-form-select__input-prefix {
    color: @B8;
  }

  .ant-dropdown-menu .ant-dropdown-menu-title-content {
    flex: unset;
  }
}

.qx-input-select__button.ant-btn-default:disabled {
  .qx-form-select__input-prefix, .qx-input-select__button-main, .qx-input-select__button-svg {
    color: @N6;
  }
}

.qx-input-select__button.ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover {
  color: unset;
}