mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
ColorField: shared color-input primitive, Theme Builder + Chart Builder migration
This commit is contained in:
@@ -179,6 +179,11 @@ UI by swapping one set of values. Borrowed from Carbon's layering model:
|
||||
buttons are **`IconButton`** (24px `sm` exists solely for controls nested
|
||||
_inside_ a 32px control — a search field's clear, a toast's dismiss); writing
|
||||
`height:` on a new ad-hoc button is the code smell.
|
||||
- **Color inputs go through `ColorField`** — the one home for the native
|
||||
`type="color"` chrome reset and the optional paired hex field (read/copy/retype
|
||||
a value). A bare `<input type="color">` is the code smell; the Theme Builder
|
||||
swatches (`hex`) and the Chart Builder constant-colour binding (`size="sm"`,
|
||||
inside a pill) share it. Per-context removal is the caller's, not the field's.
|
||||
- **Buttons:** square, via the `Button` primitive. Variants: **primary** (filled
|
||||
`--accent`), **secondary** (1px `--border-strong`, `--bg` fill —
|
||||
so a bordered control on a gray panel goes white, never a darker gray), **ghost** (text-only, borderless; a transparent
|
||||
|
||||
Reference in New Issue
Block a user