ksk-design-system 1.50.0 → 1.51.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/NATIVE_RECIPES.md CHANGED
@@ -348,3 +348,32 @@ import { Calendar } from "ksk-design-system/native/ui"
348
348
  ```
349
349
 
350
350
  セルの見た目を丸ごと差し替えたい場合は `renderDay` を使います。`renderDay` は `{ date, weekday, selected, today, disabled, tone }` を受け取ります(タップ・読み上げ・選択不可制御は DS 側が持ったままです)。月移動ボタンは `minDate` / `maxDate` / `disablePast` の範囲外へは自動で disabled になります。
351
+
352
+ ### ブランド色を注入する(ThemeProvider を使わない consumer 向け)
353
+
354
+ `ThemeProvider` を使わず、アプリごとのブランドトークンを props で流し込む設計(exam-kit 系が app/theme/brand.ts から各コンポーネントへ色を渡している方式)では、`colors` で日セルの色だけを差し替えられます。指定しなかったキーは DS theme の既定色に落ちるので、既存の呼び出しは見た目が変わりません。
355
+
356
+ ```tsx
357
+ <Calendar
358
+ value={examDate}
359
+ onChange={setExamDate}
360
+ weekendTone
361
+ colors={{
362
+ selected: brand.primary, // 選択セルの背景
363
+ selectedText: brand.onPrimary, // 選択セルの文字
364
+ today: brand.accent, // today リング / ドット
365
+ sunday: brand.caution, // weekendTone=true のときだけ効く
366
+ saturday: brand.primary,
367
+ }}
368
+ />
369
+ ```
370
+
371
+ `colors` で足りない見た目(角丸・枠線の太さ・影など)は `dayStyle` で器ごと差し替えます。DS の既定 style の**後ろに**合成されるので確実に勝ちます。
372
+
373
+ ```tsx
374
+ <Calendar
375
+ dayStyle={(day) => (day.selected ? { borderRadius: 8, borderWidth: 2, borderColor: brand.primary } : null)}
376
+ />
377
+ ```
378
+
379
+ `renderDay` がセルの「中身」、`dayStyle` がセルの「器」です。色だけなら `colors` で足ります。
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Component Contracts",
4
- "version": "1.50.0",
4
+ "version": "1.51.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "counts": {
7
7
  "ui": 67,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Semantic Token Hex Cache",
4
- "version": "1.50.0",
4
+ "version": "1.51.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",