ksk-design-system 1.62.0 → 1.63.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.
Files changed (27) hide show
  1. package/contracts/components.json +152 -18
  2. package/contracts/token-hex-cache.json +1 -1
  3. package/dist/index.js +868 -652
  4. package/dist/types/components/patterns/_internal/carousel-primitives.d.ts +5 -1
  5. package/dist/types/components/patterns/admin/bulk-actions.d.ts +3 -1
  6. package/dist/types/components/patterns/admin/data-table.d.ts +8 -2
  7. package/dist/types/components/patterns/admin/image-uploader.d.ts +3 -1
  8. package/dist/types/components/patterns/admin/kebab-menu.d.ts +3 -1
  9. package/dist/types/components/patterns/banner-carousel.d.ts +3 -1
  10. package/dist/types/components/patterns/celebration.d.ts +3 -1
  11. package/dist/types/components/patterns/commerce/bottom-tab-bar.d.ts +3 -1
  12. package/dist/types/components/patterns/commerce/filter-bar.d.ts +5 -1
  13. package/dist/types/components/patterns/commerce/image-carousel.d.ts +7 -1
  14. package/dist/types/components/patterns/commerce/quantity-selector.d.ts +9 -1
  15. package/dist/types/components/patterns/content-carousel.d.ts +5 -1
  16. package/dist/types/components/patterns/filter-pill.d.ts +79 -0
  17. package/dist/types/components/patterns/image-overlay-action.d.ts +63 -0
  18. package/dist/types/components/patterns/share-buttons.d.ts +3 -1
  19. package/dist/types/components/patterns/simple-pagination.d.ts +3 -1
  20. package/dist/types/components/patterns/thumbnail-card.d.ts +79 -0
  21. package/dist/types/components/ui/multi-select.d.ts +3 -1
  22. package/dist/types/components/ui/pagination.d.ts +5 -1
  23. package/dist/types/components/ui/toast.d.ts +16 -3
  24. package/dist/types/index.d.ts +7 -1
  25. package/package.json +1 -1
  26. package/src/components/COMPONENT_LOOKUP.md +3 -0
  27. package/src/styles/source-safelist.css +5 -0
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Component Contracts",
4
- "version": "1.62.0",
4
+ "version": "1.63.0",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "counts": {
7
7
  "ui": 68,
8
- "patterns": 57,
8
+ "patterns": 60,
9
9
  "commerce": 12,
10
10
  "admin": 8,
11
11
  "shells": 3,
12
- "total": 148
12
+ "total": 151
13
13
  },
14
14
  "exportNaming": {
15
15
  "_doc": "contracts の name が `import { name } from \"ksk-design-system\"` で解決できるかを示す。__tests__/contracts-export-integrity.test.ts が src/index.ts の実 export と突き合わせて固定する。",
@@ -516,6 +516,9 @@
516
516
  "name": "Pagination",
517
517
  "path": "src/components/ui/pagination.tsx",
518
518
  "description": "ページネーション。リスト・テーブルのページ送りに使用。",
519
+ "props": {
520
+ "navLabel": "string (既定 \"ページネーション\") — nav 要素の aria-label(issue #428、SimplePagination.navLabel と同名)"
521
+ },
519
522
  "subcomponents": [
520
523
  "PaginationContent",
521
524
  "PaginationItem",
@@ -587,10 +590,16 @@
587
590
  "保存完了・接続復旧・同期開始など一時的な操作結果は Banner ではなく toast.* helper を使う",
588
591
  "connectionRestored / saveComplete / retryStarted / retryFailed helper を提供"
589
592
  ],
593
+ "props": {
594
+ "Toaster.regionLabel": "string (既定 \"通知\") — viewport (role=\"region\") の aria-label(issue #428)",
595
+ "Toaster.closeLabel": "string (既定 \"閉じる\") — 各トーストの閉じるボタンの aria-label(issue #428)",
596
+ "configureToast({ regionLabel?, closeLabel? })": "fire-and-forget API(<Toaster> 不使用時)で同じラベルを設定する関数(issue #428)"
597
+ },
590
598
  "subcomponents": [
591
599
  "Toaster",
592
600
  "useToast",
593
- "toast"
601
+ "toast",
602
+ "configureToast"
594
603
  ]
595
604
  },
596
605
  {
@@ -1026,7 +1035,10 @@
1026
1035
  ],
1027
1036
  "rules": [
1028
1037
  "3 件以上選択する用途に。少数なら CheckboxGroup を優先"
1029
- ]
1038
+ ],
1039
+ "props": {
1040
+ "clearLabel": "string (既定 \"選択をクリア\") — クリアボタンの aria-label(issue #428)"
1041
+ }
1030
1042
  },
