noph-ui
Version:
Noph UI is a modern, powerful UI library for Svelte 5, fully aligned with the Material 3 guidelines. Build stunning, consistent user interfaces with the efficiency and flexibility of Svelte and Google’s Material Design framework.
30 lines (29 loc) • 980 B
TypeScript
import type { Snippet } from 'svelte';
import type { HTMLInputAttributes, HTMLTextareaAttributes } from 'svelte/elements';
interface FieldProps {
label?: string;
supportingText?: string;
issues?: {
message: string;
}[];
prefixText?: string;
suffixText?: string;
variant?: 'outlined' | 'filled';
start?: Snippet;
end?: Snippet;
noAsterisk?: boolean;
element?: HTMLSpanElement;
inputElement?: HTMLInputElement | HTMLTextAreaElement;
populated?: boolean;
clientWidth?: number;
clientHeight?: number;
focused?: boolean;
}
export interface InputFieldProps extends HTMLInputAttributes, FieldProps {
type?: 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url' | 'datetime-local' | 'date' | 'datetime' | 'time';
}
export interface TextAreaFieldProps extends HTMLTextareaAttributes, FieldProps {
type: 'textarea';
}
export type TextFieldProps = InputFieldProps | TextAreaFieldProps;
export {};