-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.css
More file actions
570 lines (480 loc) · 14.6 KB
/
Copy pathindex.css
File metadata and controls
570 lines (480 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
/* OKLCH 기반 전문 테마 시스템 */
:root {
/* Light theme - OKLCH color space */
--background: oklch(0.9842 0.0034 247.8575);
--foreground: oklch(0.2795 0.0368 260.0310);
--card: oklch(1.0000 0 0);
--card-foreground: oklch(0.2795 0.0368 260.0310);
--popover: oklch(1.0000 0 0);
--popover-foreground: oklch(0.2795 0.0368 260.0310);
--primary: oklch(0.5854 0.2041 277.1173);
--primary-foreground: oklch(1.0000 0 0);
--secondary: oklch(0.9276 0.0058 264.5313);
--secondary-foreground: oklch(0.3729 0.0306 259.7328);
--muted: oklch(0.9670 0.0029 264.5419);
--muted-foreground: oklch(0.5510 0.0234 264.3637);
--accent: oklch(0.9299 0.0334 272.7879);
--accent-foreground: oklch(0.3729 0.0306 259.7328);
--destructive: oklch(0.6368 0.2078 25.3313);
--destructive-foreground: oklch(1.0000 0 0);
--border: oklch(0.8717 0.0093 258.3382);
--input: oklch(0.8717 0.0093 258.3382);
--ring: oklch(0.5854 0.2041 277.1173);
/* Semantic color mappings */
--color-bg-primary: var(--background);
--color-bg-secondary: var(--muted);
--color-bg-tertiary: var(--secondary);
--color-bg-elevated: var(--card);
--color-bg-overlay: oklch(0 0 0 / 0.5);
--color-text-primary: var(--foreground);
--color-text-secondary: var(--muted-foreground);
--color-text-tertiary: oklch(0.6510 0.0184 264.3637);
--color-text-inverse: var(--primary-foreground);
--color-text-placeholder: var(--muted-foreground);
--color-border-primary: var(--border);
--color-border-secondary: var(--input);
--color-border-focus: var(--ring);
--color-surface-hover: var(--accent);
--color-surface-active: var(--secondary);
/* Button colors */
--color-button-primary: var(--primary);
--color-button-primary-hover: oklch(0.5354 0.2241 277.1173);
--color-button-secondary: var(--muted-foreground);
--color-button-secondary-hover: oklch(0.4510 0.0334 264.3637);
--color-button-danger: var(--destructive);
--color-button-danger-hover: oklch(0.5868 0.2278 25.3313);
--color-button-success: oklch(0.5569 0.1872 165.3313);
--color-button-success-hover: oklch(0.5069 0.1972 165.3313);
/* Shadows */
--shadow-2xs: 0px 4px 8px -1px oklch(0 0 0 / 0.05);
--shadow-xs: 0px 4px 8px -1px oklch(0 0 0 / 0.05);
--shadow-sm: 0px 4px 8px -1px oklch(0 0 0 / 0.10), 0px 1px 2px -2px oklch(0 0 0 / 0.10);
--shadow: 0px 4px 8px -1px oklch(0 0 0 / 0.10), 0px 1px 2px -2px oklch(0 0 0 / 0.10);
--shadow-md: 0px 4px 8px -1px oklch(0 0 0 / 0.10), 0px 2px 4px -2px oklch(0 0 0 / 0.10);
--shadow-lg: 0px 4px 8px -1px oklch(0 0 0 / 0.10), 0px 4px 6px -2px oklch(0 0 0 / 0.10);
--shadow-xl: 0px 4px 8px -1px oklch(0 0 0 / 0.10), 0px 8px 10px -2px oklch(0 0 0 / 0.10);
--shadow-2xl: 0px 4px 8px -1px oklch(0 0 0 / 0.25);
--radius: 0.5rem;
}
/* Dark theme - OKLCH color space */
.dark {
--background: oklch(0.2077 0.0398 265.7549);
--foreground: oklch(0.9288 0.0126 255.5078);
--card: oklch(0.2795 0.0368 260.0310);
--card-foreground: oklch(0.9288 0.0126 255.5078);
--popover: oklch(0.2795 0.0368 260.0310);
--popover-foreground: oklch(0.9288 0.0126 255.5078);
--primary: oklch(0.6801 0.1583 276.9349);
--primary-foreground: oklch(0.2077 0.0398 265.7549);
--secondary: oklch(0.3351 0.0331 260.9120);
--secondary-foreground: oklch(0.8717 0.0093 258.3382);
--muted: oklch(0.2795 0.0368 260.0310);
--muted-foreground: oklch(0.7137 0.0192 261.3246);
--accent: oklch(0.3729 0.0306 259.7328);
--accent-foreground: oklch(0.8717 0.0093 258.3382);
--destructive: oklch(0.6368 0.2078 25.3313);
--destructive-foreground: oklch(0.2077 0.0398 265.7549);
--border: oklch(0.4461 0.0263 256.8018);
--input: oklch(0.4461 0.0263 256.8018);
--ring: oklch(0.6801 0.1583 276.9349);
/* Semantic color mappings for dark theme */
--color-bg-primary: var(--background);
--color-bg-secondary: var(--muted);
--color-bg-tertiary: var(--secondary);
--color-bg-elevated: var(--card);
--color-bg-overlay: oklch(0 0 0 / 0.75);
--color-text-primary: var(--foreground);
--color-text-secondary: var(--muted-foreground);
--color-text-tertiary: oklch(0.6137 0.0292 261.3246);
--color-text-inverse: var(--primary-foreground);
--color-text-placeholder: var(--muted-foreground);
--color-border-primary: var(--border);
--color-border-secondary: var(--input);
--color-border-focus: var(--ring);
--color-surface-hover: var(--accent);
--color-surface-active: var(--secondary);
/* Button colors for dark theme */
--color-button-primary: var(--primary);
--color-button-primary-hover: oklch(0.7301 0.1783 276.9349);
--color-button-secondary: var(--muted-foreground);
--color-button-secondary-hover: oklch(0.7637 0.0193 261.3246);
--color-button-danger: var(--destructive);
--color-button-danger-hover: oklch(0.5868 0.2278 25.3313);
--color-button-success: oklch(0.5569 0.1872 165.3313);
--color-button-success-hover: oklch(0.6069 0.1772 165.3313);
}
/* CSS 파일에 추가 */
.my-library-table {
width: 100%;
min-width: 1600px; /* Updated for ebook column */
max-width: none;
/* Smooth scrolling for better UX when virtualization kicks in */
scroll-behavior: smooth;
}
/* Hide scrollbar for small datasets while maintaining functionality */
.my-library-table::-webkit-scrollbar {
width: 8px;
}
.my-library-table::-webkit-scrollbar-track {
background: var(--color-bg-secondary);
border-radius: 4px;
}
.my-library-table::-webkit-scrollbar-thumb {
background: var(--color-border-primary);
border-radius: 4px;
}
.my-library-table::-webkit-scrollbar-thumb:hover {
background: var(--color-text-secondary);
}
/* Line clamp utility for text truncation */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Animation for fade in */
.animate-fade-in {
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Custom tag component styling */
.custom-tag {
display: inline-flex;
align-items: center;
font-weight: 500;
border-radius: 0.375rem;
border-width: 1px;
transition: all 0.2s ease-in-out;
white-space: nowrap;
}
.custom-tag:hover {
box-shadow: var(--shadow-sm);
}
.custom-tag.clickable {
cursor: pointer;
}
/* 테마 기반 유틸리티 클래스 */
.bg-primary {
background-color: var(--color-bg-primary);
}
.bg-secondary {
background-color: var(--color-bg-secondary);
}
.bg-tertiary {
background-color: var(--color-bg-tertiary);
}
.bg-elevated {
background-color: var(--color-bg-elevated);
box-shadow: var(--shadow-sm);
}
/* Shadow utility classes */
.shadow-sm {
box-shadow: var(--shadow-sm);
}
.shadow {
box-shadow: var(--shadow);
}
.shadow-md {
box-shadow: var(--shadow-md);
}
.shadow-lg {
box-shadow: var(--shadow-lg);
}
.shadow-xl {
box-shadow: var(--shadow-xl);
}
.shadow-2xl {
box-shadow: var(--shadow-2xl);
}
.text-primary {
color: var(--color-text-primary);
}
.text-secondary {
color: var(--color-text-secondary);
}
.text-tertiary {
color: var(--color-text-tertiary);
}
.text-inverse {
color: var(--color-text-inverse);
}
.border-primary {
border-color: var(--color-border-primary);
}
.border-secondary {
border-color: var(--color-border-secondary);
}
.border-focus {
border-color: var(--color-border-focus);
}
.hover-surface:hover {
background-color: var(--color-surface-hover);
}
.active-surface:active {
background-color: var(--color-surface-active);
}
/* 공통 입력 요소 스타일 */
.input-base {
background-color: var(--color-bg-elevated);
border: 1px solid var(--color-border-primary);
color: var(--color-text-primary);
border-radius: 0.375rem;
padding: 0.5rem 0.75rem;
font-size: 0.875rem;
transition: all 0.2s ease-in-out;
}
.input-base:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.1);
}
.input-base::placeholder {
color: var(--color-text-placeholder);
}
/* 버튼 기본 스타일 */
.btn-base {
font-weight: 500;
border-radius: 0.375rem;
padding: 0.5rem 1rem;
font-size: 0.875rem;
transition: all 0.2s ease-in-out;
border: none;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn-primary {
background-color: var(--color-button-primary);
color: var(--color-text-inverse);
}
.btn-primary:hover:not(:disabled) {
background-color: var(--color-button-primary-hover);
}
.btn-secondary {
background-color: var(--color-button-secondary);
color: var(--color-text-inverse);
}
.btn-secondary:hover:not(:disabled) {
background-color: var(--color-button-secondary-hover);
}
.btn-danger {
background-color: var(--color-button-danger);
color: var(--color-text-inverse);
}
.btn-danger:hover:not(:disabled) {
background-color: var(--color-button-danger-hover);
}
.btn-success {
background-color: var(--color-button-success);
color: var(--color-text-inverse);
}
.btn-success:hover:not(:disabled) {
background-color: var(--color-button-success-hover);
}
.btn-base:disabled {
cursor: not-allowed;
}
/* Library stock button styles with status indicators */
.library-tag {
background-color: var(--secondary);
color: var(--secondary-foreground);
border: 1px solid var(--border);
transition: background-color 0.2s ease-in-out,
transform 0.2s ease-in-out,
box-shadow 0.2s ease-in-out;
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.75rem;
line-height: 1.25;
text-decoration: none;
white-space: nowrap;
box-shadow: var(--shadow-2xs);
will-change: transform;
}
.library-tag:hover {
background-color: oklch(from var(--secondary) calc(l * 0.95) c h);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.library-tag:focus {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
.library-tag:active {
transform: translateY(0);
box-shadow: var(--shadow-2xs);
}
.library-tag.status-available {
/* 대출가능 - 초록색 동그라미 */
}
.library-tag.status-unavailable {
/* 재고있지만 대출불가 - 빨간색 동그라미 */
}
.library-tag.status-none {
color: var(--muted-foreground);
opacity: 0.7;
/* 책없음 - 회색 동그라미, 연한 텍스트 */
}
.library-tag.status-none:hover {
background-color: var(--secondary);
transform: none;
box-shadow: var(--shadow-2xs);
opacity: 0.7;
}
.status-indicator {
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
flex-shrink: 0;
border: 1px solid oklch(from var(--background) calc(l * 0.9) c h);
}
.status-indicator.available {
background-color: var(--color-button-success);
border-color: oklch(from var(--color-button-success) calc(l * 0.8) c h);
box-shadow: 0 0 0 1px oklch(from var(--color-button-success) l c h / 0.2);
}
.status-indicator.unavailable {
background-color: var(--color-button-danger);
border-color: oklch(from var(--color-button-danger) calc(l * 0.8) c h);
box-shadow: 0 0 0 1px oklch(from var(--color-button-danger) l c h / 0.2);
}
.status-indicator.none {
background-color: var(--muted-foreground);
border-color: oklch(from var(--muted-foreground) calc(l * 0.8) c h);
}
/* Small variant for grid view */
.library-tag-sm {
gap: 0.2rem;
padding: 0.15rem 0.35rem;
font-size: 0.65rem;
line-height: 1.2;
}
.library-tag-sm .status-indicator {
width: 0.35rem;
height: 0.35rem;
}
/* Responsive adjustments for library tags */
@media (max-width: 640px) {
.library-tag {
gap: 0.25rem;
padding: 0.2rem 0.4rem;
font-size: 0.7rem;
}
.status-indicator {
width: 0.4rem;
height: 0.4rem;
}
}
/* Theme button responsive styles */
.theme-button-group {
width: 100%;
}
/* 모바일에서도 테마 버튼을 1줄로 유지 */
/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
.library-tag {
transition: none;
}
.library-tag:hover {
transform: none;
}
.library-tag:active {
transform: none;
}
}
/* Unified tag styles using design system colors */
.tag-primary {
background-color: var(--primary);
color: var(--primary-foreground);
border: 1px solid transparent;
box-shadow: var(--shadow-sm);
transition: all 0.2s ease-in-out;
}
.tag-primary:hover {
background-color: oklch(from var(--primary) calc(l * 0.9) c h);
}
.tag-secondary {
background-color: var(--secondary);
color: var(--secondary-foreground);
border: 1px solid transparent;
transition: all 0.2s ease-in-out;
}
.tag-secondary:hover {
background-color: oklch(from var(--secondary) calc(l * 0.9) c h);
}
.tag-tertiary {
/*
1. 배경색과 글자색은 `.btn-secondary`의 변수를 참조하여 일관성 확보
*/
background-color: var(--color-button-secondary);
color: var(--color-text-inverse);
/*
2. 다른 태그들과 동일하게 투명 테두리를 추가하여 레이아웃 깨짐 및
의도치 않은 테두리 발생 방지
*/
border: 1px solid transparent;
/*
3. 다른 태그들과 동일한 transition 효과 적용
*/
transition: all 0.2s ease-in-out;
}
.tag-tertiary:hover {
/*
4. hover 효과는 다른 태그들과 동일한 `oklch` 방식을 사용.
이렇게 하면 `.btn-secondary`의 hover 변수와 색이 다르더라도
시각적 효과의 '느낌'은 통일됩니다.
*/
background-color: oklch(from var(--color-button-secondary) calc(l * 0.9) c h);
}
/* Item-level dropdown for book controls */
.item-dropdown-btn {
background-color: var(--color-bg-tertiary);
color: var(--color-text-primary);
border-radius: 0.5rem;
padding: 0.25rem 0.5rem; /* 정렬보다 작게 조정 */
font-size: 0.75rem; /* 태그와 동일 */
transition: background-color 0.2s ease-in-out,
transform 0.2s ease-in-out;
}
.item-dropdown-btn:hover {
background-color: var(--color-surface-hover);
}
.item-dropdown-btn:focus {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
/*
* 데모 모드 안내 띠 (components/DemoModeBanner.tsx)
*
* 띠의 색 정본은 Tailwind의 dark: variant가 아니라 여기다.
* index.html에 tailwind.config = { darkMode: 'class' }가 있어 dark:도 앱 테마를 따르지만,
* 이 규칙은 body의 .dark를 직접 보므로 Tailwind 설정·CDN 로드 여부와 무관하게 앱 테마를 따른다.
* (tests/demo-library-ui.test.mjs의 [V-18]이 아래 hex 값을 그대로 단언한다.)
*
* 색은 blue-50/800/200(라이트), blue-950/200/800(다크).
* 로그인 버튼과 같은 blue-600을 쓰면 클릭 가능한 CTA처럼 읽히므로 채도를 낮췄다.
*/
.demo-mode-banner {
background-color: #eff6ff;
color: #1e40af;
border-bottom: 1px solid #bfdbfe;
}
.dark .demo-mode-banner {
background-color: #172554;
color: #bfdbfe;
border-bottom-color: #1e40af;
}