"""Line icons, lifted verbatim from the Aurora Glass design canvas.
Stroke-based, 24x24 view box, ``currentColor`` throughout, so every icon
inherits the colour of whatever it sits in and recolours with the step
accent for free. Sized by CSS (``.ups-ico svg``), never by an attribute.
These are markup constants only — nothing here reads state or renders.
"""
from __future__ import annotations
ICONS: dict[str, str] = {
"alert": "",
"arrow": "",
"check": "",
"clock": "",
"compass": "",
"copy": "",
"doc": "",
"download": "",
"edit": "",
"eye": "",
"eyeoff": "",
"folder": "",
"image": "",
"key": "",
"lock": "",
"minus": "",
"moon": "",
"plus": "",
"quote": "",
"refresh": "",
"shield": "",
"spark": "",
"sun": "",
"target": "",
"x": "",
}
def icon(name: str, *, size: int | None = None, cls: str = "") -> str:
"""Return one icon as inline SVG, wrapped so CSS can size and colour it.
Unknown names return an empty string rather than raising: an icon is
decoration, and a missing one must never take a screen down.
"""
svg = ICONS.get(name, "")
if not svg:
return ""
style = f' style="--ico:{size}px"' if size else ""
classes = ("ups-ico " + cls).strip()
return f'{svg}'