UNPKG

claritykit-svelte

Version:

A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility

65 lines 2 kB
/** * MoodTracker Types * Type definitions for the mood tracking component */ export type MoodValue = number; export type MoodScale = '1-5' | '1-10' | 'emoji'; export type MoodEmoji = 'very-sad' | 'sad' | 'neutral' | 'happy' | 'very-happy' | 'angry' | 'anxious' | 'calm' | 'excited' | 'tired'; export type InputMethod = 'slider' | 'buttons' | 'emoji-picker' | 'scale-buttons'; export type MoodSize = 'sm' | 'md' | 'lg'; export interface MoodEntry { value: MoodValue; emoji?: MoodEmoji; timestamp: Date; note?: string; } export interface MoodTrackerProps { /** Current mood value */ value?: MoodValue; /** Scale type for mood tracking */ scale?: MoodScale; /** Input method for mood selection */ inputMethod?: InputMethod; /** Size of the tracker */ size?: MoodSize; /** Whether to show labels */ showLabels?: boolean; /** Whether to show history */ showHistory?: boolean; /** Historical mood entries */ history?: MoodEntry[]; /** Maximum history entries to display */ maxHistory?: number; /** Whether to allow adding notes */ allowNotes?: boolean; /** Custom labels for scale endpoints */ minLabel?: string; maxLabel?: string; /** Whether the tracker is disabled */ disabled?: boolean; /** Additional CSS classes */ class?: string; /** Callback when mood value changes */ onMoodChange?: (entry: MoodEntry) => void; /** Callback when note is added */ onNoteAdd?: (note: string) => void; } export interface MoodConfig { value: MoodValue; emoji: string; label: string; color: string; bgColor: string; description: string; } export interface EmojiMoodConfig { emoji: string; label: string; value: MoodValue; color: string; bgColor: string; keywords: string[]; } export type MoodScaleConfig = Record<string, MoodConfig>; export type EmojiMoodMap = Record<MoodEmoji, EmojiMoodConfig>; //# sourceMappingURL=types.d.ts.map