@polastack/design-system 0.1.19 → 0.1.20

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@polastack/design-system",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Polastack Design System - UI components and design tokens for business applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/tkaneko-siracusa/DesignSystem.git"
9
+ "url": "https://github.com/siracusa-hq/DesignSystem.git"
10
10
  },
11
11
  "publishConfig": {
12
12
  "registry": "https://registry.npmjs.org",
@@ -24,7 +24,10 @@
24
24
  "import": "./dist/tokens/index.js",
25
25
  "types": "./dist/tokens/index.d.ts"
26
26
  },
27
- "./globals.css": "./src/styles/globals.css"
27
+ "./globals.css": "./src/styles/globals.css",
28
+ "./styles/tokens.css": "./src/styles/tokens.css",
29
+ "./styles/semantic.css": "./src/styles/semantic.css",
30
+ "./styles/base.css": "./src/styles/base.css"
28
31
  },
29
32
  "files": [
30
33
  "dist",
@@ -0,0 +1,150 @@
1
+ /* ============================================================
2
+ Base Styles, Keyframes, PWA, Print
3
+
4
+ Tailwind の @layer base やグローバルスタイルを定義。
5
+ tokens.css + semantic.css の後に読み込むこと。
6
+ ============================================================ */
7
+
8
+ /* --------------------------------------------------------
9
+ Keyframes
10
+ -------------------------------------------------------- */
11
+
12
+ @keyframes fade-in {
13
+ from { opacity: 0; }
14
+ to { opacity: 1; }
15
+ }
16
+
17
+ @keyframes fade-out {
18
+ from { opacity: 1; }
19
+ to { opacity: 0; }
20
+ }
21
+
22
+ @keyframes slide-in-right {
23
+ from { transform: translateX(100%); }
24
+ to { transform: translateX(0); }
25
+ }
26
+
27
+ @keyframes slide-out-right {
28
+ from { transform: translateX(0); }
29
+ to { transform: translateX(100%); }
30
+ }
31
+
32
+ @keyframes slide-in-left {
33
+ from { transform: translateX(-100%); }
34
+ to { transform: translateX(0); }
35
+ }
36
+
37
+ @keyframes slide-out-left {
38
+ from { transform: translateX(0); }
39
+ to { transform: translateX(-100%); }
40
+ }
41
+
42
+ @keyframes spinner-fade {
43
+ 0%, 100% { opacity: 1; }
44
+ 50% { opacity: 0.15; }
45
+ }
46
+
47
+ /* --------------------------------------------------------
48
+ Base Layer
49
+ -------------------------------------------------------- */
50
+
51
+ @layer base {
52
+ *,
53
+ *::before,
54
+ *::after {
55
+ border-color: var(--color-border);
56
+ }
57
+
58
+ body {
59
+ font-family: var(--font-sans);
60
+ font-size: var(--text-base);
61
+ line-height: var(--text-base--line-height);
62
+ color: var(--color-on-surface);
63
+ background-color: var(--color-surface);
64
+ -webkit-font-smoothing: antialiased;
65
+ -moz-osx-font-smoothing: grayscale;
66
+ }
67
+
68
+ /* Clickable elements should show pointer cursor */
69
+ button:not(:disabled),
70
+ [role='button']:not(:disabled),
71
+ [role='tab'],
72
+ [role='checkbox'],
73
+ [role='radio'],
74
+ [role='menuitem'],
75
+ [role='menuitemcheckbox'],
76
+ [role='menuitemradio'],
77
+ [role='option'],
78
+ [role='switch'],
79
+ label,
80
+ select:not(:disabled),
81
+ summary {
82
+ cursor: pointer;
83
+ }
84
+ }
85
+
86
+ /* ============================================================
87
+ PWA: Standalone Mode
88
+ ============================================================ */
89
+
90
+ @media (display-mode: standalone) {
91
+ body {
92
+ overscroll-behavior-y: contain;
93
+ -webkit-user-select: none;
94
+ user-select: none;
95
+ }
96
+
97
+ input,
98
+ textarea,
99
+ [contenteditable='true'] {
100
+ -webkit-user-select: text;
101
+ user-select: text;
102
+ }
103
+ }
104
+
105
+ /* ============================================================
106
+ PWA: Viewport Height
107
+ ============================================================ */
108
+
109
+ @supports (height: 100dvh) {
110
+ :root {
111
+ --vh-full: 100dvh;
112
+ }
113
+ }
114
+
115
+ @supports not (height: 100dvh) {
116
+ :root {
117
+ --vh-full: 100vh;
118
+ }
119
+ }
120
+
121
+ /* ============================================================
122
+ Accessibility: Reduced Motion
123
+ ============================================================ */
124
+
125
+ @media (prefers-reduced-motion: reduce) {
126
+ *,
127
+ *::before,
128
+ *::after {
129
+ animation-duration: 0.01ms !important;
130
+ animation-iteration-count: 1 !important;
131
+ transition-duration: 0.01ms !important;
132
+ scroll-behavior: auto !important;
133
+ }
134
+ }
135
+
136
+ /* ============================================================
137
+ Print: PDF / 帳票出力用スタイル
138
+ ============================================================ */
139
+
140
+ @media print {
141
+ @page {
142
+ margin: 0;
143
+ }
144
+
145
+ .print-document {
146
+ padding: 0 !important;
147
+ box-shadow: none !important;
148
+ border: none !important;
149
+ }
150
+ }
@@ -1,452 +1,22 @@
1
- @import 'tailwindcss';
2
-
3
- /* ============================================================
4
- Dark Mode Variant
5
- .dark クラスベースのダークモード切替
6
- ============================================================ */
7
-
8
- @custom-variant dark (&:where(.dark, .dark *));
9
-
10
- /* ============================================================
11
- Polastack Design System - Design Tokens
12
- Tailwind CSS v4 @theme directive
13
- ============================================================ */
14
-
15
- @theme {
16
- /* --------------------------------------------------------
17
- Colors: Brand (Primary)
18
- Teal系 - #1BA491をベースにしたPolastackブランドカラー
19
- -------------------------------------------------------- */
20
- --color-primary-50: #f0fdfb;
21
- --color-primary-100: #cdfbf0;
22
- --color-primary-200: #9bf7e2;
23
- --color-primary-300: #61ebd0;
24
- --color-primary-400: #2fd4ba;
25
- --color-primary-500: #1BA491;
26
- --color-primary-600: #138575;
27
- --color-primary-700: #146b5f;
28
- --color-primary-800: #15564e;
29
- --color-primary-900: #134841;
30
- --color-primary-950: #042c28;
31
-
32
- /* --------------------------------------------------------
33
- Colors: Neutral (Zinc系)
34
- 高密度UIでの微妙なコントラスト差を表現する広いグレースケール
35
- -------------------------------------------------------- */
36
- --color-neutral-50: #fafafa;
37
- --color-neutral-100: #f4f4f5;
38
- --color-neutral-200: #e4e4e7;
39
- --color-neutral-300: #d4d4d8;
40
- --color-neutral-400: #a1a1aa;
41
- --color-neutral-500: #71717a;
42
- --color-neutral-600: #52525b;
43
- --color-neutral-700: #3f3f46;
44
- --color-neutral-800: #27272a;
45
- --color-neutral-900: #18181b;
46
- --color-neutral-950: #09090b;
47
-
48
- /* --------------------------------------------------------
49
- Colors: Semantic - Success (Green)
50
- Primaryのティールと区別しやすい純粋なグリーン系
51
- -------------------------------------------------------- */
52
- --color-success-50: #f0fdf4;
53
- --color-success-100: #dcfce7;
54
- --color-success-200: #bbf7d0;
55
- --color-success-300: #86efac;
56
- --color-success-400: #4ade80;
57
- --color-success-500: #22c55e;
58
- --color-success-600: #16a34a;
59
- --color-success-700: #15803d;
60
- --color-success-800: #166534;
61
- --color-success-900: #14532d;
62
- --color-success-950: #052e16;
63
-
64
- /* --------------------------------------------------------
65
- Colors: Semantic - Warning (Amber)
66
- -------------------------------------------------------- */
67
- --color-warning-50: #fffbeb;
68
- --color-warning-100: #fef3c7;
69
- --color-warning-200: #fde68a;
70
- --color-warning-300: #fcd34d;
71
- --color-warning-400: #fbbf24;
72
- --color-warning-500: #f59e0b;
73
- --color-warning-600: #d97706;
74
- --color-warning-700: #b45309;
75
- --color-warning-800: #92400e;
76
- --color-warning-900: #78350f;
77
- --color-warning-950: #451a03;
78
-
79
- /* --------------------------------------------------------
80
- Colors: Semantic - Error (Red)
81
- -------------------------------------------------------- */
82
- --color-error-50: #fef2f2;
83
- --color-error-100: #fee2e2;
84
- --color-error-200: #fecaca;
85
- --color-error-300: #fca5a5;
86
- --color-error-400: #f87171;
87
- --color-error-500: #ef4444;
88
- --color-error-600: #dc2626;
89
- --color-error-700: #b91c1c;
90
- --color-error-800: #991b1b;
91
- --color-error-900: #7f1d1d;
92
- --color-error-950: #450a0a;
93
-
94
- /* --------------------------------------------------------
95
- Colors: Semantic - Info (Blue)
96
- -------------------------------------------------------- */
97
- --color-info-50: #eff6ff;
98
- --color-info-100: #dbeafe;
99
- --color-info-200: #bfdbfe;
100
- --color-info-300: #93c5fd;
101
- --color-info-400: #60a5fa;
102
- --color-info-500: #3b82f6;
103
- --color-info-600: #2563eb;
104
- --color-info-700: #1d4ed8;
105
- --color-info-800: #1e40af;
106
- --color-info-900: #1e3a8a;
107
- --color-info-950: #172554;
108
-
109
- /* --------------------------------------------------------
110
- Typography: Font Families
111
- Inter(欧文) + Noto Sans JP(和文) で混在表示を最適化
112
- -------------------------------------------------------- */
113
- --font-sans: 'Inter', 'Noto Sans JP', ui-sans-serif, system-ui, sans-serif;
114
- --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
115
-
116
- /* --------------------------------------------------------
117
- Typography: Font Sizes
118
- base=14px - BtoB業務アプリの高密度表示に最適化
119
- -------------------------------------------------------- */
120
- --text-xs: 0.75rem;
121
- --text-xs--line-height: 1rem;
122
- --text-sm: 0.8125rem;
123
- --text-sm--line-height: 1.25rem;
124
- --text-base: 0.875rem;
125
- --text-base--line-height: 1.25rem;
126
- --text-lg: 1rem;
127
- --text-lg--line-height: 1.5rem;
128
- --text-xl: 1.125rem;
129
- --text-xl--line-height: 1.75rem;
130
- --text-2xl: 1.25rem;
131
- --text-2xl--line-height: 1.75rem;
132
- --text-3xl: 1.5rem;
133
- --text-3xl--line-height: 2rem;
134
-
135
- /* --------------------------------------------------------
136
- Spacing: 4px Grid
137
- -------------------------------------------------------- */
138
- --spacing-0: 0px;
139
- --spacing-px: 1px;
140
- --spacing-0_5: 0.125rem;
141
- --spacing-1: 0.25rem;
142
- --spacing-1_5: 0.375rem;
143
- --spacing-2: 0.5rem;
144
- --spacing-2_5: 0.625rem;
145
- --spacing-3: 0.75rem;
146
- --spacing-3_5: 0.875rem;
147
- --spacing-4: 1rem;
148
- --spacing-5: 1.25rem;
149
- --spacing-6: 1.5rem;
150
- --spacing-7: 1.75rem;
151
- --spacing-8: 2rem;
152
- --spacing-9: 2.25rem;
153
- --spacing-10: 2.5rem;
154
- --spacing-11: 2.75rem;
155
- --spacing-12: 3rem;
156
- --spacing-14: 3.5rem;
157
- --spacing-16: 4rem;
158
- --spacing-20: 5rem;
159
- --spacing-24: 6rem;
160
-
161
- /* --------------------------------------------------------
162
- Elevation: Shadows
163
- -------------------------------------------------------- */
164
- --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
165
- --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
166
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
167
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
168
- --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
169
- --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
170
- --shadow-drawer: 0 0 48px rgb(0 0 0 / 0.16);
171
-
172
- /* --------------------------------------------------------
173
- Elevation: Border Radius
174
- -------------------------------------------------------- */
175
- --radius-none: 0px;
176
- --radius-sm: 0.25rem;
177
- --radius-md: 0.375rem;
178
- --radius-lg: 0.5rem;
179
- --radius-xl: 0.75rem;
180
- --radius-2xl: 1rem;
181
- --radius-full: 9999px;
182
-
183
- /* --------------------------------------------------------
184
- Animation: Duration
185
- -------------------------------------------------------- */
186
- --duration-fast: 100ms;
187
- --duration-normal: 200ms;
188
- --duration-slow: 300ms;
189
-
190
- /* --------------------------------------------------------
191
- Animation: Easing
192
- -------------------------------------------------------- */
193
- --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
194
- --ease-in: cubic-bezier(0.4, 0, 1, 1);
195
- --ease-out: cubic-bezier(0, 0, 0.2, 1);
196
- --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
197
-
198
- /* --------------------------------------------------------
199
- Z-Index Scale
200
- Drawer重ね表示パターン対応
201
- -------------------------------------------------------- */
202
- --z-dropdown: 50;
203
- --z-sticky: 100;
204
- --z-drawer: 200;
205
- --z-modal: 300;
206
- --z-popover: 400;
207
- --z-toast: 500;
208
- --z-tooltip: 600;
209
-
210
- /* --------------------------------------------------------
211
- PWA: Safe Area Insets
212
- ノッチ端末・ホームバー端末のSafe Area対応
213
- -------------------------------------------------------- */
214
- --safe-area-top: env(safe-area-inset-top, 0px);
215
- --safe-area-right: env(safe-area-inset-right, 0px);
216
- --safe-area-bottom: env(safe-area-inset-bottom, 0px);
217
- --safe-area-left: env(safe-area-inset-left, 0px);
218
-
219
- /* --------------------------------------------------------
220
- PWA: Touch Target
221
- WCAG 2.5.5 準拠の最小タッチターゲットサイズ
222
- -------------------------------------------------------- */
223
- --touch-target-min: 44px;
224
- --touch-target-comfortable: 48px;
225
-
226
- /* --------------------------------------------------------
227
- PWA: Bottom Navigation
228
- -------------------------------------------------------- */
229
- --bottom-nav-height: 56px;
230
-
231
- /* --------------------------------------------------------
232
- Animation: Keyframes
233
- -------------------------------------------------------- */
234
- --animate-fade-in: fade-in var(--duration-normal) var(--ease-out);
235
- --animate-fade-out: fade-out var(--duration-normal) var(--ease-in);
236
- --animate-slide-in-right: slide-in-right var(--duration-slow) var(--ease-out);
237
- --animate-slide-out-right: slide-out-right var(--duration-slow) var(--ease-in);
238
- --animate-slide-in-left: slide-in-left var(--duration-slow) var(--ease-out);
239
- --animate-slide-out-left: slide-out-left var(--duration-slow) var(--ease-in);
240
- --animate-spinner: spinner-fade 0.8s ease-in-out infinite;
241
- }
242
-
243
- /* ============================================================
244
- Semantic Color Tokens
245
- ライト/ダークモードで自動切替されるセマンティック変数
246
- ============================================================ */
247
-
248
- :root {
249
- --color-surface: #ffffff;
250
- --color-surface-raised: #ffffff;
251
- --color-surface-sunken: var(--color-neutral-50);
252
- --color-surface-muted: var(--color-neutral-100);
253
- --color-on-surface: var(--color-neutral-900);
254
- --color-on-surface-secondary: var(--color-neutral-600);
255
- --color-on-surface-muted: var(--color-neutral-500);
256
- --color-border: var(--color-neutral-200);
257
- --color-border-input: var(--color-neutral-300);
258
- --color-ring: var(--color-primary-500);
259
- --color-ring-offset: #ffffff;
260
- --color-surface-overlay: rgb(0 0 0 / 0.5);
261
- --color-tooltip-bg: var(--color-neutral-900);
262
- --color-tooltip-text: #ffffff;
263
- --color-skeleton: var(--color-neutral-200);
264
- /* Accent surface — for selected/active nav items, highlighted rows, etc. */
265
- --color-surface-accent: #E4F5F1;
266
- --color-on-surface-accent: var(--color-primary-700);
267
- }
268
-
269
- .dark {
270
- /*
271
- * Surface elevation ladder (darkest → lightest):
272
- * sunken #0A0A0C — recessed/inset areas
273
- * surface #121215 — main background (≈ Material Design / Linear range)
274
- * raised #1A1A1E — cards, panels, modals
275
- * muted #232327 — hover states, subtle fills
276
- *
277
- * Values are hand-picked (not from the neutral scale) to sit between
278
- * Material Design #121212 and Radix Gray #111111, with a very subtle
279
- * cool tint that complements the teal brand.
280
- */
281
- --color-surface: #121215;
282
- --color-surface-raised: #1A1A1E;
283
- --color-surface-sunken: #0A0A0C;
284
- --color-surface-muted: #232327;
285
- --color-on-surface: var(--color-neutral-50);
286
- --color-on-surface-secondary: var(--color-neutral-400);
287
- --color-on-surface-muted: var(--color-neutral-400);
288
- --color-border: #28282C;
289
- --color-border-input: #38383E;
290
- --color-ring: var(--color-primary-400);
291
- --color-ring-offset: #121215;
292
- --color-surface-overlay: rgb(0 0 0 / 0.6);
293
- --color-tooltip-bg: var(--color-neutral-100);
294
- --color-tooltip-text: var(--color-neutral-900);
295
- --color-skeleton: #232327;
296
- /* Accent surface — brand-tinted for selected/active states */
297
- --color-surface-accent: #0F2926;
298
- --color-on-surface-accent: var(--color-primary-400);
299
- color-scheme: dark;
300
- }
301
-
302
- @keyframes fade-in {
303
- from { opacity: 0; }
304
- to { opacity: 1; }
305
- }
306
-
307
- @keyframes fade-out {
308
- from { opacity: 1; }
309
- to { opacity: 0; }
310
- }
311
-
312
- @keyframes slide-in-right {
313
- from { transform: translateX(100%); }
314
- to { transform: translateX(0); }
315
- }
316
-
317
- @keyframes slide-out-right {
318
- from { transform: translateX(0); }
319
- to { transform: translateX(100%); }
320
- }
321
-
322
- @keyframes slide-in-left {
323
- from { transform: translateX(-100%); }
324
- to { transform: translateX(0); }
325
- }
326
-
327
- @keyframes slide-out-left {
328
- from { transform: translateX(0); }
329
- to { transform: translateX(-100%); }
330
- }
331
-
332
- @keyframes spinner-fade {
333
- 0%, 100% { opacity: 1; }
334
- 50% { opacity: 0.15; }
335
- }
336
-
337
1
  /* ============================================================
338
- Base Styles
339
- ============================================================ */
340
-
341
- @layer base {
342
- *,
343
- *::before,
344
- *::after {
345
- border-color: var(--color-border);
346
- }
347
-
348
- body {
349
- font-family: var(--font-sans);
350
- font-size: var(--text-base);
351
- line-height: var(--text-base--line-height);
352
- color: var(--color-on-surface);
353
- background-color: var(--color-surface);
354
- -webkit-font-smoothing: antialiased;
355
- -moz-osx-font-smoothing: grayscale;
356
- }
2
+ Polastack Design System - Full Entry Point
357
3
 
358
- /* Clickable elements should show pointer cursor */
359
- button:not(:disabled),
360
- [role='button']:not(:disabled),
361
- [role='tab'],
362
- [role='checkbox'],
363
- [role='radio'],
364
- [role='menuitem'],
365
- [role='menuitemcheckbox'],
366
- [role='menuitemradio'],
367
- [role='option'],
368
- [role='switch'],
369
- label,
370
- select:not(:disabled),
371
- summary {
372
- cursor: pointer;
373
- }
374
- }
375
-
376
- /* ============================================================
377
- PWA: Standalone Mode
4
+ Tailwind 初期化 + 全トークン + ベーススタイルをまとめたエントリポイント。
5
+ 消費側が自前の Tailwind を持つ場合は globals.css ではなく
6
+ tokens.css / semantic.css を個別に @import すること。
378
7
  ============================================================ */
379
8
 
380
- @media (display-mode: standalone) {
381
- body {
382
- /* PWAスタンドアロンモードではoverscrollを無効化 */
383
- overscroll-behavior-y: contain;
384
- /* ユーザー選択を制限(ネイティブアプリ的な挙動) */
385
- -webkit-user-select: none;
386
- user-select: none;
387
- }
388
-
389
- /* テキスト入力要素ではユーザー選択を許可 */
390
- input,
391
- textarea,
392
- [contenteditable='true'] {
393
- -webkit-user-select: text;
394
- user-select: text;
395
- }
396
- }
397
-
398
- /* ============================================================
399
- PWA: Viewport Height
400
- モバイルブラウザのアドレスバーを考慮した実高さ
401
- ============================================================ */
402
-
403
- @supports (height: 100dvh) {
404
- :root {
405
- --vh-full: 100dvh;
406
- }
407
- }
408
-
409
- @supports not (height: 100dvh) {
410
- :root {
411
- --vh-full: 100vh;
412
- }
413
- }
414
-
415
- /* ============================================================
416
- PWA: Touch Device Variant
417
- タッチデバイスでのタッチターゲット最適化
418
- ============================================================ */
9
+ @import 'tailwindcss';
419
10
 
11
+ /* Custom Variants — @import 'tailwindcss' の直後に配置 */
12
+ @custom-variant dark (&:where(.dark, .dark *));
420
13
  @custom-variant touch (@media (pointer: coarse));
421
14
 
422
- /* ============================================================
423
- Accessibility: Reduced Motion
424
- ============================================================ */
425
-
426
- @media (prefers-reduced-motion: reduce) {
427
- *,
428
- *::before,
429
- *::after {
430
- animation-duration: 0.01ms !important;
431
- animation-iteration-count: 1 !important;
432
- transition-duration: 0.01ms !important;
433
- scroll-behavior: auto !important;
434
- }
435
- }
436
-
437
- /* ============================================================
438
- Print: PDF / 帳票出力用スタイル
439
- pdfg (Puppeteer/Chromium) との統合を前提
440
- ============================================================ */
15
+ /* Design Tokens (@theme) */
16
+ @import './tokens.css';
441
17
 
442
- @media print {
443
- @page {
444
- margin: 0;
445
- }
18
+ /* Semantic Color Tokens (:root / .dark) */
19
+ @import './semantic.css';
446
20
 
447
- .print-document {
448
- padding: 0 !important;
449
- box-shadow: none !important;
450
- border: none !important;
451
- }
452
- }
21
+ /* Base Styles, Keyframes, PWA, Print */
22
+ @import './base.css';
@@ -0,0 +1,60 @@
1
+ /* ============================================================
2
+ Semantic Color Tokens
3
+ ライト/ダークモードで自動切替されるセマンティック変数
4
+
5
+ @theme トークンを参照するため、tokens.css の後に読み込むこと。
6
+ ============================================================ */
7
+
8
+ :root {
9
+ --color-surface: #ffffff;
10
+ --color-surface-raised: #ffffff;
11
+ --color-surface-sunken: var(--color-neutral-50);
12
+ --color-surface-muted: var(--color-neutral-100);
13
+ --color-on-surface: var(--color-neutral-900);
14
+ --color-on-surface-secondary: var(--color-neutral-600);
15
+ --color-on-surface-muted: var(--color-neutral-500);
16
+ --color-border: var(--color-neutral-200);
17
+ --color-border-input: var(--color-neutral-300);
18
+ --color-ring: var(--color-primary-500);
19
+ --color-ring-offset: #ffffff;
20
+ --color-surface-overlay: rgb(0 0 0 / 0.5);
21
+ --color-tooltip-bg: var(--color-neutral-900);
22
+ --color-tooltip-text: #ffffff;
23
+ --color-skeleton: var(--color-neutral-200);
24
+ /* Accent surface — for selected/active nav items, highlighted rows, etc. */
25
+ --color-surface-accent: #E4F5F1;
26
+ --color-on-surface-accent: var(--color-primary-700);
27
+ }
28
+
29
+ .dark {
30
+ /*
31
+ * Surface elevation ladder (darkest → lightest):
32
+ * sunken #0A0A0C — recessed/inset areas
33
+ * surface #121215 — main background (≈ Material Design / Linear range)
34
+ * raised #1A1A1E — cards, panels, modals
35
+ * muted #232327 — hover states, subtle fills
36
+ *
37
+ * Values are hand-picked (not from the neutral scale) to sit between
38
+ * Material Design #121212 and Radix Gray #111111, with a very subtle
39
+ * cool tint that complements the teal brand.
40
+ */
41
+ --color-surface: #121215;
42
+ --color-surface-raised: #1A1A1E;
43
+ --color-surface-sunken: #0A0A0C;
44
+ --color-surface-muted: #232327;
45
+ --color-on-surface: var(--color-neutral-50);
46
+ --color-on-surface-secondary: var(--color-neutral-400);
47
+ --color-on-surface-muted: var(--color-neutral-400);
48
+ --color-border: #28282C;
49
+ --color-border-input: #38383E;
50
+ --color-ring: var(--color-primary-400);
51
+ --color-ring-offset: #121215;
52
+ --color-surface-overlay: rgb(0 0 0 / 0.6);
53
+ --color-tooltip-bg: var(--color-neutral-100);
54
+ --color-tooltip-text: var(--color-neutral-900);
55
+ --color-skeleton: #232327;
56
+ /* Accent surface — brand-tinted for selected/active states */
57
+ --color-surface-accent: #0F2926;
58
+ --color-on-surface-accent: var(--color-primary-400);
59
+ color-scheme: dark;
60
+ }
@@ -0,0 +1,235 @@
1
+ /* ============================================================
2
+ Polastack Design System - Design Tokens
3
+ Tailwind CSS v4 @theme directive
4
+
5
+ トークン定義のみ。Tailwind の初期化(@import 'tailwindcss')は含まない。
6
+ 消費側が自前の Tailwind 設定を持つ場合はこのファイルだけを @import する。
7
+ ============================================================ */
8
+
9
+ @theme {
10
+ /* --------------------------------------------------------
11
+ Colors: Brand (Primary)
12
+ Teal系 - #1BA491をベースにしたPolastackブランドカラー
13
+ -------------------------------------------------------- */
14
+ --color-primary-50: #f0fdfb;
15
+ --color-primary-100: #cdfbf0;
16
+ --color-primary-200: #9bf7e2;
17
+ --color-primary-300: #61ebd0;
18
+ --color-primary-400: #2fd4ba;
19
+ --color-primary-500: #1BA491;
20
+ --color-primary-600: #138575;
21
+ --color-primary-700: #146b5f;
22
+ --color-primary-800: #15564e;
23
+ --color-primary-900: #134841;
24
+ --color-primary-950: #042c28;
25
+
26
+ /* --------------------------------------------------------
27
+ Colors: Neutral (Zinc系)
28
+ 高密度UIでの微妙なコントラスト差を表現する広いグレースケール
29
+ -------------------------------------------------------- */
30
+ --color-neutral-50: #fafafa;
31
+ --color-neutral-100: #f4f4f5;
32
+ --color-neutral-200: #e4e4e7;
33
+ --color-neutral-300: #d4d4d8;
34
+ --color-neutral-400: #a1a1aa;
35
+ --color-neutral-500: #71717a;
36
+ --color-neutral-600: #52525b;
37
+ --color-neutral-700: #3f3f46;
38
+ --color-neutral-800: #27272a;
39
+ --color-neutral-900: #18181b;
40
+ --color-neutral-950: #09090b;
41
+
42
+ /* --------------------------------------------------------
43
+ Colors: Semantic - Success (Green)
44
+ Primaryのティールと区別しやすい純粋なグリーン系
45
+ -------------------------------------------------------- */
46
+ --color-success-50: #f0fdf4;
47
+ --color-success-100: #dcfce7;
48
+ --color-success-200: #bbf7d0;
49
+ --color-success-300: #86efac;
50
+ --color-success-400: #4ade80;
51
+ --color-success-500: #22c55e;
52
+ --color-success-600: #16a34a;
53
+ --color-success-700: #15803d;
54
+ --color-success-800: #166534;
55
+ --color-success-900: #14532d;
56
+ --color-success-950: #052e16;
57
+
58
+ /* --------------------------------------------------------
59
+ Colors: Semantic - Warning (Amber)
60
+ -------------------------------------------------------- */
61
+ --color-warning-50: #fffbeb;
62
+ --color-warning-100: #fef3c7;
63
+ --color-warning-200: #fde68a;
64
+ --color-warning-300: #fcd34d;
65
+ --color-warning-400: #fbbf24;
66
+ --color-warning-500: #f59e0b;
67
+ --color-warning-600: #d97706;
68
+ --color-warning-700: #b45309;
69
+ --color-warning-800: #92400e;
70
+ --color-warning-900: #78350f;
71
+ --color-warning-950: #451a03;
72
+
73
+ /* --------------------------------------------------------
74
+ Colors: Semantic - Error (Red)
75
+ -------------------------------------------------------- */
76
+ --color-error-50: #fef2f2;
77
+ --color-error-100: #fee2e2;
78
+ --color-error-200: #fecaca;
79
+ --color-error-300: #fca5a5;
80
+ --color-error-400: #f87171;
81
+ --color-error-500: #ef4444;
82
+ --color-error-600: #dc2626;
83
+ --color-error-700: #b91c1c;
84
+ --color-error-800: #991b1b;
85
+ --color-error-900: #7f1d1d;
86
+ --color-error-950: #450a0a;
87
+
88
+ /* --------------------------------------------------------
89
+ Colors: Semantic - Info (Blue)
90
+ -------------------------------------------------------- */
91
+ --color-info-50: #eff6ff;
92
+ --color-info-100: #dbeafe;
93
+ --color-info-200: #bfdbfe;
94
+ --color-info-300: #93c5fd;
95
+ --color-info-400: #60a5fa;
96
+ --color-info-500: #3b82f6;
97
+ --color-info-600: #2563eb;
98
+ --color-info-700: #1d4ed8;
99
+ --color-info-800: #1e40af;
100
+ --color-info-900: #1e3a8a;
101
+ --color-info-950: #172554;
102
+
103
+ /* --------------------------------------------------------
104
+ Typography: Font Families
105
+ Inter(欧文) + Noto Sans JP(和文) で混在表示を最適化
106
+ -------------------------------------------------------- */
107
+ --font-sans: 'Inter', 'Noto Sans JP', ui-sans-serif, system-ui, sans-serif;
108
+ --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
109
+
110
+ /* --------------------------------------------------------
111
+ Typography: Font Sizes
112
+ base=14px - BtoB業務アプリの高密度表示に最適化
113
+ -------------------------------------------------------- */
114
+ --text-xs: 0.75rem;
115
+ --text-xs--line-height: 1rem;
116
+ --text-sm: 0.8125rem;
117
+ --text-sm--line-height: 1.25rem;
118
+ --text-base: 0.875rem;
119
+ --text-base--line-height: 1.25rem;
120
+ --text-lg: 1rem;
121
+ --text-lg--line-height: 1.5rem;
122
+ --text-xl: 1.125rem;
123
+ --text-xl--line-height: 1.75rem;
124
+ --text-2xl: 1.25rem;
125
+ --text-2xl--line-height: 1.75rem;
126
+ --text-3xl: 1.5rem;
127
+ --text-3xl--line-height: 2rem;
128
+
129
+ /* --------------------------------------------------------
130
+ Spacing: 4px Grid
131
+ -------------------------------------------------------- */
132
+ --spacing-0: 0px;
133
+ --spacing-px: 1px;
134
+ --spacing-0_5: 0.125rem;
135
+ --spacing-1: 0.25rem;
136
+ --spacing-1_5: 0.375rem;
137
+ --spacing-2: 0.5rem;
138
+ --spacing-2_5: 0.625rem;
139
+ --spacing-3: 0.75rem;
140
+ --spacing-3_5: 0.875rem;
141
+ --spacing-4: 1rem;
142
+ --spacing-5: 1.25rem;
143
+ --spacing-6: 1.5rem;
144
+ --spacing-7: 1.75rem;
145
+ --spacing-8: 2rem;
146
+ --spacing-9: 2.25rem;
147
+ --spacing-10: 2.5rem;
148
+ --spacing-11: 2.75rem;
149
+ --spacing-12: 3rem;
150
+ --spacing-14: 3.5rem;
151
+ --spacing-16: 4rem;
152
+ --spacing-20: 5rem;
153
+ --spacing-24: 6rem;
154
+
155
+ /* --------------------------------------------------------
156
+ Elevation: Shadows
157
+ -------------------------------------------------------- */
158
+ --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
159
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
160
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
161
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
162
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
163
+ --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
164
+ --shadow-drawer: 0 0 48px rgb(0 0 0 / 0.16);
165
+
166
+ /* --------------------------------------------------------
167
+ Elevation: Border Radius
168
+ -------------------------------------------------------- */
169
+ --radius-none: 0px;
170
+ --radius-sm: 0.25rem;
171
+ --radius-md: 0.375rem;
172
+ --radius-lg: 0.5rem;
173
+ --radius-xl: 0.75rem;
174
+ --radius-2xl: 1rem;
175
+ --radius-full: 9999px;
176
+
177
+ /* --------------------------------------------------------
178
+ Animation: Duration
179
+ -------------------------------------------------------- */
180
+ --duration-fast: 100ms;
181
+ --duration-normal: 200ms;
182
+ --duration-slow: 300ms;
183
+
184
+ /* --------------------------------------------------------
185
+ Animation: Easing
186
+ -------------------------------------------------------- */
187
+ --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
188
+ --ease-in: cubic-bezier(0.4, 0, 1, 1);
189
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
190
+ --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
191
+
192
+ /* --------------------------------------------------------
193
+ Z-Index Scale
194
+ Drawer重ね表示パターン対応
195
+ -------------------------------------------------------- */
196
+ --z-dropdown: 50;
197
+ --z-sticky: 100;
198
+ --z-drawer: 200;
199
+ --z-modal: 300;
200
+ --z-popover: 400;
201
+ --z-toast: 500;
202
+ --z-tooltip: 600;
203
+
204
+ /* --------------------------------------------------------
205
+ PWA: Safe Area Insets
206
+ ノッチ端末・ホームバー端末のSafe Area対応
207
+ -------------------------------------------------------- */
208
+ --safe-area-top: env(safe-area-inset-top, 0px);
209
+ --safe-area-right: env(safe-area-inset-right, 0px);
210
+ --safe-area-bottom: env(safe-area-inset-bottom, 0px);
211
+ --safe-area-left: env(safe-area-inset-left, 0px);
212
+
213
+ /* --------------------------------------------------------
214
+ PWA: Touch Target
215
+ WCAG 2.5.5 準拠の最小タッチターゲットサイズ
216
+ -------------------------------------------------------- */
217
+ --touch-target-min: 44px;
218
+ --touch-target-comfortable: 48px;
219
+
220
+ /* --------------------------------------------------------
221
+ PWA: Bottom Navigation
222
+ -------------------------------------------------------- */
223
+ --bottom-nav-height: 56px;
224
+
225
+ /* --------------------------------------------------------
226
+ Animation: Keyframes
227
+ -------------------------------------------------------- */
228
+ --animate-fade-in: fade-in var(--duration-normal) var(--ease-out);
229
+ --animate-fade-out: fade-out var(--duration-normal) var(--ease-in);
230
+ --animate-slide-in-right: slide-in-right var(--duration-slow) var(--ease-out);
231
+ --animate-slide-out-right: slide-out-right var(--duration-slow) var(--ease-in);
232
+ --animate-slide-in-left: slide-in-left var(--duration-slow) var(--ease-out);
233
+ --animate-slide-out-left: slide-out-left var(--duration-slow) var(--ease-in);
234
+ --animate-spinner: spinner-fade 0.8s ease-in-out infinite;
235
+ }