UNPKG

@sjsf/shadcn4-theme

Version:

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

21 lines (20 loc) 1.2 kB
import type { Component } from 'svelte'; import type { BitsPrimitiveDivAttributes, SingleToggleGroupRootPropsWithoutHTML, ToggleGroupItemProps, ToggleGroupRootPropsWithoutHTML, Without } from 'bits-ui'; import '@sjsf/form/fields/extra-widgets/radio-buttons'; import type { ToggleVariants } from '../../components/ui/toggle/index.js'; type ToggleGroupProps = SingleToggleGroupRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ToggleGroupRootPropsWithoutHTML> & ToggleVariants; declare module '@sjsf/form' { interface UiOptions { shadcn4RadioButtons?: ToggleGroupProps; shadcn4RadioButtonsItem?: ToggleGroupItemProps & ToggleVariants; } } declare module '../context.js' { interface ThemeComponents { ToggleGroup: Component<ToggleGroupProps & ToggleVariants, {}, 'ref' | 'value'>; ToggleGroupItem: Component<ToggleGroupItemProps & ToggleVariants, {}, 'ref' | 'value'>; } } declare const RadioButtons: Component<import("@sjsf/form/fields/widgets").WidgetCommonProps<import("@sjsf/form").SchemaValue> & import("@sjsf/form/fields/widgets").Options, {}, "value">; type RadioButtons = ReturnType<typeof RadioButtons>; export default RadioButtons;