class UiSpinner extends HTMLElement { connectedCallback() { const size = this.getAttribute('size') || 'md'; const px = { sm: '16px', md: '24px', lg: '40px' }[size] || '24px'; this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
`; } } customElements.define('ui-spinner', UiSpinner);