.l-chat

scss
.l-chat {
  border: 1px solid use-color('grey', light-i);
  height: 598px;
  min-width: 540px;
  overflow: hidden;
  position: relative;
  width: 795px;

  @include element('content') {
    background-color: use-color('base', true-white);
    height: 408px;
    margin-bottom: 100px;
    overflow: scroll;
  }
}

Layout diseñado para los contener componentes de mensajeria.

La estructura funcional estaría compuesta por los siguientes componentes:

  <div class="l-chat">
    <!-- header: c-chat-header -->
    <div class="c-chat-header"></div>

    <div class="l-chat__content">
      <!-- message box: c-message-box -->
      <div class="c-message-box"></div>
    </div>
    
    <!-- input chat: c-send-message -->
    <div class="c-send-message"></div>
  </div>

.c-chat-header

scss
.c-chat-header {
  background-color: use-color(primary);
  background-image: use-color(gradients, balanced);
  background-image: url('https://cdn.chattigo.com/assets/img/logo-wing.svg'), use-color(gradients, balanced);
  background-position: 100% -22px, 0 0;
  background-repeat: no-repeat;
  background-size: 200px, 100%;
  color: use-color(base , true-white);
  display: flex;
  flex-direction: column-reverse;
  height: auto;
  padding: 8px;
  position: relative;

  @include element('content') {
    @include use-font('body', 'bold');
    display: flex;
    justify-content: space-between;
    margin-top: 24px;

    @include if-block-has-modifier('c-chat-header', 'white-background') {
      margin-top: 12px;
    }

    @include if-block-has-modifier('c-chat-header', 'genesys') {
      margin-top: 0;
      
      ul {
        margin-top: -4px;
      }
    }
  }

  @include element('data') {
    margin-left: 40px;
    margin-right: auto;
    max-width: 80%;
    overflow: hidden;
    width: auto;

    @include media-breakpoint-up(tablet) {
      max-width: 90%;
    }

    @include modifier('name') {
      @include use-font('body', 'bold');
      cursor: default;
      line-height: 16px;
      margin: 0;
      overflow: hidden;
      padding: 0;
      text-overflow: ellipsis;
      text-transform: capitalize;
      white-space: nowrap;
      width: 100%;
    }

    @include modifier('id') {
      @include use-font('caption', 'regular');
      cursor: default;
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      text-transform: initial;
      white-space: nowrap;
      width: 100%;
    }
  }

  @include element('actions') {
    align-items: baseline;
    display: flex;
    justify-content: flex-end;
    width: 200px;

    @include media-breakpoint-down('phone-ii') {
      display: none;
    }
  }

  @include element('mobile-actions') {
    display: block;
    
    @include media-breakpoint-up('webchat') {
      display: none;
    }

    //overrides
    .c-dropup {
      &__trigger {
        right: 16px;
        top: 30px;

        span {
          font-size: 30px;
        }
      }
    }
  }

  @include element('action') {
    color: use-color(base, true-white);
    cursor: pointer;
    font-size: 18px;
    margin: 8px;
    min-width: 36px;
    text-decoration: none;
    width: auto;

    @include modifier('menu') {
      align-items: center;
      display: flex;
      flex-direction: column;
      font-size: 26px;
      justify-content: inherit;
      text-align: center;

      &:last-child() {
        font-size: 30px;
      }
    }

    @include if-block-has-modifier('c-chat-header', 'white-background') {
      color: use-color('base', 'black');

      [class^='icon-'],
      [class*=' icon-'] {
        color: use-color('secondary');
      }

      &:hover {
        color: use-color('secondary', 'dark');

        [class^='icon-'],
        [class*=' icon-'] {
          color: use-color('secondary', 'dark');
        }
      }
    }

    label {
      @include use-font('caption');
      cursor: pointer;
      text-transform: uppercase;
    }

    [class^='icon-'],
    [class*=' icon-'] {
      font-size: inherit;
    }
  }

  @include modifier('white-background') {
    background-color: use-color('base', 'true-white');
    background-image: none;
    border-bottom: solid 2px use-color('grey', 'light-i');
    color: use-color('base', 'black');
  }

  @include modifier('genesys') {
    background-color: use-color('base', 'true-white');
    background-image: none;
    border-bottom: solid 2px use-color('grey', 'light-i');
    color: use-color('base', 'black');
    padding: 4px 8px 0;
  }
}

