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

.qx-select-icon-container {
  position: relative;
  font-size: 0;

  .cover-icon,
  .cover-img {
    height: 48px;
    width: 48px;
    border-radius: 8px;

    &.cover-icon {
      color: #ffffff;
      background-color: @B8;

      svg {
        width: 24px;
        height: 24px;
        margin: 12px;
      }
    }
  }
  .anticon-edit {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    padding: 12px;
    color: #fff;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    cursor: pointer;
  }
  &:hover {
    .anticon-edit {
      display: inline-block;
    }
  }
}

.qx-icon-picker-overlay {
  width: 490px;

  .ant-popover-inner {
    border-radius: 8px;
    padding: 12px 16px;

    .ant-popover-inner-content {
      color: rgba(0, 0, 0, 0.85);
    }

    .ant-tabs-nav::before {
      display: none;
    }
    .ant-tabs-tabpane {
      display: flex;
      flex-direction: column;
      height: 336px;
    }
    .ant-tabs-tabpane-hidden {
      display: none;
    }
  }
}

.qx-select-custom-icons {
  position: relative;
  .block-color-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding-bottom: 16px;

    .block-color {
      width: 32px;
      height: 32px;
      font-size: 16px;
      text-align: center;
      vertical-align: middle;
      border-radius: 4px;
      cursor: pointer;
      &--default {
        color: #fff;
        background-color: @B8;
      }
    }
  }
  .anticon-check {
    color: #fff;
    vertical-align: middle;
  }
  .block-icon-box {
    position: relative;
    display: flex;
    flex-direction: row;
    height: 288px;

    &.height336 {
      height: 336px;
    }

    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: -16px;
      right: -16px;
      height: 1px;
      background-color: #e9e9ea;
    }

    .icon-list {
      position: relative;
      height: 100%;
      overflow: auto;
      flex: 1;

      .icon-classify-label {
        font-size: 12px;
        color: #7c7e86;
        line-height: 20px;
        padding: 16px 0 12px;
      }
      .icon-classify-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;

        .block-icon {
          width: 12.5%;
          height: 32px;
          text-align: center;
          cursor: pointer;

          .anticon {
            height: 32px;
            width: 32px;
            border-radius: 4px;
            padding-top: 6px;
            box-sizing: border-box;
            display: inline-block;

            &:hover {
              background: @N3;
              border-radius: 4px;
              color: #50535d;
            }

            svg {
              width: 20px;
              height: 20px;
            }
          }

          &--default {
            color: #fff !important;
            background-color: @B8 !important;
          }
        }
      }
    }
    .icon-classify {
      display: flex;
      flex-direction: column;
      width: 96px;
      border-left: 1px solid #e9e9ea;
      margin-right: -16px;
      align-items: center;

      .classify-switch {
        margin: 12px 0 16px;
      }

      .classify-label-list {
        flex: 1;
        width: 100%;
        overflow: auto;

        .classify-label {
          font-size: 12px;
          color: #50535d;
          line-height: 24px;
          width: 64px;
          margin: 4px auto;
          text-align: center;
          cursor: pointer;

          &:hover {
            background: @N3;
            border-radius: 4px;
            color: #50535d;
          }
          &.active {
            position: relative;
            color: @B8;
            background-color: @B3;
            border-radius: 4px;
          }
          &:first-child {
            margin-top: 0;
          }
          &:last-child {
            margin-bottom: 0;
          }
        }
      }
    }
  }
  .custom-icon-box {
    display: flex;
    flex-direction: row;
    overflow: auto;
    height: 336px;
    justify-content: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;

    .custom-icon-item {
      width: 12.5%;

      .qx-custom-preview {
        position: relative;
        width: 40px;
        height: 40px;
        margin: 0 10px 10px 0;
        padding: 6px 0;
        text-align: center;
        border: 1px solid #d9d9d9;
        border-radius: 2px;
        box-sizing: border-box;

        &:hover {
          cursor: pointer;

          .qx-custom-preview_text {
            display: block;
          }

          .qx-custom-preview_icon {
            display: block;
            cursor: pointer;
          }
        }

        &_icon {
          position: absolute;
          top: -6px;
          right: -6px;
          z-index: 9999;
          display: none;
          width: 14px;
          height: 14px;
          color: white;
          line-height: 10px;
          text-align: center;
          background-color: rgb(207, 207, 207);
          border-radius: 50%;
        }
      }

      .qx-custom-upload {
        width: 40px !important;
        margin: 0 10px 10px 0;

        .ant-upload.ant-upload-select {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 40px;
          height: 40px;
          border: 1px solid #d9d9d9;
          border-radius: 2px;
          cursor: pointer;

          .ant-upload {
            width: 100%;
          }

          img {
            width: 24px;
            height: 24px;
          }
        }
      }
    }
  }
}

.qx-select-custom-desc-icon-wrap {
  position: relative;

  .custom-desc-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: @N7;
    margin-left: 4px;
  }
}