Newer
Older
vmk-ui-kit / src / scss / components / _progress.scss
/* =========================
   Progress
   Figma: Number Progress Indicator + linear progress bars.
========================= */

@use "../kit-deps" as *;

// Linear progress
.progress {
  width: 100%;
  max-width: 600px;
  height: 8px;
  border-radius: $radius-full;
  background-color: $neutral-100;
  overflow: hidden;

  & + .progress {
    margin-top: $space-5;
  }

  .progress-bar {
    height: 100%;
    border-radius: $radius-full;
    background-color: $mint-600;
    transition: width $motion-base $motion-ease;
  }

  // Variants
  &.progress-primary .progress-bar { background-color: $neutral-900; }
  &.progress-accent  .progress-bar { background-color: $yellow-300; }
  &.progress-success  .progress-bar { background-color: $success-text; }
  &.progress-warning  .progress-bar { background-color: $warning-text; }
  &.progress-danger   .progress-bar { background-color: $danger-text; }

  // Sizes
  &.progress-sm { height: 4px; }
  &.progress-lg { height: 12px; }
}

// Circular / step indicator
.progress-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: $radius-full;
  background-color: $neutral-0;
  border: $border-width-base $border-style-base $neutral-300;
  color: $neutral-500;
  font-family: $font-family-base;
  font-size: 13px;
  font-weight: $font-weight-bold;
  line-height: 1;

  &.is-active {
    background-color: $mint-600;
    border-color: $mint-600;
    color: $neutral-0;
  }

  &.is-complete {
    background-color: $success-text;
    border-color: $success-text;
    color: $neutral-0;
  }

  &.is-accent {
    background-color: $yellow-300;
    border-color: $yellow-300;
    color: $neutral-900;
  }

  // Sizes
  &.progress-step-sm {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  &.progress-step-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
}

/* Usage meter */
.usage-meter {
  width: 100%;
  max-width: 600px;

  .usage-meter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $space-3;
    margin: 0 0 $space-3;
    font-size: $font-size-lg;
    font-weight: $font-weight-bold;
    color: $neutral-900;
  }

  .usage-meter-value {
    font-size: $font-size-base;
    font-weight: $font-weight-semibold;
    color: $neutral-500;
  }

  .usage-meter-meta {
    margin: $space-2 0 0;
    color: $neutral-500;
    font-size: $font-size-sm;
  }
}