Files
oxpoe e903912029
CI / test (push) Successful in 27s
ui: surface chrome ala tuios — bar workspace + modal + strip hint bertier
Analisa referensi tuios (Charm/BubbleTea): overlay = surface solid + chip
judul aksen, bukan border; hint strip dibuang bertier saat sempit; geometri
satu sumber untuk render & hit-test.

- components.Chip: pill label (latar aksen + teks Base; mode terminal =
  reverse) — dipakai bar workspace & modal.
- Bar workspace jadi surface 3 baris (chip 'workspace', subjudul tautan
  seksi + tombol kanan, pill Cari inset Base) — pola mock draf-tia.
- Modal konverter jadi surface: chip judul, blok inset Base untuk input &
  output (padding & teks dalam satu gaya agar latar tak bolong oleh reset
  SGR), strip tombol Base, baris hint terstyling.
- Footer jadi dock hint: kunci aksen tebal + label redup, hint dibuang
  bertier (dekoratif dulu, esensial bertahan) dengan ellipsis, status
  diagnostik dipangkas ke sisa ruang — teks plain (hit-test) = teks tampil.
- Tes: chip (3 mode tema), footer bertier (plain==styled, batas lebar), e2e
  posisi klik digeser mengikuti bar 3 baris.
2026-10-16 03:57:13 +07:00

23 lines
634 B
Go

package components
import (
"charm.land/lipgloss/v2"
"gitea.oxpoe.qzz.io/oxpoe/tia-love/internal/ui/theme"
)
// Chip — label di dalam pill (pola tuios overlay): latar aksen, teks warna
// base, bold, padding 1 sel. Mode terminal (Base kosong = latar diserahkan ke
// terminal pengguna) memakai reverse agar kontras tetap terjaga.
func Chip(label string) string {
th := theme.Current()
st := lipgloss.NewStyle().Bold(true).Padding(0, 1)
if th.Base == "" {
return st.Reverse(true).Render(label)
}
return st.
Background(lipgloss.Color(string(th.Accent))).
Foreground(lipgloss.Color(string(th.Base))).
Render(label)
}