@7onic-ui/react 0.3.0 → 0.3.1
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 +9 -12
- package/llms.txt +4 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
| **🧩** | **shadcn freedom + MUI convenience** | shadcn's customization with none of its missing features. MUI's built-in power with none of its styling constraints. Both, by design. |
|
|
29
29
|
| **⚡** | **npm or CLI — your choice** | `npm install` for packages, `npx 7onic add` for local copy. Same components, two workflows. |
|
|
30
30
|
| **🔀** | **Only Tailwind v3+v4 dual support** | The ecosystem's only design system supporting both Tailwind versions. Same tokens, same DX. |
|
|
31
|
+
| **🪄** | **Zero-config framework compat** | Works with Next.js 15 + Vite defaults out of the box. No Provider wrapper, no `globals.css` replacement, no body class setup. Install → import → done. |
|
|
31
32
|
| **🎮** | **Built-in playground** | Interactive props editor + live code generation in docs. No Storybook setup needed. |
|
|
32
33
|
| **🌗** | **Dark mode, zero config** | Light/dark themes built into tokens. System preference detection out of the box. |
|
|
33
34
|
| **🔓** | **Framework-agnostic tokens** | Tokens ship as pure CSS variables. Use with Vue, Angular, Svelte, or vanilla CSS — no React required. |
|
|
@@ -96,25 +97,19 @@ module.exports = {
|
|
|
96
97
|
```
|
|
97
98
|
</details>
|
|
98
99
|
|
|
99
|
-
Apply base theme colors to `<body>` — enables dark mode and consistent backgrounds:
|
|
100
|
-
|
|
101
|
-
```html
|
|
102
|
-
<body class="bg-background text-foreground">
|
|
103
|
-
```
|
|
104
|
-
|
|
105
100
|
Use components:
|
|
106
101
|
|
|
107
102
|
```tsx
|
|
108
|
-
import { Button, Card } from '@7onic-ui/react'
|
|
103
|
+
import { Button, Card, CardHeader, CardTitle, CardContent } from '@7onic-ui/react'
|
|
109
104
|
import { Chart, type ChartConfig } from '@7onic-ui/react/chart' // charts: separate entry
|
|
110
105
|
|
|
111
106
|
<Button variant="solid" color="primary">Get Started</Button>
|
|
112
107
|
|
|
113
108
|
<Card>
|
|
114
|
-
<
|
|
115
|
-
<
|
|
116
|
-
</
|
|
117
|
-
<
|
|
109
|
+
<CardHeader>
|
|
110
|
+
<CardTitle>Settings</CardTitle>
|
|
111
|
+
</CardHeader>
|
|
112
|
+
<CardContent>...</CardContent>
|
|
118
113
|
</Card>
|
|
119
114
|
```
|
|
120
115
|
|
|
@@ -168,6 +163,7 @@ figma-tokens.json ← SSOT (the only file you edit)
|
|
|
168
163
|
├── css/variables.css ← CSS variables (all primitives)
|
|
169
164
|
├── css/themes/light.css ← Light theme semantics
|
|
170
165
|
├── css/themes/dark.css ← Dark theme semantics
|
|
166
|
+
├── css/reset.css ← Framework template baseline
|
|
171
167
|
├── css/all.css ← All-in-one bundle
|
|
172
168
|
├── tailwind/v3-preset.js ← Tailwind v3 preset
|
|
173
169
|
├── tailwind/v4-theme.css ← Tailwind v4 theme
|
|
@@ -198,10 +194,11 @@ Breaking changes are auto-detected with diff visualization. Backward-compatible
|
|
|
198
194
|
|
|
199
195
|
| File | Description |
|
|
200
196
|
|------|-------------|
|
|
201
|
-
| `css/all.css` | All-in-one bundle (variables + light + dark) |
|
|
197
|
+
| `css/all.css` | All-in-one bundle (variables + light + dark + reset) |
|
|
202
198
|
| `css/variables.css` | Primitive tokens only |
|
|
203
199
|
| `css/themes/light.css` | Light theme semantics |
|
|
204
200
|
| `css/themes/dark.css` | Dark theme semantics |
|
|
201
|
+
| `css/reset.css` | Framework template baseline (bundled into `all.css` + `v4.css`) |
|
|
205
202
|
| `tailwind/v4.css` | All-in-one Tailwind v4 |
|
|
206
203
|
| `tailwind/v3-preset.js` | Tailwind v3 preset |
|
|
207
204
|
| `tailwind/v4-theme.css` | Tailwind v4 theme definitions |
|
package/llms.txt
CHANGED
|
@@ -77,22 +77,16 @@ module.exports = {
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
**2-3.
|
|
81
|
-
```html
|
|
82
|
-
<body class="bg-background text-foreground">
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**2-4. Apply user's answers:**
|
|
80
|
+
**2-3. Apply user's answers:**
|
|
86
81
|
|
|
87
82
|
- Dark mode = yes → implement dark mode toggle (see below)
|
|
88
83
|
- Custom font → load font (next/font for Next.js, CDN for Vite) + set `--font-family-sans`
|
|
89
84
|
- Locale includes Japanese → load Noto Sans JP font
|
|
90
85
|
- Locale includes Korean → load Noto Sans KR font
|
|
91
86
|
|
|
92
|
-
**2-
|
|
87
|
+
**2-4. Verify setup is complete before writing any UI code:**
|
|
93
88
|
- [ ] Packages installed (@7onic-ui/react, @7onic-ui/tokens, lucide-react)
|
|
94
89
|
- [ ] globals.css has ALL required imports in correct order
|
|
95
|
-
- [ ] Body has `bg-background text-foreground`
|
|
96
90
|
- [ ] Dark mode toggle (if selected)
|
|
97
91
|
- [ ] Font loaded (if custom)
|
|
98
92
|
- [ ] CJK fonts loaded (if applicable)
|
|
@@ -121,7 +115,7 @@ Place `<Toaster />` once in your root layout file. Without this, `toast()` calls
|
|
|
121
115
|
import { Toaster } from '@7onic-ui/react'
|
|
122
116
|
|
|
123
117
|
// In your root layout (e.g., app/layout.tsx)
|
|
124
|
-
<body
|
|
118
|
+
<body>
|
|
125
119
|
{children}
|
|
126
120
|
<Toaster position="bottom-right" />
|
|
127
121
|
</body>
|
|
@@ -279,7 +273,7 @@ The token system covers all UI needs out of the box. As AI, use existing tokens
|
|
|
279
273
|
If the user needs custom values beyond existing tokens, they will handle it separately.
|
|
280
274
|
Customization guide: https://7onic.design/components/theming
|
|
281
275
|
|
|
282
|
-
**Never modify generated token files** — these are auto-generated from figma-tokens.json via sync-tokens. AI must never edit, add to, or delete from: `variables.css`, `light.css`, `dark.css`, `v3-preset.js`, `v4-theme.css`, `index.js`, `index.mjs`, `index.d.ts`, `tokens.json`
|
|
276
|
+
**Never modify generated token files** — these are auto-generated from figma-tokens.json via sync-tokens. AI must never edit, add to, or delete from: `variables.css`, `light.css`, `dark.css`, `reset.css`, `v3-preset.js`, `v4-theme.css`, `index.js`, `index.mjs`, `index.d.ts`, `tokens.json`
|
|
283
277
|
|
|
284
278
|
### Self-Check (after writing ANY code)
|
|
285
279
|
|