Skip to content

feat(ui): add FloatingToggle primitive - #56

Merged
Andreas-Garcia merged 1 commit into
mainfrom
feature/floating-toggle
Nov 12, 2026
Merged

Andreas-Garcia merged 1 commit into
mainfrom
feature/floating-toggle

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

Adds FloatingToggle, a single-cell floating card with an aria-pressed icon button. It is the on/off counterpart of the floating SegmentedControl, so hosts can place a toggle beside ZoomControls without copying the card, cell and pressed styles.

Changes

  • New FloatingToggle (exported from index.ts).
  • floating-control.ts gains floatingControlCellStateClassName(selected); the floating SegmentedControl now uses it, so both controls share one set of selected/unselected styles. Rendered classes are unchanged.
  • FloatingToggle.test.tsx and a CHANGELOG.md entry under [Unreleased].

Test plan

  • pnpm lint and pnpm build: pass.
  • pnpm test in packages/ui: 14 files, 115 tests pass (3 new).
  • Visual check in the playground: not done.

Screenshots

N/A (no playground page changed).

Risk

Intent change, depth standard: new component plus a small refactor of shared class strings. An independent review compared the old and new SegmentedControl classes and found no differences or other findings. No breaking changes. There is no SegmentedControl class-output regression test.

How to revert

Revert the merge commit.

Deployment notes

None. Not released here; a minor release (0.24.0) is a separate step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Andreas-Garcia
Andreas-Garcia enabled auto-merge (squash) November 12, 2026 14:01
@Andreas-Garcia
Andreas-Garcia merged commit 19520a2 into main Nov 12, 2026
3 checks passed
@Andreas-Garcia
Andreas-Garcia deleted the feature/floating-toggle branch November 12, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant