import { ButtonGroup, ButtonGroupSeparator, ToggleButton, ToggleButtonGroup, ToggleButtonGroupSeparator, type ButtonGroupProps, type ToggleButtonGroupKey, type ToggleButtonGroupProps, type ToggleButtonProps, } from "../../packages/vue/src"; // Compile-only public contract checks (not mounted or executed by Vitest). function buttonToggleContract() { const group: ButtonGroupProps = { size: "sm", variant: "secondary", orientation: "vertical", fullWidth: true, isDisabled: true, }; // @ts-expect-error unsupported size const badSize: ButtonGroupProps = { size: "xl" }; // @ts-expect-error unsupported variant const badVariant: ButtonGroupProps = { variant: "rainbow" }; const toggle: ToggleButtonProps = { modelValue: true, isSelected: false, defaultValue: true, defaultSelected: false, isDisabled: true, isIconOnly: true, size: "lg", variant: "ghost", id: "bold", value: 2, }; // @ts-expect-error unsupported variant const badToggleVariant: ToggleButtonProps = { variant: "outline" }; const selected: ToggleButtonGroupKey = "bold"; const numeric: ToggleButtonGroupKey = 3; const toggleGroup: ToggleButtonGroupProps = { selectionMode: "multiple", modelValue: [selected, numeric], defaultSelectedKeys: ["italic"], disallowEmptySelection: true, orientation: "horizontal", size: "md", isDetached: true, fullWidth: true, isDisabled: false, }; // @ts-expect-error unsupported selection mode const badMode: ToggleButtonGroupProps = { selectionMode: "all" }; return { badMode, badSize, badToggleVariant, badVariant, group, toggle, toggleGroup, ButtonGroup, ButtonGroupSeparator, ToggleButton, ToggleButtonGroup, ToggleButtonGroupSeparator, }; } void buttonToggleContract; import type { ToolbarProps } from "../../packages/vue/src"; import { Toolbar } from "../../packages/vue/src"; function toolbarContract() { const ok: ToolbarProps = { isAttached: true, orientation: "vertical", dir: "rtl", }; // @ts-expect-error unsupported orientation const bad: ToolbarProps = { orientation: "diagonal" }; return { bad, ok, Toolbar }; } void toolbarContract;