- tokens.go: semantic token constants - variants.go: Size/ButtonVariant/ButtonTone/BadgeVariant enums + Normalized* - helpers.go: mergeAttrs for templ.Attributes - base.css: resets, :focus-visible ring (no nesting)
21 lines
958 B
Go
21 lines
958 B
Go
// Package ui hosts the design-system primitives (Button, Card, Badge) and the
|
|
// shared enum surface (Size, ButtonVariant, ButtonTone, BadgeVariant) used by
|
|
// every templ page in the application.
|
|
//
|
|
// Phase 1 ships a minimal subset of the semantic token surface declared here.
|
|
// Later phases extend the rules in *.css files rather than restructuring the
|
|
// enum/token surface — these constants exist so consumers can refer to tokens
|
|
// by name without hard-coding string literals.
|
|
package ui
|
|
|
|
// Semantic token names. Phase 1 ships these for forward compatibility; the
|
|
// CSS rules in base.css / button.css / card.css / badge.css do not yet
|
|
// dereference these constants. Future phases will route component variants
|
|
// through tokens (e.g. ButtonVariantDanger -> TokenDanger).
|
|
const (
|
|
TokenPrimary string = "primary"
|
|
TokenNeutral string = "neutral"
|
|
TokenWarning string = "warning"
|
|
TokenSuccess string = "success"
|
|
TokenDanger string = "danger"
|
|
)
|