import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["button"]; type $Props = { /** * Specify the value used to identify this button in the group's `selected` array. * @default "" */ value?: string | number; /** * Specify the icon to render. * Alternatively, use the named slot "icon". */ icon?: Icon | undefined; /** * Specify the accessible label for an icon-only button. * Required when no default slot content is provided; also used as the * hover/focus tooltip text. */ iconDescription?: string | undefined; /** * Set to `true` to disable this button * @default false */ disabled?: boolean; /** * Set the tooltip placement in floating-ui form: the side, then `start` * or `end` along it, as Popover's `align` takes. Above and below, * `start` and `end` name inline sides, so they swap under `dir="rtl"`. * When set, takes precedence over `tooltipPosition` and `tooltipAlignment`. */ tooltipAlign?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | undefined; /** * Set the position of the portalled tooltip relative to the icon. Icon-only buttons only. * Defaults to `"bottom"` when the group is horizontal and `"right"` when * vertical, since a top/bottom tooltip would otherwise land on top of the * next stacked segment. * @deprecated use `tooltipAlign` */ tooltipPosition?: "top" | "right" | "bottom" | "left" | undefined; /** * Set the alignment of the portalled tooltip relative to the icon. Icon-only buttons only. * @deprecated use `tooltipAlign` * @default "center" */ tooltipAlignment?: "start" | "center" | "end"; /** * Obtain a reference to the HTML element. * @default null */ ref?: null | HTMLButtonElement; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type ToggleButtonProps = Omit<$RestProps, keyof $Props> & $Props; export default class ToggleButton extends SvelteComponentTyped< ToggleButtonProps, { blur: WindowEventMap["blur"]; click: WindowEventMap["click"]; focus: WindowEventMap["focus"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record; icon: Record; } > {}