@huyooo/file-explorer-frontend-react 0.4.14 → 0.4.15

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.
@@ -3,7 +3,7 @@
3
3
  .file-info-dialog-overlay {
4
4
  position: fixed;
5
5
  inset: 0;
6
- background: rgba(0, 0, 0, 0.4);
6
+ background: var(--huyooo-overlay);
7
7
  display: flex;
8
8
  align-items: center;
9
9
  justify-content: center;
@@ -17,15 +17,15 @@
17
17
  }
18
18
 
19
19
  .file-info-dialog {
20
- background: #ffffff;
21
- border: 1px solid #e0e0e0;
20
+ background: var(--huyooo-panel-bg);
21
+ border: 1px solid var(--huyooo-border);
22
22
  border-radius: 12px;
23
23
  width: 420px;
24
24
  max-width: 90vw;
25
25
  max-height: 80vh;
26
26
  display: flex;
27
27
  flex-direction: column;
28
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
28
+ box-shadow: var(--huyooo-menu-shadow);
29
29
  animation: file-info-slideIn 0.2s ease-out;
30
30
  }
31
31
 
@@ -40,14 +40,7 @@
40
40
  }
41
41
  }
42
42
 
43
- /* 深色模式 */
44
- @media (prefers-color-scheme: dark) {
45
- .file-info-dialog {
46
- background: #2d2d2d;
47
- border-color: #404040;
48
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
49
- }
50
- }
43
+ /* 深色模式由 token 负责 */
51
44
 
52
45
  /* 头部 */
53
46
  .file-info-dialog-header {
@@ -55,15 +48,11 @@
55
48
  align-items: center;
56
49
  justify-content: space-between;
57
50
  padding: 16px 20px;
58
- border-bottom: 1px solid #e0e0e0;
51
+ border-bottom: 1px solid var(--huyooo-border);
59
52
  gap: 12px;
60
53
  }
61
54
 
62
- @media (prefers-color-scheme: dark) {
63
- .file-info-dialog-header {
64
- border-bottom-color: #404040;
65
- }
66
- }
55
+ /* 深色模式由 token 负责 */
67
56
 
