ksk-design-system 1.68.0 → 1.69.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 +64 -0
- package/contracts/components.json +9 -4
- package/contracts/token-hex-cache.json +1 -1
- package/dist/index.js +491 -466
- package/dist/types/components/patterns/responsive-overlay-frame.d.ts +49 -8
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/COMPONENT_LOOKUP.md +1 -1
- package/src/styles/sheet-keyboard.css +7 -2
- package/src/styles/source-safelist.css +1 -0
package/MIGRATION.md
CHANGED
|
@@ -53,6 +53,70 @@ npx ksk-ds check-migration ./src
|
|
|
53
53
|
|
|
54
54
|
## v1 系内の minor 変更(参考)
|
|
55
55
|
|
|
56
|
+
### 次のリリース — `ResponsiveOverlayFrame` が float / float-glass シートを受けられるようになった(issue #479)
|
|
57
|
+
|
|
58
|
+
#472 で入った `ResponsiveOverlayFrame` は内部で `BottomSheetFrame`(`side="bottom"` 固定)を
|
|
59
|
+
使うため、左右・下に余白を持つカード型のシート(`side="float"` / `"float-glass"`)を
|
|
60
|
+
受けられなかった。消費側はその形のシートだけ、デスクトップ中央モーダル化の
|
|
61
|
+
global CSS(`!important`)を残す必要があった。
|
|
62
|
+
|
|
63
|
+
`side` prop を足したので、float 系も同じ 1 つの API で切り替えられる。
|
|
64
|
+
|
|
65
|
+
**before**(`Sheet` + `SheetContent side="float"` + 消費側 global CSS)
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<Sheet open={open} onOpenChange={setOpen}>
|
|
69
|
+
<SheetContent side="float" className="w-full max-w-md mx-auto p-6">
|
|
70
|
+
…
|
|
71
|
+
</SheetContent>
|
|
72
|
+
</Sheet>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
/* 消費側 global CSS — 削除する */
|
|
77
|
+
@media (min-width: 1024px) {
|
|
78
|
+
[data-slot="sheet-content"][data-side="float"]:not([data-snap-active]) {
|
|
79
|
+
left: 50% !important; top: 50% !important;
|
|
80
|
+
transform: translate(-50%, -50%) !important;
|
|
81
|
+
width: min(32rem, calc(100vw - 4rem)) !important;
|
|
82
|
+
max-height: min(85vh, 46rem) !important;
|
|
83
|
+
border-radius: var(--Radius-Modal) !important;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**after**
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
<ResponsiveDialog open={open} onOpenChange={setOpen} breakpoint="lg">
|
|
92
|
+
<ResponsiveOverlayFrame side="float" className="max-w-md">
|
|
93
|
+
…
|
|
94
|
+
</ResponsiveOverlayFrame>
|
|
95
|
+
</ResponsiveDialog>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
注意点:
|
|
99
|
+
|
|
100
|
+
- `side` ごとに効く prop が違い、**効かない組み合わせは型エラーになる**(黙って無視されない)。
|
|
101
|
+
- `side="bottom"`(既定): `preset` / `surface` / `desktopPosition` が使える。`padding` は不可
|
|
102
|
+
(preset が余白を持つため)。
|
|
103
|
+
- `side="float"` / `"float-glass"`: `padding`(既定 `true` = `p-6`)が使える。
|
|
104
|
+
`preset` / `surface` / `desktopPosition` は不可。
|
|
105
|
+
- `"float-glass"` の素材は `side` 自身が決める(`glass` + `glass-specular`)。
|
|
106
|
+
`surface="glass"`(`glass-strong`)とは別物で、二重に重ねると glass.css の記述順でしか
|
|
107
|
+
勝敗が決まらないため型で禁止している。
|
|
108
|
+
- デスクトップの寸法は幅 `32rem`(`sm:max-w-lg`)× 高さ `min(85dvh, 46rem)`。上の global CSS が
|
|
109
|
+
当てていた値と実質同じだが、厳密には次の差がある:
|
|
110
|
+
- 高さの単位が `dvh`(DS)と `vh`(旧 CSS)で、アドレスバーが伸縮する環境では一致しない。
|
|
111
|
+
- 幅の上限は `sm:`(640px 以上)で効く。`breakpoint` を 640px 未満に解決する設定
|
|
112
|
+
(`product-theme` で小さい値を入れた場合)では DialogContent 既定の
|
|
113
|
+
`max-w-[calc(100%_-_3rem)]` が残る。`breakpoint="md"` / `"lg"` 運用なら差は出ない。
|
|
114
|
+
- デスクトップでは overlay(背景の暗転)がガラスにならない(`glassOverlay` はシート固有の
|
|
115
|
+
prop なので落ちる)。面だけガラス、背景は通常の暗転になる。
|
|
116
|
+
- snap point 付きのシートは #472 と同じくシートのまま。ただし DS の snap は
|
|
117
|
+
`side="bottom"` 専用なので、`snapPoints` と float 系の併用は snap もデスクトップ変換も
|
|
118
|
+
効かない「何も起きない」組み合わせになる。どちらかに寄せること。
|
|
119
|
+
|
|
56
120
|
### 次のリリース — `ResponsiveOverlayFrame` 追加(`BottomSheetFrame` + 消費側デスクトップ CSS からの移行 / issue #472)
|
|
57
121
|
|
|
58
122
|
`BottomSheetFrame` はモバイルの preset(`mobile-full` / `mobile-page` /
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"name": "KSK Design System — Component Contracts",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.69.0",
|
|
5
5
|
"description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
|
|
6
6
|
"counts": {
|
|
7
7
|
"ui": 68,
|
|
@@ -2230,14 +2230,16 @@
|
|
|
2230
2230
|
{
|
|
2231
2231
|
"name": "ResponsiveOverlayFrame",
|
|
2232
2232
|
"path": "src/components/patterns/responsive-overlay-frame.tsx",
|
|
2233
|
-
"description": "
|
|
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
2237
|
"surface: default / glass",
|
|
2237
2238
|
"desktopPosition: center / top / fullscreen"
|
|
2238
2239
|
],
|
|
2239
2240
|
"features": [
|
|
2240
2241
|
"preset ごとのデスクトップ寸法写像(幅・max-height・角丸)",
|
|
2242
|
+
"side=float / float-glass のデスクトップ写像(32rem / min(85dvh,46rem))。float 系は preset ではなく padding が効く",
|
|
2241
2243
|
"description / autoFocus / restoreFocusOnClose / closeOnEsc / zIndex を両分岐へ透過",
|
|
2242
2244
|
"snap sheet はデスクトップでもシートのまま",
|
|
2243
2245
|
"ResponsiveOverlayFooter がモバイルのみキーボード追従になる"
|
|
@@ -2246,7 +2248,10 @@
|
|
|
2246
2248
|
"必ず <ResponsiveDialog> の子として使う(境界の判定は ResponsiveDialog の context が持つ)",
|
|
2247
2249
|
"consumer 側の global CSS でシートをデスクトップモーダルへ変換しない — この frame に置き換える",
|
|
2248
2250
|
"中身は DetailSheetScaffold + ResponsiveOverlayFooter で組む",
|
|
2249
|
-
"デスクトップ側にだけ効かせたい className は desktopClassName、モバイル側は mobileClassName を使う"
|
|
2251
|
+
"デスクトップ側にだけ効かせたい className は desktopClassName、モバイル側は mobileClassName を使う",
|
|
2252
|
+
"左右・下に余白を持つカード型のシートは side=\"float\"(Liquid Glass なら \"float-glass\")を使う。surface=\"glass\"(glass-strong)とは素材が別物で、float-glass との併用は型エラー(ガラスの二重適用防止)",
|
|
2253
|
+
"side ごとに効く prop が判別ユニオンで分かれている: bottom は preset / surface / desktopPosition、float 系は padding。効かない組み合わせは黙って無視されずコンパイルエラーになる(型テスト test/types/responsive-overlay-frame.tsx)",
|
|
2254
|
+
"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)"
|
|
2250
2255
|
],
|
|
2251
2256
|
"subcomponents": [
|
|
2252
2257
|
"ResponsiveOverlayFooter"
|
|
@@ -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.69.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",
|