ksk-design-system 2.15.0 → 2.16.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/MIGRATION.md CHANGED
@@ -20,6 +20,14 @@ patch / minor は原則破壊変更なし、自動アップグレード可(例
20
20
  - **余白・項目行・ダイアログ・アプリ枠・予定の色(#711–#716)**: Container / ChipFilterBar の `gutter="fluid"`(`--Container-Gutter-Fluid`)、FormField の `orientation="horizontal"`・Input / Textarea の `targetSize="comfortable"`、Dialog の `centerFrom`・`height="fill"`・`size="2xl"`・`DialogHeader variant="bar"`、FieldSet の `gap`・FieldLegend の `size="sm"`、MobileAppShell の `viewport="fixed"`・`safeAreaTop`・`safeAreaBottom`・`bottomPadding="native-tab-bar"`(`--Native-Tab-Bar-Height`。ネイティブ側が書く任意フック <!-- docs-drift-ignore: --Native-Tab-Bar-Height -->)、MonthCalendar / AgendaList の予定の `accentColor` を追加します。すべて任意指定で、既定の見た目は変わりません。
21
21
  - **CollapsibleChipField の見出し(#717)**: `label` の既定の見た目が `typo-label-sm` + `Text-Medium-Emphasis`(12px)から、フォームの項目名と同じ `typo-label-md` + `Text-High-Emphasis`(14px 太字)に変わります(同じ詳細シートの `<Label>` / `FormField` と大きさをそろえるため)。従来の見た目が要る画面は `labelSize="sm"` を指定してください。展開中の選択肢のまとまりは見える見出しと `aria-labelledby` で結ばれます(`ariaLabel` を指定した場合は従来どおり `aria-label`)。`label` も `icon` も渡さない行は、先頭の 24px の空きが無くなります。native の CollapsibleChipField は変わりません。
22
22
 
23
+ ## v2.16.0 の導入注意
24
+
25
+ 以下はv2.16.0の導入注意です。consumerへの展開・アプリ配布は別工程で、次回のまとめ展開で反映します。
26
+
27
+ - **FieldGroup `variant="rows"` の余白が FormField 以外の行にも付く(#733・既定の見た目の変更)**: 直下の FormField 以外(Switch の行・ImageAttachmentPicker・Banner 等)にも上下 12px(`py-3`)が付きます。これらに `py-3` を手で書いていた場合は同じ値なので外せます。`my-*` のマージンは足し算になるので外してください。CollapsibleChipField は対象外(従来どおり)。
28
+ - **NavigationBar `leftLabelVisible` の文字幅の上限(#732)**: title ありのときの左の文字幅の上限が 176px になります(title なしは上限なし)。
29
+ - 追加のみ(既定の見た目は不変): FormField `as="group"` 内の ChipSelector が名前なしの警告を出さない(外側の group が名前を持つ。#734)、Banner の `onDismiss` / `dismissLabel`(#735)、MonthCalendarHeader の `live`(#736)、AdminShell の `overlay`(背景の inert は重ねる側で付ける。#737)。
30
+
23
31
  ## v2.15.0 の導入注意
24
32
 
25
33
  以下はv2.15.0の導入注意です。consumerへの展開・アプリ配布は別工程で、次回のまとめ展開で反映します。
package/RELEASE.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  `ksk-design-system` のリリーススケジュール・運用ルール。
4
4
 
5
+ ## v2.16.0(2026-10-18)
6
+
7
+ 2.15.0以降に、NavigationBarの文字付きの戻るの切れを直し、consumer側の上書きをなくすためのAPIを5件追加したminorリリース。追加のみのAPIが中心です。次の1点は既定の見た目が変わります。
8
+
9
+ - FieldGroup `variant="rows"` の余白が、直下の FormField 以外の行(Switch の行・Banner 等)にも上下12pxで付きます。手書きの `py-3` は外せます。`my-*` は足し算になるので外します(#733)。
10
+
11
+ 主な変更は次のとおりです。
12
+ - NavigationBar `leftLabelVisible` が、title ありで左・中央・右の3列になり、375pxでも「戻る」と長めのタイトルが見えるようにしました。文字幅の上限は176pxです。title なしは左ラベルが残り幅で省略され、右の要素を押し出しません(#732)。
13
+ - FormField `as="group"` の中の ChipSelector が、名前を指定しなくても警告を出さないようにしました(#734)。
14
+ - Banner に `onDismiss` / `dismissLabel`(#735)。
15
+ - MonthCalendarHeader に `live`(#736)。
16
+ - AdminShell に `overlay`。シェル内の Sheet / Dialog の暗転が下に隠れません(#737)。
17
+
18
+ 導入時は [2.16.0の注意](./MIGRATION.md#v2160-の導入注意) を確認してください。npm公開・タグ・GitHub Releaseはversion変更のmainマージ後に `publish.yml` が実行します。consumerへの取り込みとアプリ配布は別工程で、今回のDS公開準備には含めません。
19
+
5
20
  ## v2.15.0(2026-10-17)
6
21
 
7
22
  2.14.0以降に、consumer側の上書きをなくすためのAPIを10件追加したminorリリース。追加のみのAPIが中心です。次の2点は既定の挙動・見た目が変わります。
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Component Contracts",
4
- "version": "2.15.0",
4
+ "version": "2.16.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "counts": {
7
7
  "ui": 73,
@@ -876,7 +876,7 @@
876
876
  "leftButtonProps": "Button の属性・ref(variant / size / onClick / children を除く)",
877
877
  "shareButtonProps": "Button の属性・ref(variant / size / onClick / children を除く)",
878
878
  "headerProps": "title を除く header の属性・ref を根へ転送(issue #649)",
879
- "leftLabelVisible": "boolean — 左ボタンに leftLabel の文字も表示(高さ 44px・文字は max-w-28 で省略し title 属性で全文・タイトルの左右を px-32 に広げる。既定 false。issue #729)"
879
+ "leftLabelVisible": "boolean — 左ボタンに leftLabel の文字も表示(高さ 44px・文字は title なしなら幅の上限なし(右の要素を押し出さず残り幅で省略)・title ありなら max-w-44(176px・日本語8文字が収まる)で省略し title 属性で全文。title ありは左|中央|右の 3 列 grid(左右は同じ幅)で、短い文言ならタイトルが広く残る。既定 false。issue #729)"
880
880
  },
881
881
  "accessibility": [
882
882
  "aria-label auto-set for back/close/share",
@@ -1471,7 +1471,8 @@
1471
1471
  "rules": [
1472
1472
  "Color + icon + text (never color alone)",
1473
1473
  "density: default(gap-3 p-4) / compact(gap-2 px-3 py-2)。余白を詰めたいときは density=\"compact\"。`!p-2` 等の className で上書きしない(issue #683)",
1474
- "layout: card(既定・角丸の囲み) / bar(全幅・角丸なし・下線のみ)。画面上端の注意帯は layout=\"bar\" を使い、div で帯を自作しない(issue #683。native Banner は画像バナーで別 API のため Web のみ)"
1474
+ "layout: card(既定・角丸の囲み) / bar(全幅・角丸なし・下線のみ)。画面上端の注意帯は layout=\"bar\" を使い、div で帯を自作しない(issue #683。native Banner は画像バナーで別 API のため Web のみ)",
1475
+ "閉じるボタンは onDismiss(右端の icon-sm ghost・読み上げ名は dismissLabel、既定は KskLabels の close)。閉じる処理は consumer が持つ。×ボタンを自作して並べない(issue #735)"
1475
1476
  ]
1476
1477
  },
1477
1478
  {
@@ -1684,7 +1685,8 @@
1684
1685
  "horizontal で枠の無い入力欄(variant=\"inline\")を置くときは targetSize=\"comfortable\" で 44px の当たり判定を持たせる。外側に py-2 を足して稼がない(issue #712)",
1685
1686
  "orientation=\"horizontal\" は置き場所の幅(@container)が 15rem 未満なら縦積みに戻る。endLabel は入力欄の右に出る(issue #712)",
1686
1687
  "チップ・トグル・ラジオ等の選択肢のまとまりを右(下)に置く行は as=\"group\"(ラベルは span[id]、中身の列は role=group + aria-labelledby、説明文・エラーは aria-describedby)。<span> + <div role=\"group\"> + w-20 のラベルで行を自作しない。htmlFor は渡さない(開発ビルドで警告)。required は読み上げに伝わらないので、必須は description か label の文言で補う(issue #720)",
1687
- "区切り線で並べる項目行の一覧は FieldGroup variant=\"rows\"(divide-y + 直下の FormField に py-3)に入れる。FormField に className=\"py-3\" を足さない(issue #720)"
1688
+ "区切り線で並べる項目行の一覧は FieldGroup variant=\"rows\"(divide-y + 直下の FormField に py-3)に入れる。FormField に className=\"py-3\" を足さない(issue #720)",
1689
+ "FormField as=\"group\" の中の ChipSelector(single)は aria-label / aria-labelledby を省いても名前なしの警告が出ない(外側の group がラベルで名前を持つ。内側へ同じ名前は結ばない = 二重読み上げにしない。issue #734)"
1688
1690
  ]
1689
1691
  },
1690
1692
  {
@@ -1705,7 +1707,7 @@
1705
1707
  ],
1706
1708
  "rules": [
1707
1709
  "FieldSet は gap-6(24px)、FieldGroup は gap-4(16px)の縦リズムを正本とする",
1708
- "詳細シートの区切り線の一覧は FieldGroup variant=\"rows\"(子の間に Border-Low-Emphasis の線・直下の FormField に上下 12px)。CollapsibleChipField は自前の py-3 を持つのでそのまま並べる。divide-y と py-3 を自作しない(issue #720)",
1710
+ "詳細シートの区切り線の一覧は FieldGroup variant=\"rows\"(子の間に Border-Low-Emphasis の線・直下の要素(FormField に限らず Switch の行・ImageAttachmentPicker・Banner 等。FieldSeparator / FieldLegend / FieldDescription / FieldError は除く。詳細度 0 なので子の py-* が勝つ)に上下 12px)。CollapsibleChipField は自前の py-3 を持つのでそのまま並べる。divide-y と py-3 を自作しない(issue #720 / #733)",
1709
1711
  "個々の入力は既存 FormField を FieldGroup 内に並べる",
1710
1712
  "FieldDescription はセクション・グループの補足、FieldError はグループ単位のエラーに使う",
1711
1713
  "グループ横断の区切りは FieldSeparator を使い、中央ラベルは children で渡す",
@@ -1981,7 +1983,8 @@
1981
1983
  "Use selectionMode=\"single\" for single-select (multiple=false は非推奨). Use max to limit selection count.",
1982
1984
  "Do not patch selected flicker in consumer CSS; Chip handles Android tap highlight and touch transition behavior.",
1983
1985
  "PillToggle は 2〜4 択の segmented control 専用。5択以上・折り返しが要る単一選択はこの selectionMode=\"single\" を使う(issue #418)。",
1984
- "グループ名は aria-labelledby(見出しの id)か aria-label で渡す(issue #666)。単一選択の radiogroup は名前が必須で、どちらも無いと開発ビルドで console.warn する。id / aria-describedby もルートへ渡せる。native は accessibilityLabel / accessibilityLabelledBy"
1986
+ "グループ名は aria-labelledby(見出しの id)か aria-label で渡す(issue #666)。単一選択の radiogroup は名前が必須で、どちらも無いと開発ビルドで console.warn する。id / aria-describedby もルートへ渡せる。native は accessibilityLabel / accessibilityLabelledBy",
1987
+ "FormField as=\"group\" の中では aria-label / aria-labelledby を省いても警告が出ない(外側の group が名前を持つ)。明示した指定が優先(issue #734)"
1985
1988
  ]
1986
1989
  },
1987
1990
  {
@@ -2862,6 +2865,7 @@
2862
2865
  "native は未提供(INTENTIONAL_NATIVE_GAPS)",
2863
2866
  "分類の識別色(カテゴリ別の予定)は MonthCalendarEvent.accentColor に var(--Categorical-N) を渡す。md 以上はチップの先頭の点、md 未満は日付の下の点(tone より優先)。チップの面と文字は tone のまま。renderEvent の中で色の点を自作しない(issue #716)",
2864
2867
  "月の見出し(月名・今日へ・前後の月)は MonthCalendarHeader(month・onToday / onPrev / onNext・size md=スマホ / lg=PC・headingLevel)を grid の上に置く。前後は icon-sm + aria-label(既定「前の月」「次の月」)。見出しは aria-live=\"polite\" で月の切り替えを読み上げる。h2 + Button で自作しない(issue #721)",
2868
+ "見出しは月が変わると aria-live で読み上げる。一覧のスクロールで月が変わる画面は MonthCalendarHeader live={false} で切る(issue #736)",
2865
2869
  "週の帯 ⇄ 月全体の開閉は MonthCalendarExpandToggle(expanded / onExpandedChange・読み上げ名は固定で状態は aria-expanded・aria-controls に MonthCalendar の id)を grid の下に置き、expanded を view=\"month\" / \"week\" に渡す。Button ghost icon-sm w-full で自作しない(issue #721)"
2866
2870
  ]
2867
2871
  },
@@ -3306,7 +3310,8 @@
3306
3310
  "暗色サイドバーは sidebarTone=\"inverse\"(aside を Surface-Inverse にする)。中のナビは SidebarNav tone=\"inverse\"、ロゴ・フッターの文字も Text-on-Inverse 系にする(issue #680)",
3307
3311
  "lg 未満でナビへ辿れるようにするときは mobileDrawer(issue #705)。ヘッダー左端のメニューボタン(44px・aria-expanded・aria-label 既定「メニューを開く」)から左の Sheet に同じ sidebar を開く。ハンバーガーと Sheet side=\"left\" を consumer で自作しない",
3308
3312
  "ドロワー内のリンク(a[href])と SidebarNav の項目を押すと閉じる(closeMobileDrawerOnNavigate 既定 false、明示 true で有効)。開閉の制御は mobileDrawerOpen / onMobileDrawerOpenChange",
3309
- "上端の safe-area は safeAreaTop(ヘッダーは下線込み 64px + 安全領域、lg 以上のサイドバーと mobileDrawer のドロワーも上に足す。header が無いときは本文の列)。アプリ内で全画面に重ねるときは className=\"h-full\" と組み、外枠に pt-[var(--Safe-Area-Inset-Top)] や背景を書かない(外枠は fixed と重ね順だけ。issue #724)"
3313
+ "上端の safe-area は safeAreaTop(ヘッダーは下線込み 64px + 安全領域、lg 以上のサイドバーと mobileDrawer のドロワーも上に足す。header が無いときは本文の列)。アプリ内で全画面に重ねるときは className=\"h-full\" と組み、外枠に pt-[var(--Safe-Area-Inset-Top)] や背景を書かない(外枠は fixed と重ね順だけ。issue #724)",
3314
+ "アプリ内で全画面に重ねるときは overlay(fixed inset-0 z-[var(--Z-Overlay)] h-full を DS が持つ。Sheet / Dialog の overlay と同じ層で、後に開いたものが上に出る)。背景の inert は重ねる側が付ける。className で fixed / z-index を書かない(issue #737)"
3310
3315
  ]
3311
3316
  },
3312
3317
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Semantic Token Hex Cache",
4
- "version": "2.15.0",
4
+ "version": "2.16.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",