1031
1043
  {
1032
1044
  "name": "SyncStatusBadge",
@@ -1506,7 +1518,10 @@
1506
1518
  "CTA を含む達成 UI は actions slot を使い、カード tap で任意 dismiss したい場合は interactive または onTapDismiss を使う",
1507
1519
  "カード不要の演出は cardless を使う",
1508
1520
  "effect は既定 \"fall\"(後方互換)。クラッカーが弾けた感じにしたい達成演出は effect=\"burst\" を使う(中央から全方位 360° に放射)"
1509
- ]
1521
+ ],
1522
+ "props": {
1523
+ "dismissLabel": "string (既定 \"閉じる\") — タップで閉じる不可視ボタンの aria-label(issue #428)"
1524
+ }
1510
1525
  },
1511
1526
  {
1512
1527
  "name": "BottomSheetForm",
@@ -1756,7 +1771,10 @@
1756
1771
  {
1757
1772
  "name": "BannerCarousel",
1758
1773
  "path": "src/components/patterns/banner-carousel.tsx",
1759
- "description": "バナーカルーセル。複数バナー画像を自動スライド表示。トップページのキービジュアルや特集告知に使用。"
1774
+ "description": "バナーカルーセル。複数バナー画像を自動スライド表示。トップページのキービジュアルや特集告知に使用。",
1775
+ "props": {
1776
+ "regionLabel": "string (既定 \"バナー一覧\") — role=\"region\" スクロール領域の aria-label(issue #428)"
1777
+ }
1760
1778
  },
1761
1779
  {
1762
1780
  "name": "ContentCarousel",
@@ -1779,7 +1797,11 @@
1779
1797
  "rules": [
1780
1798
  "矢印・ドットは ImageCarousel と同じ内部プリミティブを使用し、コピーしない",
1781
1799
  "画像だけのカルーセルには ImageCarousel、商品一覧には ProductCarousel を使う"
1782
- ]
1800
+ ],
1801
+ "props": {
1802
+ "previousLabel": "string (既定 \"前へ\") — 前へ矢印の aria-label(issue #428)",
1803
+ "nextLabel": "string (既定 \"次へ\") — 次へ矢印の aria-label(issue #428)"
1804
+ }
1783
1805
  },
1784
1806
  {
1785
1807
  "name": "Footer",
@@ -1827,7 +1849,10 @@
1827
1849
  "region=jp は line/x/copy、region=us は whatsapp/x/copy を既定にする",
1828
1850
  "provider 別の計測には onShare(provider) を使う。コピー結果の計測には onCopy(result) を使う",
1829
1851
  "Clipboard API が利用不可または拒否された場合も copyErrorLabel を通知する"
1830
- ]
1852
+ ],
1853
+ "props": {
1854
+ "groupLabel": "string (既定 \"シェア\") — role=\"group\" 全体ラッパーの aria-label(issue #428)"
1855
+ }
1831
1856
  },
1832
1857
  {
1833
1858
  "name": "MediaActionCluster",
@@ -1958,7 +1983,10 @@
1958
1983
  ],
1959
1984
  "rules": [
1960
1985
  "フル機能は Pagination (ui/) を使う"
1961
- ]
1986
+ ],
1987
+ "props": {
1988
+ "navLabel": "string (既定 \"ページネーション\") — nav 要素の aria-label(issue #428)"
1989
+ }
1962
1990
  },
1963
1991
  {
1964
1992
  "name": "CoachMarkOverlay",
@@ -2057,6 +2085,80 @@
2057
2085
  "isActive 切替時に key を変えて Chip を強制再マウント (selected キャッシュ残り防止)"
2058
2086
  ]
2059
2087
  },
