Skip to content

UI kit: Tooltip, Accordion, and Separator #2268

Open

Description

@trillium

Trillium Firstmate 🤖

Overview

Create the shared tooltip, accordion, and divider that replace MUI Tooltip (2 uses), Accordion (1 use) and Divider (1 use).

Dependencies

Action Items

  • Add @radix-ui/react-tooltip, @radix-ui/react-accordion, and @radix-ui/react-separator.
  • Create client/src/components/ui/tooltip.tsx (TooltipProvider, Tooltip, TooltipTrigger, TooltipContent). Opens on hover and on keyboard focus; Escape closes.
  • Create client/src/components/ui/accordion.tsx (Accordion, AccordionItem, AccordionTrigger, AccordionContent) with the chevron icon from the icon ticket that rotates when open. Match components/parts/boxes/TitledBox.jsx.
  • Create client/src/components/ui/separator.tsx (replaces the Divider in TitledBox.jsx).
  • Tests for each (hover/focus opens a tooltip; Enter/Space toggles the accordion; separator has the right role).
  • Catalogue entries for all three.

Acceptance Criteria

  • The component lives in client/src/components/ui/ as a .tsx file, with typed props that pass yarn typecheck (strict mode).
  • Styling uses Tailwind classes only. Variants (if any) are declared with cva, and className is merged with cn() so callers can override.
  • The component does not import anything from @mui/* or @emotion/*.
  • A test file next to the component (for example button.test.tsx) covers: it renders, each variant/size, the disabled and error states where they apply, and keyboard use where it applies (Tab, Enter/Space, Escape, arrow keys). yarn test passes.
  • The component has an entry on the /design-system page: description, props/variants, states, a short do/don't, a code example, and a live demo.
  • Visible focus: there is a clear focus ring when the control is reached by keyboard.
  • The PR does not change any existing screen. Screens adopt the component in their own tickets.

Resources/Instructions

Additional Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: Design systemmilestone: missingrole: Front Endsize: 3pt

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions