feat(ui): Pane and Page fit/header, inset/fill Tabs, quiet tones, dialog toolbar

- Page `fit` + `Pane`: panes scroll on their own, the page doesn't (from 768 px);
  Page `header`: the title and description above the tabs; the scrollbar's room
  is always kept, so short and long tabs are the same width.
- Tabs `inset` (a card's header: room around the end button) and `fill`.
- IconButton tone: grey at rest, the colour on hover; Button tone (ghost text
  that turns red on hover).
- Dialog / Sheet `toolbar`: stays under the title while the body scrolls.
- A Switch without a label lines up with the buttons beside it.
- DESIGN.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 17:51:16 +02:00
co-authored by Claude Opus 5.5
parent 1053703f0d
commit 181b2f16b0
8 changed files with 90 additions and 22 deletions
+5 -2
View File
@@ -63,10 +63,13 @@ export function Segmented({ options = [], value, onChange, size = 'md', classNam
* never up and down. tabs: [{ id, label, badge?, warn?, testId? }].
* <Tabs tabs={tabs} value={tab} onChange={setTab} />
* end: an element at the right end of the strip (a refresh button…).
* inset: the strip is the header of a card / panel: the card's padding at the sides, and the same
* room above and below `end` (a button never touches the card's edge or the line).
* fill: the tabs share the width equally, each label centred (a narrow column's tabs).
*/
export function Tabs({ tabs = [], value, onChange, size = 'md', end, className, ...rest }) {
export function Tabs({ tabs = [], value, onChange, size = 'md', end, inset = false, fill = false, className, ...rest }) {
return (
<div className={cx('x-tabs', `x-tabs--${size}`, className)} {...rest}>
<div className={cx('x-tabs', `x-tabs--${size}`, inset && 'x-tabs--inset', fill && 'x-tabs--fill', className)} {...rest}>
<div className="x-tabs__list" role="tablist">
{tabs.map(tb => (
<button key={tb.id} type="button" role="tab" aria-selected={tb.id === value} data-testid={tb.testId}