kaze-design-system 0.8.0 → 0.9.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/CHANGELOG.md +140 -0
- package/README.md +46 -4
- package/components.css +243 -164
- package/core.css +9 -0
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/BarChart/BarChart.js +27 -19
- package/dist/components/BarList/BarList.js +10 -2
- package/dist/components/Checkbox/Checkbox.js +12 -2
- package/dist/components/ColumnChart/ColumnChart.js +5 -17
- package/dist/components/CommandPalette/CommandPalette.js +89 -45
- package/dist/components/Dialog/Dialog.js +47 -27
- package/dist/components/Disclosure/Disclosure.js +7 -6
- package/dist/components/DonutChart/DonutChart.js +69 -53
- package/dist/components/Dropdown/Dropdown.js +141 -125
- package/dist/components/FAQ/FAQ.js +11 -5
- package/dist/components/FormField/FormField.js +32 -14
- package/dist/components/Heatmap/Heatmap.js +11 -1
- package/dist/components/Icon/Icon.js +2 -12
- package/dist/components/Input/Input.js +5 -3
- package/dist/components/LineChart/LineChart.js +6 -17
- package/dist/components/NumberField/NumberField.js +62 -31
- package/dist/components/Pagination/Pagination.js +6 -3
- package/dist/components/Radio/Radio.js +24 -6
- package/dist/components/Search/Search.js +54 -38
- package/dist/components/Select/Select.js +5 -3
- package/dist/components/Sidebar/Sidebar.js +10 -4
- package/dist/components/Sparkline/Sparkline.js +6 -1
- package/dist/components/Stepper/Stepper.js +38 -24
- package/dist/components/Table/Table.js +1 -10
- package/dist/components/Tabs/Tabs.js +30 -5
- package/dist/components/Textarea/Textarea.js +5 -3
- package/dist/components/Toast/Toast.js +189 -111
- package/dist/components/Tooltip/Tooltip.js +109 -60
- package/dist/components/Tracker/Tracker.js +33 -17
- package/dist/components/_internal/aria.js +11 -0
- package/dist/hooks/ThemeScript.js +8 -0
- package/dist/hooks/useFocusTrap.js +25 -23
- package/dist/hooks.js +2 -0
- package/dist/lib/composeEventHandlers.js +9 -0
- package/dist/lib/jaText.js +21 -0
- package/dist/lib/useChartWidth.js +28 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/types/components/CommandPalette/CommandPalette.d.ts +4 -0
- package/dist/types/components/Dropdown/Dropdown.d.ts +7 -1
- package/dist/types/components/FAQ/FAQ.d.ts +3 -0
- package/dist/types/components/FormField/FormField.d.ts +1 -1
- package/dist/types/components/NumberField/NumberField.d.ts +9 -2
- package/dist/types/components/Pagination/Pagination.d.ts +2 -0
- package/dist/types/components/Search/Search.d.ts +4 -1
- package/dist/types/components/Sidebar/Sidebar.d.ts +4 -1
- package/dist/types/components/Sparkline/Sparkline.d.ts +5 -0
- package/dist/types/components/Toast/Toast.d.ts +6 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +5 -1
- package/dist/types/components/Tracker/Tracker.d.ts +1 -1
- package/dist/types/components/_internal/aria.d.ts +9 -0
- package/dist/types/hooks/ThemeScript.d.ts +15 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/lib/composeEventHandlers.d.ts +8 -0
- package/dist/types/lib/jaText.d.ts +22 -0
- package/dist/types/lib/useChartWidth.d.ts +14 -0
- package/dist/utils/scrollLock.js +9 -0
- package/kaze.css +13 -10
- package/package.json +10 -3
- package/reset.css +13 -1
- package/tokens.css +43 -20
- package/utilities.css +6 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
This project follows [Conventional Commits](https://www.conventionalcommits.org/) for semver bumps and [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## Conventions
|
|
7
|
+
|
|
8
|
+
Commit prefix determines the next version bump on release:
|
|
9
|
+
|
|
10
|
+
- `feat:` → **minor** bump (new feature, backward-compatible)
|
|
11
|
+
- `fix:`, `perf:`, `refactor:`, `docs:`, `chore:`, `build:`, `ci:` → **patch** bump
|
|
12
|
+
- `feat!:`, `fix!:`, `refactor!:` or a commit body containing `BREAKING CHANGE:` → **major** bump
|
|
13
|
+
|
|
14
|
+
CHANGELOG entries and version bumps are generated automatically by `.github/workflows/publish.yml` on every push to `main` that touches library source files.
|
|
15
|
+
|
|
16
|
+
### 0.x policy
|
|
17
|
+
|
|
18
|
+
While the major version is 0, a **minor** release may include breaking changes (they are called out in the release notes with a migration note); a **patch** release never does. The public API will be frozen at 1.0.
|
|
19
|
+
## [0.9.0] - 2026-10-29
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- feat: accessibility, Japanese input and typography overhaul (phase 1 of the "best in Japan" plan) (#40)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [0.8.1] - 2026-10-29
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- fix: resolve all a11y lint warnings and stop charts jumping on first paint (#39)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.8.0] - 2026-10-29
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
- feat: use the new charts in the sample dashboards; LineChart startAtZero (#38)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [0.7.0] - 2026-10-28
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
- feat: add LineChart, ColumnChart, Heatmap, CategoryBar, ChartLegend and SegmentedControl (#37)
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
- fix(site): link the docs and sample pages back to the GitHub repository (#36)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## [0.6.1] - 2026-10-28
|
|
52
|
+
|
|
53
|
+
### Other
|
|
54
|
+
|
|
55
|
+
- chore: introduce biome for lint / format and clean up unused files (#35)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [0.6.0] - 2026-10-28
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
- fix: セルフ点検で見つかった不具合・CI・ドキュメント・コンテンツの修正 (#32)
|
|
63
|
+
|
|
64
|
+
### Other
|
|
65
|
+
|
|
66
|
+
- ci: publish to npm via Trusted Publishing (OIDC) instead of NPM_TOKEN (#34)
|
|
67
|
+
- ci: fix invalid publish workflow and allow manual releases (#33)
|
|
68
|
+
- ci: add manual publish recovery workflow for tagged releases
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [0.5.0] - 2026-07-17
|
|
72
|
+
|
|
73
|
+
### Features
|
|
74
|
+
|
|
75
|
+
- feat: add kaze-design-system/marketing subpath export (#30)
|
|
76
|
+
- feat: introduce density tokens with data-density=compact support (#31)
|
|
77
|
+
- feat: align status variant vocab, zero runtime deps, and overhaul demo content
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
- fix(landing): wire GitHub buttons to the actual repo URL
|
|
82
|
+
|
|
83
|
+
### Other
|
|
84
|
+
|
|
85
|
+
- docs: present component catalog as Application UI / Marketing two-layer taxonomy (#29)
|
|
86
|
+
- docs: add CONTRIBUTING.md, issue/PR templates, and bundle size tooling
|
|
87
|
+
|
|
88
|
+
## [0.4.2] - 2026-04-12
|
|
89
|
+
|
|
90
|
+
### Bug Fixes
|
|
91
|
+
|
|
92
|
+
- fix(test): unbreak vitest unit + storybook browser test suites
|
|
93
|
+
|
|
94
|
+
### Other
|
|
95
|
+
|
|
96
|
+
- docs: drop Zinc-based from generate-llms.mjs boilerplate + add docs:stories npm script
|
|
97
|
+
- chore(stories): add stub stories for remaining 26 compound components
|
|
98
|
+
- ci: exclude *.stories.tsx and *.test.tsx from publish trigger
|
|
99
|
+
|
|
100
|
+
## [0.4.1] - 2026-04-12
|
|
101
|
+
|
|
102
|
+
### Other
|
|
103
|
+
|
|
104
|
+
- chore: add Storybook stories for 16 previously-uncovered components
|
|
105
|
+
- docs: rewrite Zinc-based intro copy for non-designer audience
|
|
106
|
+
- docs: add sample page links + clearer overview to README
|
|
107
|
+
|
|
108
|
+
## [0.4.0] - 2026-04-12
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
- feat: add Disclosure component and relax useLegendToggle types
|
|
113
|
+
- feat(docs): auto-extract component Props from TypeScript sources
|
|
114
|
+
|
|
115
|
+
### Other
|
|
116
|
+
|
|
117
|
+
- ci: drive semver bumps from Conventional Commit prefixes
|
|
118
|
+
- ci: only publish when library source changes + refresh README
|
|
119
|
+
|
|
120
|
+
## [0.3.3] - 2026-04-12
|
|
121
|
+
|
|
122
|
+
Baseline release (initial CHANGELOG). Prior releases are documented via git tags.
|
|
123
|
+
|
|
124
|
+
### Features (v0.3.0)
|
|
125
|
+
|
|
126
|
+
- Add StatusBadge component for data-status display (live / stale / missing / manual / loading) (#25)
|
|
127
|
+
- Add HelpButton component — click-activated help popover with outside-click / ESC dismissal (#24)
|
|
128
|
+
- Add `useLegendToggle` hook for interactive Recharts legends (#23)
|
|
129
|
+
- Add `size` prop (`sm` / `md` / `lg`) to EmptyState with `role="status"` (#26)
|
|
130
|
+
|
|
131
|
+
### Docs
|
|
132
|
+
|
|
133
|
+
- Add `/llms.txt` and `/llms-full.txt` generated from ComponentPage.tsx + TypeScript Props interfaces for AI-assistant discoverability
|
|
134
|
+
- Refresh ComponentsOverview and ComponentPage with new components
|
|
135
|
+
- Refresh README (package name, component count, AI assistants section)
|
|
136
|
+
|
|
137
|
+
### CI
|
|
138
|
+
|
|
139
|
+
- `publish.yml` now filters by paths so docs/app/scripts changes never trigger empty npm publishes
|
|
140
|
+
- Semver bump now driven by Conventional Commit prefixes, not fixed patch
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- **69 コンポーネント**: フォーム、テーブル、依存ゼロの SVG チャート(折れ線・縦棒・ヒートマップ等)、ダッシュボード UI、ランディングページ、マーケティングパーツまで
|
|
9
9
|
- **日本語組版に最適化**: PALT グローバル適用、和欧混植、括弧ツメ、適切な line-height
|
|
10
10
|
- **ライト / ダーク両対応**: `data-theme` 属性で切替、`prefers-color-scheme` 連動
|
|
11
|
-
- **素の CSS + カスケードレイヤー**: `@layer tokens, reset, components, utilities` でカスケード管理、Tailwind/CSS-in-JS 不要
|
|
11
|
+
- **素の CSS + カスケードレイヤー**: `@layer kaze.tokens, kaze.reset, kaze.components, kaze.utilities` でカスケード管理、Tailwind/CSS-in-JS 不要
|
|
12
12
|
- **ESM only + Tree-shakeable**: React 18 / 19 + TypeScript、peer deps は `react`, `react-dom`(`lucide-react` は任意)のみ
|
|
13
13
|
- **AI フレンドリー**: [`/llms.txt`](https://kaze-design-system.vercel.app/llms.txt) で全コンポーネント API を 1 ファイル配信
|
|
14
14
|
|
|
@@ -233,9 +233,10 @@ import { useFocusTrap, useLegendToggle } from "kaze-design-system/hooks";
|
|
|
233
233
|
|
|
234
234
|
CSS カスタムプロパティベース:
|
|
235
235
|
|
|
236
|
-
- カラー: `--color-*`(warm zinc
|
|
236
|
+
- カラー: `--color-*`(warm zinc パレット)。文字色は `fg` / `fg-muted` / `fg-secondary` / `fg-tertiary` がすべて WCAG AA(4.5:1)を満たし、`fg-decorative` だけが装飾専用
|
|
237
|
+
- フォーカス: `--color-focus`(既定は `fg`。全テーマで 3:1 以上の実線リング)
|
|
237
238
|
- スペーシング: `--space-*`
|
|
238
|
-
- タイポグラフィ: `--font-size-*`, `--font-weight
|
|
239
|
+
- タイポグラフィ: `--font-size-*`, `--font-weight-*`, `--font-sans`(本文、Noto Sans JP 主体), `--font-display`(見出しと大きな数値、Montserrat + palt), `--measure-ja`(日本語本文の行長 40em)
|
|
239
240
|
- ボーダー: `--radius-*`
|
|
240
241
|
- シャドウ: `--shadow-*`
|
|
241
242
|
- 密度: `--density-*`(コントロール高さ・行パディング・UI フォントサイズ。下記「密度」参照)
|
|
@@ -246,6 +247,15 @@ JS から値を参照したい場合は `kaze-design-system/tokens` から impor
|
|
|
246
247
|
import { space } from "kaze-design-system/tokens";
|
|
247
248
|
```
|
|
248
249
|
|
|
250
|
+
## 日本語組版の既定値
|
|
251
|
+
|
|
252
|
+
`reset.css` と `tokens.css` が、日本語の本文と UI に合わせた既定値を適用します。
|
|
253
|
+
|
|
254
|
+
- 本文は Noto Sans JP 主体、行間 1.75、ルートのフォントサイズはブラウザ既定(ユーザーの拡大設定を尊重)
|
|
255
|
+
- 禁則処理 `line-break: strict`、約物の詰め `text-spacing-trim: trim-start`、見出しの文節改行 `word-break: auto-phrase`(対応ブラウザのみ)
|
|
256
|
+
- プロポーショナルかな(palt)と Montserrat は、見出し・Metric・Stats・料金などの表示用テキストにだけ適用
|
|
257
|
+
- 数値は `tabular-nums`、日本語見出しの字間は 0(欧文数字のみ `--letter-spacing-tight`)
|
|
258
|
+
|
|
249
259
|
## テーマ(ライト / ダーク)
|
|
250
260
|
|
|
251
261
|
`data-theme="light"` / `data-theme="dark"` で切り替え。
|
|
@@ -253,6 +263,32 @@ import { space } from "kaze-design-system/tokens";
|
|
|
253
263
|
|
|
254
264
|
`data-palette="cool"` を付けると warm zinc から cool slate のパレットに切り替わります(ライト / ダークどちらとも併用可)。
|
|
255
265
|
|
|
266
|
+
ダークモード利用者の初回描画がライトで一瞬光るのを防ぐには、`<head>` に `ThemeScript` を置きます。React が動く前に保存済みのテーマを `<html>` に適用します。
|
|
267
|
+
|
|
268
|
+
```tsx
|
|
269
|
+
import { ThemeProvider, ThemeScript } from "kaze-design-system/hooks";
|
|
270
|
+
|
|
271
|
+
<html lang="ja" suppressHydrationWarning>
|
|
272
|
+
<head>
|
|
273
|
+
<ThemeScript defaultTheme="system" />
|
|
274
|
+
</head>
|
|
275
|
+
<body>
|
|
276
|
+
<ThemeProvider defaultTheme="system">{children}</ThemeProvider>
|
|
277
|
+
</body>
|
|
278
|
+
</html>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Server Components から使う
|
|
282
|
+
|
|
283
|
+
ルートの barrel(`kaze-design-system`)は `"use client"` 付きなので、そこから import したコンポーネントはすべてクライアント境界に入ります。state を持たない静的コンポーネント(Card、Badge、Heading、Table など 54 個)を Server Component のまま使いたい場合は、個別のサブパスから import してください。
|
|
284
|
+
|
|
285
|
+
```tsx
|
|
286
|
+
import { Card, CardHeader, CardTitle } from "kaze-design-system/components/Card";
|
|
287
|
+
import { Badge } from "kaze-design-system/components/Badge";
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
state を持つコンポーネント(Dialog、Dropdown、Tabs など)は個別ファイルの先頭に `"use client"` が付いているので、同じ書き方で問題なく動きます。
|
|
291
|
+
|
|
256
292
|
## 密度(Density)
|
|
257
293
|
|
|
258
294
|
`data-density="compact"` を祖先要素(`<html>` やパネル単位)に付けると、Input / Select / Table / List / Tabs / Dropdown / Sidebar などが詰まった表示になります。テーマ・パレットとは独立に組み合わせられます。
|
|
@@ -263,7 +299,13 @@ import { space } from "kaze-design-system/tokens";
|
|
|
263
299
|
|
|
264
300
|
## CSS のレイヤーについて
|
|
265
301
|
|
|
266
|
-
`
|
|
302
|
+
Kaze の CSS はすべて `kaze` 配下のカスケードレイヤー(`kaze.tokens` → `kaze.reset` → `kaze.components` → `kaze.utilities`)に入っています。`css/components` などを個別に読み込んでも、各ファイルが自分のレイヤーを宣言するので順序は保たれます。レイヤー外のスタイル(CSS Modules、あなたのアプリの CSS)は常に Kaze より優先されます。
|
|
303
|
+
|
|
304
|
+
**Tailwind と併用する場合**は `kaze-design-system/css/core`(tokens + reset + components)を読み込み、`css/utilities` は読み込まないでください。`.flex` や `.hidden` のようなユーティリティ名が Tailwind と重なるためです。レイヤー名を `kaze.*` に分けているので、Tailwind の `components` / `utilities` レイヤーと混ざることはありません。
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
import "kaze-design-system/css/core"; // Tailwind と併用
|
|
308
|
+
```
|
|
267
309
|
|
|
268
310
|
## 開発
|
|
269
311
|
|