68
57
  .file-info-dialog-title {
69
58
  display: flex;
@@ -76,17 +65,13 @@
76
65
  .file-info-dialog-name {
77
66
  font-size: 16px;
78
67
  font-weight: 600;
79
- color: #1a1a1a;
68
+ color: var(--huyooo-text);
80
69
  white-space: nowrap;
81
70
  overflow: hidden;
82
71
  text-overflow: ellipsis;
83
72
  }
84
73
 
85
- @media (prefers-color-scheme: dark) {
86
- .file-info-dialog-name {
87
- color: #e0e0e0;
88
- }
89
- }
74
+ /* 深色模式由 token 负责 */
90
75
 
91
76
  .file-info-dialog-close {
92
77
  display: flex;
@@ -96,7 +81,7 @@
96
81
  height: 28px;
97
82
  border: none;
98
83
  background: transparent;
99
- color: #666;
84
+ color: var(--huyooo-text-muted);
100
85
  border-radius: 6px;
101
86
  cursor: pointer;
102
87
  flex-shrink: 0;
@@ -104,19 +89,11 @@
104
89
  }
105
90
 
106
91
  .file-info-dialog-close:hover {
107
- background: #f0f0f0;
108
- color: #333;
92
+ background: var(--huyooo-muted);
93
+ color: var(--huyooo-text);
109
94
  }
110
95
 
111
- @media (prefers-color-scheme: dark) {
112
- .file-info-dialog-close {
113
- color: #888;
114
- }
115
- .file-info-dialog-close:hover {
116
- background: #404040;
117
- color: #e0e0e0;
118
- }
119
- }
96
+ /* 深色模式由 token 负责 */
120
97
 
121
98
  /* 内容 */
122
99
  .file-info-dialog-content {
@@ -139,15 +116,11 @@
139
116
  gap: 6px;
140
117
  width: 90px;
141
118
  flex-shrink: 0;
142
- color: #666;
119
+ color: var(--huyooo-text-muted);
143
120
  font-size: 13px;
144
121
  }
145
122
 
146
- @media (prefers-color-scheme: dark) {
147
- .file-info-label {
148
- color: #888;
149
- }
150
- }
123
+ /* 深色模式由 token 负责 */
151
124
 
152
125
  .file-info-label svg {
153
126
  flex-shrink: 0;
@@ -155,32 +128,25 @@
155
128
 
156
129
  .file-info-value {
157
130
  flex: 1;
158
- color: #1a1a1a;
131
+ color: var(--huyooo-text);
159
132
  font-size: 13px;
160
133
  word-break: break-all;
161
134
  line-height: 1.4;
162
135
  }
163
136
 
164
- @media (prefers-color-scheme: dark) {
165
- .file-info-value {
166
- color: #e0e0e0;
167
- }
168
- }
137
+ /* 深色模式由 token 负责 */
169
138
 
170
139
  .file-info-value--path {
171
140
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
172
141
  font-size: 12px;
173
- background: #f5f5f5;
142
+ background: var(--huyooo-code-bg);
143
+ color: var(--huyooo-code-text);
174
144
  padding: 4px 8px;
175
145
  border-radius: 4px;
176
146
  user-select: all;
177
147
  }
178
148
 
179
- @media (prefers-color-scheme: dark) {
180
- .file-info-value--path {
181
- background: #383838;
182
- }
183
- }
149
+ /* 深色模式由 token 负责 */
184
150
 
185
151
  /* 图标样式 */
186
152
  .file-info-icon {
@@ -190,35 +156,35 @@
190
156
  }
191
157
 
192
158
  .file-info-icon--folder {
193
- color: #dcb67a;
159
+ color: var(--huyooo-filetype-folder);
194
160
  }
195
161
 
196
162
  .file-info-icon--image {
197
- color: #7ec699;
163
+ color: var(--huyooo-filetype-image);
198
164
  }
199
165
 
200
166
  .file-info-icon--video {
201
- color: #c678dd;
167
+ color: var(--huyooo-filetype-video);
202
168
  }
203
169
 
204
170
  .file-info-icon--music {
205
- color: #e06c75;
171
+ color: var(--huyooo-filetype-music);
206
172
  }
207
173
 
208
174
  .file-info-icon--document {
209
- color: #61afef;
175
+ color: var(--huyooo-filetype-document);
210
176
  }
211
177
 
212
178
  .file-info-icon--code {
213
- color: #98c379;
179
+ color: var(--huyooo-filetype-code);
214
180
  }
215
181
 
216
182
  .file-info-icon--archive {
217
- color: #d19a66;
183
+ color: var(--huyooo-filetype-archive);
218
184
  }
219
185
 
220
186
  .file-info-icon--file {
221
- color: #abb2bf;
187
+ color: var(--huyooo-filetype-file);
222
188
  }
223
189
 
224
190
  /* 底部 */
@@ -226,14 +192,10 @@
226
192
  display: flex;
227
193
  justify-content: flex-end;
228
194
  padding: 12px 20px;
229
- border-top: 1px solid #e0e0e0;
195
+ border-top: 1px solid var(--huyooo-border);
230
196
  }
231
197
 
232
- @media (prefers-color-scheme: dark) {
233
- .file-info-dialog-footer {
234
- border-top-color: #404040;
235
- }
236
- }
198
+ /* 深色模式由 token 负责 */
237
199
 
238
200
  .file-info-dialog-btn {
239
201
  padding: 6px 16px;
@@ -242,11 +204,11 @@
242
204
  font-size: 13px;
243
205
  cursor: pointer;
244
206
  transition: all 0.15s ease;
245
- background: #007aff;
207
+ background: var(--huyooo-primary);
246
208
  color: white;
247
209
  }
248
210
 
249
211
  .file-info-dialog-btn:hover {
250
- background: #0066d6;
212
+ background: var(--huyooo-primary-hover, var(--huyooo-primary));
251
213
  }
252
214
 
@@ -19,13 +19,13 @@
19
19
  /* 表头 - 更紧凑 */
20
20
  .file-list-header {
21
21
  font-size: 11px;
22
- color: #86868b;
22
+ color: var(--huyooo-text-muted);
23
23
  font-weight: 500;
24
24
  text-transform: uppercase;
25
25
  letter-spacing: 0.3px;
26
26
  position: sticky;
27
27
  top: 0;
28
- background: rgba(255, 255, 255, 0.92);
28
+ background: var(--huyooo-surface);
29
29
  backdrop-filter: blur(8px);
30
30
  -webkit-backdrop-filter: blur(8px);
31
31
  z-index: 10;
@@ -34,7 +34,7 @@
34
34
 
35
35
  .file-list-header-cell {
36
36
  padding: 6px 12px;
37
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
37
+ border-bottom: 1px solid var(--huyooo-border);
38
38
  cursor: pointer;
39
39
  text-align: left;
40
40
  font-weight: 500;
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  .file-list-header-cell:hover {
45
- background: rgba(0, 0, 0, 0.04);
45
+ background: var(--huyooo-muted-hover);
46
46
  }
47
47
 
48
48
  .file-list-header-cell--name {
@@ -79,36 +79,36 @@
79
79
 
80
80
  /* 奇数行 - 轻微斑马纹 */
81
81
  .file-list-row--odd {
82
- background: rgba(0, 0, 0, 0.015);
82
+ background: color-mix(in srgb, var(--huyooo-muted) 20%, transparent);
83
83
  }
84
84
 
85
85
  /* 悬停效果 */
86
86
  .file-list-row--even:hover,
87
87
  .file-list-row--odd:hover {
88
- background: rgba(0, 0, 0, 0.04);
88
+ background: var(--huyooo-muted-hover);
89
89
  }
90
90
 
91
91
  /* 选中状态 - macOS 风格整行高亮 */
92
92
  .file-list-row--selected {
93
- background: #007aff;
93
+ background: var(--huyooo-primary);
94
94
  color: white;
95
95
  }
96
96
 
97
97
  .file-list-row--selected:hover {
98
- background: #0066d6;
98
+ background: var(--huyooo-primary-hover, var(--huyooo-primary));
99
99
  }
100
100
 
101
101
  /* 拖拽悬停 */
102
102
  .file-list-row--drag-over {
103
- background: rgba(0, 122, 255, 0.15);
104
- border-bottom-color: rgba(0, 122, 255, 0.3);
103
+ background: var(--huyooo-focus-ring);
104
+ border-bottom-color: var(--huyooo-primary);
105
105
  }
106
106
 
107
107
  /* 单元格 - 更紧凑的行高 */
108
108
  .file-list-cell {
109
109
  padding: 4px 12px;
110
110
  white-space: nowrap;
111
- color: #6e6e73;
111
+ color: var(--huyooo-text-muted);
112
112
  vertical-align: middle;
113
113
  height: 28px;
114
114
  }
@@ -124,14 +124,14 @@
124
124
 
125
125
  /* 选中时单元格颜色 */
126
126
  .file-list-cell--selected {
127
- color: rgba(255, 255, 255, 0.75);
127
+ color: var(--huyooo-on-primary-muted);
128
128
  }
129
129
 
130
130
  /* 大小列 - 等宽字体 */
131
131
  .file-list-cell--size {
132
132
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
133
133
  font-size: 11px;
134
- color: #8e8e93;
134
+ color: var(--huyooo-text-disabled);
135
135
  font-variant-numeric: tabular-nums;
136
136
  }
137
137
 
@@ -140,7 +140,7 @@
140
140
  overflow: hidden;
141
141
  text-overflow: ellipsis;
142
142
  flex: 1;
143
- color: #1d1d1f;
143
+ color: var(--huyooo-text);
144
144
  cursor: default;
145
145
  font-weight: 400;
146
146
  }
@@ -157,70 +157,13 @@
157
157
  flex: 1;
158
158
  font-size: 13px;
159
159
  padding: 2px 6px;
160
- border: 1px solid #007aff;
160
+ border: 1px solid var(--huyooo-primary);
161
161
  border-radius: 4px;
162
162
  outline: none;
163
- box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
164
- background: white;
163
+ box-shadow: 0 0 0 3px var(--huyooo-focus-ring);
164
+ background: var(--huyooo-surface-2);
165
+ color: var(--huyooo-text);
165
166
  cursor: text;
166
167
  }
167
168
 
168
- /* 深色模式支持 */
169
- @media (prefers-color-scheme: dark) {
170
- .file-list-header {
171
- background: rgba(28, 28, 30, 0.92);
172
- color: #98989d;
173
- }
174
-
175
- .file-list-header-cell {
176
- border-bottom-color: rgba(255, 255, 255, 0.08);
177
- }
178
-
179
- .file-list-header-cell:hover {
180
- background: rgba(255, 255, 255, 0.04);
181
- }
182
-
183
- .file-list-row--odd {
184
- background: rgba(255, 255, 255, 0.02);
185
- }
186
-
187
- .file-list-row--even:hover,
188
- .file-list-row--odd:hover {
189
- background: rgba(255, 255, 255, 0.06);
190
- }
191
-
192
- .file-list-row--selected {
193
- background: #0a84ff;
194
- }
195
-
196
- .file-list-row--selected:hover {
197
- background: #0077ed;
198
- }
199
-
200
- .file-list-row--drag-over {
201
- background: rgba(10, 132, 255, 0.2);
202
- border-bottom-color: rgba(10, 132, 255, 0.4);
203
- }
204
-
205
- .file-list-cell {
206
- color: #98989d;
207
- }
208
-
209
- .file-list-cell--size {
210
- color: #6e6e73;
211
- }
212
-
213
- .file-list-name {
214
- color: #f5f5f7;
215
- }
216
-
217
- .file-list-name--selected {
218
- color: white;
219
- }
220
-
221
- .file-list-rename-input {
222
- background: #1c1c1e;
223
- border-color: #0a84ff;
224
- color: #f5f5f7;
225
- }
226
- }
169
+ /* 深色模式由 token 负责 */
@@ -13,15 +13,15 @@
13
13
  align-items: center;
14
14
  justify-content: center;
15
15
  height: 100%;
16
- color: rgb(156, 163, 175);
16
+ color: var(--huyooo-text-disabled);
17
17
  gap: 16px;
18
18
  }
19
19
 
20
20
  .file-list-view-spinner {
21
21
  width: 32px;
22
22
  height: 32px;
23
- border: 3px solid rgba(156, 163, 175, 0.2);
24
- border-top-color: rgb(59, 130, 246);
23
+ border: 3px solid color-mix(in srgb, var(--huyooo-text-disabled) 20%, transparent);
24
+ border-top-color: var(--huyooo-primary);
25
25
  border-radius: 50%;
26
26
  animation: spin 0.8s linear infinite;
27
27
  }
@@ -1,8 +1,8 @@
1
1
  .file-sidebar {
2
2
  width: 12rem;
3
- background: rgba(243, 244, 246, 0.5);
3
+ background: var(--huyooo-muted);
4
4
  backdrop-filter: blur(24px);
5
- border-right: 1px solid rgba(229, 231, 233, 0.5);
5
+ border-right: 1px solid var(--huyooo-border);
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  padding-top: 2rem;
@@ -25,12 +25,12 @@
25
25
  }
26
26
 
27
27
  .file-sidebar::-webkit-scrollbar-thumb {
28
- background: rgba(0, 0, 0, 0.2);
28
+ background: var(--huyooo-scrollbar);
29
29
  border-radius: 3px;
30
30
  }
31
31
 
32
32
  .file-sidebar::-webkit-scrollbar-thumb:hover {
33
- background: rgba(0, 0, 0, 0.3);
33
+ background: var(--huyooo-scrollbar-hover);
34
34
  }
35
35
 
36
36
  .file-sidebar-section {
@@ -43,7 +43,7 @@
43
43
  margin-bottom: 0.5rem;
44
44
  font-size: 0.75rem;
45
45
  font-weight: 600;
46
- color: rgb(107, 114, 128);
46
+ color: var(--huyooo-text-muted);
47
47
  text-transform: uppercase;
48
48
  letter-spacing: 0.05em;
49
49
  }
@@ -70,25 +70,25 @@
70
70
  cursor: pointer;
71
71
  font-size: 0.875rem;
72
72
  font-weight: 500;
73
- color: rgb(75, 85, 99);
73
+ color: var(--huyooo-text-muted);
74
74
  transition: all 200ms;
75
75
  /* no-drag 已由 section 继承 */
76
76
  }
77
77
 
78
78
  .file-sidebar-item:hover {
79
- background: rgba(229, 231, 233, 0.5);
80
- color: black;
79
+ background: var(--huyooo-muted-hover);
80
+ color: var(--huyooo-text);
81
81
  }
82
82
 
83
83
  .file-sidebar-item--active {
84
- background: rgba(209, 213, 219, 0.6);
85
- color: black;
84
+ background: var(--huyooo-muted-hover);
85
+ color: var(--huyooo-text);
86
86
  }
87
87
 
88
88
  .file-sidebar-item-icon {
89
- color: rgb(107, 114, 128);
89
+ color: var(--huyooo-text-muted);
90
90
  }
91
91
 
92
92
  .file-sidebar-item-icon--active {
93
- color: rgb(37, 99, 235);
93
+ color: var(--huyooo-primary);
94
94
  }