Initial commit: timeline-elements-ui library
Angular 19 component library for timelines and event tracking: timeline, Gantt chart, event cards, date markers, connectors, and custom event templates. Includes signal-based services, SCSS design tokens with dark mode, and TypeScript type definitions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
124
src/components/tl-timeline-item/tl-timeline-item.component.scss
Normal file
124
src/components/tl-timeline-item/tl-timeline-item.component.scss
Normal file
@@ -0,0 +1,124 @@
|
||||
@use '../../styles/mixins' as *;
|
||||
|
||||
.tl-timeline-item {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: var(--spacing-lg, 1.5rem);
|
||||
padding: var(--spacing-md, 1rem) 0;
|
||||
|
||||
&::after {
|
||||
@include tl-connector(solid);
|
||||
left: calc(var(--tl-marker-size-md) / 2 - var(--tl-line-width) / 2);
|
||||
top: calc(var(--tl-marker-size-md) + var(--spacing-md, 1rem));
|
||||
bottom: calc(-1 * var(--spacing-md, 1rem));
|
||||
}
|
||||
|
||||
&:last-child::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&--animate {
|
||||
animation: tl-slide-in 300ms ease-out;
|
||||
}
|
||||
|
||||
&__marker {
|
||||
@include tl-marker(md);
|
||||
}
|
||||
|
||||
&__content {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__card {
|
||||
background: var(--color-bg-primary, #ffffff);
|
||||
border: 1px solid var(--color-border-primary, #e5e7eb);
|
||||
border-radius: var(--radius-lg, 0.5rem);
|
||||
padding: var(--spacing-lg, 1.5rem);
|
||||
transition: all var(--transition-normal, 200ms ease);
|
||||
}
|
||||
|
||||
&__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--spacing-sm, 0.75rem);
|
||||
gap: var(--spacing-md, 1rem);
|
||||
}
|
||||
|
||||
&__title {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-base, 1rem);
|
||||
font-weight: var(--font-weight-semibold, 600);
|
||||
color: var(--color-text-primary, #111827);
|
||||
line-height: var(--line-height-snug, 1.375);
|
||||
letter-spacing: var(--letter-spacing-tight, -0.025em);
|
||||
}
|
||||
|
||||
&__time {
|
||||
font-size: var(--font-size-xs, 0.75rem);
|
||||
color: var(--color-text-muted, #9ca3af);
|
||||
white-space: nowrap;
|
||||
font-weight: var(--font-weight-medium, 500);
|
||||
}
|
||||
|
||||
&__description {
|
||||
margin: var(--spacing-xs, 0.5rem) 0 0;
|
||||
font-size: var(--font-size-sm, 0.875rem);
|
||||
color: var(--color-text-secondary, #6b7280);
|
||||
line-height: var(--line-height-relaxed, 1.625);
|
||||
}
|
||||
|
||||
&__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--spacing-xs, 0.5rem);
|
||||
margin-top: var(--spacing-md, 1rem);
|
||||
}
|
||||
|
||||
&__category {
|
||||
margin-top: var(--spacing-md, 1rem);
|
||||
}
|
||||
|
||||
// Status colors
|
||||
&--completed .tl-timeline-item__marker {
|
||||
background: var(--tl-status-completed);
|
||||
}
|
||||
|
||||
&--active .tl-timeline-item__marker {
|
||||
background: var(--tl-status-active);
|
||||
}
|
||||
|
||||
&--pending .tl-timeline-item__marker {
|
||||
background: var(--tl-status-pending);
|
||||
}
|
||||
|
||||
&--error .tl-timeline-item__marker {
|
||||
background: var(--tl-status-error);
|
||||
}
|
||||
|
||||
&--warning .tl-timeline-item__marker {
|
||||
background: var(--tl-status-warning);
|
||||
}
|
||||
|
||||
// Alternating layout
|
||||
.tl-timeline-item--alternating &:nth-child(even) {
|
||||
grid-template-columns: 1fr auto;
|
||||
direction: rtl;
|
||||
|
||||
.tl-timeline-item__content {
|
||||
direction: ltr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes tl-slide-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user