2088
+ {
2089
+ "name": "FilterPill",
2090
+ "path": "src/components/patterns/filter-pill.tsx",
2091
+ "description": "任意コンテンツの Popover を開くフィルタピル。value 指定で適用中(Brand 配色・\"ラベル: 値\" 表記)になり、onClear を渡すとピル内にクリアボタンが出る。パネルの中身は自由スロット。",
2092
+ "variants": [
2093
+ "active (value 指定)",
2094
+ "inactive"
2095
+ ],
2096
+ "sizes": [
2097
+ "sm",
2098
+ "md"
2099
+ ],
2100
+ "accessibility": [
2101
+ "トリガーは aria-expanded / aria-haspopup=\"dialog\" を部品側で持つ",
2102
+ "クリアボタンには既定 aria-label(`{label}をクリア`)が付く",
2103
+ "クリアは Popover トリガーの兄弟に配置し button の入れ子を作らない",
2104
+ "Popover パネル(role=\"dialog\")に既定の aria-label(`{label}のフィルタ` / panelLabel で上書き)が付く"
2105
+ ],
2106
+ "rules": [
2107
+ "単純な on/off トグルは FilterChip、単一選択リストは DropdownFilter、任意パネル + 明示クリアは FilterPill",
2108
+ "適用中かどうかの正本は value(active フラグを別に持たない)",
2109
+ "value の整形(複数選択の \"渋谷 他2件\" 等)は呼び出し側の責務"
2110
+ ]
2111
+ },
2112
+ {
2113
+ "name": "ImageOverlayAction",
2114
+ "path": "src/components/patterns/image-overlay-action.tsx",
2115
+ "description": "画像の上に重ねる単一のアクションボタン(お気に入りトグル・カルーセル矢印・削除など)。見た目の円は sm/md で変わるが、タップ領域は常に 44px 以上。placement で四隅・左右中央に絶対配置する。",
2116
+ "variants": [
2117
+ "tone: surface / scrim"
2118
+ ],
2119
+ "sizes": [
2120
+ "sm",
2121
+ "md"
2122
+ ],
2123
+ "accessibility": [
2124
+ "aria-label が必須(型で強制。アイコンのみの操作子のため)",
2125
+ "pressed を渡すと aria-pressed が出る(トグル用途)",
2126
+ "タップ領域 44px 以上を size によらず確保する"
2127
+ ],
2128
+ "rules": [
2129
+ "写真の上に素のアイコンだけを置かない。半透明の面(surface)か暗いスクリム(scrim)を必ず持たせる",
2130
+ "scrim はテーマ非依存の --Surface-VideoOverlay-* / --Text-on-Media を使う(ライト/ダークで反転させない)",
2131
+ "親要素に relative が必要(placement=\"none\" 以外)",
2132
+ "stretched-link のカード内では既定の stopPropagation により親の遷移を起こさない",
2133
+ "複数操作をラベル付きでまとめる動画プレイヤー用途は MediaActionCluster を使う(本部品は静止画上の単発操作専用)"
2134
+ ]
2135
+ },
2136
+ {
2137
+ "name": "ThumbnailCard",
2138
+ "path": "src/components/patterns/thumbnail-card.tsx",
2139
+ "description": "サムネイル + 見出し + 補足 + meta で、カード全体が 1 つのリンク / ボタンになる汎用カード(stretched link)。secondaryAction をサムネ上に重ねられる。価格・レーティングを持たないコンテンツ(レコメンド・記事・検索結果)向け。",
2140
+ "variants": {
2141
+ "orientation": [
2142
+ "vertical",
2143
+ "horizontal"
2144
+ ],
2145
+ "aspect": [
2146
+ "square",
2147
+ "video",
2148
+ "portrait"
2149
+ ]
2150
+ },
2151
+ "accessibility": [
2152
+ "全面リンク / ボタンの accessible name は title",
2153
+ "サムネの alt は既定で空(リンク名の二重読み上げ回避)",
2154
+ "secondaryAction はリンク面の前面に置かれ、押してもカードの遷移は起きない"
2155
+ ],
2156
+ "rules": [
2157
+ "価格・レーティング・カート追加を持つ EC 商品は ProductCard を使う。meta に価格文字列を手組みしない",
2158
+ "テキスト側に別リンクを置かない(リンクの入れ子になる)。別操作は secondaryAction へ",
2159
+ "meta には押せない表示のみ置く"
2160
+ ]
2161
+ },
2060
2162
  {
2061
2163
  "name": "PresenceIndicator",
2062
2164
  "path": "src/components/patterns/presence-indicator.tsx",
@@ -2310,7 +2412,13 @@
2310
2412
  ],
2311
2413
  "rules": [
2312
2414
  "sm: cart compact, md: product detail page"
2313
- ]
2415
+ ],
2416
+ "props": {
2417
+ "groupLabel": "string (既定 \"数量選択\") — role=\"group\" 全体の aria-label(issue #428)",
2418
+ "decreaseLabel": "string (既定 \"数量を減らす\") — 減少ボタンの aria-label(issue #428)",
2419
+ "increaseLabel": "string (既定 \"数量を増やす\") — 増加ボタンの aria-label(issue #428)",
2420
+ "deleteLabel": "string (既定 \"削除\") — trash 状態時の減少ボタンの aria-label(issue #428)"
2421
+ }
2314
2422
  },
