.c-modal

scss
.c-modal {
  background-color: use-color('base', 'true-white');
  border: solid 1px use-color('grey', 'light-i');
  border-radius: 8px;
  box-sizing: border-box;
  height: auto;
  left: 50%;
  max-height: 100%;
  max-width: 90%;
  padding: 16px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  z-index: use-layer('modal-2');

  @include media-breakpoint-up('tablet') {
    box-sizing: unset;
  }

  @include element('close-icon') {
    color: use-color('grey', 'light');
    position: absolute;
    right: 16px;
    text-decoration: none;
    z-index: use-layer('modal');

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

  @include element('header') {
    color: use-color('grey');
    // display: contents; Lo dejo comentado por las dudas.
    margin: 32px 0 16px;
    padding: 0 8px;
    width: fit-content;

    @include media-breakpoint-up('tablet') {
      margin: 36px 0 28px;
      padding: 0 24px;
    }

    @include if-block-has-modifier('c-modal', 'small') {
      margin: 16px 0 20px;
      padding: 0 8px;
    }

    @include if-block-has-modifier('c-modal', 'padding-less') {
      margin: 0 0 20px;
      padding: 0 16px;
    }
    
    &::first-letter {
      text-transform: uppercase;
    }
  }

  @include element('content') {
    // height: 68%;
    height: fit-content;
    overflow: hidden;
    overflow-y: scroll;
    padding: 0 8px 8px;

    @include media-breakpoint-up('tablet') {
      padding: 0 24px 24px;
    }

    @include if-block-has-modifier('c-modal', 'loader') {
      overflow-y: auto;
      padding: 7px;
    }

    @include if-block-has-modifier('c-modal', 'small') {
      min-height: 100px;
      overflow: auto;
      padding: 0 8px 8px;
    }

    @include if-block-has-modifier('c-modal', 'padding-less') {
      padding: 0;
    }

    @include if-block-has-modifier('c-modal', 'with-footer') {
      height: 80%;
      margin-bottom: 40px;
    }

    @include if-block-has-modifier('c-modal', 'datetime-picker') {
      display: flex;
      flex-direction: row;
      padding: 0;

      @include media-breakpoint-down('tablet') {
        flex-direction: column;
      }
    }

    @include modifier('search') {
      padding: 0 16px;
    }

    @include modifier('auto-height') {
      height: fit-content;
    }

    // overrides
    .c-campaign-visibility {
      margin: 0;
      width: 100%;
    }

    .c-indicator-group,
    .c-transferable-user {
      margin: 0 0 16px;
    }

    img {
      width: 100%;
    }
  }

  @include element('footer') {
    align-items: center;
    background-color: use-color('base', true-white);
    border-radius: 0 0 8px 8px;
    bottom: 0;
    box-shadow: $box-shadow-card-lvl-1;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 16px;
    position: absolute;
    width: 92%;
    z-index: use-layer('modal-3');

    @include media-breakpoint-up('webchat') {
      width: inherit;
    }

    @include media-breakpoint-between('webchat', 'tablet') {
      width: 95%;
    }

    .c-button {
      margin: 0;
      max-width: 270px;
    }
  }

  @include element('action-area') {
    background-color: use-color('grey', 'light-iii');
    border-radius: 0 0 8px 8px;
    border-top: solid 1px use-color('grey', 'light-i');
    cursor: pointer;
    display: flex;
    padding: 12px 16px;
    text-decoration: none;

    @include modifier('data') {
      color: use-color('grey');
      display: flex;
      flex-direction: column;
      margin-left: 8px;

      span {
        margin-bottom: 8px;

        &::first-letter {
          text-transform: uppercase;
        }
      }
    }

    @include modifier('times') {
      background-color: use-color('base', 'true-white');
      border-top: 0;
      cursor: auto;
      text-align: center;
    }

    [class^='icon-'],
    [class*=' icon-'] {
      color: use-color('primary');
      font-size: 21px;
    }
  }

  @include element('actions') {
    align-items: center;
    display: flex;
    justify-content: center;

    .c-button {
      margin: 0 16px 0 0;
      max-width: 130px;

      &:last-child {
        margin: 0;
      }
    }
  }

  @include element('overlay') {
    background-color: transparentize($color: use-color('base', 'black'), $amount: 0.2);
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: use-layer('modal');
  }
  
  @include element('info') {

    @include element('text') {
      @include use-font('caption', 'regular');
      color: use-color('grey', 'light');
      margin: 0;
    }
  }

  @include modifier('small') {
    height: fit-content;
    width: 329px;
  }

  @include modifier('auto-height') {
    height: fit-content;
  }

  @include modifier('with-footer') {
    box-sizing: unset;
    height: 90%;
  }

  @include modifier('padding-less') {
    padding: 16px 0 0;
    width: 391px;
  }

  @include modifier('datetime-picker') {
    padding-right: 0;
  }

  @include modifier('loader') {
    width: auto;
  }
}

TODO: add docs

Examples

html
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__header">
      Dummy header
    </div>

    <div class="c-modal__content">
      // some content
    </div>
  </div>

  <div class="c-modal__overlay"></div>

</div>
html small
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal c-modal--small">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__header">
      Dummy header
    </div>

    <div class="c-modal__content">
      // some content
    </div>
  </div>

  <div class="c-modal__overlay"></div>

</div>
html with footer
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal c-modal--with-footer">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__header">
      Dummy header
    </div>

    <div class="c-modal__content">
      // some content
    </div>

    <div class="c-modal__footer">
      <a class="c-button">
        transferir chat
      </a>
    </div>

  </div>

  <div class="c-modal__overlay"></div>

</div>
html padding-less
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal c-modal--padding-less">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__header">
      Dummy header
    </div>

    <div class="c-modal__content">
      // some content
    </div>

  </div>

  <div class="c-modal__overlay"></div>

</div>

.c-datetime-modal

scss
.c-datetime-modal {
  @include element('section') {
    position: relative;
    width: 100%;

    @include modifier('time') {
      border-left: solid 1px use-color('grey', 'light-i');
      max-width: 232px;

      @include media-breakpoint-down('tablet') {
        border-left: 0;
        max-width: inherit;
        padding-right: 16px;
      }
    }
  }

  @include element('header') {
    @include use-font('subheading');
    color: use-color('grey');
    padding-left: 8px;
  }

  @include element('content') {
    padding: 0 8px;
  }

  @include element('action-area') {
    align-content: center;
    border-top: solid 1px use-color('grey', 'light-i');
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding: 0 8px;

    @include media-breakpoint-down('tablet') {
      border-top: 0;
      padding: 0 16px 0 0;
    }
  }

  @include element('message') {
    @include use-font('body-alt');
    margin: 12px 0;
    padding: 0 14px;
    text-align: center;

    @include media-breakpoint-down('tablet') {
      color: use-color('grey');
      padding: 0;
    }

    @include modifier('error') {
      @include use-font('caption');
      color: use-color('event', 'error');
      line-height: 14px;
    }
  }
}
  • c-datetime-modal__section
    • c-datetime-modal__header
    • c-datetime-modal__content
      • c-datetime-modal__action-area
        • c-datetime-modal__message
        • c-datetime-modal__message–error

Example

html datetime-picker
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal c-modal--datetime-picker">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__content">
      <div class="c-datetime-modal__section">
        <div class="c-datetime-modal__header">
          Día
        </div>

        <div class="c-datetime-modal__content">

        </div>
      </div>

      <div class="c-datetime-modal__section c-datetime-modal__section--time">
        <div class="c-datetime-modal__header">
          Horario
        </div>
        <!-- inline style only for example porpouse -->
        <div class="c-datetime-modal__content" style="min-height: 100px">

        </div>

        <div class="c-datetime-modal__action-area">
          <p class="c-datetime-modal__message">
            El envío será programado para el
            <strong>17 de Junio del 2020</strong>
            a las
            <strong>12:43 PM</strong>
          </p>

          <a href="#" class="c-button c-button--secondary c-button--thin">
            Programar
          </a>

          <p class="c-datetime-modal__message c-datetime-modal__message--error">
            El horario programado debe ser posterior a la fecha actual
          </p>
        </div>
      </div>
    </div>

  </div>

  <div class="c-modal__overlay"></div>

</div>

.c-datetime-modal

scss
.c-datetime-modal {
  @include element('section') {
    position: relative;
    width: 100%;

    @include modifier('time') {
      border-left: solid 1px use-color('grey', 'light-i');
      // display: flex;
      // flex-direction: column;
      // justify-content: space-between;
      max-width: 232px;

      @include media-breakpoint-down('tablet') {
        border-left: 0;
        max-width: inherit;
        padding-right: 16px;
      }
    }
  }
}
  • c-datetime-modal__section
    • c-datetime-modal__header
    • c-datetime-modal__content
      • c-datetime-modal__action-area
        • c-datetime-modal__message
        • c-datetime-modal__message–error

Example

html datetime-picker
<div class="u-widget-example-margin"> <!-- this div is just for the example -->

  <div class="c-modal c-modal--datetime-picker">
    <a href="#" class="c-modal__close-icon">
      <span class="icon-close"></span>
    </a>

    <div class="c-modal__content">
      <div class="c-datetime-modal__section">
        <div class="c-datetime-modal__header">
          Día
        </div>

        <div class="c-datetime-modal__content">

        </div>
      </div>

      <div class="c-datetime-modal__section c-datetime-modal__section--time">
        <div class="c-datetime-modal__header">
          Horario
        </div>
        <!-- inline style only for example porpouse -->
        <div class="c-datetime-modal__content" style="min-height: 100px">

        </div>

        <div class="c-datetime-modal__action-area">
          <p class="c-datetime-modal__message">
            El envío será programado para el
            <strong>17 de Junio del 2020</strong>
            a las
            <strong>12:43 PM</strong>
          </p>

          <a href="#" class="c-button c-button--secondary c-button--thin">
            Programar
          </a>

          <p class="c-datetime-modal__message c-datetime-modal__message--error">
            El horario programado debe ser posterior a la fecha actual
          </p>
        </div>
      </div>
    </div>

  </div>

  <div class="c-modal__overlay"></div>

</div>

.c-time-modal

scss
.c-modal {
  @include modifier('welcome-modal') {
    padding: 74px 90px 12px 74px;
    text-align: center;

    @include element('title') {
      margin-bottom: 12px;

      h2 {
        @include use-font('h1', 'regular');
        margin: 0;
      }
    }

    @include element('text') {
      margin-bottom: 20px;

      p {
        @include use-font('title', 'regular');
        margin: 0;
      }
    }

    @include element('btn-wrapper') {
      margin-bottom: 20px;
    }

    @include element('extra-text') {
      color: use-color('grey', 'light');

      p {
        @include use-font('link', 'regular');
        margin: 0;
      }
    }
  }
  
  @include element('header') {
    
    @include modifier('text') {
      @include use-font('subheading', 'regular');
      margin: 0 0 26px;
      padding: 0 24px;
    }
    
  }
}

Componente creado que responde al diseño del modal con la lista de presets de minutos.

Example

html
<div class="c-modal c-modal--small c-modal--padding-less">
  
  <a href="./outbound--step-4.html" class="c-modal__close-icon">
    <span class="icon-close"></span>
  </a>
  
  <div class="c-modal__header">
    <h3 class="c-modal__header--text">Pausar chat</h3>
  </div>
  
  <div class="c-modal__content">

    <ul class="c-list c-list--no-margin">
      <li class="c-list__schedule-item c-list__schedule-item--odded">
        <span>
          15 Minutos
        </span>
      </li>
      <li class="c-list__schedule-item c-list__schedule-item--odded">
        <span>
          30 Minutos
        </span>
      </li>
      <li class="c-list__schedule-item c-list__schedule-item--odded">
        <span>
          45 Minutos
        </span>
      </li>
      <li class="c-list__schedule-item c-list__schedule-item--odded">
        <span>
          1 Hora
        </span>
      </li>
      <li class="c-list__schedule-item c-list__schedule-item--odded">
        <span>
          Indefinido
        </span>
      </li>
    </ul>
  </div>

  <div class="c-modal__action-area c-modal__action-area--times">
    <div class="c-modal__info">
      <p class="c-modal__info__text">Para Whatsapp oficial, se realizará un cobro por el mensaje enviado luego de 24 horas de la ultima conversación</p>
    </div>
  </div>
</div>

.c-welcome-modal

scss
// Buscar!!!!
/// Componente creado que responde al diseño del modal con la lista de presets de minutos.
///
/// @group web-modal
/// @name .c-time-modal
/// @example html  
///     <div class="c-modal c-modal--small c-modal--padding-less">
///       
///       <a href="./outbound--step-4.html" class="c-modal__close-icon">
///         <span class="icon-close"></span>
///       </a>
///       
///       <div class="c-modal__header">
///         <h3 class="c-modal__header--text">Pausar chat</h3>
///       </div>
///       
///       <div class="c-modal__content">
///
///         <ul class="c-list c-list--no-margin">
///           <li class="c-list__schedule-item c-list__schedule-item--odded">
///             <span>
///               15 Minutos
///             </span>
///           </li>
///           <li class="c-list__schedule-item c-list__schedule-item--odded">
///             <span>
///               30 Minutos
///             </span>
///           </li>
///           <li class="c-list__schedule-item c-list__schedule-item--odded">
///             <span>
///               45 Minutos
///             </span>
///           </li>
///           <li class="c-list__schedule-item c-list__schedule-item--odded">
///             <span>
///               1 Hora
///             </span>
///           </li>
///           <li class="c-list__schedule-item c-list__schedule-item--odded">
///             <span>
///               Indefinido
///             </span>
///           </li>
///         </ul>
///       </div>
///
///       <div class="c-modal__action-area c-modal__action-area--times">
///         <div class="c-modal__info">
///           <p class="c-modal__info__text">Para Whatsapp oficial, se realizará un cobro por el mensaje enviado luego de 24 horas de la ultima conversación</p>
///         </div>
///       </div>
///     </div>
.c-modal {
  @include modifier('welcome-modal') {
    padding: 74px 90px 12px 74px;
    text-align: center;

    @include element('title') {
      margin-bottom: 12px;

      h2 {
        @include use-font('h1', 'regular');
        margin: 0;
      }
    }

    @include element('text') {
      margin-bottom: 20px;

      p {
        @include use-font('title', 'regular');
        margin: 0;
      }
    }

    @include element('btn-wrapper') {
      margin-bottom: 20px;
    }

    @include element('extra-text') {
      color: use-color('grey', 'light');

      p {
        @include use-font('link', 'regular');
        margin: 0;
      }
    }
  }
  
  @include element('header') {
    
    @include modifier('text') {
      @include use-font('subheading', 'regular');
      margin: 0 0 26px;
      padding: 0 24px;
    }
    
  }
}

Componente creado para dar la bienvenida después del onboarding.

Example

html
<div class="u-widget-example-margin"> <!-- this div is just for the example -->
  <div class="c-modal c-modal--welcome-modal">
    <div class="c-modal--welcome-modal__title">
      <h2>Bienvenido a Chattigo</h2>
    </div>
    <div class="c-modal--welcome-modal__text">
      <p>¡Estamos muy agradecidos que seas parte de nuestra comunidad!</p>
    </div>
    <div class="c-modal--welcome-modal__img-wrapper">
      <img src="https://feature-ux-341--chattigo-webkit.netlify.app/assets/img/illustrations/community.svg" alt="Welcome!">
    </div>
    <div class="c-modal--welcome-modal__btn-wrapper">
      <a href="#" class="c-button">Empezar</a>
    </div>
    <div class="c-modal--welcome-modal__extra-text">
      <p>Si tienes dudas o necesitas ayuda revisa nuestros tutpriales o descarga los manuales de <a href="https://cdn.chattigo.com/assets/pdf/manual-agente.pdf" class="c-action-link" target="_blank">agente</a>, <a href="https://cdn.chattigo.com/assets/pdf/manual-supervisor.pdf" class="c-action-link" target="_blank">supervisor</a> y <a href="https://cdn.chattigo.com/assets/pdf/manual-config.pdf" class="c-action-link" target="_blank">configuración</a>.</p>