@sjsf/shadcn4-theme
Version:
The shadcn-svelte based theme for svelte-jsonschema-form
28 lines (27 loc) • 1.18 kB
TypeScript
import type { Component } from 'svelte';
import type { RangeCalendarRootProps, RangeCalendar, WithoutChildrenOrChild } from 'bits-ui';
import type { DateValue } from '@internationalized/date';
import type { Range } from '@sjsf/form/lib/range';
import '../types/popover';
declare module '@sjsf/form' {
interface ComponentProps {
shadcn4DateRangePickerWidget: WidgetCommonProps<Partial<Range<string>>>;
}
interface ComponentBindings {
shadcn4DateRangePickerWidget: 'value';
}
interface UiOptions {
shadcn4DateRangePicker?: RangeCalendarRootProps;
shadcn4DateRangePickerPlaceholder?: string;
shadcn4DateRangeFormatter?: (range: Range<DateValue | undefined>) => string;
}
}
declare module '../context.js' {
interface ThemeComponents {
RangeCalendar: Component<WithoutChildrenOrChild<RangeCalendar.RootProps>, {}, 'ref' | 'value' | 'placeholder'>;
}
}
import type { WidgetCommonProps } from '@sjsf/form/fields/widgets';
declare const DateRangePicker: Component<WidgetCommonProps<Partial<Range<string>>>, {}, "value">;
type DateRangePicker = ReturnType<typeof DateRangePicker>;
export default DateRangePicker;