2026-02-24 18:02:24 +03:00
|
|
|
<!--
|
|
|
|
|
Component: SectionHeader
|
|
|
|
|
Numbered section heading with optional subtitle and pulse dot.
|
|
|
|
|
-->
|
|
|
|
|
<script lang="ts">
|
2026-04-23 09:48:32 +03:00
|
|
|
import { cn } from '$shared/lib';
|
2026-02-24 18:02:24 +03:00
|
|
|
import { Label } from '$shared/ui';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
2026-03-02 22:19:35 +03:00
|
|
|
/**
|
|
|
|
|
* Section index
|
|
|
|
|
*/
|
2026-02-24 18:02:24 +03:00
|
|
|
index: string | number;
|
2026-03-02 22:19:35 +03:00
|
|
|
/**
|
|
|
|
|
* Section title
|
|
|
|
|
*/
|
2026-02-24 18:02:24 +03:00
|
|
|
title: string;
|
2026-03-02 22:19:35 +03:00
|
|
|
/**
|
|
|
|
|
* Section subtitle
|
|
|
|
|
*/
|
2026-02-24 18:02:24 +03:00
|
|
|
subtitle?: string;
|
2026-03-02 22:19:35 +03:00
|
|
|
/**
|
|
|
|
|
* Pulse animation
|
|
|
|
|
* @default false
|
|
|
|
|
*/
|
2026-02-24 18:02:24 +03:00
|
|
|
pulse?: boolean;
|
2026-03-02 22:19:35 +03:00
|
|
|
/**
|
|
|
|
|
* CSS classes
|
|
|
|
|
*/
|
2026-02-24 18:02:24 +03:00
|
|
|
class?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
index,
|
|
|
|
|
title,
|
|
|
|
|
subtitle,
|
|
|
|
|
pulse = false,
|
|
|
|
|
class: className,
|
|
|
|
|
}: Props = $props();
|
|
|
|
|
|
|
|
|
|
const indexStr = $derived(String(index).padStart(2, '0'));
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-04-23 09:48:32 +03:00
|
|
|
<div class={cn('flex items-center gap-3 md:gap-4 mb-2', className)}>
|
2026-02-24 18:02:24 +03:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
|
{#if pulse}
|
|
|
|
|
<span class="w-1.5 h-1.5 bg-brand rounded-full animate-pulse"></span>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<Label variant="accent" size="sm" bold>
|
|
|
|
|
{indexStr} // {title}
|
|
|
|
|
</Label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{#if subtitle}
|
2026-04-17 09:41:55 +03:00
|
|
|
<span class="text-neutral-300 dark:text-neutral-700 text-2xs hidden md:inline">/</span>
|
2026-02-24 18:02:24 +03:00
|
|
|
<Label variant="muted" size="sm">{subtitle}</Label>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|