Repository navigation
feat(ui): yorozuya の Switch・Dialog・Spinner・Skeleton・Truncate を追加し、Checkbox のチェック位置を直す - #22
Merged
Merged
Conversation
Checkbox.Indicator(span)が本文の行の高さ(16px × 1.7)を引き継いだ行ボックスになり、 align-middle の SVG がベースライン基準で置かれて、チェックと横線が枠の中心から下にずれていた。 Indicator を flex にして行ボックスを作らないようにし、単体テストで配置のクラスを検査する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
yorozuya で使っていた共通部品(Panda CSS + Ark UI)を、Base UI と semantic トークン、tv() で作り直して追加する。 - Switch: Base UI の Switch。オンはつまみにチェックを出し、色だけで状態を伝えない - Dialog: Base UI の Dialog。title 必須。placement="side" は裏の画面を操作できる(フォーカスだけ閉じ込める) - Spinner: role="status" の中に文言を文字で持ち、読み上げに確実に伝える(yorozuya は aria-label) - Skeleton: aria-hidden の箱。動きを減らす設定で止まる - Truncate: Base UI の Tooltip。省略されたときだけフォーカスでき、キーボードでも全文を確かめられる Switch のつまみとトラックの組み合わせを contrast.rules.json に追加し、ルールブック・DESIGN.md・README・ バックログ・改善ログ・レジストリを更新した。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
Base UI はツールチップのポップアップにも tabindex="-1" を付けるため、[tabindex] で除外すると全文が見つからなかった。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
happy-dom は Base UI の非ネイティブのボタン(span)での Space の操作を再現しないため、キーボード操作はストーリーの play 関数(実ブラウザ)で検査する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
tkc310
added a commit
that referenced
this pull request
Oct 20, 2026
Checkbox・RadioGroup などのフォーム部品と同じく、Switch のストーリーを Components/Form の Switches に移す。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
変更内容
追加した部品(yorozuya から移植)
yorozuya の共通部品のうち 8341-ui に無かった 5 つを、Panda CSS + Ark UI から Base UI + semantic トークン +
tv()に作り直しました(Field・Input は既存の FormField・TextField に相当するため対象外)。Switchsizemd / sm、descriptionDialogtitle必須、description・footer・trigger・closeLabelplacement="side"はmodal="trap-focus"+disablePointerDismissalで裏の画面を操作可能に。背面bg-overlay・shadow-3・rounded-xl・最大幅max-w-proseSpinnerrole="status"、sizesm / md / lg、delayaria-labelではなくライブリージョンの中の文字で持つ(既定は視覚的に隠し、showLabelで表示)Skeletonaria-hiddenの箱、width/height/radiusbg-muted、角丸を radius トークンに。動きを減らす設定で止まるTruncatecontrast.rules.jsonに追加(198/198 件が基準を満たす)make design-mdで生成、仕様は手書き)、README、バックログ、改善ログを更新generate-registry.tsで生成Checkbox のチェック位置の修正
Checkbox.Indicator(span)が本文の行の高さ(16px × 1.7 ≒ 27px)を引き継いだ行ボックスになり、align-middleの SVG がベースライン基準で置かれて、チェックと横線が枠の中心から下にずれていました。Indicator をflex items-center justify-centerにして行ボックスを作らないようにしています。Storybook プレビュー
未作成(作業環境から npm レジストリに接続できず、ローカルで Storybook をビルドできなかったため)。
make storybook-previewで追加をお願いします。主に確認したいストーリー: Components/Form › Switches・Checkboxes、Components/Dialog、Spinner、Skeleton、Truncate完了の定義
make checkとmake testが通る(CI の check・test が成功。手元では依存を入れられず、Node 単体で動く検査だけ実行)contrast.rules.jsonに追加した改善ループ
docs/improvement/log.mdに 2 行追記したhttps://claude.ai/code/session_014vSbu2VCfYegcFB1uxU9DF
Generated by Claude Code