# Spinner — accessible headless loading indicator
#
# Announces loading state to screen readers via role="status".
# Exposes size as a CSS custom property for styling.
# Ships zero CSS.
#
# Usage:
#   Spinner
#   Spinner label: "Saving...", size: "24px"

export Spinner = component
  @label:: string := "Loading"
  @size:: any := null

  render
    div role: "status", aria-label: @label
      style: if @size then "--spinner-size: #{@size}" else undefined
