hikari-components 0.2.0

Core UI components (40+) for the Hikari design system
// styles/components/carousel.scss
// Carousel component 

.hi-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

// Carousel track - contains all slides
.hi-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

// Carousel item - individual slide
.hi-carousel-item {
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
}

// Navigation arrows
.hi-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--hi-color-surface, #ffffff);
  color: var(--hi-color-text-primary, #333);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
  user-select: none;

  &:hover {
    background-color: var(--hi-color-primary, #00A0E9);
    color: var(--hi-color-surface, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 160, 233, 0.3);
  }

  &:active {
    transform: translateY(-50%) scale(0.95);
  }
}

.hi-carousel-arrow-prev {
  left: 1rem;
}

.hi-carousel-arrow-next {
  right: 1rem;
}

// Indicators container
.hi-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hi-carousel-indicators-dots {
  // Dots are positioned at bottom center
}

.hi-carousel-indicators-line {
  // Line indicators are positioned at bottom center
}

.hi-carousel-indicators-hidden {
  display: none;
}

// Indicator dots
.hi-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--hi-color-surface, #ffffff);
  border: 2px solid var(--hi-color-border, #e0e0e0);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;

  &:hover {
    background-color: var(--hi-color-primary, #00A0E9);
    border-color: var(--hi-color-primary, #00A0E9);
    transform: scale(1.2);
  }

  &:active {
    transform: scale(1.1);
  }
}

.hi-carousel-dot-active {
  background-color: var(--hi-color-primary, #00A0E9);
  border-color: var(--hi-color-primary, #00A0E9);
  box-shadow: 0 0 12px var(--hi-glow-button-primary, rgba(0, 160, 233, 0.4));
}

// Pause button
.hi-carousel-pause {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--hi-color-surface, #ffffff);
  color: var(--hi-color-text-primary, #333);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
  user-select: none;

  &:hover {
    background-color: var(--hi-color-primary, #00A0E9);
    color: var(--hi-color-surface, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 160, 233, 0.3);
  }

  &:active {
    transform: scale(0.95);
  }
}

//  effects
.hi-carousel-arrow:hover {
  box-shadow:
    0 4px 12px rgba(0, 160, 233, 0.3),
    0 0 20px var(--hi-glow-button-primary, rgba(0, 160, 233, 0.2));
}

.hi-carousel-dot-active {
  box-shadow:
    0 0 12px var(--hi-glow-button-primary, rgba(0, 160, 233, 0.4)),
    0 0 24px rgba(0, 160, 233, 0.2);
}

.hi-carousel-pause:hover {
  box-shadow:
    0 4px 12px rgba(0, 160, 233, 0.3),
    0 0 20px var(--hi-glow-button-primary, rgba(0, 160, 233, 0.2));
}

// Tairitsu theme (dark)
[data-theme="tairitsu"] {
  .hi-carousel-arrow,
  .hi-carousel-dot,
  .hi-carousel-pause {
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .hi-carousel-arrow:hover,
  .hi-carousel-dot-active,
  .hi-carousel-pause:hover {
    background-color: var(--hi-color-primary);
    color: rgba(255, 255, 255, 0.95);
    border-color: var(--hi-color-primary);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.4);
  }

  .hi-carousel-dot {
    background-color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.24);
  }

  .hi-carousel-dot-active {
    background-color: var(--hi-color-primary);
    border-color: var(--hi-color-primary);
    box-shadow:
      0 0 12px rgba(26, 35, 126, 0.5),
      0 0 24px rgba(26, 35, 126, 0.3);
  }

  .hi-carousel-arrow:hover,
  .hi-carousel-pause:hover {
    box-shadow:
      0 4px 12px rgba(26, 35, 126, 0.5),
      0 0 20px rgba(26, 35, 126, 0.3);
  }
}

// Responsive adjustments
@media (max-width: 768px) {
  .hi-carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }

  .hi-carousel-arrow-prev {
    left: 0.5rem;
  }

  .hi-carousel-arrow-next {
    right: 0.5rem;
  }

  .hi-carousel-dot {
    width: 6px;
    height: 6px;
  }

  .hi-carousel-pause {
    width: 30px;
    height: 30px;
    font-size: 0.875rem;
    bottom: 0.5rem;
    right: 0.5rem;
  }
}

// Animation for smooth transitions
@keyframes hi-carousel-slide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hi-carousel-item {
  animation: hi-carousel-slide 0.5s ease-out;
}