claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
47 lines • 1.96 kB
TypeScript
import type { Snippet } from 'svelte';
import type { MoodValue, MoodScale, InputMethod, MoodSize, MoodEntry } from './types.js';
interface Props {
value?: MoodValue;
scale?: MoodScale;
inputMethod?: InputMethod;
size?: MoodSize;
showLabels?: boolean;
showHistory?: boolean;
history?: MoodEntry[];
maxHistory?: number;
allowNotes?: boolean;
minLabel?: string;
maxLabel?: string;
disabled?: boolean;
class?: string;
onMoodChange?: (entry: MoodEntry) => void;
onNoteAdd?: (note: string) => void;
children?: Snippet;
}
/**
* MoodTracker
*
* ADHD-friendly mood tracking component with multiple input methods and accessibility features.
* Designed with therapeutic principles for neurodivergent users.
*
* @prop {MoodValue} [value] - Current mood value
* @prop {MoodScale} [scale='1-5'] - Scale type ('1-5', '1-10', 'emoji')
* @prop {InputMethod} [inputMethod='slider'] - Input method ('slider', 'buttons', 'emoji-picker', 'scale-buttons')
* @prop {MoodSize} [size='md'] - Size variant ('sm', 'md', 'lg')
* @prop {boolean} [showLabels=true] - Whether to show labels
* @prop {boolean} [showHistory=false] - Whether to show history
* @prop {MoodEntry[]} [history=[]] - Historical mood entries
* @prop {number} [maxHistory=5] - Maximum history entries to display
* @prop {boolean} [allowNotes=true] - Whether to allow adding notes
* @prop {string} [minLabel] - Custom label for minimum value
* @prop {string} [maxLabel] - Custom label for maximum value
* @prop {boolean} [disabled=false] - Whether the tracker is disabled
* @prop {string} [class] - Additional CSS classes
*
* @event moodchange - Dispatched when mood value changes
* @event noteadd - Dispatched when note is added
*/
declare const MoodTracker: import("svelte").Component<Props, {}, "">;
type MoodTracker = ReturnType<typeof MoodTracker>;
export default MoodTracker;
//# sourceMappingURL=MoodTracker.svelte.d.ts.map