/** * AgnosticUI v2 Button - Canonical Implementation * * � IMMUTABLE CANONICAL VERSION � * * This file contains the canonical, upgrade-safe implementation of the Button component. * It should NEVER be modified directly by users or AI assistants. * * Version: 2.0.0-dev * Last Updated: 2025-09-16 * API Compatibility: 2.x * * Stability Guarantees: * - All public APIs remain backward compatible within major versions * - All ARIA attributes and accessibility features are preserved * - All CSS functional styling remains consistent * - Component behavior is identical across patch and minor updates * * For customization, use: * - Button.ts: Experimental/AI-modifiable version * - styled/: Production styling tiers * - experiments/: Experimental styling variations * - extensions/: AI-safe behavioral extensions */ import { LitElement, html, css, type CSSResultGroup } from 'lit'; import { property } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; // Event types export interface ButtonToggleEventDetail { pressed: boolean; } export type ButtonToggleEvent = CustomEvent; // Props interface following INTERFACE_STANDARDS.md export interface ButtonProps { variant?: 'success' | 'primary' | 'secondary' | 'warning' | 'danger' | 'monochrome' | ''; size?: 'x-sm' | 'sm' | 'md' | 'lg' | 'xl'; shape?: 'capsule' | 'rounded' | 'circle' | 'square' | 'rounded-square' | ''; bordered?: boolean; ghost?: boolean; link?: boolean; grouped?: boolean; fullWidth?: boolean; type?: 'button' | 'submit' | 'reset'; disabled?: boolean; loading?: boolean; toggle?: boolean; pressed?: boolean; ariaLabel?: string; onClick?: (event: MouseEvent) => void; onFocus?: (event: FocusEvent) => void; onBlur?: (event: FocusEvent) => void; onToggle?: (event: ButtonToggleEvent) => void; } /** * AgButton - Foundation button component with APG compliance * * A semantic button element that supports multiple types and follows * WAI-ARIA APG button patterns for full accessibility compliance. * * Features: * - Semantic `; } }