UNPKG

@sjsf/shadcn4-theme

Version:

The shadcn-svelte based theme for svelte-jsonschema-form

21 lines (20 loc) 897 B
import type { Component } from 'svelte'; import type { Calendar, CalendarSingleRootProps, WithoutChildrenOrChild } from 'bits-ui'; import '@sjsf/form/fields/extra-widgets/date-picker'; import type { ButtonProps } from '../types/button.js'; import '../types/popover'; declare module '@sjsf/form' { interface UiOptions { shadcn4DatePicker?: Omit<WithoutChildrenOrChild<CalendarSingleRootProps>, 'type'>; shadcn4DatePickerTrigger?: ButtonProps; shadcn4DateFormatter?: (date: Date) => string; } } declare module '../context.js' { interface ThemeComponents { Calendar: Component<WithoutChildrenOrChild<Calendar.RootProps>, {}, 'value' | 'placeholder' | 'ref'>; } } declare const DatePicker: Component<import("@sjsf/form/fields/widgets").WidgetCommonProps<string>, {}, "value">; type DatePicker = ReturnType<typeof DatePicker>; export default DatePicker;