import { Show } from 'solid-js'; import { Button } from '../ui/button'; import { renderIcon } from '../ui/icon'; import { defineWebComponent } from './define'; interface Props extends Record { /** Visual style. `default` (filled), `subtle` (muted text, hover tint — the * toolbar icon look), `ghost` (transparent, hover fill), `outline`, or * `destructive`. Defaults to `default`. */ variant?: 'default' | 'subtle' | 'ghost' | 'outline' | 'destructive'; /** Size token. `icon` / `icon-sm` are square (for icon-only buttons); `sm` / * `md` / `lg` size text buttons. Defaults to `md`. */ size?: 'sm' | 'md' | 'lg' | 'icon' | 'icon-sm'; /** Leading icon: a named icon (e.g. `"mic"`, `"plus"`), an image URL/data-URI, * or plain text. Renders before any slotted label. */ icon?: string; /** Trailing icon, after the label (e.g. `"chevron-down"` for a menu affordance). */ iconTrailing?: string; /** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored * when you slot visible text, which already names the button. */ label?: string; /** Disable the button (non-interactive, dimmed). */ disabled?: boolean; /** Stretch the button to the full width of its container (a block button) — * e.g. a card CTA or a stacked action. Attribute: `full`. */ full?: boolean; /** Justify the button's content: `start`, `center` (default), or `end`. * Combine with `full` for a full-width, left-aligned button. */ align?: 'start' | 'center' | 'end'; /** Native button `type`. Defaults to `button` (so it never submits a form). */ type?: 'button' | 'submit' | 'reset'; } /** Events fired by ``. */ interface Events { /** The button was activated (pointer or keyboard). Carries no detail. The * native `click` also bubbles (composed) for consumers who prefer it. */ 'kai-click': void; } /** * `` — the kit's button as a drop-in element, so consumers compose * polished, theme-aware controls instead of hand-rolling ` ); });