@vrugd/ui 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +249 -0
  2. package/package.json +2 -1
package/README.md ADDED
@@ -0,0 +1,249 @@
1
+ # @vrugd/ui
2
+
3
+ ![Version](https://img.shields.io/badge/version-0.1.0-blue.svg?style=flat-square)
4
+ ![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)
5
+ ![Bun](https://img.shields.io/badge/bun-1.3.x-black.svg?style=flat-square&logo=bun)
6
+
7
+ > **Apple-ish UIKit for Next.js**
8
+ >
9
+ > Appleの公式サイトに見られるような、**静寂で洗練されたUI**を、Next.js (App Router) で即座に再現するためのデザインシステム兼UIキットです。
10
+
11
+ ---
12
+
13
+ ## ✨ Features
14
+
15
+ **「Appleっぽさ」を部品化する**
16
+ 角丸、影、余白、そしてガラス表現(Blur)――。これらをバラバラに実装するのではなく、統一された「トークン」として管理し、積み上げることで美しいUIを構築します。
17
+
18
+ * **🍎 Apple-ish Design**
19
+ * 大きめで統一された角丸 (`--r-*`)
20
+ * 繊細なレイヤー構造と柔らかい影
21
+ * 美しいGlass morphism / blur表現
22
+ * **🎨 Design Tokens**
23
+ * CSS Variables による一元管理 (`--accent`, `--border`, `--shadow`, etc.)
24
+ * ダークモード対応を見越した設計
25
+ * **⚡️ Next.js Ready**
26
+ * **App Router** 完全対応
27
+ * **Server Component** 指向(基本はCSS + React)
28
+ * Tailwind Utility を前提とした軽量設計
29
+ * **📦 Monorepo Friendly**
30
+ * Bun + Turborepo 構成
31
+ * `@vrugd/ui` パッケージとして分離済み
32
+
33
+ ---
34
+
35
+ ## 📂 Repository Structure
36
+
37
+ ```text
38
+ repo-root/
39
+ ├── apps/
40
+ │ └── web/ # Next.js App Router (Demo App)
41
+ └── packages/
42
+ └── ui/ # @vrugd/ui (Component Library)
43
+
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 🚀 Quick Start
49
+
50
+ ### Requirements
51
+
52
+ * **Bun**: `1.3.x`
53
+ * **Node.js**: `18+` (Recommended: `20+`)
54
+
55
+ ### 1. Install & Run
56
+
57
+ ルートディレクトリで以下を実行してください。
58
+
59
+ ```bash
60
+ # Install dependencies
61
+ bun install
62
+
63
+ # Start development server (Demo app)
64
+ bunx turbo dev --filter=web
65
+
66
+ ```
67
+
68
+ 起動後、[http://localhost:3000](https://www.google.com/search?q=http://localhost:3000) にアクセスするとデモが表示されます。
69
+
70
+ ---
71
+
72
+ ## 📖 Usage
73
+
74
+ Next.js (App Router) アプリケーションで `@vrugd/ui` を使用する手順です。
75
+
76
+ ### 1. Install Dependency
77
+
78
+ ワークスペース内のパッケージとして依存関係に追加します。
79
+
80
+ **`apps/web/package.json`**
81
+
82
+ ```json
83
+ {
84
+ "dependencies": {
85
+ "@vrugd/ui": "workspace:*"
86
+ }
87
+ }
88
+
89
+ ```
90
+
91
+ ### 2. Import Global Styles
92
+
93
+ UIキットの基本スタイル(Design Tokens & Base styles)を読み込みます。
94
+
95
+ **`apps/web/app/globals.css`**
96
+
97
+ ```css
98
+ @tailwind base;
99
+ @tailwind components;
100
+ @tailwind utilities;
101
+
102
+ /* @vrugd/ui global styles & tokens */
103
+ @import "../../../packages/ui/src/styles/globals.css";
104
+
105
+ ```
106
+
107
+ ### 3. Tailwind Configuration
108
+
109
+ UIパッケージ内のクラスをTailwindが検知できるようにパスを通します。
110
+
111
+ **`apps/web/tailwind.config.ts`**
112
+
113
+ ```ts
114
+ import type { Config } from "tailwindcss";
115
+
116
+ const config: Config = {
117
+ content: [
118
+ "./app/**/*.{ts,tsx}",
119
+ // UIパッケージ内のコンポーネントをスキャン対象に追加
120
+ "../../packages/ui/src/**/*.{ts,tsx}"
121
+ ],
122
+ // ...
123
+ };
124
+
125
+ export default config;
126
+
127
+ ```
128
+
129
+ ### 4. Use Components
130
+
131
+ コンポーネントをインポートして配置します。
132
+
133
+ **`apps/web/app/page.tsx`**
134
+
135
+ ```tsx
136
+ import * as React from "react";
137
+ import { Button, Card, Hero, Navbar, Section, Text } from "@vrugd/ui";
138
+
139
+ export default function Page() {
140
+ return (
141
+ <main>
142
+ <Navbar
143
+ brand={<span className="font-semibold">UIKit</span>}
144
+ items={[
145
+ { label: "Overview", href: "#overview" },
146
+ { label: "Components", href: "#components" }
147
+ ]}
148
+ right={
149
+ <div className="flex items-center gap-2">
150
+ <Button variant="soft">Docs</Button>
151
+ <Button>Get started</Button>
152
+ </div>
153
+ }
154
+ />
155
+
156
+ <Hero
157
+ eyebrow="Next.js App Router"
158
+ title="AppleっぽいUIを “部品化” して積み上げる"
159
+ description="トークン(色/影/角丸/ガラス)を中心に、一貫したルールで提供します。"
160
+ actions={
161
+ <>
162
+ <Button>Install</Button>
163
+ <Button variant="ghost">View components</Button>
164
+ </>
165
+ }
166
+ />
167
+
168
+ <Section id="overview">
169
+ <div className="grid gap-4 md:grid-cols-3">
170
+ <Card tone="elevated" className="p-6">
171
+ <div className="text-[13px] text-[rgb(var(--muted))]">Design tokens</div>
172
+ <div className="mt-2 font-semibold">一貫した“Apple感”</div>
173
+ <Text className="mt-2" tone="muted">
174
+ 角丸・影・ガラス・タイポ・余白をトークン化して統一。
175
+ </Text>
176
+ </Card>
177
+ </div>
178
+ </Section>
179
+ </main>
180
+ );
181
+ }
182
+
183
+ ```
184
+
185
+ ---
186
+
187
+ ## 🎨 Design Tokens
188
+
189
+ デザインは `packages/ui/src/styles/tokens.css` 内の **CSS Variables** によって制御されています。これらを変更するだけで、全体のルック&フィールを調整可能です。
190
+
191
+ ```css
192
+ :root {
193
+ /* Colors (RGB format for opacity manipulation) */
194
+ --accent: 10 132 255; /* Blue */
195
+ --border: 228 228 231; /* Gray */
196
+
197
+ /* Radius */
198
+ --r-sm: 12px;
199
+ --r-md: 16px;
200
+ --r-lg: 22px;
201
+
202
+ /* Shadows (Layered shadows) */
203
+ --shadow-sm: 0 1px 0 rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
204
+ }
205
+
206
+ ```
207
+
208
+ ---
209
+
210
+ ## 🧩 Components
211
+
212
+ 現在提供されている主要コンポーネント:
213
+
214
+ | Name | Description |
215
+ | --- | --- |
216
+ | **Navbar** | 半透明(Glass)効果を持つナビゲーションバー |
217
+ | **Hero** | 大きな見出しとCTAを持つイントロダクションエリア |
218
+ | **Card** | `elevated`, `outlined`, `soft` などのトーンを持つカード |
219
+ | **Button** | インタラクティブなボタン要素 |
220
+ | **Glass** | 背景ぼかし効果を持つコンテナ |
221
+ | **Text** | タイポグラフィルールを適用したテキストラッパー |
222
+
223
+ ---
224
+
225
+ ## 🛠 Development Notes
226
+
227
+ **TypeScript Support**
228
+ Next.js が TypeScript を検知した場合、依存関係の追加が必要になることがあります。
229
+
230
+ ```bash
231
+ bun add -d --cwd apps/web @types/node @types/react @types/react-dom
232
+
233
+ ```
234
+
235
+ ---
236
+
237
+ ## 🗺 Roadmap
238
+
239
+ * [ ] 🌗 **Dark mode toggle / Theme switch**
240
+ * [ ] ✍️ **Typography components** (`H1`, `H2`, `Lead`)
241
+ * [ ] 🎬 **Motion layer** (Framer Motion optional)
242
+ * [ ] 📐 **Layout primitives** (Grid, Stack)
243
+ * [ ] 📦 **Publish-ready build** (`dist/` output + type declarations)
244
+
245
+ ---
246
+
247
+ ## License
248
+
249
+ MIT (TBD)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrugd/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,6 +15,7 @@
15
15
  "@types/node": "^25.0.10",
16
16
  "@types/react": "^19.2.9",
17
17
  "@types/react-dom": "^19.2.3",
18
+ "npm-check-updates": "^19.3.1",
18
19
  "tsup": "^8.5.1",
19
20
  "typescript": "^5.5.0"
20
21
  },