@icen.ai/ui 0.2.0 → 0.3.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 +29 -16
- package/dist/base.css +389 -48
- package/dist/behaviors/accordion.mjs +20 -0
- package/dist/behaviors/carousel.mjs +30 -1
- package/dist/behaviors/charts.mjs +168 -0
- package/dist/behaviors/copy.mjs +4 -3
- package/dist/behaviors/datatable.mjs +748 -0
- package/dist/behaviors/input.mjs +20 -1
- package/dist/behaviors/modal.mjs +15 -1
- package/dist/behaviors/nav.mjs +31 -4
- package/dist/behaviors/sidebar.mjs +12 -0
- package/dist/behaviors/slider.mjs +35 -3
- package/dist/behaviors/tabs.mjs +100 -9
- package/dist/behaviors/tag-input.mjs +11 -0
- package/dist/behaviors/theme.mjs +26 -0
- package/dist/behaviors/toast.mjs +83 -15
- package/dist/behaviors/tree.mjs +57 -1
- package/dist/behaviors/upload.mjs +2 -3
- package/dist/cli.mjs +74 -0
- package/dist/components/accordion.mjs +3 -0
- package/dist/components/alert.mjs +2 -0
- package/dist/components/avatar.mjs +2 -0
- package/dist/components/breadcrumb.css +91 -18
- package/dist/components/breadcrumb.mjs +2 -0
- package/dist/components/btn.css +174 -14
- package/dist/components/btn.mjs +2 -0
- package/dist/components/card.css +118 -18
- package/dist/components/card.mjs +2 -0
- package/dist/components/carousel.mjs +3 -0
- package/dist/components/charts.css +225 -33
- package/dist/components/charts.mjs +3 -0
- package/dist/components/content.css +256 -74
- package/dist/components/context-menu.mjs +3 -0
- package/dist/components/datatable.css +343 -0
- package/dist/components/datatable.mjs +4 -0
- package/dist/components/desc.mjs +2 -0
- package/dist/components/dropdown.mjs +3 -0
- package/dist/components/empty.css +50 -10
- package/dist/components/empty.mjs +2 -0
- package/dist/components/feedback.css +158 -47
- package/dist/components/form.css +139 -22
- package/dist/components/input.css +165 -45
- package/dist/components/input.mjs +3 -0
- package/dist/components/kbd.mjs +2 -0
- package/dist/components/layout.mjs +2 -0
- package/dist/components/list.mjs +2 -0
- package/dist/components/media-card.mjs +2 -0
- package/dist/components/media.css +187 -40
- package/dist/components/menu.css +159 -32
- package/dist/components/modal.css +140 -34
- package/dist/components/modal.mjs +3 -0
- package/dist/components/nav.css +134 -32
- package/dist/components/nav.mjs +3 -0
- package/dist/components/pagination.css +105 -19
- package/dist/components/pagination.mjs +2 -0
- package/dist/components/panel.css +61 -6
- package/dist/components/panel.mjs +2 -0
- package/dist/components/pill.css +74 -14
- package/dist/components/pill.mjs +2 -0
- package/dist/components/popover.css +109 -7
- package/dist/components/popover.mjs +3 -0
- package/dist/components/progress.mjs +2 -0
- package/dist/components/rating.mjs +2 -0
- package/dist/components/result.mjs +2 -0
- package/dist/components/segmented.css +199 -50
- package/dist/components/segmented.mjs +2 -0
- package/dist/components/select.css +140 -39
- package/dist/components/select.mjs +3 -0
- package/dist/components/sidebar.css +162 -34
- package/dist/components/sidebar.mjs +3 -0
- package/dist/components/skeleton.mjs +2 -0
- package/dist/components/slider.css +169 -31
- package/dist/components/slider.mjs +3 -0
- package/dist/components/spinner.mjs +2 -0
- package/dist/components/stat.css +103 -8
- package/dist/components/stat.mjs +2 -0
- package/dist/components/steps.css +105 -31
- package/dist/components/steps.mjs +2 -0
- package/dist/components/switch.css +171 -54
- package/dist/components/switch.mjs +2 -0
- package/dist/components/table.css +114 -12
- package/dist/components/table.mjs +2 -0
- package/dist/components/tabs.css +104 -17
- package/dist/components/tabs.mjs +3 -0
- package/dist/components/tag-input.css +119 -23
- package/dist/components/tag-input.mjs +3 -0
- package/dist/components/timeline.mjs +2 -0
- package/dist/components/toast.css +85 -12
- package/dist/components/toast.mjs +3 -0
- package/dist/components/tooltip.css +86 -26
- package/dist/components/tooltip.mjs +2 -0
- package/dist/components/tree.mjs +3 -0
- package/dist/components/upload.css +144 -17
- package/dist/components/upload.mjs +3 -0
- package/dist/index.mjs +629 -48
- package/dist/registry.json +197 -2
- package/dist/retro-effects.css +264 -0
- package/dist/tokens/colors.css +18 -90
- package/dist/tokens/retro-effects.css +264 -0
- package/dist/tokens/style-profiles.css +47 -47
- package/dist/tokens.css +65 -137
- package/dist/ui.css +4861 -1019
- package/package.json +9 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @icen.ai/ui — Retro 效果层(按需引入)
|
|
3
|
+
*
|
|
4
|
+
* 与 tokens.css 不同,本文件 **不** 进 tokens.css 拼合,需显式 import:
|
|
5
|
+
* import '@icen.ai/ui/retro-effects.css';
|
|
6
|
+
*
|
|
7
|
+
* 仅在 <html class="style-retro">(或叠加 .dark)激活时生效,对其它风格无副作用:
|
|
8
|
+
* - CRT 扫描线 + 暗角 + 颗粒噪点
|
|
9
|
+
* - 屏幕闪烁 / 抖动 / 游走扫描光
|
|
10
|
+
* - RGB 色散 / 霓虹发光(暗色)
|
|
11
|
+
* - 像素边框 / 像素按钮 / 像素分隔线工具类
|
|
12
|
+
* - 开机自检 / 打字机光标 / 页面闪白动画
|
|
13
|
+
*
|
|
14
|
+
* 所有动画尊重 prefers-reduced-motion:在 reduce 下由 base.css 的全局兜底降为 0.01ms。
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* ══════════════════════════════════════════════════════════════
|
|
18
|
+
CRT 显示器效果
|
|
19
|
+
══════════════════════════════════════════════════════════════ */
|
|
20
|
+
|
|
21
|
+
/* CRT 扫描线 overlay */
|
|
22
|
+
.style-retro body::before {
|
|
23
|
+
content: "";
|
|
24
|
+
position: fixed;
|
|
25
|
+
inset: 0;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
z-index: 9999;
|
|
28
|
+
opacity: 0.14;
|
|
29
|
+
background:
|
|
30
|
+
repeating-linear-gradient(
|
|
31
|
+
0deg,
|
|
32
|
+
transparent,
|
|
33
|
+
transparent 2px,
|
|
34
|
+
rgba(0, 0, 0, 0.35) 2px,
|
|
35
|
+
rgba(0, 0, 0, 0.35) 4px
|
|
36
|
+
);
|
|
37
|
+
mix-blend-mode: multiply;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.style-retro.dark body::before {
|
|
41
|
+
opacity: 0.22;
|
|
42
|
+
mix-blend-mode: screen;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* CRT 暗角 + 轻微曲面 */
|
|
46
|
+
.style-retro body::after {
|
|
47
|
+
content: "";
|
|
48
|
+
position: fixed;
|
|
49
|
+
inset: 0;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
z-index: 9998;
|
|
52
|
+
background:
|
|
53
|
+
radial-gradient(
|
|
54
|
+
ellipse at center,
|
|
55
|
+
transparent 55%,
|
|
56
|
+
rgba(0, 0, 0, 0.18) 100%
|
|
57
|
+
);
|
|
58
|
+
opacity: 0.55;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 屏幕闪烁(备用工具类,需要时挂在元素上) */
|
|
62
|
+
@keyframes retro-flicker {
|
|
63
|
+
0%, 100% { opacity: 1; }
|
|
64
|
+
50% { opacity: 0.985; }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* 屏幕轻微抖动(备用工具类) */
|
|
68
|
+
@keyframes retro-jitter {
|
|
69
|
+
0%, 100% { transform: translate(0, 0); }
|
|
70
|
+
25% { transform: translate(0.5px, 0); }
|
|
71
|
+
50% { transform: translate(-0.5px, 0.5px); }
|
|
72
|
+
75% { transform: translate(0, -0.5px); }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* CRT 颗粒噪点 */
|
|
76
|
+
@keyframes retro-grain {
|
|
77
|
+
0%, 100% { background-position: 0 0; }
|
|
78
|
+
10% { background-position: -5% -10%; }
|
|
79
|
+
20% { background-position: -15% 5%; }
|
|
80
|
+
30% { background-position: 7% -25%; }
|
|
81
|
+
40% { background-position: -5% 25%; }
|
|
82
|
+
50% { background-position: -15% 10%; }
|
|
83
|
+
60% { background-position: 15% 0%; }
|
|
84
|
+
70% { background-position: 0% 15%; }
|
|
85
|
+
80% { background-position: 3% 35%; }
|
|
86
|
+
90% { background-position: -10% 10%; }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.style-retro .retro-crt-grain {
|
|
90
|
+
position: fixed;
|
|
91
|
+
inset: 0;
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
z-index: 9997;
|
|
94
|
+
opacity: 0.06;
|
|
95
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
|
|
96
|
+
animation: retro-grain 0.5s steps(10) infinite;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* ══════════════════════════════════════════════════════════════
|
|
100
|
+
全局动画关键帧 + 游走扫描光
|
|
101
|
+
══════════════════════════════════════════════════════════════ */
|
|
102
|
+
|
|
103
|
+
@keyframes retro-blink {
|
|
104
|
+
0%, 49% { opacity: 1; }
|
|
105
|
+
50%, 100% { opacity: 0; }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes retro-scanline-slide {
|
|
109
|
+
0% { transform: translateY(-100%); }
|
|
110
|
+
100% { transform: translateY(100vh); }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 游走的扫描线(偶尔闪过)—— 挂到 .style-retro 下的显式节点 */
|
|
114
|
+
.style-retro .retro-scanline-beam,
|
|
115
|
+
.retro-scanline-beam {
|
|
116
|
+
position: fixed;
|
|
117
|
+
left: 0;
|
|
118
|
+
right: 0;
|
|
119
|
+
height: 4px;
|
|
120
|
+
background: linear-gradient(
|
|
121
|
+
180deg,
|
|
122
|
+
transparent,
|
|
123
|
+
color-mix(in srgb, var(--token-accent) 30%, transparent),
|
|
124
|
+
transparent
|
|
125
|
+
);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
z-index: 9996;
|
|
128
|
+
opacity: 0.4;
|
|
129
|
+
animation: retro-scanline-slide 4s linear infinite;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ══════════════════════════════════════════════════════════════
|
|
133
|
+
开机自检 / 打字机效果
|
|
134
|
+
══════════════════════════════════════════════════════════════ */
|
|
135
|
+
|
|
136
|
+
@keyframes retro-boot-text {
|
|
137
|
+
0% { opacity: 0; transform: translateY(4px); }
|
|
138
|
+
10% { opacity: 1; transform: translateY(0); }
|
|
139
|
+
90% { opacity: 1; transform: translateY(0); }
|
|
140
|
+
100% { opacity: 0; transform: translateY(-4px); }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.retro-boot-line {
|
|
144
|
+
opacity: 0;
|
|
145
|
+
animation: retro-boot-text 0.3s steps(1) forwards;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.retro-boot-line:nth-child(1) { animation-delay: 0.1s; }
|
|
149
|
+
.retro-boot-line:nth-child(2) { animation-delay: 0.25s; }
|
|
150
|
+
.retro-boot-line:nth-child(3) { animation-delay: 0.4s; }
|
|
151
|
+
.retro-boot-line:nth-child(4) { animation-delay: 0.55s; }
|
|
152
|
+
.retro-boot-line:nth-child(5) { animation-delay: 0.7s; }
|
|
153
|
+
|
|
154
|
+
/* 打字机光标 */
|
|
155
|
+
.retro-cursor::after {
|
|
156
|
+
content: "█";
|
|
157
|
+
display: inline-block;
|
|
158
|
+
margin-left: 2px;
|
|
159
|
+
color: var(--token-accent);
|
|
160
|
+
animation: retro-blink 1s step-end infinite;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ══════════════════════════════════════════════════════════════
|
|
164
|
+
RGB 色散 / 霓虹发光(暗色下尤其出彩)
|
|
165
|
+
══════════════════════════════════════════════════════════════ */
|
|
166
|
+
|
|
167
|
+
.style-retro.dark .retro-glow {
|
|
168
|
+
text-shadow:
|
|
169
|
+
-1px 0 0 rgba(255, 0, 0, 0.4),
|
|
170
|
+
1px 0 0 rgba(0, 255, 255, 0.4),
|
|
171
|
+
0 0 2px var(--token-accent),
|
|
172
|
+
0 0 8px var(--token-accent);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.style-retro.dark .retro-glow-cold {
|
|
176
|
+
text-shadow:
|
|
177
|
+
-1px 0 0 rgba(255, 0, 0, 0.4),
|
|
178
|
+
1px 0 0 rgba(0, 255, 255, 0.4),
|
|
179
|
+
0 0 2px var(--token-accent-cold),
|
|
180
|
+
0 0 8px var(--token-accent-cold);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* 亮色模式下发光退化为单层硬投影,保持像素感而不刺眼 */
|
|
184
|
+
.style-retro:not(.dark) .retro-glow {
|
|
185
|
+
text-shadow:
|
|
186
|
+
1px 1px 0 color-mix(in srgb, var(--token-accent) 30%, transparent);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ══════════════════════════════════════════════════════════════
|
|
190
|
+
像素边框工具类(任意风格下可用,但与 retro 最契合)
|
|
191
|
+
══════════════════════════════════════════════════════════════ */
|
|
192
|
+
|
|
193
|
+
.retro-pixel-border {
|
|
194
|
+
border: 2px solid var(--token-line);
|
|
195
|
+
box-shadow:
|
|
196
|
+
2px 2px 0 var(--token-line-strong),
|
|
197
|
+
inset 2px 2px 0 var(--token-surface-strong),
|
|
198
|
+
inset -2px -2px 0 var(--token-line-soft);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.retro-pixel-border-accent {
|
|
202
|
+
border: 2px solid var(--token-accent);
|
|
203
|
+
box-shadow:
|
|
204
|
+
2px 2px 0 var(--token-accent-cold),
|
|
205
|
+
inset 2px 2px 0 color-mix(in srgb, var(--token-accent) 20%, transparent),
|
|
206
|
+
inset -2px -2px 0 color-mix(in srgb, var(--token-accent) 40%, transparent);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* 像素按钮:硬投影 + 按下内移 */
|
|
210
|
+
.retro-pixel-button {
|
|
211
|
+
position: relative;
|
|
212
|
+
border: 2px solid var(--token-line-strong);
|
|
213
|
+
box-shadow:
|
|
214
|
+
inset -2px -2px 0 var(--token-line-soft),
|
|
215
|
+
inset 2px 2px 0 var(--token-surface-strong),
|
|
216
|
+
2px 2px 0 var(--token-line);
|
|
217
|
+
transition: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.retro-pixel-button:active {
|
|
221
|
+
transform: translate(2px, 2px);
|
|
222
|
+
box-shadow:
|
|
223
|
+
inset -2px -2px 0 var(--token-line-soft),
|
|
224
|
+
inset 2px 2px 0 var(--token-surface-strong);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* ══════════════════════════════════════════════════════════════
|
|
228
|
+
选中文字 / 像素分隔线
|
|
229
|
+
══════════════════════════════════════════════════════════════ */
|
|
230
|
+
|
|
231
|
+
.style-retro ::selection {
|
|
232
|
+
background: var(--token-accent);
|
|
233
|
+
color: var(--token-on-accent);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.retro-pixel-rule {
|
|
237
|
+
height: 0;
|
|
238
|
+
border: 0;
|
|
239
|
+
border-top: 2px dashed var(--token-line);
|
|
240
|
+
image-rendering: pixelated;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* ══════════════════════════════════════════════════════════════
|
|
244
|
+
页面切换 / 闪白效果
|
|
245
|
+
══════════════════════════════════════════════════════════════ */
|
|
246
|
+
|
|
247
|
+
@keyframes retro-flash {
|
|
248
|
+
0% { opacity: 0; }
|
|
249
|
+
10% { opacity: 0.8; }
|
|
250
|
+
100% { opacity: 0; }
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.retro-page-flash {
|
|
254
|
+
position: fixed;
|
|
255
|
+
inset: 0;
|
|
256
|
+
pointer-events: none;
|
|
257
|
+
z-index: 10000;
|
|
258
|
+
background: var(--token-bg);
|
|
259
|
+
opacity: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.retro-page-flash.active {
|
|
263
|
+
animation: retro-flash 0.2s steps(3) forwards;
|
|
264
|
+
}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* 1. 这些类挂在 <html> 上,与 .clay/.piano/.art/.vangogh/.ink/.retro 共存。
|
|
11
11
|
* 2. 只覆盖与“风格”相关的变量:字体、圆角、阴影硬度、抗锯齿、图像渲染。
|
|
12
12
|
* 3. 颜色仍由 preset 决定,保持正交。
|
|
13
|
+
*
|
|
14
|
+
* 注:选择器引用的是 base.css 的交互基元(.pressable / .control / .lift),
|
|
15
|
+
* 而非源项目 opengal 的 .og-* 命名——切换 profile 时这些基元自动获得
|
|
16
|
+
* 对应风格的几何/边框/阴影形态。
|
|
13
17
|
*/
|
|
14
18
|
|
|
15
19
|
/* ══════════════════════════════════════════════════════════════
|
|
@@ -164,6 +168,19 @@
|
|
|
164
168
|
/* ── 滚动条 ── */
|
|
165
169
|
--token-scrollbar-size: 10px;
|
|
166
170
|
|
|
171
|
+
/* ── icen 原语覆盖:retro 的聚焦环/按下/悬停全部像素化 ── */
|
|
172
|
+
--icen-ring: 2px solid var(--token-accent);
|
|
173
|
+
--icen-ring-soft: 2px solid var(--token-accent);
|
|
174
|
+
--icen-ring-error: 2px solid var(--token-error);
|
|
175
|
+
--icen-ring-success: 2px solid var(--token-success);
|
|
176
|
+
--icen-press: translate(2px, 2px);
|
|
177
|
+
--icen-press-soft: translate(1px, 1px);
|
|
178
|
+
--icen-hover-border: var(--token-accent);
|
|
179
|
+
--icen-hover-border-strong: var(--token-accent);
|
|
180
|
+
--icen-control-focus-shadow: inset 2px 2px 0 var(--token-line-soft), inset -1px -1px 0 var(--token-surface-strong);
|
|
181
|
+
--icen-control-focus-border: var(--token-accent);
|
|
182
|
+
--icen-control-error-shadow: inset 2px 2px 0 var(--token-line-soft), inset -1px -1px 0 var(--token-surface-strong);
|
|
183
|
+
|
|
167
184
|
/* ── 渲染 ── */
|
|
168
185
|
image-rendering: pixelated;
|
|
169
186
|
-webkit-font-smoothing: none;
|
|
@@ -192,9 +209,13 @@
|
|
|
192
209
|
|
|
193
210
|
/* ══════════════════════════════════════════════════════════════
|
|
194
211
|
按钮 / 可点击元素 — 8-bit 像素按钮
|
|
212
|
+
base.css 的 .pressable / 原生 button / [role=button] / 复位按钮
|
|
213
|
+
注:聚焦环 / 按下形变 / 悬停边框 由 --icen-* 原语驱动,
|
|
214
|
+
在 .style-retro 块里已统一覆盖;这里只补"按钮的像素投影",
|
|
215
|
+
这是 .pressable::after 高光无法表达的形态。
|
|
195
216
|
══════════════════════════════════════════════════════════════ */
|
|
196
217
|
|
|
197
|
-
.style-retro .
|
|
218
|
+
.style-retro .pressable,
|
|
198
219
|
.style-retro button,
|
|
199
220
|
.style-retro [role="button"],
|
|
200
221
|
.style-retro input[type="button"],
|
|
@@ -210,42 +231,42 @@
|
|
|
210
231
|
transition: all var(--duration-fast) var(--ease-out);
|
|
211
232
|
}
|
|
212
233
|
|
|
213
|
-
|
|
234
|
+
/* 禁用 .pressable::after 的现代渐变高光,retro 用硬投影表达层级 */
|
|
235
|
+
.style-retro .pressable::after,
|
|
214
236
|
.style-retro button::after {
|
|
215
237
|
display: none;
|
|
216
238
|
}
|
|
217
239
|
|
|
218
|
-
/*
|
|
219
|
-
.style-retro .
|
|
220
|
-
.style-retro button:hover
|
|
221
|
-
|
|
222
|
-
|
|
240
|
+
/* 悬停:边框高亮(聚焦环由 --icen-ring 接管,不再硬覆盖 outline) */
|
|
241
|
+
.style-retro .pressable:hover,
|
|
242
|
+
.style-retro button:hover,
|
|
243
|
+
.style-retro [role="button"]:hover {
|
|
244
|
+
border-color: var(--token-accent);
|
|
223
245
|
}
|
|
224
246
|
|
|
225
|
-
/* 按下:内移 +
|
|
226
|
-
.style-retro .
|
|
247
|
+
/* 按下:内移 + 阴影消失(位移值由 --icen-press 驱动) */
|
|
248
|
+
.style-retro .pressable:active,
|
|
227
249
|
.style-retro button:active,
|
|
228
250
|
.style-retro [role="button"]:active {
|
|
229
|
-
transform: translate(2px, 2px);
|
|
230
251
|
box-shadow:
|
|
231
252
|
inset -2px -2px 0 var(--token-line-soft),
|
|
232
253
|
inset 2px 2px 0 var(--token-surface-strong);
|
|
233
254
|
}
|
|
234
255
|
|
|
235
256
|
/* 禁用状态 */
|
|
236
|
-
.style-retro .
|
|
257
|
+
.style-retro .pressable:where(:disabled, [aria-disabled="true"], [data-disabled]),
|
|
237
258
|
.style-retro button:disabled {
|
|
238
|
-
transform: none;
|
|
239
259
|
box-shadow: none;
|
|
240
260
|
outline: none;
|
|
241
|
-
opacity: 0.5;
|
|
242
261
|
}
|
|
243
262
|
|
|
244
263
|
/* ══════════════════════════════════════════════════════════════
|
|
245
264
|
输入框 / 表单元素 — 像素输入框
|
|
265
|
+
base.css 的 .control 是 wrapper 基元;原生 input/textarea/select 同样适用
|
|
266
|
+
注:聚焦阴影/边框已由 --icen-control-focus-* 接管,这里只补像素 inset 阴影
|
|
246
267
|
══════════════════════════════════════════════════════════════ */
|
|
247
268
|
|
|
248
|
-
.style-retro .
|
|
269
|
+
.style-retro .control,
|
|
249
270
|
.style-retro input,
|
|
250
271
|
.style-retro textarea,
|
|
251
272
|
.style-retro select {
|
|
@@ -258,18 +279,12 @@
|
|
|
258
279
|
transition: none;
|
|
259
280
|
}
|
|
260
281
|
|
|
261
|
-
|
|
262
|
-
display: none;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/* 被 og-control / vn-editable-field 容器包裹的输入框:自身边框透明化,
|
|
282
|
+
/* 被 .control 容器包裹的输入框:自身边框透明化,
|
|
266
283
|
完全交给外层容器承担像素边框,避免常驻/聚焦状态出现双层内框。 */
|
|
267
|
-
.style-retro .
|
|
268
|
-
.style-retro .
|
|
269
|
-
.style-retro .
|
|
270
|
-
.style-retro .
|
|
271
|
-
.style-retro .vn-editable-field textarea,
|
|
272
|
-
.style-retro .vn-editable-field [contenteditable="true"] {
|
|
284
|
+
.style-retro .control input:not([type="checkbox"]):not([type="radio"]),
|
|
285
|
+
.style-retro .control textarea,
|
|
286
|
+
.style-retro .control select,
|
|
287
|
+
.style-retro .control [contenteditable="true"] {
|
|
273
288
|
border-color: transparent !important;
|
|
274
289
|
box-shadow: none !important;
|
|
275
290
|
background: transparent !important;
|
|
@@ -278,22 +293,12 @@
|
|
|
278
293
|
.style-retro input:hover,
|
|
279
294
|
.style-retro textarea:hover,
|
|
280
295
|
.style-retro select:hover,
|
|
281
|
-
.style-retro .
|
|
282
|
-
|
|
283
|
-
border-color: var(--token-accent);
|
|
296
|
+
.style-retro .control:hover {
|
|
297
|
+
border-color: var(--icen-hover-border);
|
|
284
298
|
}
|
|
285
299
|
|
|
286
|
-
|
|
287
|
-
.
|
|
288
|
-
border-color: var(--token-accent);
|
|
289
|
-
box-shadow:
|
|
290
|
-
inset 2px 2px 0 var(--token-line-soft),
|
|
291
|
-
inset -1px -1px 0 var(--token-surface-strong);
|
|
292
|
-
outline: 2px solid var(--token-accent);
|
|
293
|
-
outline-offset: -2px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/* 文本输入区自身无焦点环,完全交给外层容器 */
|
|
300
|
+
/* 文本输入区自身无焦点环,完全交给外层容器;
|
|
301
|
+
.control:focus-within 的 box-shadow / border 由 --icen-control-focus-* 自动驱动 */
|
|
297
302
|
.style-retro input:focus,
|
|
298
303
|
.style-retro textarea:focus,
|
|
299
304
|
.style-retro select:focus,
|
|
@@ -377,8 +382,8 @@
|
|
|
377
382
|
border-color: var(--token-line-strong);
|
|
378
383
|
}
|
|
379
384
|
|
|
380
|
-
/*
|
|
381
|
-
.style-retro .
|
|
385
|
+
/* 禁用平滑悬停提升;.lift 在 retro 下用硬投影 + 边框色变化表达悬停 */
|
|
386
|
+
.style-retro .lift:hover {
|
|
382
387
|
transform: none;
|
|
383
388
|
box-shadow:
|
|
384
389
|
2px 2px 0 var(--token-accent);
|
|
@@ -495,7 +500,7 @@
|
|
|
495
500
|
box-shadow: var(--token-shadow-card);
|
|
496
501
|
}
|
|
497
502
|
|
|
498
|
-
/*
|
|
503
|
+
/* 非文本元素的硬像素焦点环 */
|
|
499
504
|
.style-retro :focus-visible:not(input):not(textarea):not(select):not([contenteditable="true"]) {
|
|
500
505
|
outline: 2px solid var(--token-accent);
|
|
501
506
|
outline-offset: -2px;
|
|
@@ -503,11 +508,6 @@
|
|
|
503
508
|
border-radius: var(--radius-md);
|
|
504
509
|
}
|
|
505
510
|
|
|
506
|
-
/* 非输入按钮在 retro 下禁用现代渐变高光(::after 渐变由 .og-pressable 提供) */
|
|
507
|
-
.style-retro .og-pressable::after {
|
|
508
|
-
display: none;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
511
|
/* ══════════════════════════════════════════════════════════════
|
|
512
512
|
TERMINAL — 命令行 / CRT 终端(预留,可组合任意 dark preset)
|
|
513
513
|
══════════════════════════════════════════════════════════════ */
|