index.less 3.77 KB
@import '~@qx/ui/src/style/variable.less';

@ant-prefix-cls: ~'ant';

.qx-node-select {
  &-dropdown {
    max-height: calc(8 * 32px);
    overflow: auto;
    background-color: white;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;

    &-header {
      display: flex;
      align-items: center;
      &__icon {
        width: 14px;
        height: 14px;
        font-size: 14px;
        line-height: 14px;
        margin-right: 4px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;

        > img {
          width: 14px;
          height: 14px;

          &.is-svg {
            position: relative;
            left: -14px;
            filter: drop-shadow(14px 0 0 @N9);
            width: 14px !important;
            height: 14px !important;
          }
        }
      }
    }

    .qx-node-select-item__icon {
      margin-right: 4px;
    }

    .@{ant-prefix-cls}-collapse-header,
    .@{ant-prefix-cls}-collapse-content {
      padding: 7px !important;
      font-size: 14px;
    }

    .@{ant-prefix-cls}-collapse-content {
      background-color: transparent !important;
      padding: 0 !important;

      &-box {
        padding: 0 !important;
      }
    }
  }

  &-item {
    width: 100%;
    padding: 7px 16px 7px 32px !important;
    color: @N9;
    &:hover {
      background-color: @N3;
      cursor: pointer;
    }

    &__group {
      padding: 0 0 0 32px !important;

      &:hover {
        background-color: transparent;
      }
      .@{ant-prefix-cls}-collapse-header {
        padding: 7px 0 !important;
      }
    }
  }

  &-input {
    box-sizing: border-box;
    margin: 0;
    font-variant: tabular-nums;
    list-style: none;
    font-feature-settings: 'tnum', 'tnum';
    position: relative;
    display: inline-block;
    width: 100%;
    height: 32px;
    min-width: 0;
    padding: 4px 8px;
    color: @N9;
    font-size: 14px;
    line-height: 1.5715;
    background-color: #fff;
    background-image: none;
    border: 1px solid @N4;
    border-radius: 4px;
    transition: all 0.3s;
    pointer-events: auto;
    cursor: pointer;

    &.disabled {
      pointer-events: none;
      cursor: not-allowed;
      color: @N5;
      background-color: @N2;
      box-shadow: none;

      .qx-node-select-input__content {
        color: @N6;
      }
    }

    &:hover {
      border-color: @B8;
      .qx-node-select-input__content {
        background: @N4;
      }
    }

    &__content {
      width: 100%;
      min-width: 100%;
      max-width: 100%;
      display: inline;
      color: @N9;
      font-size: 14px;
      background-color: @N3;
      border-radius: 4px;
      overflow: hidden;

      &-item {
        flex-shrink: 1;
        margin-right: 4px;
        display: inline;
        align-items: center;

        &__icon {
          width: 14px;
          height: 14px;
          font-size: 14px;
          line-height: 14px;
          margin-right: 4px;
          border-radius: 50%;
          display: inline;
          align-items: center;
          justify-content: center;

          > img {
            width: inherit;
            height: inherit;
          }
        }

        &__arrow {
          display: inline-flex;
          align-items: center;
          color: @N6;
        }

        &__text {
          &.error {
            color: @E3;
          }
        }
      }
    }

    &__suffix {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}

.qx-node-select-dropdown {
  > .@{ant-prefix-cls}-collapse {
    > .@{ant-prefix-cls}-collapse-item {
      > .@{ant-prefix-cls}-collapse-content {
        padding-right: 7px !important;
      }
    }
  }
}