'use client' import { Accordion, View, XStack } from '@hanzo/gui'; import * as React from 'react'; import { ink } from './ink'; // The Lux accordion, on gui's Accordion. // // Everything behavioural belongs to the primitive and none of it is // re-implemented here: roving Arrow/Home/End focus on the root, `aria-expanded` // + `aria-controls` on the trigger, `role="region"` + `aria-labelledby` on the // content. This file names the four parts and dresses them. // // Three corrections the primitive needs, each of which is a real bug if skipped: // // 1. gui's `Accordion.Header` renders an `

` at the display type scale. An // accordion is a list of sections inside a page that already has a title, so // unqualified every row publishes a competing document heading and a screen // reader's heading list comes out as N level-1s. `headingLevel` re-hosts it // and sets the matching `aria-level`, which the inherited `role="heading"` // requires to be valid. // 2. `unstyled` means gui applies nothing — which on the web leaves the USER // AGENT's chrome, and a bare `