@smkit/ui
Version:
UI Kit of SberMarketing
26 lines (25 loc) • 726 B
TypeScript
import type { Writable } from 'svelte/store';
import type { ZodAny, ZodString } from 'zod';
export interface FormSettings {
value?: string | number | boolean;
validation?: ZodAny | ZodString | null;
selectField?: string;
}
export type FormData = string | number | boolean;
export type FormValidators = Record<string, ZodAny | null>;
export type FormError = string;
export type FormErrors = Writable<Record<string, FormError>>;
export interface FormValidationOutput {
success: boolean;
error?: string[];
}
export declare enum InputTypes {
Text = "text",
Checkbox = "checkbox",
Radio = "radio",
Number = "number"
}
export declare enum FormActions {
Create = "create",
Edit = "edit"
}