UNPKG

@sjsf/daisyui5-theme

Version:

The daisyUI v5 based theme for svelte-jsonschema-form

32 lines (31 loc) 1.25 kB
import type { ClassValue, HTMLButtonAttributes } from 'svelte/elements'; import type { CalendarRangeProps, CalendarMonthProps, CalendarDateProps } from 'cally'; import '@sjsf/form/fields/extra-widgets/date-picker'; type MapEvents<T> = { [K in keyof T as K extends `on${infer E}` ? `on:${Lowercase<E>}` : K]: T[K]; }; export type CalendarProps = MapEvents<CalendarDateProps> & { class?: ClassValue | null; placeholder?: string; }; declare module 'svelte/elements' { interface SvelteHTMLElements { 'calendar-range': MapEvents<CalendarRangeProps>; 'calendar-month': MapEvents<CalendarMonthProps>; 'calendar-date': CalendarProps; } interface SVGAttributes<T extends EventTarget> { slot?: string | null; } } declare module '@sjsf/form' { interface UiOptions { daisyui5CallyCalendarDateFormatter?: (date: string) => string; daisyui5CallyCalendarTrigger?: HTMLButtonAttributes; daisyui5CallyCalendar?: CalendarProps; } } import 'cally'; declare const CallyDatePicker: import("svelte").Component<import("@sjsf/form/fields/widgets").WidgetCommonProps<string>, {}, "value">; type CallyDatePicker = ReturnType<typeof CallyDatePicker>; export default CallyDatePicker;