ksk-design-system 1.55.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -33,6 +33,7 @@ UI を書く前に必ず確認すること:
33
33
  - [ ] アニメーションは `duration-[var(--Motion-Duration-*)]` / `ease-[var(--Motion-Easing-*)]` か(`duration-200` や生 `cubic-bezier` の直書きは禁止。トークン参照でないと `prefers-reduced-motion` の一括制御から漏れる)
34
34
  - [ ] 重なり順は `z-[var(--Z-*)]` か(`z-50` 一律だと Portal のマウント順で勝敗が決まる。`z-10` / `z-20` のコンポーネント内部の重なりは対象外。順序は DESIGN.md の Layering 節)
35
35
  - [ ] アイコンは `iconsax-reactjs` か(`lucide-react` / `heroicons` は使わない)
36
+ - [ ] **選んだアイコンの「絵」を実際に見たか**。iconsax は名前と絵が一致しないものがある。`Check` は小切手(checkbook)でチェックマークではない(PR #349 で出荷直前まで残った)。チェックマークは `TickSquare` / `TickCircle`。また **"i" のグリフは iconsax に存在せず**、`InfoCircle` / `Information` / `Danger` / `Warning2` はすべて感嘆符「!」の器違いなので、情報アイコンは DS 自前の `InfoCircleIcon` を使う。名前で選んだら描画結果を目視し、意味が変わると困る箇所は path で固定するテストを書く <!-- docs-drift-ignore: Check TickSquare TickCircle InfoCircle Information Danger Warning2 InfoCircleIcon -->
36
37
  - [ ] 生タグ(`<button>` / `<input>` / `<a href>`)でなく DS コンポーネントを使ったか
37
38
  - [ ] CSS でベンダープレフィックス併記する場合、**`-webkit-` を先・標準形を後**に書いたか(消費側の minifier が同一プロパティとして dedupe し後勝ちのみ残すため。逆順だと Firefox で静かに無効化。`node scripts/check-prefix-order.mjs` が CI で検出)
38
39
  - [ ] flex 行(flex-col でない flex)で shrink-0 の兄弟と可変テキストを並べるとき、テキスト側に `flex-1`(+ 必要なら `min-w-[...]` 下限)を付けたか(`min-w-0` だけだと 1 文字ずつ折り返すまで潰れる。issue #293。`node scripts/check-flex-shrink.mjs` が CI で検出、例外は `ksk-lint-ignore KFX001 -- 理由`)
package/CLAUDE.md CHANGED
@@ -33,6 +33,7 @@ UI を書く前に必ず確認すること:
33
33
  - [ ] アニメーションは `duration-[var(--Motion-Duration-*)]` / `ease-[var(--Motion-Easing-*)]` か(`duration-200` や生 `cubic-bezier` の直書きは禁止。トークン参照でないと `prefers-reduced-motion` の一括制御から漏れる)
34
34
  - [ ] 重なり順は `z-[var(--Z-*)]` か(`z-50` 一律だと Portal のマウント順で勝敗が決まる。`z-10` / `z-20` のコンポーネント内部の重なりは対象外。順序は DESIGN.md の Layering 節)
35
35
  - [ ] アイコンは `iconsax-reactjs` か(`lucide-react` / `heroicons` は使わない)
36
+ - [ ] **選んだアイコンの「絵」を実際に見たか**。iconsax は名前と絵が一致しないものがある。`Check` は小切手(checkbook)でチェックマークではない(PR #349 で出荷直前まで残った)。チェックマークは `TickSquare` / `TickCircle`。また **"i" のグリフは iconsax に存在せず**、`InfoCircle` / `Information` / `Danger` / `Warning2` はすべて感嘆符「!」の器違いなので、情報アイコンは DS 自前の `InfoCircleIcon` を使う。名前で選んだら描画結果を目視し、意味が変わると困る箇所は path で固定するテストを書く <!-- docs-drift-ignore: Check TickSquare TickCircle InfoCircle Information Danger Warning2 InfoCircleIcon -->
36
37
  - [ ] 生タグ(`<button>` / `<input>` / `<a href>`)でなく DS コンポーネントを使ったか
37
38
  - [ ] CSS でベンダープレフィックス併記する場合、**`-webkit-` を先・標準形を後**に書いたか(消費側の minifier が同一プロパティとして dedupe し後勝ちのみ残すため。逆順だと Firefox で静かに無効化。`node scripts/check-prefix-order.mjs` が CI で検出)
38
39
  - [ ] flex 行(flex-col でない flex)で shrink-0 の兄弟と可変テキストを並べるとき、テキスト側に `flex-1`(+ 必要なら `min-w-[...]` 下限)を付けたか(`min-w-0` だけだと 1 文字ずつ折り返すまで潰れる。issue #293。`node scripts/check-flex-shrink.mjs` が CI で検出、例外は `ksk-lint-ignore KFX001 -- 理由`)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Component Contracts",
4
- "version": "1.55.0",
4
+ "version": "1.56.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "counts": {
7
7
  "ui": 67,
@@ -325,7 +325,7 @@
325
325
  {
326
326
  "name": "Dialog",
327
327
  "path": "src/components/ui/dialog.tsx",
328
- "description": "タスク面用の中央モーダル(role=dialog)。フォーム入力・絞り込み等の「作業する」面に使う。削除/送信等の割り込み確認は ConfirmDialog / AlertDialog(role=alertdialog) を使い分ける。モバイルは ResponsiveDialog 推奨。position=\"top\" でモバイル向け上部寄せ。autoFocus / restoreFocusOnClose / closeOnEsc / bodyScrollLock でフォーカス・スクロール挙動を制御可能。",
328
+ "description": "タスク面用の中央モーダル(role=dialog)。フォーム入力・絞り込み等の「作業する」面に使う。削除/送信等の割り込み確認は ConfirmDialog / AlertDialog(role=alertdialog) を使い分ける。モバイルは ResponsiveDialog 推奨。position=\"top\" でモバイル向け上部寄せ、position=\"fullscreen\" で全画面(inset-0)。top/fullscreen は既定で safe-area(ノッチ・ステータスバー等)を回避し、safeArea=false でオプトアウト可能。autoFocus / restoreFocusOnClose / closeOnEsc / bodyScrollLock でフォーカス・スクロール挙動を制御可能。Sheet と同じ open 順スタックに参加し、多段モーダルでは後から開いた側の overlay/content の z-index が自動繰り上げされる(zIndex prop で上書き可能)。",
329
329
  "subcomponents": [
330
330
  "DialogTrigger",
331
331
  "DialogContent",
@@ -336,12 +336,27 @@
336
336
  "DialogClose"
337
337
  ],
338
338
  "rules": [
339
- "rounded-2xl (16px)",
339
+ "rounded-2xl (16px)。position=\"fullscreen\" は rounded-none",
340
340
  "shadow-[var(--shadow-dialog)]",
341
341
  "p-6 padding",
342
+ "position は center(既定) / top / fullscreen",
343
+ "safeArea(既定 true) で top/fullscreen の safe-area 回避を制御。false でオプトアウト",
342
344
  "autoFocus は first-input / title / ref / false を指定可能",
343
- "description prop は sr-only description を自動生成する"
344
- ]
345
+ "description prop は sr-only description を自動生成する",
346
+ "DialogTitle は level=\"page\"|\"section\"|\"card\" で見出しの役割を指定する(値は contracts/composition.json の textHierarchy と1対1)。未指定時は position=\"fullscreen\" 配下で page 相当、それ以外は従来の typo-heading-lg"
347
+ ],
348
+ "variants": {
349
+ "position": [
350
+ "center",
351
+ "top",
352
+ "fullscreen"
353
+ ],
354
+ "titleLevel": [
355
+ "page",
356
+ "section",
357
+ "card"
358
+ ]
359
+ }
345
360
  },
346
361
  {
347
362
  "name": "Sheet",
@@ -361,10 +376,19 @@
361
376
  "Side panel, not modal",
362
377
  "swipeToClose は side=bottom / bottom-glass のみ有効",
363
378
  "swipeToClose mode は max-h-[90dvh] を自動付与し、viewport 外にはみ出さない",
379
+ "side=\"top\" は既定(safeArea=true)で env(safe-area-inset-top) を padding-top に確保",
380
+ "side=\"float\"/\"float-glass\" は既定(safeArea=true)でキーボード非表示時も上端が抜けない max-height を確保",
381
+ "safeArea(既定 true) は上記2つの回避をまとめてオプトアウトする prop。他の side には効果なし",
364
382
  "autoFocus は first-input / title / ref / false を指定可能",
365
- "description prop はRadix管理IDの sr-only description を自動生成する"
383
+ "description prop はRadix管理IDの sr-only description を自動生成する",
384
+ "SheetTitle は level=\"page\"|\"section\"|\"card\" で見出しの役割を指定する(値は contracts/composition.json の textHierarchy と1対1)。未指定時は BottomSheetFrame preset=\"mobile-full\"|\"mobile-page\" 配下で page 相当、それ以外は従来の typo-heading-lg"
366
385
  ],
367
386
  "variants": {
387
+ "titleLevel": [
388
+ "page",
389
+ "section",
390
+ "card"
391
+ ],
368
392
  "side": [
369
393
  "top",
370
394
  "bottom",
@@ -754,7 +778,7 @@
754
778
  {
755
779
  "name": "AlertDialog",
756
780
  "path": "src/components/ui/alert-dialog.tsx",
757
- "description": "「アクションを止める」割り込み確認の基盤(role=alertdialog)。破壊的アクションの二段階確認に使用。中央表示・オーバーレイ外クリックでは閉じない(明示的に選ばせる)。開く瞬間に既存Popoverを閉じ、AlertDialog内で後から開くPopoverは専用z-indexで前面に表示する。タスク面の中央モーダルは Dialog を使う。",
781
+ "description": "「アクションを止める」割り込み確認の基盤(role=alertdialog)。破壊的アクションの二段階確認に使用。中央表示・オーバーレイ外クリックでは閉じない(明示的に選ばせる)。開く瞬間に既存Popoverを閉じ、AlertDialog内で後から開くPopoverは専用z-indexで前面に表示する。タスク面の中央モーダルは Dialog を使う。Sheet / Dialog と同じ open 順スタックに参加し、基底は --Z-Alert-* のまま段数ぶんを加算するため、アラートは常に通常モーダルより上・アラート同士は開いた順に前面へ来る(zIndex prop で上書き可能)。",
758
782
  "variants": [
759
783
  "default",
760
784
  "sm"
@@ -1325,11 +1349,17 @@
1325
1349
  {
1326
1350
  "name": "SwipeRow",
1327
1351
  "path": "src/components/patterns/swipe-row.tsx",
1328
- "description": "スワイプアクション付きリスト行。左スワイプでアクションボタンを表示。タッチ/マウス両対応。",
1352
+ "description": "スワイプアクション付きリスト行。左スワイプでアクションボタンを表示。タッチ/マウス両対応。actions グループはフォーカスで自動的に開き、Tab / スクリーンリーダーからも到達できる(issue #342)。native 版(src/native/components/SwipeRow.tsx)は rightActions から accessibilityActions を自動生成し VoiceOver/TalkBack からスワイプ操作を代替できる。",
1329
1353
  "features": [
1330
1354
  "swipe-to-reveal",
1331
1355
  "snap-behavior",
1332
- "multiple-actions"
1356
+ "multiple-actions",
1357
+ "keyboard-focus-reveal",
1358
+ "native-accessibility-actions"
1359
+ ],
1360
+ "accessibility": [
1361
+ "actions グループにフォーカスが入ると開き、外れると閉じる(inert で常時隠さない)",
1362
+ "native: rightActions から accessibilityActions / onAccessibilityAction を既定で自動生成"
1333
1363
  ],
1334
1364
  "rules": [
1335
1365
  "Mobile list items with swipe actions (delete, archive, etc.)"
@@ -1338,7 +1368,7 @@
1338
1368
  {
1339
1369
  "name": "ConfirmDialog",
1340
1370
  "path": "src/components/patterns/confirm-dialog.tsx",
1341
- "description": "確認ダイアログ。AlertDialog(role=alertdialog)基盤の割り込み確認。削除・送信等の重要操作前に PC/SP とも中央アラートで確認。外クリックでは閉じない・非同期onConfirm対応・ローディング状態あり。",
1371
+ "description": "確認ダイアログ。AlertDialog(role=alertdialog)基盤の割り込み確認。削除・送信等の重要操作前に PC/SP とも中央アラートで確認。外クリックでは閉じない・非同期onConfirm対応・ローディング状態あり。多段 Sheet / Dialog の上に開いても常に最前面(AlertDialog の open 順スタックに準拠)。",
1342
1372
  "variants": [
1343
1373
  "default",
1344
1374
  "destructive"
@@ -2062,11 +2092,14 @@
2062
2092
  "info",
2063
2093
  "caution",
2064
2094
  "columns: 2 / 3 / 4 / auto",
2065
- "gap: sm / md"
2095
+ "gap: sm / md",
2096
+ "selectionMode: 未指定 / single / multiple"
2066
2097
  ],
2067
2098
  "accessibility": [
2068
2099
  "button semantics",
2069
2100
  "aria-pressed when selected (selected prop または variant=\"selected\" のどちらでも true)",
2101
+ "selectionMode=\"single\" のとき grid が role=\"radiogroup\"、tile が role=\"radio\" + aria-checked(web) / accessibilityRole=\"radiogroup\"|\"radio\" + accessibilityState.checked(native)。この場合 aria-pressed / selected は出さない(意味論の二重化を避ける)",
2102
+ "selectionMode=\"single\" の web は roving tabindex(選択中のタイルのみ tabIndex=0、未選択なら先頭)と上下左右矢印での移動+選択を持つ(WAI-ARIA APG の radio group パターン。端で折り返し、disabled は移動対象外)",
2070
2103
  "選択状態は色だけでなく既定チェック(indicator省略時)でも伝える(WCAG 1.4.1)",
2071
2104
  "既定チェックは読み上げ対象外(aria-hidden / accessibilityElementsHidden)。選択状態の正本は aria-pressed(web) / accessibilityState.selected(native)"
2072
2105
  ],
@@ -2075,6 +2108,9 @@
2075
2108
  "shortcut row/grid の columns/gap を consumer 側で決め打ちしない",
2076
2109
  "children には ActionTile を使う",
2077
2110
  "選択状態は selected prop を使う",
2111
+ "単一選択(アンケートの単一回答など)には selectionMode=\"single\" を指定する。複数選択と明示したい場合は \"multiple\"。未指定は「選択の集合ではない起動ボタン」の意味で、従来どおり grid に role を付けず tile は aria-pressed のみ(issue #318)",
2112
+ "selectionMode=\"single\" で選択中の ActionTile が 2 つ以上あると開発ビルドで console.warn する(ChipSelector の既定モード問題と同じ静かな誤動作の検出)",
2113
+ "ActionTile 側の selectionMode 明示は親 grid より優先される(grid 外の単体使用・混在時の逃げ道)",
2078
2114
  "meta はカード下段右端の補足情報専用。選択インジケータには indicator prop を使う(issue #309)",
2079
2115
  "indicator はラベル行右端(loading 時 Spinner の位置)に表示。省略時は選択状態でDS標準チェックが既定表示される。null/undefined/falseはいずれも「指定なし」として扱われ、選択中なら既定チェックへフォールバックする",
2080
2116
  "loading は indicator / 既定チェックより優先して表示される",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Semantic Token Hex Cache",
4
- "version": "1.55.0",
4
+ "version": "1.56.0",
5
5
  "description": "semantic / semanticDark トークン(var(--Primitive-*) 参照)を実 hex に解決したサイドカー生成物。hex はデフォルト(Blue)テーマでの解決値であり、Brand 系(meta.themeDependentKeys に列挙)はテーマ差し替え(orange/green/violet 等)で実色が変わる。テーマ別の完全解決値は `ksk-design-system/native` エクスポート(バンドル済み native トークンモジュール)の themes を参照。tokens.json 本体のスキーマは変更せず、AI がこのファイルだけで実色を把握できるようにし、primitive 値の変更による semantic 実色のドリフトを --check で機械検出する。",
6
6
  "generatedBy": "scripts/generate-token-hex-cache.mjs",
7
7
  "theme": "default",