@biza-gov/token-css 0.0.0-stage → 1.0.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 +543 -3
- package/base.css +204 -0
- package/globals.css +20 -0
- package/package.json +44 -4
- package/theme.css +521 -0
- package/tokens.css +800 -0
- package/typography.css +648 -0
package/README.md
CHANGED
|
@@ -1,3 +1,543 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @biza-gov/token-css
|
|
2
|
+
|
|
3
|
+
Government Design System — CSS Design Tokens, Typography, Shadows, and Dark Mode.
|
|
4
|
+
|
|
5
|
+
> **Modular architecture**: Import only what you need — no unnecessary CSS loading.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @biza-gov/token-css
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📦 Import Options
|
|
16
|
+
|
|
17
|
+
### Option 1: All-in-One (ใช้ทุกอย่าง)
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
@import "@biza-gov/token-css";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
รวม: tokens + base + theme + typography + tailwindcss + tw-animate-css
|
|
24
|
+
|
|
25
|
+
### Option 2: Modular (เลือกเฉพาะที่ต้องการ)
|
|
26
|
+
|
|
27
|
+
```css
|
|
28
|
+
/* CSS Variables เท่านั้น (สี, spacing, font, shadow) */
|
|
29
|
+
@import "@biza-gov/token-css/tokens";
|
|
30
|
+
|
|
31
|
+
/* shadcn/UI variables + base styles + dark mode */
|
|
32
|
+
@import "@biza-gov/token-css/base";
|
|
33
|
+
|
|
34
|
+
/* Tailwind v4 theme mappings (ต้องใช้คู่กับ tokens) */
|
|
35
|
+
@import "@biza-gov/token-css/theme";
|
|
36
|
+
|
|
37
|
+
/* Responsive typography classes */
|
|
38
|
+
@import "@biza-gov/token-css/typography";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### ตัวอย่างการใช้งานจริง
|
|
42
|
+
|
|
43
|
+
**โปรเจค Tailwind + shadcn (แนะนำ):**
|
|
44
|
+
```css
|
|
45
|
+
@import "tailwindcss";
|
|
46
|
+
@import "@biza-gov/token-css/tokens";
|
|
47
|
+
@import "@biza-gov/token-css/base";
|
|
48
|
+
@import "@biza-gov/token-css/theme";
|
|
49
|
+
@import "@biza-gov/token-css/typography";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**โปรเจคที่ต้องการแค่ตัวแปรสี:**
|
|
53
|
+
```css
|
|
54
|
+
@import "@biza-gov/token-css/tokens";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**โปรเจคที่ต้องการ typography อย่างเดียว:**
|
|
58
|
+
```css
|
|
59
|
+
@import "@biza-gov/token-css/tokens";
|
|
60
|
+
@import "@biza-gov/token-css/typography";
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 📁 File Structure
|
|
66
|
+
|
|
67
|
+
| File | Size | Content | Dependencies |
|
|
68
|
+
|------|------|---------|-------------|
|
|
69
|
+
| `tokens.css` | ~38KB | CSS custom properties (สี, font, spacing, shadow) | None |
|
|
70
|
+
| `base.css` | ~5KB | shadcn/UI vars, body styles, dark mode | None |
|
|
71
|
+
| `theme.css` | ~12KB | Tailwind v4 `@theme` mappings, motion easing | Requires `tokens.css` |
|
|
72
|
+
| `typography.css` | ~28KB | Responsive `.typo-*` classes | Requires `tokens.css` |
|
|
73
|
+
| `globals.css` | ~0.5KB | Convenience bundle (imports all above) | tailwindcss, tw-animate-css |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🔤 Fonts (Sans-serif)
|
|
78
|
+
|
|
79
|
+
Default stack in the library uses **Noto Sans Thai** + **Inter**. You can override these in your app if needed.
|
|
80
|
+
|
|
81
|
+
**CSS variables:**
|
|
82
|
+
|
|
83
|
+
```css
|
|
84
|
+
:root {
|
|
85
|
+
--font-inter: "Inter", "Noto Sans Thai", sans-serif;
|
|
86
|
+
--font-noto-sans-thai: "Noto Sans Thai", "Inter", sans-serif;
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Example (Next.js):**
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { Inter, Noto_Sans_Thai } from "next/font/google";
|
|
94
|
+
|
|
95
|
+
const notoSansThai = Noto_Sans_Thai({
|
|
96
|
+
weight: ["300", "400", "500", "600", "700"],
|
|
97
|
+
subsets: ["thai"],
|
|
98
|
+
variable: "--font-noto-sans-thai",
|
|
99
|
+
display: "swap",
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const inter = Inter({
|
|
103
|
+
weight: ["300", "400", "500", "600", "700"],
|
|
104
|
+
subsets: ["latin"],
|
|
105
|
+
variable: "--font-inter",
|
|
106
|
+
display: "swap",
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🎨 Brand Colors
|
|
113
|
+
|
|
114
|
+
| Token | Tailwind Class | Value |
|
|
115
|
+
| ------------------------- | -------------------------------------------- | --------- |
|
|
116
|
+
| `--color-brand-primary` | `bg-brand-primary`, `text-brand-primary` | `#1e7d55` |
|
|
117
|
+
| `--color-brand-secondary` | `bg-brand-secondary`, `text-brand-secondary` | `#80d897` |
|
|
118
|
+
| `--color-brand-surface` | `bg-brand-surface` | `#faf9e5` |
|
|
119
|
+
| `--color-brand-text-dark` | `text-brand-text-dark` | `#05010e` |
|
|
120
|
+
|
|
121
|
+
**Usage:**
|
|
122
|
+
|
|
123
|
+
```jsx
|
|
124
|
+
<button className="bg-brand-primary text-white hover:bg-brand-secondary">
|
|
125
|
+
Primary Button
|
|
126
|
+
</button>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## ⚠️ Semantic Colors
|
|
132
|
+
|
|
133
|
+
| Token | Tailwind Class | Value | Use Case |
|
|
134
|
+
| --------------------------------- | ------------------------------------------------ | --------- | --------------- |
|
|
135
|
+
| `--color-semantic-critical` | `bg-semantic-critical`, `text-semantic-critical` | `#f21515` | Errors |
|
|
136
|
+
| `--color-semantic-critical-hover` | `hover:bg-semantic-critical-hover` | `#c71b1b` | Error hover |
|
|
137
|
+
| `--color-semantic-success` | `bg-semantic-success`, `text-semantic-success` | `#95c135` | Success states |
|
|
138
|
+
| `--color-semantic-success-hover` | `hover:bg-semantic-success-hover` | `#7aa125` | Success hover |
|
|
139
|
+
| `--color-semantic-warning` | `bg-semantic-warning`, `text-semantic-warning` | `#f1be25` | Warnings |
|
|
140
|
+
| `--color-semantic-warning-hover` | `hover:bg-semantic-warning-hover` | `#ad8306` | Warning hover |
|
|
141
|
+
| `--color-semantic-neutral` | `bg-semantic-neutral`, `text-semantic-neutral` | `#707993` | Neutral/muted |
|
|
142
|
+
| `--color-semantic-verified` | `bg-semantic-verified`, `text-semantic-verified` | `#6982e1` | Verified badges |
|
|
143
|
+
|
|
144
|
+
**Usage:**
|
|
145
|
+
|
|
146
|
+
```jsx
|
|
147
|
+
<span className="text-semantic-critical">Error: Invalid input</span>
|
|
148
|
+
<span className="text-semantic-success">Success!</span>
|
|
149
|
+
<span className="bg-semantic-warning text-black px-2 rounded">Warning</span>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 📊 Status Colors
|
|
155
|
+
|
|
156
|
+
| Token | Tailwind Class | Value | Use Case |
|
|
157
|
+
| ------------------------ | ------------------- | --------- | --------------- |
|
|
158
|
+
| `--color-status-default` | `bg-status-default` | `#8df0ff` | Default state |
|
|
159
|
+
| `--color-status-stable` | `bg-status-stable` | `#95c135` | Stable/active |
|
|
160
|
+
| `--color-status-warning` | `bg-status-warning` | `#f8842d` | Warning state |
|
|
161
|
+
| `--color-status-danger` | `bg-status-danger` | `#991d1d` | Danger/critical |
|
|
162
|
+
|
|
163
|
+
**Usage:**
|
|
164
|
+
|
|
165
|
+
```jsx
|
|
166
|
+
<span className="bg-status-stable text-white px-2 py-1 rounded-full text-xs">
|
|
167
|
+
Active
|
|
168
|
+
</span>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## ✍️ Text Colors
|
|
174
|
+
|
|
175
|
+
| Token | Tailwind Class | Light Mode | Dark Mode |
|
|
176
|
+
| -------------------------- | ----------------------- | ---------- | --------- |
|
|
177
|
+
| `--color-text-primary` | `text-text-primary` | `#060d26` | `#fcfcff` |
|
|
178
|
+
| `--color-text-secondary` | `text-text-secondary` | `#1e7d55` | `#80d897` |
|
|
179
|
+
| `--color-text-tertiary` | `text-text-tertiary` | `#475272` | `#c8cedd` |
|
|
180
|
+
| `--color-text-placeholder` | `text-text-placeholder` | `#707993` | - |
|
|
181
|
+
| `--color-text-disable` | `text-text-disable` | `#c8cedd` | - |
|
|
182
|
+
| `--color-text-critical` | `text-text-critical` | `#f21515` | `#ffa9a9` |
|
|
183
|
+
| `--color-text-tags` | `text-text-tags` | `#a9edb9` | - |
|
|
184
|
+
|
|
185
|
+
**Usage:**
|
|
186
|
+
|
|
187
|
+
```jsx
|
|
188
|
+
<h1 className="text-text-primary">Main Title</h1>
|
|
189
|
+
<p className="text-text-secondary">Subtitle</p>
|
|
190
|
+
<span className="text-text-placeholder">Hint text...</span>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🔲 Border Colors
|
|
196
|
+
|
|
197
|
+
| Token | Tailwind Class | Value |
|
|
198
|
+
| ------------------------- | ------------------------ | --------- |
|
|
199
|
+
| `--color-border-default` | `border-border-default` | `#a9edb9` |
|
|
200
|
+
| `--color-border-hover` | `border-border-hover` | `#80d897` |
|
|
201
|
+
| `--color-border-neutral` | `border-border-neutral` | `#c8cedd` |
|
|
202
|
+
| `--color-border-critical` | `border-border-critical` | `#f21515` |
|
|
203
|
+
| `--color-border-disable` | `border-border-disable` | `#c8cedd` |
|
|
204
|
+
| `--color-border-tags` | `border-border-tags` | `#a9edb9` |
|
|
205
|
+
|
|
206
|
+
**Usage:**
|
|
207
|
+
|
|
208
|
+
```jsx
|
|
209
|
+
<input className="border border-border-neutral focus:border-border-default" />
|
|
210
|
+
<div className="border-2 border-border-critical">Error state</div>
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 🔘 Button Colors
|
|
216
|
+
|
|
217
|
+
| Token | Tailwind Class | Value |
|
|
218
|
+
| --------------------- | -------------------- | --------- |
|
|
219
|
+
| `--color-btn-primary` | `bg-btn-primary` | `#1e7d55` |
|
|
220
|
+
| `--color-btn-hover` | `hover:bg-btn-hover` | `#80d897` |
|
|
221
|
+
| `--color-btn-default` | `bg-btn-default` | `#fcfcff` |
|
|
222
|
+
|
|
223
|
+
**Usage:**
|
|
224
|
+
|
|
225
|
+
```jsx
|
|
226
|
+
<button className="bg-btn-primary hover:bg-btn-hover text-white">Submit</button>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 🎯 Icon Colors
|
|
232
|
+
|
|
233
|
+
| Token | Tailwind Class | Value | Use Case |
|
|
234
|
+
| ----------------------------- | -------------------------- | --------- | --------------- |
|
|
235
|
+
| `--color-icon-default` | `text-icon-default` | `#05010e` | Default icons |
|
|
236
|
+
| `--color-icon-hover` | `text-icon-hover` | `#1e7d55` | Hover state |
|
|
237
|
+
| `--color-icon-water` | `text-icon-water` | `#13a8bf` | Water module |
|
|
238
|
+
| `--color-icon-water-hover` | `text-icon-water-hover` | `#008296` | Water hover |
|
|
239
|
+
| `--color-icon-tax` | `text-icon-tax` | `#475272` | Tax module |
|
|
240
|
+
| `--color-icon-tax-hover` | `text-icon-tax-hover` | `#182342` | Tax hover |
|
|
241
|
+
| `--color-icon-security` | `text-icon-security` | `#b37abb` | Security module |
|
|
242
|
+
| `--color-icon-security-hover` | `text-icon-security-hover` | `#502f55` | Security hover |
|
|
243
|
+
| `--color-icon-success` | `text-icon-success` | `#95c135` | Success |
|
|
244
|
+
| `--color-icon-warning` | `text-icon-warning` | `#f1be25` | Warning |
|
|
245
|
+
| `--color-icon-critical` | `text-icon-critical` | `#f21515` | Critical/error |
|
|
246
|
+
|
|
247
|
+
**Usage:**
|
|
248
|
+
|
|
249
|
+
```jsx
|
|
250
|
+
<WaterIcon className="text-icon-water hover:text-icon-water-hover" />
|
|
251
|
+
<TaxIcon className="text-icon-tax hover:text-icon-tax-hover" />
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## 📝 Text Field Colors
|
|
257
|
+
|
|
258
|
+
| Token | Tailwind Class | Value |
|
|
259
|
+
| ---------------------------- | ----------------------- | --------- |
|
|
260
|
+
| `--color-field-default` | `bg-field-default` | `#fcfcff` |
|
|
261
|
+
| `--color-field-default-dark` | `bg-field-default-dark` | `#060d26` |
|
|
262
|
+
| `--color-field-disable` | `bg-field-disable` | `#ebedf5` |
|
|
263
|
+
|
|
264
|
+
**Usage:**
|
|
265
|
+
|
|
266
|
+
```jsx
|
|
267
|
+
<input className="bg-field-default disabled:bg-field-disable" />
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 🍎 Foundation Palettes
|
|
273
|
+
|
|
274
|
+
### Apple Pallet (Green)
|
|
275
|
+
|
|
276
|
+
| Shade | Class | Value |
|
|
277
|
+
| ------ | ----------------- | --------- |
|
|
278
|
+
| dark | `bg-apple-dark` | `#1e7d55` |
|
|
279
|
+
| darker | `bg-apple-darker` | `#05010e` |
|
|
280
|
+
| light | `bg-apple-light` | `#faf9e5` |
|
|
281
|
+
| medium | `bg-apple-medium` | `#80d897` |
|
|
282
|
+
| soft | `bg-apple-soft` | `#a9edb9` |
|
|
283
|
+
|
|
284
|
+
### Sky Blue Pallet
|
|
285
|
+
|
|
286
|
+
| Shade | Class | Value |
|
|
287
|
+
| ----------- | -------------------- | --------- |
|
|
288
|
+
| bright | `bg-sky-bright` | `#edfcff` |
|
|
289
|
+
| light | `bg-sky-light` | `#cdf8ff` |
|
|
290
|
+
| light-soft | `bg-sky-light-soft` | `#adf4ff` |
|
|
291
|
+
| soft | `bg-sky-soft` | `#8df0ff` |
|
|
292
|
+
| soft-medium | `bg-sky-soft-medium` | `#6debff` |
|
|
293
|
+
| medium | `bg-sky-medium` | `#4de7ff` |
|
|
294
|
+
| medium-dark | `bg-sky-medium-dark` | `#2fcfe8` |
|
|
295
|
+
| dark | `bg-sky-dark` | `#13a8bf` |
|
|
296
|
+
| dark-darker | `bg-sky-dark-darker` | `#008296` |
|
|
297
|
+
| darker | `bg-sky-darker` | `#005f6d` |
|
|
298
|
+
|
|
299
|
+
### Fuji Pallet (Gray)
|
|
300
|
+
|
|
301
|
+
| Shade | Class | Value |
|
|
302
|
+
| ----------- | --------------------- | --------- |
|
|
303
|
+
| bright | `bg-fuji-bright` | `#fcfcff` |
|
|
304
|
+
| light | `bg-fuji-light` | `#ebedf5` |
|
|
305
|
+
| soft | `bg-fuji-soft` | `#c8cedd` |
|
|
306
|
+
| soft-medium | `bg-fuji-soft-medium` | `#707993` |
|
|
307
|
+
| medium | `bg-fuji-medium` | `#475272` |
|
|
308
|
+
| medium-dark | `bg-fuji-medium-dark` | `#252f4a` |
|
|
309
|
+
| dark | `bg-fuji-dark` | `#182342` |
|
|
310
|
+
| darker | `bg-fuji-darker` | `#060d26` |
|
|
311
|
+
|
|
312
|
+
### Fuan Pallet (Red)
|
|
313
|
+
|
|
314
|
+
| Shade | Class | Value |
|
|
315
|
+
| ----------- | --------------------- | --------- |
|
|
316
|
+
| light | `bg-fuan-light` | `#ffd2d2` |
|
|
317
|
+
| soft | `bg-fuan-soft` | `#ffa9a9` |
|
|
318
|
+
| soft-medium | `bg-fuan-soft-medium` | `#ff6060` |
|
|
319
|
+
| medium | `bg-fuan-medium` | `#f21515` |
|
|
320
|
+
| medium-dark | `bg-fuan-medium-dark` | `#c71b1b` |
|
|
321
|
+
| dark | `bg-fuan-dark` | `#991d1d` |
|
|
322
|
+
| darker | `bg-fuan-darker` | `#540d0d` |
|
|
323
|
+
|
|
324
|
+
### Take Pallet (Green)
|
|
325
|
+
|
|
326
|
+
| Shade | Class | Value |
|
|
327
|
+
| ----------- | --------------------- | --------- |
|
|
328
|
+
| light | `bg-take-light` | `#f1ffd3` |
|
|
329
|
+
| soft | `bg-take-soft` | `#d4eca1` |
|
|
330
|
+
| soft-medium | `bg-take-soft-medium` | `#afd461` |
|
|
331
|
+
| medium | `bg-take-medium` | `#95c135` |
|
|
332
|
+
| medium-dark | `bg-take-medium-dark` | `#7aa125` |
|
|
333
|
+
| dark | `bg-take-dark` | `#557909` |
|
|
334
|
+
| darker | `bg-take-darker` | `#314604` |
|
|
335
|
+
|
|
336
|
+
### Saffron Pallet (Yellow)
|
|
337
|
+
|
|
338
|
+
| Shade | Class | Value |
|
|
339
|
+
| ----------- | ------------------------ | --------- |
|
|
340
|
+
| light | `bg-saffron-light` | `#fff9e9` |
|
|
341
|
+
| light-soft | `bg-saffron-light-soft` | `#ffe9a8` |
|
|
342
|
+
| soft | `bg-saffron-soft` | `#ffd968` |
|
|
343
|
+
| medium | `bg-saffron-medium` | `#f1be25` |
|
|
344
|
+
| medium-dark | `bg-saffron-medium-dark` | `#ad8306` |
|
|
345
|
+
| dark | `bg-saffron-dark` | `#694f00` |
|
|
346
|
+
|
|
347
|
+
### Moody Blue Pallet
|
|
348
|
+
|
|
349
|
+
| Shade | Class | Value |
|
|
350
|
+
| ----------- | ---------------------- | --------- |
|
|
351
|
+
| bright | `bg-moody-bright` | `#f3f5ff` |
|
|
352
|
+
| light | `bg-moody-light` | `#d7dfff` |
|
|
353
|
+
| light-soft | `bg-moody-light-soft` | `#bccaff` |
|
|
354
|
+
| soft | `bg-moody-soft` | `#a0b4ff` |
|
|
355
|
+
| soft-medium | `bg-moody-soft-medium` | `#859eff` |
|
|
356
|
+
| medium | `bg-moody-medium` | `#6982e1` |
|
|
357
|
+
| medium-dark | `bg-moody-medium-dark` | `#4f67bf` |
|
|
358
|
+
| dark | `bg-moody-dark` | `#26387b` |
|
|
359
|
+
| dark-darker | `bg-moody-dark-darker` | `#172559` |
|
|
360
|
+
| darker | `bg-moody-darker` | `#182342` |
|
|
361
|
+
|
|
362
|
+
### Crustae Pallet (Orange-Brown)
|
|
363
|
+
|
|
364
|
+
| Shade | Class | Value |
|
|
365
|
+
| ----------- | ------------------------ | --------- |
|
|
366
|
+
| light | `bg-crustae-light` | `#fff3ea` |
|
|
367
|
+
| light-soft | `bg-crustae-light-soft` | `#ffcfab` |
|
|
368
|
+
| soft | `bg-crustae-soft` | `#ffab6d` |
|
|
369
|
+
| medium | `bg-crustae-medium` | `#f8842d` |
|
|
370
|
+
| medium-dark | `bg-crustae-medium-dark` | `#b4540d` |
|
|
371
|
+
| dark | `bg-crustae-dark` | `#703000` |
|
|
372
|
+
|
|
373
|
+
### Glacier Pallet (Ice Blue)
|
|
374
|
+
|
|
375
|
+
| Shade | Class | Value |
|
|
376
|
+
| ----------- | ----------------------- | --------- |
|
|
377
|
+
| bright | `bg-glacier-bright` | `#f8fcff` |
|
|
378
|
+
| light | `bg-glacier-light` | `#dcf1ff` |
|
|
379
|
+
| light-soft | `bg-glacier-light-soft` | `#c0e5ff` |
|
|
380
|
+
| soft | `bg-glacier-soft` | `#afd4ef` |
|
|
381
|
+
| soft-medium | `bg-glacier-soft-medium`| `#98bcd5` |
|
|
382
|
+
| medium | `bg-glacier-medium` | `#82a4bb` |
|
|
383
|
+
| medium-dark | `bg-glacier-medium-dark`| `#6d8ca2` |
|
|
384
|
+
| dark | `bg-glacier-dark` | `#597588` |
|
|
385
|
+
| dark-darker | `bg-glacier-dark-darker`| `#465e6f` |
|
|
386
|
+
| darker | `bg-glacier-darker` | `#344856` |
|
|
387
|
+
|
|
388
|
+
### Wisteria Pallet (Purple)
|
|
389
|
+
|
|
390
|
+
| Shade | Class | Value |
|
|
391
|
+
| ----------- | ------------------------- | --------- |
|
|
392
|
+
| light | `bg-wisteria-light` | `#fef7ff` |
|
|
393
|
+
| light-soft | `bg-wisteria-light-soft` | `#f2cff7` |
|
|
394
|
+
| soft | `bg-wisteria-soft` | `#e5a8ee` |
|
|
395
|
+
| medium | `bg-wisteria-medium` | `#b37abb` |
|
|
396
|
+
| medium-dark | `bg-wisteria-medium-dark` | `#815288` |
|
|
397
|
+
| dark | `bg-wisteria-dark` | `#502f55` |
|
|
398
|
+
|
|
399
|
+
### Other Palettes
|
|
400
|
+
|
|
401
|
+
- **Orange**: `bg-orange-light` (`#ffb381`), `bg-orange-medium` (`#f8842d`), `bg-orange-soft` (`#fb8b07`), `bg-orange-pink` (`#ff5558`), `bg-orange-red` (`#fe4d01`)
|
|
402
|
+
- **Purple**: `bg-purple-dark` (`#390f37`), `bg-purple-medium` (`#815288`), `bg-purple-soft` (`#bd9fd1`)
|
|
403
|
+
- **Yellow**: `bg-yellow-light` (`#ede9da`), `bg-yellow-medium` (`#f1be25`), `bg-yellow-soft` (`#f1dca7`), `bg-yellow-soft-medium` (`#dbbd7e`), `bg-yellow-medium-dark` (`#eabf23`)
|
|
404
|
+
- **Blue**: `bg-blue-dark` (`#042d8b`), `bg-blue-darker` (`#010006`), `bg-blue-medium` (`#008296`), `bg-blue-medium-dark` (`#394e9d`), `bg-blue-soft` (`#98bcd5`), `bg-blue-soft-medium` (`#71c9d5`)
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## 📏 Spacing
|
|
409
|
+
|
|
410
|
+
| Token | Tailwind Class | Value |
|
|
411
|
+
| -------------- | ------------------------- | ------ |
|
|
412
|
+
| `--spacing-1x` | `p-1x`, `m-1x`, `gap-1x` | `8px` |
|
|
413
|
+
| `--spacing-2x` | `p-2x`, `m-2x`, `gap-2x` | `16px` |
|
|
414
|
+
| `--spacing-3x` | `p-3x`, `m-3x`, `gap-3x` | `24px` |
|
|
415
|
+
| `--spacing-4x` | `p-4x`, `m-4x`, `gap-4x` | `32px` |
|
|
416
|
+
|
|
417
|
+
**Usage:**
|
|
418
|
+
|
|
419
|
+
```jsx
|
|
420
|
+
<div className="p-3x gap-2x flex">
|
|
421
|
+
<div className="m-1x">Item</div>
|
|
422
|
+
</div>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## 🔵 Border Radius
|
|
428
|
+
|
|
429
|
+
| Token | Tailwind Class | Value |
|
|
430
|
+
| ---------------------- | --------------------- | ------- |
|
|
431
|
+
| `--radius-circle` | `rounded-circle` | `100px` |
|
|
432
|
+
| `--radius-square` | `rounded-square` | `8px` |
|
|
433
|
+
| `--radius-square-hard` | `rounded-square-hard` | `16px` |
|
|
434
|
+
|
|
435
|
+
**Usage:**
|
|
436
|
+
|
|
437
|
+
```jsx
|
|
438
|
+
<div className="rounded-square bg-brand-primary">Card</div>
|
|
439
|
+
<span className="rounded-circle bg-status-stable">Badge</span>
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## 🌓 Shadows
|
|
445
|
+
|
|
446
|
+
| Token | Tailwind Class | Description |
|
|
447
|
+
| ------------------------ | ---------------------- | ----------------- |
|
|
448
|
+
| `--shadow-smooth-low` | `shadow-smooth-low` | Subtle elevation |
|
|
449
|
+
| `--shadow-smooth-medium` | `shadow-smooth-medium` | Standard cards |
|
|
450
|
+
| `--shadow-smooth-high` | `shadow-smooth-high` | Modals, dropdowns |
|
|
451
|
+
|
|
452
|
+
**Usage:**
|
|
453
|
+
|
|
454
|
+
```jsx
|
|
455
|
+
<div className="shadow-smooth-low bg-white rounded-square p-3x">
|
|
456
|
+
Low elevation card
|
|
457
|
+
</div>
|
|
458
|
+
<div className="shadow-smooth-medium bg-white rounded-square-hard p-3x">
|
|
459
|
+
Medium elevation card
|
|
460
|
+
</div>
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## 📚 Typography Classes
|
|
466
|
+
|
|
467
|
+
Typography classes are defined in `typography.css`:
|
|
468
|
+
|
|
469
|
+
| Class | Description |
|
|
470
|
+
| ------------------------ | ---------------------- |
|
|
471
|
+
| `.typo-h1` | Heading 1 (responsive) |
|
|
472
|
+
| `.typo-h2` | Heading 2 (responsive) |
|
|
473
|
+
| `.typo-h3` | Heading 3 (responsive) |
|
|
474
|
+
| `.typo-body` | Body text (responsive) |
|
|
475
|
+
| `.typo-sub` | Subtitle (responsive) |
|
|
476
|
+
| `.typo-button` | Button text |
|
|
477
|
+
| `.typo-button-sm` | Small button text |
|
|
478
|
+
| `.typo-menu` | Menu/nav text |
|
|
479
|
+
| `.typo-tags` | Tags/labels |
|
|
480
|
+
| `.typo-logo` | Logo text |
|
|
481
|
+
| `.typo-text-button` | Text button/link |
|
|
482
|
+
| `.typo-text-button-line` | Underlined link |
|
|
483
|
+
| `.typo-discount` | Discount badge |
|
|
484
|
+
|
|
485
|
+
**Usage:**
|
|
486
|
+
|
|
487
|
+
```jsx
|
|
488
|
+
<h1 className="typo-h1 text-text-primary">Page Title</h1>
|
|
489
|
+
<p className="typo-body text-text-tertiary">Description text</p>
|
|
490
|
+
<button className="typo-button-sm bg-btn-primary">Click</button>
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## 📐 Layout Tokens
|
|
496
|
+
|
|
497
|
+
| Token | Value | Use Case |
|
|
498
|
+
| ------------------------------ | ------- | ----------------- |
|
|
499
|
+
| `--layout-component-card-padding` | `24px` | Card padding |
|
|
500
|
+
| `--layout-component-hitbox-min` | `48px` | Min touch target |
|
|
501
|
+
| `--layout-layout-grid-gutter` | `24px` | Grid gutter |
|
|
502
|
+
| `--layout-layout-page-margin` | `32px` | Page margin |
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## 🎬 Motion / Easing
|
|
507
|
+
|
|
508
|
+
| Token | Tailwind Class | Description |
|
|
509
|
+
| ---------------------- | -------------------- | ----------------- |
|
|
510
|
+
| `--ease-spring-snappy` | `ease-spring-snappy` | Quick, responsive |
|
|
511
|
+
| `--ease-spring` | `ease-spring` | Natural spring |
|
|
512
|
+
| `--ease-spring-soft` | `ease-spring-soft` | Gentle spring |
|
|
513
|
+
|
|
514
|
+
**Usage:**
|
|
515
|
+
|
|
516
|
+
```jsx
|
|
517
|
+
<div className="transition-transform duration-300 ease-spring hover:scale-105">
|
|
518
|
+
Animated element
|
|
519
|
+
</div>
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## 🌙 Dark Mode
|
|
525
|
+
|
|
526
|
+
Dark mode is automatically handled when `.dark` class is on a parent element:
|
|
527
|
+
|
|
528
|
+
```jsx
|
|
529
|
+
// In your layout or root component
|
|
530
|
+
<html className={isDark ? "dark" : ""}>...</html>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
These tokens automatically switch in dark mode:
|
|
534
|
+
|
|
535
|
+
- `text-text-primary` → `#fcfcff` (was `#060d26`)
|
|
536
|
+
- `text-text-secondary` → `#80d897` (was `#1e7d55`)
|
|
537
|
+
- `text-text-tertiary` → `#c8cedd` (was `#475272`)
|
|
538
|
+
- `text-text-critical` → `#ffa9a9` (was `#f21515`)
|
|
539
|
+
- `border-border-default` → `#80d897` (was `#a9edb9`)
|
|
540
|
+
- `border-border-tags` → `#1e7d55` (was `#a9edb9`)
|
|
541
|
+
- `text-icon-default` → `#fcfcff` (was `#05010e`)
|
|
542
|
+
- `bg-field-default` → `#060d26` (was `#fcfcff`)
|
|
543
|
+
- Shadows → use darker variants with increased opacity
|