ksk-design-system 1.69.0 → 1.70.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 +46 -0
- package/contracts/components.json +4 -3
- package/contracts/token-hex-cache.json +1 -1
- package/dist/index.js +486 -459
- package/dist/types/components/patterns/responsive-overlay-frame.d.ts +23 -1
- package/package.json +1 -1
- package/src/components/COMPONENT_LOOKUP.md +1 -1
- package/src/styles/source-safelist.css +1 -0
package/MIGRATION.md
CHANGED
|
@@ -53,6 +53,52 @@ npx ksk-ds check-migration ./src
|
|
|
53
53
|
|
|
54
54
|
## v1 系内の minor 変更(参考)
|
|
55
55
|
|
|
56
|
+
### 次のリリース — `ResponsiveOverlayFrame` に `preset="plain"` を追加(issue #486)
|
|
57
|
+
|
|
58
|
+
`side="bottom"` の経路は必ず `BottomSheetFrame` の preset を通るため、
|
|
59
|
+
`sm:`(640px 以上)でフロートカード化し、内側 padding も落ちる(`p-0`)。
|
|
60
|
+
「タブレット幅でも全幅の下部シートのままでよい」面——素の
|
|
61
|
+
`<SheetContent side="bottom">` で組んである確認シート等——には強すぎて、
|
|
62
|
+
移行すると 640〜1023px の見た目が変わってしまう。
|
|
63
|
+
|
|
64
|
+
`preset="plain"` はその橋渡し。モバイルは素の `<SheetContent side="bottom">`
|
|
65
|
+
そのまま(全幅・下端固定・`p-6`・`max-h-[90dvh]`)で、デスクトップだけ
|
|
66
|
+
中央モーダル(32rem × `min(90dvh, 46rem)`)になる。
|
|
67
|
+
|
|
68
|
+
**before**
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<Sheet open={open} onOpenChange={setOpen}>
|
|
72
|
+
<SheetContent side="bottom" className="max-w-md mx-auto pb-8">
|
|
73
|
+
…
|
|
74
|
+
</SheetContent>
|
|
75
|
+
</Sheet>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**after**
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
<ResponsiveDialog open={open} onOpenChange={setOpen} breakpoint="lg">
|
|
82
|
+
<ResponsiveOverlayFrame preset="plain" className="max-w-md mx-auto pb-8">
|
|
83
|
+
…
|
|
84
|
+
</ResponsiveOverlayFrame>
|
|
85
|
+
</ResponsiveDialog>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
注意点:
|
|
89
|
+
|
|
90
|
+
- `preset="plain"` では `padding`(既定 `true` = `p-6`)が使える。他の preset は
|
|
91
|
+
preset 自身が余白を持つため `padding` は型エラーになる。
|
|
92
|
+
- デスクトップの角丸は `--Radius-Modal`(1.5rem)。消費側 CSS で 1rem 等に
|
|
93
|
+
していた場合は `desktopClassName` で明示する。
|
|
94
|
+
- 高さは `min(90dvh, 46rem)`。モバイルの `max-h-[90dvh]` を引き継いだ値で、
|
|
95
|
+
縦 866px 以上の画面では 46rem が効く。
|
|
96
|
+
- 幅の 32rem は `sm:`(640px 以上)で効く。`breakpoint` を 640px 未満に解決する
|
|
97
|
+
設定では DialogContent 既定の `max-w-[calc(100%_-_3rem)]` が残る。
|
|
98
|
+
`breakpoint="md"` / `"lg"` 運用なら影響しない。
|
|
99
|
+
- `desktopPosition` は `"center"` / `"top"` のみ。`"fullscreen"` は plain の
|
|
100
|
+
幅指定と噛み合わないため型で禁止している。
|
|
101
|
+
|
|
56
102
|
### 次のリリース — `ResponsiveOverlayFrame` が float / float-glass シートを受けられるようになった(issue #479)
|
|
57
103
|
|
|
58
104
|
#472 で入った `ResponsiveOverlayFrame` は内部で `BottomSheetFrame`(`side="bottom"` 固定)を
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Component Contracts",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.70.0",
|
|
5
5
|
"description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
|
|
6
6
|
"counts": {
|
|
7
7
|
"ui": 68,
|
|
@@ -2233,13 +2233,14 @@
|
|
|
2233
2233
|
"description": "モバイルではシートの見た目(ボトムシート preset / float カード)をそのまま保ち、デスクトップでは DialogContent(中央モーダル)として出すレスポンシブ overlay frame(issue #472 / #479)。消費側が global CSS で position / transform / width / max-height / radius を !important 上書きしてシートをデスクトップモーダルへ変換する回避策を不要にする。切り替え境界は親の <ResponsiveDialog breakpoint> が決め、snapPoints 付きのシートは境界を越えてもシートのまま。",
|
|
2234
2234
|
"variants": [
|
|
2235
2235
|
"side: bottom(既定) / float / float-glass",
|
|
2236
|
-
"preset: mobile-full / mobile-page / mobile-form / desktop-floating(side=bottom のときだけ有効)",
|
|
2236
|
+
"preset: mobile-full / mobile-page / mobile-form / desktop-floating / plain(side=bottom のときだけ有効)",
|
|
2237
2237
|
"surface: default / glass",
|
|
2238
2238
|
"desktopPosition: center / top / fullscreen"
|
|
2239
2239
|
],
|
|
2240
2240
|
"features": [
|
|
2241
2241
|
"preset ごとのデスクトップ寸法写像(幅・max-height・角丸)",
|
|
2242
2242
|
"side=float / float-glass のデスクトップ写像(32rem / min(85dvh,46rem))。float 系は preset ではなく padding が効く",
|
|
2243
|
+
"preset=\"plain\" は BottomSheetFrame を通さない素の bottom シート(全幅・下端固定・p-6・max-h-90dvh のまま)で、デスクトップだけ中央モーダル(32rem / min(90dvh,46rem))になる。padding が効く(issue #486)",
|
|
2243
2244
|
"description / autoFocus / restoreFocusOnClose / closeOnEsc / zIndex を両分岐へ透過",
|
|
2244
2245
|
"snap sheet はデスクトップでもシートのまま",
|
|
2245
2246
|
"ResponsiveOverlayFooter がモバイルのみキーボード追従になる"
|
|
@@ -2250,7 +2251,7 @@
|
|
|
2250
2251
|
"中身は DetailSheetScaffold + ResponsiveOverlayFooter で組む",
|
|
2251
2252
|
"デスクトップ側にだけ効かせたい className は desktopClassName、モバイル側は mobileClassName を使う",
|
|
2252
2253
|
"左右・下に余白を持つカード型のシートは side=\"float\"(Liquid Glass なら \"float-glass\")を使う。surface=\"glass\"(glass-strong)とは素材が別物で、float-glass との併用は型エラー(ガラスの二重適用防止)",
|
|
2253
|
-
"side ごとに効く prop が判別ユニオンで分かれている:
|
|
2254
|
+
"side / preset ごとに効く prop が判別ユニオンで分かれている: preset 経路は preset / surface / desktopPosition、float 系と preset=\"plain\" は padding。効かない組み合わせは黙って無視されずコンパイルエラーになる(型テスト test/types/responsive-overlay-frame.tsx)",
|
|
2254
2255
|
"float-glass の実スクロールは src/styles/sheet-keyboard.css の :is(sheet-content, dialog-content)[data-side=\"float-glass\"] が担う。.glass-specular の overflow:hidden が非レイヤー CSS で className を踏み潰すため、className だけでは効かない(#337 / #479)"
|
|
2255
2256
|
],
|
|
2256
2257
|
"subcomponents": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Semantic Token Hex Cache",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.70.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",
|