En este componente se muestra toda la información referente al chat abierto, con una sección(.c-chat-header__data) para datos como el nombre, participantes, canal, etc… y los elementos anchor:

  <a class="c-chat-header__action c-chat-header__action--menu" href="#">
    <span class="icon-notes"></span>
    <label>notas</label>
  </a>

para las acciones.

c-chat-header--white-background, modificador para la versión blanca del header.

Examples

html
<div class="c-chat-header">
  <div class="c-chat-header__content">
    <div class="c-chat-header__data">
      <h3 class="c-chat-header__data--name">
        client very-large name client very-large name
      </h3>
      
      <small class="c-chat-header__data--id">
        35 participantes | Inicio Grupo: 10/09/2019
      </small>

      <!-- List component -->
      <ul class="app-c-list-channels">
        <li class="app-c-list-channels__item">WhatsApp</li>
        <li class="app-c-list-channels__item">Campaign Description</li>
      </ul>
    </div>

    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-notes"></span>
      <label>notas</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-faq"></span>
      <label>faqs</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-chat-transfer"></span>
      <label>transferir</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-typification"></span>
      <label>Finalizar</label>
    </a>
  </div>
</div>
html white background
<div class="c-chat-header c-chat-header--white-background">
  <div class="c-chat-header__content">
    <div class="c-chat-header__data">
      <h3 class="c-chat-header__data--name">
        client very-large name client very-large name
      </h3>
      
      <small class="c-chat-header__data--id">
        35 participantes | Inicio Grupo: 10/09/2019
      </small>

      <!-- List component -->
      <ul class="app-c-list-channels app-c-list-channels--alt-wicon">
        <li class="app-c-list-channels__item">WhatsApp</li>
        <li class="app-c-list-channels__item">Campaign Description</li>
      </ul>
    </div>

    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-notes"></span>
      <label>notas</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-faq"></span>
      <label>faqs</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-chat-transfer"></span>
      <label>transferir</label>
    </a>
    <a class="c-chat-header__action c-chat-header__action--menu" href="#">
      <span class="icon-typification"></span>
      <label>Finalizar</label>
    </a>
  </div>
</div>

.web-c-empty-chat

scss
.web-c-empty-chat {
  background-color: use-color(base, true-white);
  background-image: url('https://cdn.chattigo.com/assets/img/isotipo-grey.svg');
  background-position: -10% 130%;
  background-repeat: no-repeat;
  background-size: 1300px;
  box-sizing: border-box;
  min-height: 100vh;
  padding-top: 20%;

  @include media-breakpoint-up(tablet) {
    background-position: -30% 135%;
  }

  @include element('image') {
    display: flex;
    height: 98px;
    margin: 0 auto 19px;
    width: 98px;
  }

  @include element('message') {
    @include use-font('subheading','regular');
    margin: auto;
    text-align: center;
    width: 276px;
    
    &::first-letter {
      text-transform: uppercase;
    }
  }
}

Para cuando no existan mensajes en el inbox de la app, este componente debe usarce como contenido.

Example

html
<div class="l-chat">
  <div class="web-c-empty-chat">
    <img class="web-c-empty-chat__image" src="https://cdn.chattigo.com/assets/img/smile-empty-state.png" />
    <p class="web-c-empty-chat__message">
      para comenzar, selecciona un chat de la <b>Bandeja de grupos</b>
    </p>
  </div>
</div>

Requires

@function use-color()

@mixin element()

.c-empty-content

scss
.c-empty-content {
  min-height: 40vh;
  padding: 14%;

  @include element('image') {
    display: flex;
    height: 98px;
    margin: 0 auto 20px;
    width: 98px;
  }

  @include element('message') {
    @include use-font('subheading');
    text-align: center;
    width: 100%;
  }
}

Para cuando no existan elementos en el contenido

Example

html
<div class="c-empty-content">
  <img class="c-empty-content__image" src="https://cdn.chattigo.com/assets/img/smile-empty-state.png">
  <p class="c-empty-content__message">
    mensaje descriptivo
  </p>
</div>

Requires

@mixin element()