UNPKG

@sjsf-lab/shadcn-extras-theme

Version:

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

75 lines (74 loc) 3.31 kB
import type { WithChildren, WithoutChildren } from 'bits-ui'; import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements'; import { type VariantProps } from 'tailwind-variants'; export declare const buttonVariants: import("tailwind-variants").TVReturnType<{ variant: { default: string; destructive: string; outline: string; secondary: string; ghost: string; link: string; }; size: { default: string; sm: string; lg: string; icon: string; }; }, undefined, "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 relative inline-flex shrink-0 items-center justify-center gap-2 overflow-hidden rounded-md text-sm font-medium whitespace-nowrap outline-hidden transition-all select-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", { variant: { default: string; destructive: string; outline: string; secondary: string; ghost: string; link: string; }; size: { default: string; sm: string; lg: string; icon: string; }; }, undefined, import("tailwind-variants").TVReturnType<{ variant: { default: string; destructive: string; outline: string; secondary: string; ghost: string; link: string; }; size: { default: string; sm: string; lg: string; icon: string; }; }, undefined, "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 relative inline-flex shrink-0 items-center justify-center gap-2 overflow-hidden rounded-md text-sm font-medium whitespace-nowrap outline-hidden transition-all select-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", unknown, unknown, undefined>>; export type ButtonVariant = VariantProps<typeof buttonVariants>['variant']; export type ButtonSize = VariantProps<typeof buttonVariants>['size']; export type ButtonPropsWithoutHTML = WithChildren<{ ref?: HTMLElement | null; variant?: ButtonVariant; size?: ButtonSize; loading?: boolean; onClickPromise?: (e: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement; }) => Promise<void>; }>; export type AnchorElementProps = ButtonPropsWithoutHTML & WithoutChildren<Omit<HTMLAnchorAttributes, 'href' | 'type'>> & { href: HTMLAnchorAttributes['href']; type?: never; disabled?: HTMLButtonAttributes['disabled']; }; export type ButtonElementProps = ButtonPropsWithoutHTML & WithoutChildren<Omit<HTMLButtonAttributes, 'type' | 'href'>> & { type?: HTMLButtonAttributes['type']; href?: never; disabled?: HTMLButtonAttributes['disabled']; }; export type ButtonProps = AnchorElementProps | ButtonElementProps; declare const Button: import("svelte").Component<ButtonProps, {}, "ref">; type Button = ReturnType<typeof Button>; export default Button;