weifuwu 0.68.0 → 0.70.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 +3 -3
- package/dist/client/index.js +4 -3
- package/dist/client/types.d.ts +2 -1
- package/dist/components/Card/Card.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +2 -2
- package/dist/components/CodeBlock/highlight.d.ts +15 -0
- package/dist/components/Drawer/Drawer.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/index.js +14 -16
- package/dist/components/style.css +160 -119
- package/dist/layout/weifuwu-layout.css +79 -11
- package/package.json +1 -1
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
--wf-dark-slate-300: #475569; --wf-dark-slate-200: #334155; --wf-dark-slate-100: #1e293b;
|
|
43
43
|
--wf-dark-slate-50: #0f172a; --wf-dark-bg: #0f172a;
|
|
44
44
|
--wf-dark-overlay: rgba(0, 0, 0, 0.6); /* 暗色遮罩(比亮色更深,压住暗底内容) */
|
|
45
|
+
--wf-dark-fill: var(--wf-dark-slate-200); /* 暗色填充(比底色亮一级) */
|
|
46
|
+
--wf-dark-bg-hover: rgba(255, 255, 255, 0.06); /* 暗色 hover 反白 */
|
|
45
47
|
--wf-dark-surface-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
46
48
|
--wf-dark-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
47
49
|
--wf-dark-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
@@ -192,6 +194,8 @@
|
|
|
192
194
|
--wf-ease-in: cubic-bezier(0.4, 0, 1, 1); /* 退场:渐入加速 */
|
|
193
195
|
--wf-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); /* 往返/闪烁动画 */
|
|
194
196
|
--wf-ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1); /* 选中/弹跳 */
|
|
197
|
+
--wf-ease-standard: ease; /* 通用缓动(组件假 token 收敛) */
|
|
198
|
+
--wf-dur-md: var(--wf-dur-base); /* 中档时长(= base 别名) */
|
|
195
199
|
|
|
196
200
|
--wf-motion-sm: 4px;
|
|
197
201
|
--wf-motion-md: 8px;
|
|
@@ -208,6 +212,11 @@
|
|
|
208
212
|
--wf-color-error-text: var(--wf-red-700);
|
|
209
213
|
--wf-color-info-text: var(--wf-sky-700);
|
|
210
214
|
|
|
215
|
+
/* ── 色彩 — 通用填充/悬停底色(暗色经 _dark.css 映射) ── */
|
|
216
|
+
--wf-color-fill: var(--wf-slate-100); /* 通用填充色(禁裸灰——组件假 token 收敛) */
|
|
217
|
+
--wf-color-bg-subtle: var(--wf-color-fill); /* 极淡底(别名) */
|
|
218
|
+
--wf-color-bg-hover: rgba(0, 0, 0, 0.04); /* hover 底色(暗色反白) */
|
|
219
|
+
|
|
211
220
|
/* ── 色彩 — 实心填充上的文字/图标(primary/success 等实心底色) ── */
|
|
212
221
|
--wf-color-on-brand: #fff;
|
|
213
222
|
|
|
@@ -221,6 +230,9 @@
|
|
|
221
230
|
/* 控件尺寸:垂直内边距 + 目标高度(移动端在 _base.css 提升到 44px) */
|
|
222
231
|
--wf-control-pad-y: 10px;
|
|
223
232
|
--wf-control-height: 36px;
|
|
233
|
+
/* 字段统一尺寸(组件假 token 收敛——Input/Select/Textarea 引用) */
|
|
234
|
+
--wf-field-height: var(--wf-control-height);
|
|
235
|
+
--wf-field-radius: var(--wf-radius);
|
|
224
236
|
|
|
225
237
|
/* ── 断点 ── */
|
|
226
238
|
--wf-bp-sm: 640px;
|
|
@@ -281,6 +293,9 @@
|
|
|
281
293
|
--wf-color-bg: var(--wf-dark-bg);
|
|
282
294
|
--wf-color-bg-secondary: var(--wf-dark-slate-100);
|
|
283
295
|
--wf-color-bg-tertiary: var(--wf-dark-slate-200);
|
|
296
|
+
--wf-color-fill: var(--wf-dark-fill);
|
|
297
|
+
--wf-color-bg-subtle: var(--wf-dark-fill);
|
|
298
|
+
--wf-color-bg-hover: var(--wf-dark-bg-hover);
|
|
284
299
|
|
|
285
300
|
--wf-color-border: var(--wf-dark-slate-200);
|
|
286
301
|
--wf-color-border-light: var(--wf-dark-slate-100);
|
|
@@ -328,6 +343,9 @@
|
|
|
328
343
|
--wf-color-bg: var(--wf-dark-bg);
|
|
329
344
|
--wf-color-bg-secondary: var(--wf-dark-slate-100);
|
|
330
345
|
--wf-color-bg-tertiary: var(--wf-dark-slate-200);
|
|
346
|
+
--wf-color-fill: var(--wf-dark-fill);
|
|
347
|
+
--wf-color-bg-subtle: var(--wf-dark-fill);
|
|
348
|
+
--wf-color-bg-hover: var(--wf-dark-bg-hover);
|
|
331
349
|
|
|
332
350
|
--wf-color-border: var(--wf-dark-slate-200);
|
|
333
351
|
--wf-color-border-light: var(--wf-dark-slate-100);
|
|
@@ -622,6 +640,19 @@ body.wf-dragging {
|
|
|
622
640
|
}
|
|
623
641
|
}
|
|
624
642
|
|
|
643
|
+
@layer layout {
|
|
644
|
+
/* between — 两端对齐(行内垂直居中) */
|
|
645
|
+
.wf-between {
|
|
646
|
+
display: flex;
|
|
647
|
+
justify-content: space-between;
|
|
648
|
+
align-items: var(--wf-align, center);
|
|
649
|
+
gap: var(--wf-gap, var(--wf-gap-md));
|
|
650
|
+
}
|
|
651
|
+
@media (min-width: 640px) { .wf-between\@sm { display: flex; justify-content: space-between; align-items: var(--wf-align, center); gap: var(--wf-gap, var(--wf-gap-md)); } }
|
|
652
|
+
@media (min-width: 768px) { .wf-between\@md { display: flex; justify-content: space-between; align-items: var(--wf-align, center); gap: var(--wf-gap, var(--wf-gap-md)); } }
|
|
653
|
+
@media (min-width: 1024px) { .wf-between\@lg { display: flex; justify-content: space-between; align-items: var(--wf-align, center); gap: var(--wf-gap, var(--wf-gap-md)); } }
|
|
654
|
+
}
|
|
655
|
+
|
|
625
656
|
@layer layout {
|
|
626
657
|
/* right — 靠右对齐 */
|
|
627
658
|
.wf-right {
|
|
@@ -693,6 +724,12 @@ body.wf-dragging {
|
|
|
693
724
|
.wf-fixed {
|
|
694
725
|
flex: none;
|
|
695
726
|
}
|
|
727
|
+
|
|
728
|
+
/* pin — 固定定位(角标/浮层锚点——position: fixed,坐标由 inline 参数控制) */
|
|
729
|
+
.wf-pin {
|
|
730
|
+
position: fixed;
|
|
731
|
+
z-index: var(--wf-z, var(--wf-cover-z));
|
|
732
|
+
}
|
|
696
733
|
}
|
|
697
734
|
|
|
698
735
|
@layer layout {
|
|
@@ -902,7 +939,7 @@ body.wf-dragging {
|
|
|
902
939
|
}
|
|
903
940
|
}
|
|
904
941
|
|
|
905
|
-
@layer
|
|
942
|
+
@layer utilities {
|
|
906
943
|
/* block — 块级显示 */
|
|
907
944
|
.wf-block {
|
|
908
945
|
display: block;
|
|
@@ -928,7 +965,10 @@ body.wf-dragging {
|
|
|
928
965
|
|
|
929
966
|
@layer layout {
|
|
930
967
|
/* container — 内容宽度约束居中 */
|
|
968
|
+
/* width: 100% 必须:margin: 0 auto 在 flex 父中阻止 stretch(宽度=内容)
|
|
969
|
+
——landing 特性区 404px 而非撑满 1100 容器的根因 */
|
|
931
970
|
.wf-container {
|
|
971
|
+
width: 100%;
|
|
932
972
|
max-width: var(--wf-max, 1200px);
|
|
933
973
|
margin: 0 auto;
|
|
934
974
|
padding: 0 var(--wf-gap, var(--wf-gap-lg));
|
|
@@ -951,12 +991,12 @@ body.wf-dragging {
|
|
|
951
991
|
}
|
|
952
992
|
|
|
953
993
|
@layer layout {
|
|
954
|
-
/* nowrap —
|
|
994
|
+
/* nowrap — 不换行(只管 flex-wrap——不定义 align-items,避免与
|
|
995
|
+
wf-stretch 等对齐工具叠加冲突:双份 CSS 下 nowrap 后置曾覆盖 stretch) */
|
|
955
996
|
.wf-nowrap {
|
|
956
997
|
display: flex;
|
|
957
998
|
flex-wrap: nowrap;
|
|
958
999
|
gap: var(--wf-gap, var(--wf-gap-md));
|
|
959
|
-
align-items: var(--wf-align, center);
|
|
960
1000
|
}
|
|
961
1001
|
}
|
|
962
1002
|
|
|
@@ -1028,19 +1068,30 @@ body.wf-dragging {
|
|
|
1028
1068
|
.wf-mx-auto { margin-left: auto; margin-right: auto; }
|
|
1029
1069
|
.wf-my-auto { margin-top: auto; margin-bottom: auto; }
|
|
1030
1070
|
|
|
1031
|
-
/* ── gap
|
|
1032
|
-
|
|
1033
|
-
.wf-gap-
|
|
1034
|
-
.wf-gap-
|
|
1035
|
-
.wf-gap-
|
|
1036
|
-
.wf-gap-
|
|
1037
|
-
.wf-gap-
|
|
1038
|
-
.wf-gap-
|
|
1071
|
+
/* ── gap:直接设置 gap 属性(不设 --wf-gap 变量——变量会继承污染子孙:
|
|
1072
|
+
壳 root wf-gap-none 曾让 KPI grid 的 gap: var(--wf-gap) = 0 卡无间距) ── */
|
|
1073
|
+
.wf-gap-none { gap: 0; }
|
|
1074
|
+
.wf-gap-xs { gap: var(--wf-gap-xs); }
|
|
1075
|
+
.wf-gap-sm { gap: var(--wf-gap-sm); }
|
|
1076
|
+
.wf-gap-md { gap: var(--wf-gap-md); }
|
|
1077
|
+
.wf-gap-lg { gap: var(--wf-gap-lg); }
|
|
1078
|
+
.wf-gap-xl { gap: var(--wf-gap-xl); }
|
|
1079
|
+
.wf-gap-2xl { gap: var(--wf-gap-2xl); }
|
|
1039
1080
|
|
|
1040
1081
|
/* ── 尺寸 ── */
|
|
1041
1082
|
.wf-w-full { width: 100%; }
|
|
1042
1083
|
.wf-h-full { height: 100%; }
|
|
1043
1084
|
.wf-w-auto { width: auto; }
|
|
1085
|
+
|
|
1086
|
+
/* ── 固定宽度阶梯(对齐 token 阶梯——卡片/面板/容器宽不再内联) ── */
|
|
1087
|
+
.wf-w-xs { width: var(--wf-w-xs, 320px); }
|
|
1088
|
+
.wf-w-sm { width: var(--wf-w-sm, 480px); }
|
|
1089
|
+
.wf-w-md { width: var(--wf-w-md, 640px); }
|
|
1090
|
+
.wf-w-lg { width: var(--wf-w-lg, 768px); }
|
|
1091
|
+
.wf-w-xl { width: var(--wf-w-xl, 1024px); }
|
|
1092
|
+
.wf-w-max { max-width: 100%; }
|
|
1093
|
+
.wf-w-md-auto { width: 100%; }
|
|
1094
|
+
@media (min-width: 768px) { .wf-w-md-auto { width: var(--wf-w-md, 640px); } }
|
|
1044
1095
|
}
|
|
1045
1096
|
|
|
1046
1097
|
@layer layout {
|
|
@@ -1159,6 +1210,23 @@ body.wf-dragging {
|
|
|
1159
1210
|
display: inline-flex;
|
|
1160
1211
|
}
|
|
1161
1212
|
|
|
1213
|
+
/* ── 折叠态:图标-only 导航(配合 --wf-sidebar-width 收窄侧栏) ── */
|
|
1214
|
+
.wf-nav--collapsed .wf-nav-item {
|
|
1215
|
+
justify-content: center;
|
|
1216
|
+
gap: 0;
|
|
1217
|
+
padding: var(--wf-space-sm);
|
|
1218
|
+
}
|
|
1219
|
+
.wf-nav--collapsed .wf-nav-label {
|
|
1220
|
+
display: none;
|
|
1221
|
+
}
|
|
1222
|
+
.wf-nav--collapsed .wf-nav-group {
|
|
1223
|
+
text-align: center;
|
|
1224
|
+
padding-left: 0;
|
|
1225
|
+
padding-right: 0;
|
|
1226
|
+
overflow: hidden;
|
|
1227
|
+
white-space: nowrap;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1162
1230
|
/* ── 主内容区 ── */
|
|
1163
1231
|
.wf-main {
|
|
1164
1232
|
padding: var(--wf-space-lg);
|