UNPKG

noph-ui

Version:

Noph UI is a modern, powerful UI library for Svelte 5, fully aligned with the Material 3 guidelines. Build stunning, consistent user interfaces with the efficiency and flexibility of Svelte and Google’s Material Design framework.

56 lines (55 loc) 1.86 kB
import type { Snippet } from 'svelte'; import type { HTMLAttributes, HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements'; interface ButtonButtonProps extends HTMLButtonAttributes { variant?: 'text' | 'filled' | 'outlined' | 'elevated' | 'tonal'; start?: Snippet | undefined; end?: Snippet | undefined; element?: HTMLElement; disabled?: boolean; loading?: boolean; loadingAriaLabel?: string; keepTooltipOnClick?: boolean; } interface ButtonAnchorProps extends HTMLAnchorAttributes { variant?: 'text' | 'filled' | 'outlined' | 'elevated' | 'tonal'; start?: Snippet; end?: Snippet; element?: HTMLElement; keepTooltipOnClick?: boolean; disabled?: boolean; loading?: boolean; loadingAriaLabel?: string; } interface IconButtonButtonProps extends HTMLButtonAttributes { variant?: 'text' | 'filled' | 'outlined' | 'tonal'; element?: HTMLElement; toggle?: boolean; selected?: boolean; keepTooltipOnClick?: boolean; selectedIcon?: Snippet; } interface IconButtonAnchorProps extends HTMLAnchorAttributes { variant?: 'text' | 'filled' | 'outlined' | 'tonal'; element?: HTMLElement; disabled?: boolean; toggle?: boolean; selected?: boolean; keepTooltipOnClick?: boolean; selectedIcon?: Snippet; } export type IconButtonProps = IconButtonButtonProps | IconButtonAnchorProps; export type ButtonProps = ButtonButtonProps | ButtonAnchorProps; export interface SegmentedButtonProps extends HTMLAttributes<HTMLDivElement> { name: string; multiSelect?: boolean; options: { label: string | Snippet; selected?: boolean; disabled?: boolean; icon?: Snippet; onclick?: (event: Event) => void; }[]; group?: string | number | (string | number)[] | null; element?: HTMLElement; } export {};