@polastack/design-system 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Polastack
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # @polastack/design-system
2
+
3
+ BtoB業務アプリケーション向けReactデザインシステム。
4
+ 高密度な業務UIを品質高く、素早く、ブランド統一して構築するためのコンポーネントライブラリ。
5
+
6
+ ## 技術スタック
7
+
8
+ - **React 18/19** — コンポーネント基盤
9
+ - **Tailwind CSS v4** — ゼロランタイムスタイリング(`@theme` でトークン統合)
10
+ - **Radix UI** — アクセシビリティ基盤(ARIA/キーボード/フォーカス管理)
11
+ - **CVA** — 型安全なバリアント管理
12
+ - **TypeScript** — 完全な型定義
13
+
14
+ ## Storybook
15
+
16
+ コンポーネントカタログ: https://tkaneko-siracusa.github.io/DesignSystem/
17
+
18
+ ## インストール
19
+
20
+ ```bash
21
+ pnpm add @polastack/design-system
22
+ ```
23
+
24
+ ### CSS の読み込み
25
+
26
+ ```ts
27
+ // アプリのエントリポイントで
28
+ import '@polastack/design-system/globals.css';
29
+ ```
30
+
31
+ ### フォント
32
+
33
+ Inter(欧文)と Noto Sans JP(和文)を読み込んでください。
34
+
35
+ ```html
36
+ <link
37
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap"
38
+ rel="stylesheet"
39
+ />
40
+ ```
41
+
42
+ ## 基本的な使い方
43
+
44
+ ```tsx
45
+ import { ThemeProvider, Button, Card, CardHeader, CardTitle, CardContent } from '@polastack/design-system';
46
+
47
+ function App() {
48
+ return (
49
+ <ThemeProvider defaultTheme="system">
50
+ <Card>
51
+ <CardHeader>
52
+ <CardTitle>Hello Polastack</CardTitle>
53
+ </CardHeader>
54
+ <CardContent>
55
+ <Button>Click me</Button>
56
+ </CardContent>
57
+ </Card>
58
+ </ThemeProvider>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ## コンポーネント一覧
64
+
65
+ ### コアアトム
66
+ Button, Badge, Avatar, Separator, Skeleton, Spinner, Card, Tooltip, Toast
67
+
68
+ ### フォーム
69
+ Label, Input, Textarea, Checkbox, RadioGroup, Switch, Select, Combobox, DatePicker, NumberInput, FormField, DynamicFormField, FormLayout
70
+
71
+ ### データ表示
72
+ Tabs, EmptyState, Table, DataTable, FilterBar
73
+
74
+ ### ナビゲーション + レイアウト
75
+ Popover, DropdownMenu, Dialog, CommandPalette, Drawer, AppShell
76
+
77
+ ### PWA
78
+ BottomNavigation, OfflineIndicator, InstallPrompt, PullToRefresh
79
+
80
+ ### テーマ
81
+ ThemeProvider, useTheme
82
+
83
+ ## ダークモード
84
+
85
+ `ThemeProvider` でライト/ダーク/システム連動の切り替えが可能です。
86
+
87
+ ```tsx
88
+ import { ThemeProvider, useTheme } from '@polastack/design-system';
89
+
90
+ // アプリルートで
91
+ <ThemeProvider defaultTheme="system">
92
+ <App />
93
+ </ThemeProvider>
94
+
95
+ // コンポーネント内で
96
+ function ThemeToggle() {
97
+ const { theme, setTheme } = useTheme();
98
+ return <Button onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}>Toggle</Button>;
99
+ }
100
+ ```
101
+
102
+ CSS変数ベースのセマンティックトークンにより、全コンポーネントが自動的にダークモードに対応します。
103
+
104
+ ## デザイントークン
105
+
106
+ TypeScript定数としても利用可能です。
107
+
108
+ ```ts
109
+ import { colors, typography, spacing } from '@polastack/design-system/tokens';
110
+ ```
111
+
112
+ ## 開発
113
+
114
+ ```bash
115
+ # Storybook 起動(コンポーネントカタログ)
116
+ pnpm storybook
117
+
118
+ # テスト実行
119
+ pnpm test
120
+
121
+ # 型チェック
122
+ pnpm typecheck
123
+
124
+ # ビルド
125
+ pnpm build
126
+
127
+ # バンドルサイズ確認
128
+ pnpm size
129
+ ```
130
+
131
+ ## ブランドカラー
132
+
133
+ メインカラー: **#1BA491**(ティール)
134
+
135
+ | カテゴリ | カラー |
136
+ |---------|--------|
137
+ | Primary | Teal (#1BA491) |
138
+ | Success | Green |
139
+ | Warning | Amber |
140
+ | Error | Red |
141
+ | Info | Blue |
142
+
143
+ ## リリース
144
+
145
+ 1. `CHANGELOG.md` を更新
146
+ 2. GitHub で新しい Release を作成(タグ: `v0.x.x`)
147
+ 3. GitHub Actions が自動的にテスト・ビルド・publish を実行
148
+
149
+ ## ライセンス
150
+
151
+ MIT License