ksk-design-system 1.37.5 → 1.38.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/README.md +40 -2
- package/contracts/components.json +82 -4
- package/dist/class-names.js +1 -1
- package/dist/index.js +1751 -1411
- package/dist/native.js +44 -4
- package/dist/{server-variants-EoHx5Klh.js → server-variants-qSBVrkGA.js} +1 -1
- package/dist/types/components/patterns/media-action-cluster.d.ts +30 -0
- package/dist/types/components/patterns/photo-hero.d.ts +28 -0
- package/dist/types/components/patterns/screen.d.ts +20 -0
- package/dist/types/components/patterns/share-buttons.d.ts +2 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/tokens/native/themes.d.ts +40 -0
- package/package.json +1 -1
- package/src/components/COMPONENT_LOOKUP.md +4 -1
- package/src/styles/glass.css +13 -2
- package/src/styles/semantic.css +42 -0
- package/src/styles/typography.css +6 -0
- package/tokens.json +8 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**🔗 ライブ Storybook → https://ksk-design-system.vercel.app**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
115 コンポーネントを実際に操作・確認できます。
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- **アクセシブル** — shadcn/ui(Radix UI ベース)+ `@storybook/addon-a11y` で a11y を担保
|
|
15
15
|
- **Tailwind CSS v4 ネイティブ** — `@theme` ベースのトークン設計
|
|
16
16
|
- **型安全** — React 19 + TypeScript、CVA によるバリアント管理
|
|
17
|
-
- **
|
|
17
|
+
- **115 + 91 コンポーネント** — Web 115(UI 56 / EC 11 / 管理 8 / シェル 3 / パターン 37)+ React Native 91
|
|
18
18
|
- **iOS 26 Liquid Glass 対応** — RN 側 `GlassView` + `Button variant="glass"`、Web 側 `.glass` CSS マテリアル
|
|
19
19
|
|
|
20
20
|
## 🎨 テーマ
|
|
@@ -54,6 +54,44 @@ import { Button, Card, Input, FormField } from "ksk-design-system"
|
|
|
54
54
|
|
|
55
55
|
新規クライアント案件では、テーマファイルで `--Primitive-Brand-500` などブランドカラーの 10 行を定義するだけで、全コンポーネントがそのブランドカラーで動作します。
|
|
56
56
|
|
|
57
|
+
### Media overlay utilities
|
|
58
|
+
|
|
59
|
+
動画・写真の上に文字や操作を置く場合は、`--Text-on-Media` と `.text-on-media` / `.text-on-media-secondary`、上下の `.media-scrim-top` / `.media-scrim-bottom` を使います。TikTok / Reels 型の操作群は `MediaActionCluster` が glass ボタン、ラベル、safe-area anchor、idle auto-hide をまとめて扱います。
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { MediaActionCluster } from "ksk-design-system"
|
|
63
|
+
|
|
64
|
+
<div className="relative">
|
|
65
|
+
<div className="absolute inset-x-0 top-0 h-32 media-scrim-top" />
|
|
66
|
+
<h1 className="text-on-media">メディア上のタイトル</h1>
|
|
67
|
+
<MediaActionCluster
|
|
68
|
+
anchor="bottom-right"
|
|
69
|
+
items={[
|
|
70
|
+
{ label: "いいね", icon: <HeartIcon />, active: true },
|
|
71
|
+
{ label: "シェア", icon: <ShareIcon /> },
|
|
72
|
+
]}
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Fullscreen screen primitives
|
|
78
|
+
|
|
79
|
+
フルスクリーン画面は `Screen` で固定高 root、本文の内部スクロール、下部 CTA の safe-area 余白をまとめて扱います。写真背景の入口画面やオンボーディングスライドは `PhotoHero` と `typo-on-image` を組み合わせます。
|
|
80
|
+
|
|
81
|
+
```tsx
|
|
82
|
+
import { Screen, PhotoHero, Button } from "ksk-design-system"
|
|
83
|
+
|
|
84
|
+
<Screen scroll={false} padding="none">
|
|
85
|
+
<PhotoHero src="/onboarding/slide-1.jpg" overlay="dark">
|
|
86
|
+
<PhotoHero.Eyebrow>さあ、始めよう</PhotoHero.Eyebrow>
|
|
87
|
+
<PhotoHero.Title>ふたりの準備、ここから。</PhotoHero.Title>
|
|
88
|
+
<PhotoHero.Actions>
|
|
89
|
+
<Button variant="glass-inverse" className="w-full">はじめる</Button>
|
|
90
|
+
</PhotoHero.Actions>
|
|
91
|
+
</PhotoHero>
|
|
92
|
+
</Screen>
|
|
93
|
+
```
|
|
94
|
+
|
|
57
95
|
### React Native / Expo
|
|
58
96
|
|
|
59
97
|
`ksk-design-system/native/ui` から直接 RN 用コンポーネント(91 個)を import できます。iOS 26 の **Liquid Glass** にも対応:
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
|
|
6
6
|
"counts": {
|
|
7
7
|
"ui": 56,
|
|
8
|
-
"patterns":
|
|
8
|
+
"patterns": 37,
|
|
9
9
|
"commerce": 11,
|
|
10
10
|
"admin": 8,
|
|
11
11
|
"shells": 3,
|
|
12
|
-
"total":
|
|
12
|
+
"total": 115
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"ui": [
|
|
@@ -1115,11 +1115,89 @@
|
|
|
1115
1115
|
"providers",
|
|
1116
1116
|
"region defaults",
|
|
1117
1117
|
"copy fallback",
|
|
1118
|
-
"circle / inline layout"
|
|
1118
|
+
"circle / inline layout",
|
|
1119
|
+
"onShare tracking"
|
|
1119
1120
|
],
|
|
1120
1121
|
"rules": [
|
|
1121
1122
|
"providers を渡すと明示順で表示",
|
|
1122
|
-
"region=jp は line/x/copy、region=us は whatsapp/x/copy を既定にする"
|
|
1123
|
+
"region=jp は line/x/copy、region=us は whatsapp/x/copy を既定にする",
|
|
1124
|
+
"provider 別の計測には onShare(provider) を使う。copy 完了時だけ必要なら onCopy も併用する"
|
|
1125
|
+
]
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"name": "MediaActionCluster",
|
|
1129
|
+
"path": "src/components/patterns/media-action-cluster.tsx",
|
|
1130
|
+
"description": "動画・写真などのメディア上に重ねる icon + label のアクションクラスタ。TikTok/Reels 型の縦・横操作群、safe-area anchor、idle auto-hide に対応。",
|
|
1131
|
+
"features": [
|
|
1132
|
+
"media overlay",
|
|
1133
|
+
"icon + label actions",
|
|
1134
|
+
"vertical / horizontal / auto orientation",
|
|
1135
|
+
"safe-area anchor",
|
|
1136
|
+
"idle auto-hide",
|
|
1137
|
+
"glass buttons",
|
|
1138
|
+
"text-on-media"
|
|
1139
|
+
],
|
|
1140
|
+
"accessibility": [
|
|
1141
|
+
"role=group",
|
|
1142
|
+
"aria-label",
|
|
1143
|
+
"aria-pressed for active button items",
|
|
1144
|
+
"44px touch target"
|
|
1145
|
+
],
|
|
1146
|
+
"rules": [
|
|
1147
|
+
"メディア上の操作群に使用する。通常画面の下部 CTA には StickyActionBar を使う",
|
|
1148
|
+
"items[].label は必須。アイコン単独にしない",
|
|
1149
|
+
"暗い写真・動画・濃色面上では glass-inverse / text-on-media を維持する",
|
|
1150
|
+
"autoHideMs=null で idle fade を無効化できる"
|
|
1151
|
+
]
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
"name": "Screen",
|
|
1155
|
+
"path": "src/components/patterns/screen.tsx",
|
|
1156
|
+
"description": "固定高ビューポート、本文だけの内部スクロール、下部固定 CTA の safe-area 余白を内包するフルスクリーン画面骨組み。",
|
|
1157
|
+
"features": [
|
|
1158
|
+
"100dvh fixed viewport",
|
|
1159
|
+
"internal scroll body",
|
|
1160
|
+
"min-h-0 guard",
|
|
1161
|
+
"fixed header slot",
|
|
1162
|
+
"fixed footer slot",
|
|
1163
|
+
"safe-area bottom"
|
|
1164
|
+
],
|
|
1165
|
+
"accessibility": [
|
|
1166
|
+
"main landmark",
|
|
1167
|
+
"footer landmark when footer is present"
|
|
1168
|
+
],
|
|
1169
|
+
"rules": [
|
|
1170
|
+
"body スクロールを使わないアプリのフルスクリーン画面に使う",
|
|
1171
|
+
"本文が長い画面では scroll=true のまま使う",
|
|
1172
|
+
"写真ヒーローなど 1 画面固定では scroll=false と padding=none を組み合わせる",
|
|
1173
|
+
"footer には主要 CTA を置き、safe-area 余白を消費側で再実装しない"
|
|
1174
|
+
]
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"name": "PhotoHero",
|
|
1178
|
+
"path": "src/components/patterns/photo-hero.tsx",
|
|
1179
|
+
"description": "写真背景、暗化オーバーレイ、下詰め/中央寄せコンテンツ、写真上の可読性 typography をまとめるフルスクリーンヒーロー。",
|
|
1180
|
+
"features": [
|
|
1181
|
+
"photo background",
|
|
1182
|
+
"medium / dark overlay",
|
|
1183
|
+
"bottom / center align",
|
|
1184
|
+
"on-image typography",
|
|
1185
|
+
"compound slots"
|
|
1186
|
+
],
|
|
1187
|
+
"subcomponents": [
|
|
1188
|
+
"PhotoHero.Eyebrow",
|
|
1189
|
+
"PhotoHero.Title",
|
|
1190
|
+
"PhotoHero.Body",
|
|
1191
|
+
"PhotoHero.Actions"
|
|
1192
|
+
],
|
|
1193
|
+
"accessibility": [
|
|
1194
|
+
"decorative image defaults to alt empty",
|
|
1195
|
+
"alt can be provided when the image is meaningful"
|
|
1196
|
+
],
|
|
1197
|
+
"rules": [
|
|
1198
|
+
"オンボーディング入口・写真スライド・メディア上 CTA に使う",
|
|
1199
|
+
"写真上の CTA には Button variant=glass-inverse / ghost-inverse を使う",
|
|
1200
|
+
"本文が長い場合は Screen scroll=true 側で内部スクロールを確保する"
|
|
1123
1201
|
]
|
|
1124
1202
|
},
|
|
1125
1203
|
{
|
package/dist/class-names.js
CHANGED