import { FluentComponent } from '../core/fluent-component' import { createUniversalComponent } from '../core/component-factory' class FluentStepperInternal extends FluentComponent { static tag = 'fluent-stepper' static override get observedAttributes() { return ['current', 'total'] } override connectedCallback() { super.connectedCallback() this.addEventListener('keydown', (e: KeyboardEvent) => { const current = Number(this.getAttribute('current') || '1') const total = Number(this.getAttribute('total') || '1') if (e.key === 'ArrowRight') this.setAttribute('current', String(Math.min(total, current + 1))) if (e.key === 'ArrowLeft') this.setAttribute('current', String(Math.max(1, current - 1))) }) } render() { const current = Number(this.getAttribute('current') || '1') const total = Number(this.getAttribute('total') || '1') const items = Array.from({ length: total }, (_, i) => `
`).join('') this.shadowRootRef.innerHTML = `