Skip to content

feat: AlertDialog / Drawer / Popover / Alert / Badge / Toast コンポーネントを追加#97

Merged
newt239 merged 11 commits into
mainfrom
feat/feedback-overlay-components
Jul 8, 2026
Merged

feat: AlertDialog / Drawer / Popover / Alert / Badge / Toast コンポーネントを追加#97
newt239 merged 11 commits into
mainfrom
feat/feedback-overlay-components

Conversation

@newt239

@newt239 newt239 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

概要

react-aria-components をアクセシビリティ基盤として、オーバーレイ系3種(AlertDialog / Drawer / Popover)と通知・表示系3種(Alert / Badge / Toast)の計6コンポーネントを追加します。

変更内容

デザイントークン

  • variables.css にセマンティックカラー変数を追加(--color-info / --color-success / --color-warning / --color-danger とそれぞれの -light / -dark)
  • 全コンポーネントで「light背景 + baseアクセント + darkテキスト」の配色に統一し、WCAG AA のコントラストを確保

新コンポーネント

  • Alert: タイトルと説明文を持つ静的表示。4バリアント。動的挿入時のみ有効な role="alert" はデフォルト付与せず props で指定可能
  • Badge: primary / secondary + 状態色4種の計6バリアント
  • AlertDialog: role="alertdialog" を固定。既存の Modal / DialogTrigger を再利用し、外側クリックで閉じない挙動を維持
  • Drawer: ModalOverlay > Modal > Dialog の3層構成。placement 4方向のスライドイン・アウトアニメーション付き。dismissable prop で外側クリック挙動を制御
  • Popover: 非モーダル Dialog と矢印(OverlayArrow)を内蔵。placement / showArrow でカスタマイズ可能
  • Toast: react-aria の UNSTABLE_ Toast API をラップ。グローバルキューと toast.show / info / success / warning / danger / close の関数 API、4隅に配置可能な ToastRegion を提供。UNSTABLE 接頭辞はラップ内に隠蔽済みで、stable 化時も利用者側は無変更

ドキュメント

  • ドキュメントサイトに6コンポーネントのページ・デモ・メタデータを追加(コンポーネント総数 19 → 25)
  • 各コンポーネントの Storybook ストーリーを追加
  • changeset(minor)とルート CHANGELOG.md を追記

検証

  • npx tsc --noEmit && pnpm run lint && pnpm run format && pnpm run stylelint 通過
  • pnpm build(tsdown の d.ts 生成)成功
  • Storybook ビルド成功
  • docs サイトのビルドと起動確認(全25ページ生成、SSR出力にコンポーネントのクラスが含まれることを確認)

🤖 Generated with Claude Code

newt239 and others added 9 commits July 8, 2026 16:52
info / success / warning / danger の各状態色に base / light / dark の3トークンを定義

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
タイトルと説明文を持つ静的表示コンポーネント。info / success / warning / danger の4バリアントに対応。動的通知を想定しないため role="alert" はデフォルト付与しない

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
role="alertdialog" を固定したダイアログ。既存の Modal / DialogTrigger と組み合わせて使用し、variant でタイトル色と上部アクセントを変更可能

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ステータスやラベルを表示する span ベースのバッジ。primary / secondary と状態色4種の計6バリアント

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
画面端からスライドインするドロワー。placement で4方向を指定でき、dismissable で外側クリック時の挙動を制御可能

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
react-aria の Popover をラップし、非モーダル Dialog と矢印(OverlayArrow)を内蔵。placement と showArrow でカスタマイズ可能

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
react-aria の UNSTABLE_ Toast API をラップ。グローバルキューによる toast.show / info / success / warning / danger / close の関数 API と、4隅に配置可能な ToastRegion を提供

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AlertDialog / Drawer / Popover / Alert / Badge / Toast のメタデータ・デモ・MDXページを追加し、コンポーネント総数の表記を25個に更新

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@newt239 newt239 self-assigned this Jul 8, 2026
newt239 and others added 2 commits July 8, 2026 17:05
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 新コンポーネントの変更内容を plenty-moons-shake.md へ統合し、重複していた changeset を削除
- CHANGELOG.md に v0.12.0〜v0.13.3 の未記載バージョンを追記し、v0.14.0 に未リリースの CodeBlock 追加分を追加

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9ac96fd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 3 packages
Name Type
@ginga-ui/core Minor
ginga-ui.com Minor
@ginga-ui/utils Minor

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@newt239 newt239 merged commit b99faa7 into main Jul 8, 2026
2 checks passed
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