// MIT License // Copyright (c) 2026 Koncreate // See LICENSE for details import lustre/attribute.{type Attribute, attribute, class} import lustre/element.{type Element} import lustre/element/html import ui/size as size_helpers pub type Variant { Default Muted } pub type Size { Small Medium Large } pub fn group( attributes: List(Attribute(a)), children: List(Element(a)), ) -> Element(a) { html.div( [class("flex items-center gap-2"), attribute("role", "group"), ..attributes], children, ) } pub fn variant(v: Variant) -> Attribute(a) { case v { Default -> class("text-foreground") Muted -> class("text-muted-foreground") } } pub fn size(s: Size) -> Attribute(a) { case s { Small -> class(size_helpers.text_class(size_helpers.Small)) Medium -> class(size_helpers.text_class(size_helpers.Medium)) Large -> class(size_helpers.text_class(size_helpers.Large)) } } pub fn aria_label(label: String) -> Attribute(a) { attribute("aria-label", label) }