2315
2423
  {
2316
2424
  "name": "OrderSummary",
@@ -2330,7 +2438,12 @@
2330
2438
  "dots",
2331
2439
  "arrows",
2332
2440
  "autoPlay"
2333
- ]
2441
+ ],
2442
+ "props": {
2443
+ "regionLabel": "string (既定 \"画像カルーセル\") — role=\"region\" スクロール領域の aria-label(issue #428)",
2444
+ "previousLabel": "string (既定 \"前へ\") — 「前へ」ボタンの aria-label(issue #428)",
2445
+ "nextLabel": "string (既定 \"次へ\") — 「次へ」ボタンの aria-label(issue #428)"
2446
+ }
2334
2447
  },
2335
2448
  {
2336
2449
  "name": "BottomTabBar",
@@ -2362,7 +2475,10 @@
2362
2475
  "Set maxWidth to the mobile web shell width when the app is centered in a desktop viewport.",
2363
2476
  "Use floatingPosition='left'|'right' (variant='pill' only) when a FAB is placed on the opposite side; default 'center' keeps the existing centered float.",
2364
2477
  "Native Expo Router / React Navigation consumers should use createExpoRouterTabBar instead of local floating tab bars."
2365
- ]
2478
+ ],
2479
+ "props": {
2480
+ "navLabel": "string (既定 \"メインナビゲーション\") — nav 要素の aria-label(issue #428)"
2481
+ }
2366
2482
  },
2367
2483
  {
2368
2484
  "name": "MobileTabBar",
@@ -2389,7 +2505,11 @@
2389
2505
  "chips",
2390
2506
  "sort",
2391
2507
  "count"
2392
- ]
2508
+ ],
2509
+ "props": {
2510
+ "navLabel": "string (既定 \"フィルター\") — nav 要素の aria-label(issue #428)",
2511
+ "moreFiltersLabel": "string (既定 \"絞り込み\") — 絞り込みボタンの aria-label(issue #428)"
2512
+ }
2393
2513
  },
2394
2514
  {
2395
2515
  "name": "ReviewCard",
@@ -2458,7 +2578,12 @@
2458
2578
  "固定列は column.sticky だけ指定する。left/right は先行固定列の width から自動計算されるため stickyOffset の px 手計算は不要(幅が auto/flex の固定列が先行する場合のみ stickyOffset を明示する)",
2459
2579
  "サーバー側でページを切り替える表は manualPagination + pageCount + pageIndex + onPaginationChange を使い、rows には現在ページ分だけ渡す(DataTable は行をスライスしない)",
2460
2580
  "複雑なテーブル全体構成は DataTableHead, DataTableRow, DataTableCell などのサブコンポーネントを使う"
2461
- ]
2581
+ ],
2582
+ "props": {
2583
+ "selectionColumnLabel": "string (既定 \"行選択\") — 選択列ヘッダー (th) の aria-label(issue #428)",
2584
+ "selectAllLabel": "string (既定 \"すべて選択\") — 「すべて選択」チェックボックスの aria-label(issue #428)",
2585
+ "DataTableActionCell.menuLabel": "string (既定 \"行メニュー\") — 行メニュー起動ボタンの aria-label(issue #428)"
2586
+ }
2462
2587
  },
2463
2588
  {
2464
2589
  "name": "KebabMenu",
@@ -2468,7 +2593,10 @@
2468
2593
  "For table row actions only",
2469
2594
  "description は補足説明、shortcut は右側表示",
2470
2595
  "{ type: \"separator\" } で区切り線を挿入"
2471
- ]
2596
+ ],
2597
+ "props": {
2598
+ "menuLabel": "string (既定 \"メニュー\") — トリガーボタンの aria-label(issue #428、DataTableActionCell.menuLabel と同名)"
2599
+ }
2472
2600
  },
2473
2601
  {
2474
2602
  "name": "BulkActions",
@@ -2476,7 +2604,10 @@
2476
2604
  "description": "一括選択操作バー。選択件数表示・クリアボタン・カスタムアクションスロット。",
2477
2605
  "rules": [
2478
2606
  "Show only when rows are selected"
2479
- ]
2607
+ ],
2608
+ "props": {
2609
+ "clearLabel": "string (既定 \"選択を解除\") — 選択解除ボタンの aria-label(issue #428)"
2610
+ }
2480
2611
  },
2481
2612
  {
2482
2613
  "name": "StatusTabs",
@@ -2507,7 +2638,10 @@
2507
2638
  "upload",
2508
2639
  "delete",
2509
2640
  "grid-layout"
2510
- ]
2641
+ ],
2642
+ "props": {
2643
+ "addLabel": "string (既定 \"画像を追加\") — 追加ボタンの aria-label(issue #428)"
2644
+ }
2511
2645
  },
2512
2646
  {
2513
2647
  "name": "NotificationList",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Semantic Token Hex Cache",
4
- "version": "1.62.0",
4
+ "version": "1.63.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",