lcap-frontend-library 0.0.1

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.
Files changed (84) hide show
  1. package/README.md +271 -0
  2. package/bin/lcap-frontend-library.mjs +3 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +27 -0
  5. package/dist/init.d.ts +6 -0
  6. package/dist/init.js +79 -0
  7. package/dist/sync.d.ts +4 -0
  8. package/dist/sync.js +70 -0
  9. package/dist/utils.d.ts +19 -0
  10. package/dist/utils.js +101 -0
  11. package/package.json +34 -0
  12. package/packages/lcap-frontend-library/LEARNINGS.md +11 -0
  13. package/packages/lcap-frontend-library/SKILL.md +86 -0
  14. package/packages/lcap-frontend-library/commands/migrate.check.md +287 -0
  15. package/packages/lcap-frontend-library/commands/migrate.green.md +190 -0
  16. package/packages/lcap-frontend-library/commands/migrate.plan.md +169 -0
  17. package/packages/lcap-frontend-library/commands/migrate.red.md +160 -0
  18. package/packages/lcap-frontend-library/commands/migrate.scan.md +151 -0
  19. package/packages/lcap-frontend-library/commands/migrate.spec.md +144 -0
  20. package/packages/lcap-frontend-library/commands/migrate.tasks.md +179 -0
  21. package/packages/lcap-frontend-library/commands/speckit.create.md +201 -0
  22. package/packages/lcap-frontend-library/commands/speckit.implement.md +88 -0
  23. package/packages/lcap-frontend-library/commands/speckit.plan.md +79 -0
  24. package/packages/lcap-frontend-library/commands/speckit.self-check.md +177 -0
  25. package/packages/lcap-frontend-library/commands/speckit.specify.md +91 -0
  26. package/packages/lcap-frontend-library/commands/speckit.tasks.md +61 -0
  27. package/packages/lcap-frontend-library/references/frontend-design/LICENSE.txt +177 -0
  28. package/packages/lcap-frontend-library/references/frontend-design/SKILL.md +42 -0
  29. package/packages/lcap-frontend-library/references/lcap-extension-component/SKILL.md +360 -0
  30. package/packages/lcap-frontend-library/references/lcap-extension-component/api.md +331 -0
  31. package/packages/lcap-frontend-library/references/lcap-extension-component/block.md +160 -0
  32. package/packages/lcap-frontend-library/references/lcap-extension-component/i18n.md +95 -0
  33. package/packages/lcap-frontend-library/references/lcap-extension-component/icon.md +27 -0
  34. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/container.md +728 -0
  35. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/element.md +312 -0
  36. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/expression.md +154 -0
  37. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/index.md +113 -0
  38. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/modal.md +189 -0
  39. package/packages/lcap-frontend-library/references/lcap-extension-component/ide/popover.md +171 -0
  40. package/packages/lcap-frontend-library/references/lcap-extension-component/ide.md +799 -0
  41. package/packages/lcap-frontend-library/references/lcap-extension-component/implementation-rules.md +242 -0
  42. package/packages/lcap-frontend-library/references/lcap-extension-component/index.md +27 -0
  43. package/packages/lcap-frontend-library/references/lcap-extension-component/nasl-view-component.md +895 -0
  44. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/accessibility.md +185 -0
  45. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/child.md +82 -0
  46. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/data-source.md +261 -0
  47. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/event.md +171 -0
  48. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/form.md +266 -0
  49. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/function.md +80 -0
  50. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/link.md +137 -0
  51. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/slot.md +128 -0
  52. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-ant-design.md +1470 -0
  53. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-cloud-ui.md +259 -0
  54. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-element-plus.md +580 -0
  55. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-element-ui.md +1007 -0
  56. package/packages/lcap-frontend-library/references/lcap-extension-component/platform/theme-variables-mobile-ui.md +85 -0
  57. package/packages/lcap-frontend-library/references/lcap-extension-component/theme.md +234 -0
  58. package/packages/lcap-frontend-library/references/lcap-extension-component/workflow-guardrails.md +328 -0
  59. package/packages/lcap-frontend-library/references/nasl-logic-authoring/SKILL.md +201 -0
  60. package/packages/lcap-frontend-library/scripts/bash/create-component-files.sh +95 -0
  61. package/packages/lcap-frontend-library/scripts/bash/create-extension-project.sh +109 -0
  62. package/packages/lcap-frontend-library/scripts/bash/create-logic-files.sh +149 -0
  63. package/packages/lcap-frontend-library/scripts/bash/create-spec.sh +109 -0
  64. package/packages/lcap-frontend-library/scripts/bash/get-available-port.sh +35 -0
  65. package/packages/lcap-frontend-library/scripts/bash/list-specs.sh +19 -0
  66. package/packages/lcap-frontend-library/scripts/node/setup-extension-project.mjs +166 -0
  67. package/packages/lcap-frontend-library/templates/component-self-check.md +31 -0
  68. package/packages/lcap-frontend-library/templates/component-template.md +96 -0
  69. package/packages/lcap-frontend-library/templates/library-report-template.md +52 -0
  70. package/packages/lcap-frontend-library/templates/logic-template.md +44 -0
  71. package/packages/lcap-frontend-library/templates/migration-manifest-template.md +84 -0
  72. package/packages/lcap-frontend-library/templates/migration-plan-template.md +138 -0
  73. package/packages/lcap-frontend-library/templates/migration-report-template.md +227 -0
  74. package/packages/lcap-frontend-library/templates/migration-spec-template.md +135 -0
  75. package/packages/lcap-frontend-library/templates/migration-tasks-template.md +129 -0
  76. package/packages/lcap-frontend-library/templates/plan-template.md +299 -0
  77. package/packages/lcap-frontend-library/templates/self-check-report-template.md +148 -0
  78. package/packages/lcap-frontend-library/templates/tasks-template.md +81 -0
  79. package/packages/lcap-frontend-library/workflows/create/flow.md +199 -0
  80. package/packages/lcap-frontend-library/workflows/evolve/flow.md +249 -0
  81. package/packages/lcap-frontend-library/workflows/generate/flow.md +10 -0
  82. package/packages/lcap-frontend-library/workflows/harness/flow.md +82 -0
  83. package/packages/lcap-frontend-library/workflows/migrate/flow.md +302 -0
  84. package/packages/lcap-frontend-library/workflows/migrate/knowledge-base.md +564 -0
@@ -0,0 +1,1470 @@
1
+ # 使用 Ant Design 全局主题变量
2
+
3
+ ## 复制变量文件
4
+
5
+ 创建文件 `.storybook/vars.css`, 内容如下:
6
+
7
+ ```css
8
+ .cw-nasl {
9
+ /**
10
+ * @desc 基础组件的圆角大小,例如按钮、输入框、卡片等
11
+ * @title 基础圆角
12
+ * @type size
13
+ */
14
+ --cw-border-radius: 6px;
15
+
16
+ /**
17
+ * @desc 用于派生背景色梯度的基础变量,v5 中我们添加了一层背景色的派生算法可以产出梯度明确的背景色的梯度变量。但请不要在代码中直接使用该 Seed Token !
18
+ * @title 基础背景色
19
+ * @type color
20
+ */
21
+ --cw-color-bg-base: #fff;
22
+
23
+ /**
24
+ * @desc 用于表示操作失败的 Token 序列,如失败按钮、错误状态提示(Result)组件等。
25
+ * @title 错误色
26
+ * @type color
27
+ */
28
+ --cw-color-error: #ff4d4f;
29
+
30
+ /**
31
+ * @desc 用于表示操作信息的 Token 序列,如 Alert 、Tag、 Progress 等组件都有用到该组梯度变量。
32
+ * @title 信息色
33
+ * @type color
34
+ */
35
+ --cw-color-info: #1677ff;
36
+
37
+ /**
38
+ * @desc 控制超链接的颜色。
39
+ * @title 超链接颜色
40
+ * @type color
41
+ */
42
+ --cw-color-link: #1677ff;
43
+
44
+ /**
45
+ * @desc 品牌色是体现产品特性和传播理念最直观的视觉元素之一。在你完成品牌主色的选取之后,我们会自动帮你生成一套完整的色板,并赋予它们有效的设计语义
46
+ * @title 品牌主色
47
+ * @type color
48
+ */
49
+ --cw-color-primary: #1677ff;
50
+
51
+ /**
52
+ * @desc 用于表示操作成功的 Token 序列,如 Result、Progress 等组件会使用该组梯度变量。
53
+ * @title 成功色
54
+ * @type color
55
+ */
56
+ --cw-color-success: #52c41a;
57
+
58
+ /**
59
+ * @desc 用于派生文本色梯度的基础变量,v5 中我们添加了一层文本色的派生算法可以产出梯度明确的文本色的梯度变量。但请不要在代码中直接使用该 Seed Token !
60
+ * @title 基础文本色
61
+ * @type color
62
+ */
63
+ --cw-color-text-base: #000;
64
+
65
+ /**
66
+ * @desc 用于表示操作警告的 Token 序列,如 Notification、 Alert等警告类组件或 Input 输入类等组件会使用该组梯度变量。
67
+ * @title 警戒色
68
+ * @type color
69
+ */
70
+ --cw-color-warning: #faad14;
71
+
72
+ /**
73
+ * @desc Ant Design 中按钮和输入框等基础控件的高度
74
+ * @title 基础高度
75
+ * @type size
76
+ */
77
+ --cw-control-height: 32px;
78
+
79
+ /**
80
+ * @desc Ant Design 的字体家族中优先使用系统默认的界面字体,同时提供了一套利于屏显的备用字体库,来维护在不同平台以及浏览器的显示下,字体始终保持良好的易读性和可读性,体现了友好、稳定和专业的特性。
81
+ * @title 字体
82
+ * @type input
83
+ */
84
+ --cw-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
85
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
86
+ 'Noto Color Emoji';
87
+
88
+ /**
89
+ * @desc 代码字体,用于 Typography 内的 code、pre 和 kbd 类型的元素
90
+ * @title 代码字体
91
+ * @type input
92
+ */
93
+ --cw-font-family-code: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
94
+
95
+ /**
96
+ * @desc 设计系统中使用最广泛的字体大小,文本梯度也将基于该字号进行派生。
97
+ * @title 默认字号
98
+ * @type size
99
+ */
100
+ --cw-font-size: 14px;
101
+
102
+ /**
103
+ * @desc 用于控制组件边框、分割线等的样式,默认是实线
104
+ * @title 线条样式
105
+ * @type input
106
+ */
107
+ --cw-line-type: solid;
108
+
109
+ /**
110
+ * @desc 用于控制组件边框、分割线等的宽度
111
+ * @title 基础线宽
112
+ * @type size
113
+ */
114
+ --cw-line-width: 1px;
115
+
116
+ /**
117
+ * @desc 用于配置动画效果,为 `false` 时则关闭动画
118
+ * @title 动画风格
119
+ * @type input
120
+ */
121
+ --cw-motion: true;
122
+
123
+ /**
124
+ * @title 动画基础时长。
125
+ * @type input
126
+ */
127
+ --cw-motion-base: 0;
128
+
129
+ /**
130
+ * @desc 预设动效曲率
131
+ * @type input
132
+ */
133
+ --cw-motion-ease-in-back: cubic-bezier(0.71, -0.46, 0.88, 0.6);
134
+
135
+ /**
136
+ * @desc 预设动效曲率
137
+ * @type input
138
+ */
139
+ --cw-motion-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
140
+
141
+ /**
142
+ * @desc 预设动效曲率
143
+ * @type input
144
+ */
145
+ --cw-motion-ease-in-out-circ: cubic-bezier(0.78, 0.14, 0.15, 0.86);
146
+
147
+ /**
148
+ * @desc 预设动效曲率
149
+ * @type input
150
+ */
151
+ --cw-motion-ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
152
+
153
+ /**
154
+ * @desc 预设动效曲率
155
+ * @type input
156
+ */
157
+ --cw-motion-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
158
+
159
+ /**
160
+ * @desc 预设动效曲率
161
+ * @type input
162
+ */
163
+ --cw-motion-ease-out-back: cubic-bezier(0.12, 0.4, 0.29, 1.46);
164
+
165
+ /**
166
+ * @desc 预设动效曲率
167
+ * @type input
168
+ */
169
+ --cw-motion-ease-out-circ: cubic-bezier(0.08, 0.82, 0.17, 1);
170
+
171
+ /**
172
+ * @desc 预设动效曲率
173
+ * @type input
174
+ */
175
+ --cw-motion-ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
176
+
177
+ /**
178
+ * @desc 用于控制动画时长的变化单位
179
+ * @title 动画时长变化单位
180
+ * @type size
181
+ */
182
+ --cw-motion-unit: 0.1px;
183
+
184
+ /**
185
+ * @title 图片不透明度
186
+ * @type input
187
+ */
188
+ --cw-opacity-image: 1;
189
+
190
+ /**
191
+ * @desc 组件箭头的尺寸
192
+ * @title 组件箭头尺寸
193
+ * @type size
194
+ */
195
+ --cw-size-popup-arrow: 16px;
196
+
197
+ /**
198
+ * @desc 用于控制组件尺寸的基础步长,尺寸步长结合尺寸变化单位,就可以派生各种尺寸梯度。通过调整步长即可得到不同的布局模式,例如 V5 紧凑模式下的尺寸步长为 2
199
+ * @title 尺寸步长
200
+ * @type size
201
+ */
202
+ --cw-size-step: 4px;
203
+
204
+ /**
205
+ * @desc 用于控制组件尺寸的变化单位,在 Ant Design 中我们的基础单位为 4 ,便于更加细致地控制尺寸梯度
206
+ * @title 尺寸变化单位
207
+ * @type size
208
+ */
209
+ --cw-size-unit: 4px;
210
+
211
+ /**
212
+ * @desc 用于将组件的视觉效果变为线框化,如果需要使用 V4 的效果,需要开启配置项
213
+ * @title 线框风格
214
+ * @type input
215
+ */
216
+ --cw-wireframe: false;
217
+
218
+ /**
219
+ * @desc 所有组件的基础 Z 轴值,用于一些悬浮类的组件的可以基于该值 Z 轴控制层级,例如 BackTop、 Affix 等
220
+ * @title 基础 zIndex
221
+ * @type input
222
+ */
223
+ --cw-z-index-base: 0;
224
+
225
+ /**
226
+ * @desc 浮层类组件的基础 Z 轴值,用于一些悬浮类的组件的可以基于该值 Z 轴控制层级,例如 FloatButton、 Affix、Modal 等
227
+ * @title 浮层基础 zIndex
228
+ * @type input
229
+ */
230
+ --cw-z-index-popup-base: 1000;
231
+
232
+ /**
233
+ * @desc LG号圆角,用于组件中的一些大圆角,如 Card、Modal 等一些组件样式。
234
+ * @title LG号圆角
235
+ * @type size
236
+ */
237
+ --cw-border-radius-lg: 8px;
238
+
239
+ /**
240
+ * @desc 外部圆角
241
+ * @title 外部圆角
242
+ * @type size
243
+ */
244
+ --cw-border-radius-outer: 4px;
245
+
246
+ /**
247
+ * @desc SM号圆角,用于组件小尺寸下的圆角,如 Button、Input、Select 等输入类控件在 small size 下的圆角
248
+ * @title SM号圆角
249
+ * @type size
250
+ */
251
+ --cw-border-radius-sm: 4px;
252
+
253
+ /**
254
+ * @desc XS号圆角,用于组件中的一些小圆角,如 Segmented 、Arrow 等一些内部圆角的组件样式中。
255
+ * @title XS号圆角
256
+ * @type size
257
+ */
258
+ --cw-border-radius-xs: 2px;
259
+
260
+ /**
261
+ * @desc 控制毛玻璃容器的背景色,通常为透明色。
262
+ * @title 毛玻璃容器背景色
263
+ * @type input
264
+ */
265
+ --cw-color-bg-blur: transparent;
266
+
267
+ /**
268
+ * @desc 组件的容器背景色,例如:默认按钮、输入框等。务必不要将其与 `colorBgElevated` 混淆。
269
+ * @title 组件容器背景色
270
+ * @type color
271
+ */
272
+ --cw-color-bg-container: #ffffff;
273
+
274
+ /**
275
+ * @desc 浮层容器背景色,在暗色模式下该 token 的色值会比 `colorBgContainer` 要亮一些。例如:模态框、弹出框、菜单等。
276
+ * @title 浮层容器背景色
277
+ * @type color
278
+ */
279
+ --cw-color-bg-elevated: #ffffff;
280
+
281
+ /**
282
+ * @desc 该色用于页面整体布局的背景色,只有需要在页面中处于 B1 的视觉层级时才会使用该 token,其他用法都是错误的
283
+ * @title 布局背景色
284
+ * @type color
285
+ */
286
+ --cw-color-bg-layout: #f5f5f5;
287
+
288
+ /**
289
+ * @desc 浮层的背景蒙层颜色,用于遮罩浮层下面的内容,Modal、Drawer 等组件的蒙层使用的是该 token
290
+ * @title 浮层的背景蒙层颜色
291
+ * @type color
292
+ */
293
+ --cw-color-bg-mask: rgba(0, 0, 0, 0.45);
294
+
295
+ /**
296
+ * @desc 该色用于引起用户强烈关注注意的背景色,目前只用在 Tooltip 的背景色上。
297
+ * @title 引起注意的背景色
298
+ * @type color
299
+ */
300
+ --cw-color-bg-spotlight: rgba(0, 0, 0, 0.85);
301
+
302
+ /**
303
+ * @desc 默认使用的边框颜色, 用于分割不同的元素,例如:表单的分割线、卡片的分割线等。
304
+ * @title 一级边框色
305
+ * @type color
306
+ */
307
+ --cw-color-border: #d9d9d9;
308
+
309
+ /**
310
+ * @desc 比默认使用的边框色要浅一级,此颜色和 colorSplit 的颜色一致。使用的是实色。
311
+ * @title 二级边框色
312
+ * @type color
313
+ */
314
+ --cw-color-border-secondary: #f0f0f0;
315
+
316
+ /**
317
+ * @desc 错误色的深色激活态
318
+ * @title 错误色的深色激活态
319
+ * @type color
320
+ */
321
+ --cw-color-error-active: #d9363e;
322
+
323
+ /**
324
+ * @desc 错误色的浅色背景颜色
325
+ * @title 错误色的浅色背景颜色
326
+ * @type color
327
+ */
328
+ --cw-color-error-bg: #fff2f0;
329
+
330
+ /**
331
+ * @desc 错误色的浅色背景色悬浮态
332
+ * @title 错误色的浅色背景色悬浮态
333
+ * @type color
334
+ */
335
+ --cw-color-error-bg-hover: #fff1f0;
336
+
337
+ /**
338
+ * @desc 错误色的描边色
339
+ * @title 错误色的描边色
340
+ * @type color
341
+ */
342
+ --cw-color-error-border: #ffccc7;
343
+
344
+ /**
345
+ * @desc 错误色的描边色悬浮态
346
+ * @title 错误色的描边色悬浮态
347
+ * @type color
348
+ */
349
+ --cw-color-error-border-hover: #ffa39e;
350
+
351
+ /**
352
+ * @desc 错误色的深色悬浮态
353
+ * @title 错误色的深色悬浮态
354
+ * @type color
355
+ */
356
+ --cw-color-error-hover: #ff7875;
357
+
358
+ /**
359
+ * @desc 错误色的文本默认态
360
+ * @title 错误色的文本默认态
361
+ * @type color
362
+ */
363
+ --cw-color-error-text: #ff4d4f;
364
+
365
+ /**
366
+ * @desc 错误色的文本激活态
367
+ * @title 错误色的文本激活态
368
+ * @type color
369
+ */
370
+ --cw-color-error-text-active: #d9363e;
371
+
372
+ /**
373
+ * @desc 错误色的文本悬浮态
374
+ * @title 错误色的文本悬浮态
375
+ * @type color
376
+ */
377
+ --cw-color-error-text-hover: #ff7875;
378
+
379
+ /**
380
+ * @desc 最深的填充色,用于拉开与二、三级填充色的区分度,目前只用在 Slider 的 hover 效果。
381
+ * @title 一级填充色
382
+ * @type color
383
+ */
384
+ --cw-color-fill: rgba(0, 0, 0, 0.15);
385
+
386
+ /**
387
+ * @desc 最弱一级的填充色,适用于不易引起注意的色块,例如斑马纹、区分边界的色块等。
388
+ * @title 四级填充色
389
+ * @type color
390
+ */
391
+ --cw-color-fill-quaternary: rgba(0, 0, 0, 0.02);
392
+
393
+ /**
394
+ * @desc 二级填充色可以较为明显地勾勒出元素形体,如 Rate、Skeleton 等。也可以作为三级填充色的 Hover 状态,如 Table 等。
395
+ * @title 二级填充色
396
+ * @type color
397
+ */
398
+ --cw-color-fill-secondary: rgba(0, 0, 0, 0.06);
399
+
400
+ /**
401
+ * @desc 三级填充色用于勾勒出元素形体的场景,如 Slider、Segmented 等。如无强调需求的情况下,建议使用三级填色作为默认填色。
402
+ * @title 三级填充色
403
+ * @type color
404
+ */
405
+ --cw-color-fill-tertiary: rgba(0, 0, 0, 0.04);
406
+
407
+ /**
408
+ * @desc 信息色的深色激活态。
409
+ * @title 信息色的深色激活态
410
+ * @type color
411
+ */
412
+ --cw-color-info-active: #0958d9;
413
+
414
+ /**
415
+ * @desc 信息色的浅色背景颜色。
416
+ * @title 信息色的浅色背景颜色
417
+ * @type color
418
+ */
419
+ --cw-color-info-bg: #e6f4ff;
420
+
421
+ /**
422
+ * @desc 信息色的浅色背景色悬浮态。
423
+ * @title 信息色的浅色背景色悬浮态
424
+ * @type color
425
+ */
426
+ --cw-color-info-bg-hover: #bae0ff;
427
+
428
+ /**
429
+ * @desc 信息色的描边色。
430
+ * @title 信息色的描边色
431
+ * @type color
432
+ */
433
+ --cw-color-info-border: #91caff;
434
+
435
+ /**
436
+ * @desc 信息色的描边色悬浮态。
437
+ * @title 信息色的描边色悬浮态
438
+ * @type color
439
+ */
440
+ --cw-color-info-border-hover: #69b1ff;
441
+
442
+ /**
443
+ * @desc 信息色的深色悬浮态。
444
+ * @title 信息色的深色悬浮态
445
+ * @type color
446
+ */
447
+ --cw-color-info-hover: #69b1ff;
448
+
449
+ /**
450
+ * @desc 信息色的文本默认态。
451
+ * @title 信息色的文本默认态
452
+ * @type color
453
+ */
454
+ --cw-color-info-text: #1677ff;
455
+
456
+ /**
457
+ * @desc 信息色的文本激活态。
458
+ * @title 信息色的文本激活态
459
+ * @type color
460
+ */
461
+ --cw-color-info-text-active: #0958d9;
462
+
463
+ /**
464
+ * @desc 信息色的文本悬浮态。
465
+ * @title 信息色的文本悬浮态
466
+ * @type color
467
+ */
468
+ --cw-color-info-text-hover: #4096ff;
469
+
470
+ /**
471
+ * @desc 控制超链接被点击时的颜色。
472
+ * @title 超链接激活颜色
473
+ * @type color
474
+ */
475
+ --cw-color-link-active: #0958d9;
476
+
477
+ /**
478
+ * @desc 控制超链接悬浮时的颜色。
479
+ * @title 超链接悬浮颜色
480
+ * @type color
481
+ */
482
+ --cw-color-link-hover: #69b1ff;
483
+
484
+ /**
485
+ * @desc 主色梯度下的深色激活态。
486
+ * @title 主色激活态
487
+ * @type color
488
+ */
489
+ --cw-color-primary-active: #0958d9;
490
+
491
+ /**
492
+ * @desc 主色浅色背景颜色,一般用于视觉层级较弱的选中状态。
493
+ * @title 主色浅色背景色
494
+ * @type color
495
+ */
496
+ --cw-color-primary-bg: #e6f4ff;
497
+
498
+ /**
499
+ * @desc 与主色浅色背景颜色相对应的悬浮态颜色。
500
+ * @title 主色浅色背景悬浮态
501
+ * @type color
502
+ */
503
+ --cw-color-primary-bg-hover: #bae0ff;
504
+
505
+ /**
506
+ * @desc 主色梯度下的描边用色,用在 Slider 等组件的描边上。
507
+ * @title 主色描边色
508
+ * @type color
509
+ */
510
+ --cw-color-primary-border: #91caff;
511
+
512
+ /**
513
+ * @desc 主色梯度下的描边用色的悬浮态,Slider 、Button 等组件的描边 Hover 时会使用。
514
+ * @title 主色描边色悬浮态
515
+ * @type color
516
+ */
517
+ --cw-color-primary-border-hover: #69b1ff;
518
+
519
+ /**
520
+ * @desc 主色梯度下的悬浮态。
521
+ * @title 主色悬浮态
522
+ * @type color
523
+ */
524
+ --cw-color-primary-hover: #4096ff;
525
+
526
+ /**
527
+ * @desc 主色梯度下的文本颜色。
528
+ * @title 主色文本
529
+ * @type color
530
+ */
531
+ --cw-color-primary-text: #1677ff;
532
+
533
+ /**
534
+ * @desc 主色梯度下的文本激活态。
535
+ * @title 主色文本激活态
536
+ * @type color
537
+ */
538
+ --cw-color-primary-text-active: #0958d9;
539
+
540
+ /**
541
+ * @desc 主色梯度下的文本悬浮态。
542
+ * @title 主色文本悬浮态
543
+ * @type color
544
+ */
545
+ --cw-color-primary-text-hover: #4096ff;
546
+
547
+ /**
548
+ * @desc 成功色的深色激活态
549
+ * @title 成功色的深色激活态
550
+ * @type color
551
+ */
552
+ --cw-color-success-active: #389e0d;
553
+
554
+ /**
555
+ * @desc 成功色的浅色背景颜色,用于 Tag 和 Alert 的成功态背景色
556
+ * @title 成功色的浅色背景颜色
557
+ * @type color
558
+ */
559
+ --cw-color-success-bg: #f6ffed;
560
+
561
+ /**
562
+ * @desc 成功色浅色背景颜色,一般用于视觉层级较弱的选中状态,不过 antd 目前没有使用到该 token
563
+ * @title 成功色的浅色背景色悬浮态
564
+ * @type color
565
+ */
566
+ --cw-color-success-bg-hover: #d9f7be;
567
+
568
+ /**
569
+ * @desc 成功色的描边色,用于 Tag 和 Alert 的成功态描边色
570
+ * @title 成功色的描边色
571
+ * @type color
572
+ */
573
+ --cw-color-success-border: #b7eb8f;
574
+
575
+ /**
576
+ * @desc 成功色的描边色悬浮态
577
+ * @title 成功色的描边色悬浮态
578
+ * @type color
579
+ */
580
+ --cw-color-success-border-hover: #95de64;
581
+
582
+ /**
583
+ * @desc 成功色的深色悬浮态
584
+ * @title 成功色的深色悬浮态
585
+ * @type color
586
+ */
587
+ --cw-color-success-hover: #95de64;
588
+
589
+ /**
590
+ * @desc 成功色的文本默认态
591
+ * @title 成功色的文本默认态
592
+ * @type color
593
+ */
594
+ --cw-color-success-text: #52c41a;
595
+
596
+ /**
597
+ * @desc 成功色的文本激活态
598
+ * @title 成功色的文本激活态
599
+ * @type color
600
+ */
601
+ --cw-color-success-text-active: #389e0d;
602
+
603
+ /**
604
+ * @desc 成功色的文本悬浮态
605
+ * @title 成功色的文本悬浮态
606
+ * @type color
607
+ */
608
+ --cw-color-success-text-hover: #73d13d;
609
+
610
+ /**
611
+ * @desc 最深的文本色。为了符合W3C标准,默认的文本颜色使用了该色,同时这个颜色也是最深的中性色。
612
+ * @title 一级文本色
613
+ * @type color
614
+ */
615
+ --cw-color-text: rgba(0, 0, 0, 0.88);
616
+
617
+ /**
618
+ * @desc 第四级文本色是最浅的文本色,例如表单的输入提示文本、禁用色文本等。
619
+ * @title 四级文本色
620
+ * @type color
621
+ */
622
+ --cw-color-text-quaternary: rgba(0, 0, 0, 0.25);
623
+
624
+ /**
625
+ * @desc 作为第二梯度的文本色,一般用在不那么需要强化文本颜色的场景,例如 Label 文本、Menu 的文本选中态等场景。
626
+ * @title 二级文本色
627
+ * @type color
628
+ */
629
+ --cw-color-text-secondary: rgba(0, 0, 0, 0.65);
630
+
631
+ /**
632
+ * @desc 第三级文本色一般用于描述性文本,例如表单的中的补充说明文本、列表的描述性文本等场景。
633
+ * @title 三级文本色
634
+ * @type color
635
+ */
636
+ --cw-color-text-tertiary: rgba(0, 0, 0, 0.45);
637
+
638
+ /**
639
+ * @desc 警戒色的深色激活态
640
+ * @title 警戒色的深色激活态
641
+ * @type color
642
+ */
643
+ --cw-color-warning-active: #d48806;
644
+
645
+ /**
646
+ * @desc 警戒色的浅色背景颜色
647
+ * @title 警戒色的浅色背景颜色
648
+ * @type color
649
+ */
650
+ --cw-color-warning-bg: #fffbe6;
651
+
652
+ /**
653
+ * @desc 警戒色的浅色背景色悬浮态
654
+ * @title 警戒色的浅色背景色悬浮态
655
+ * @type color
656
+ */
657
+ --cw-color-warning-bg-hover: #fff1b8;
658
+
659
+ /**
660
+ * @desc 警戒色的描边色
661
+ * @title 警戒色的描边色
662
+ * @type color
663
+ */
664
+ --cw-color-warning-border: #ffe58f;
665
+
666
+ /**
667
+ * @desc 警戒色的描边色悬浮态
668
+ * @title 警戒色的描边色悬浮态
669
+ * @type color
670
+ */
671
+ --cw-color-warning-border-hover: #ffd666;
672
+
673
+ /**
674
+ * @desc 警戒色的深色悬浮态
675
+ * @title 警戒色的深色悬浮态
676
+ * @type color
677
+ */
678
+ --cw-color-warning-hover: #ffd666;
679
+
680
+ /**
681
+ * @desc 警戒色的文本默认态
682
+ * @title 警戒色的文本默认态
683
+ * @type color
684
+ */
685
+ --cw-color-warning-text: #faad14;
686
+
687
+ /**
688
+ * @desc 警戒色的文本激活态
689
+ * @title 警戒色的文本激活态
690
+ * @type color
691
+ */
692
+ --cw-color-warning-text-active: #d48806;
693
+
694
+ /**
695
+ * @desc 警戒色的文本悬浮态
696
+ * @title 警戒色的文本悬浮态
697
+ * @type color
698
+ */
699
+ --cw-color-warning-text-hover: #ffc53d;
700
+
701
+ /**
702
+ * @desc 不随主题变化的纯白色
703
+ * @title 纯白色
704
+ * @type color
705
+ */
706
+ --cw-color-white: #fff;
707
+
708
+ /**
709
+ * @desc 较高的组件高度
710
+ * @title 较高的组件高度
711
+ * @type size
712
+ */
713
+ --cw-control-height-lg: 40px;
714
+
715
+ /**
716
+ * @desc 较小的组件高度
717
+ * @title 较小的组件高度
718
+ * @type size
719
+ */
720
+ --cw-control-height-sm: 24px;
721
+
722
+ /**
723
+ * @desc 更小的组件高度
724
+ * @title 更小的组件高度
725
+ * @type size
726
+ */
727
+ --cw-control-height-xs: 16px;
728
+
729
+ /**
730
+ * @desc H1 标签所使用的字号
731
+ * @title 一级标题字号
732
+ * @type size
733
+ */
734
+ --cw-font-size-heading-1: 38px;
735
+
736
+ /**
737
+ * @desc h2 标签所使用的字号
738
+ * @title 二级标题字号
739
+ * @type size
740
+ */
741
+ --cw-font-size-heading-2: 30px;
742
+
743
+ /**
744
+ * @desc h3 标签使用的字号
745
+ * @title 三级标题字号
746
+ * @type size
747
+ */
748
+ --cw-font-size-heading-3: 24px;
749
+
750
+ /**
751
+ * @desc h4 标签使用的字号
752
+ * @title 四级标题字号
753
+ * @type size
754
+ */
755
+ --cw-font-size-heading-4: 20px;
756
+
757
+ /**
758
+ * @desc h5 标签使用的字号
759
+ * @title 五级标题字号
760
+ * @type size
761
+ */
762
+ --cw-font-size-heading-5: 16px;
763
+
764
+ /**
765
+ * @desc 大号字体大小
766
+ * @type size
767
+ */
768
+ --cw-font-size-lg: 16px;
769
+
770
+ /**
771
+ * @desc 小号字体大小
772
+ * @type size
773
+ */
774
+ --cw-font-size-sm: 12px;
775
+
776
+ /**
777
+ * @desc 超大号字体大小
778
+ * @type size
779
+ */
780
+ --cw-font-size-xl: 20px;
781
+
782
+ /**
783
+ * @desc 文本行高
784
+ * @type input
785
+ */
786
+ --cw-line-height: 1.5714285714285714;
787
+
788
+ /**
789
+ * @desc H1 标签所使用的行高
790
+ * @title 一级标题行高
791
+ * @type input
792
+ */
793
+ --cw-line-height-heading-1: 1.2105263157894737;
794
+
795
+ /**
796
+ * @desc h2 标签所使用的行高
797
+ * @title 二级标题行高
798
+ * @type input
799
+ */
800
+ --cw-line-height-heading-2: 1.2666666666666666;
801
+
802
+ /**
803
+ * @desc h3 标签所使用的行高
804
+ * @title 三级标题行高
805
+ * @type input
806
+ */
807
+ --cw-line-height-heading-3: 1.3333333333333333;
808
+
809
+ /**
810
+ * @desc h4 标签所使用的行高
811
+ * @title 四级标题行高
812
+ * @type input
813
+ */
814
+ --cw-line-height-heading-4: 1.4;
815
+
816
+ /**
817
+ * @desc h5 标签所使用的行高
818
+ * @title 五级标题行高
819
+ * @type input
820
+ */
821
+ --cw-line-height-heading-5: 1.5;
822
+
823
+ /**
824
+ * @desc 大型文本行高
825
+ * @type input
826
+ */
827
+ --cw-line-height-lg: 1.5;
828
+
829
+ /**
830
+ * @desc 小型文本行高
831
+ * @type input
832
+ */
833
+ --cw-line-height-sm: 1.6666666666666667;
834
+
835
+ /**
836
+ * @desc 描边类组件的默认线宽,如 Button、Input、Select 等输入类控件。
837
+ * @title 线宽
838
+ * @type size
839
+ */
840
+ --cw-line-width-bold: 2px;
841
+
842
+ /**
843
+ * @desc 动效播放速度,快速。用于小型元素动画交互
844
+ * @type input
845
+ */
846
+ --cw-motion-duration-fast: 0.1s;
847
+
848
+ /**
849
+ * @desc 动效播放速度,中速。用于中型元素动画交互
850
+ * @type input
851
+ */
852
+ --cw-motion-duration-mid: 0.2s;
853
+
854
+ /**
855
+ * @desc 动效播放速度,慢速。用于大型元素如面板动画交互
856
+ * @type input
857
+ */
858
+ --cw-motion-duration-slow: 0.3s;
859
+
860
+ /**
861
+ * @desc 默认尺寸
862
+ * @title 默认
863
+ * @type size
864
+ */
865
+ --cw-size: 16px;
866
+
867
+ /**
868
+ * @title LG
869
+ * @type size
870
+ */
871
+ --cw-size-lg: 24px;
872
+
873
+ /**
874
+ * @title MD
875
+ * @type size
876
+ */
877
+ --cw-size-md: 20px;
878
+
879
+ /**
880
+ * @type size
881
+ */
882
+ --cw-size-ms: 16px;
883
+
884
+ /**
885
+ * @title SM
886
+ * @type size
887
+ */
888
+ --cw-size-sm: 12px;
889
+
890
+ /**
891
+ * @title XL
892
+ * @type size
893
+ */
894
+ --cw-size-xl: 32px;
895
+
896
+ /**
897
+ * @title XS
898
+ * @type size
899
+ */
900
+ --cw-size-xs: 8px;
901
+
902
+ /**
903
+ * @title XXL
904
+ * @type size
905
+ */
906
+ --cw-size-xxl: 48px;
907
+
908
+ /**
909
+ * @title XXS
910
+ * @type size
911
+ */
912
+ --cw-size-xxs: 4px;
913
+
914
+ /**
915
+ * @desc 控制元素阴影样式。
916
+ * @title 一级阴影
917
+ * @type input
918
+ */
919
+ --cw-box-shadow:
920
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
921
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
922
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
923
+ ;
924
+
925
+ /**
926
+ * @desc 控制元素二级阴影样式。
927
+ * @title 二级阴影
928
+ * @type input
929
+ */
930
+ --cw-box-shadow-secondary:
931
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
932
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
933
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
934
+ ;
935
+
936
+ /**
937
+ * @desc 控制元素三级盒子阴影样式。
938
+ * @title 三级阴影
939
+ * @type input
940
+ */
941
+ --cw-box-shadow-tertiary:
942
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
943
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
944
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
945
+ ;
946
+
947
+ /**
948
+ * @desc 控制容器在禁用状态下的背景色。
949
+ * @title 容器禁用态下的背景色
950
+ * @type color
951
+ */
952
+ --cw-color-bg-container-disabled: var(--cw-color-fill-tertiary);
953
+
954
+ /**
955
+ * @desc 控制文本在激活状态下的背景色。
956
+ * @title 文本激活态背景色
957
+ * @type color
958
+ */
959
+ --cw-color-bg-text-active: var(--cw-color-fill);
960
+
961
+ /**
962
+ * @desc 控制文本在悬停状态下的背景色。
963
+ * @title 文本悬停态背景色
964
+ * @type color
965
+ */
966
+ --cw-color-bg-text-hover: var(--cw-color-fill-secondary);
967
+
968
+ /**
969
+ * @desc 控制元素背景边框的颜色。
970
+ * @title 背景边框颜色
971
+ * @type color
972
+ */
973
+ --cw-color-border-bg: var(--cw-color-bg-container);
974
+
975
+ /**
976
+ * @desc 控制输入组件错误状态下的外轮廓线颜色。
977
+ * @title 错误状态下的 Outline 颜色
978
+ * @type color
979
+ */
980
+ --cw-color-error-outline: rgba(255, 38, 5, 0.06);
981
+
982
+ /**
983
+ * @desc 控制元素替代背景色。
984
+ * @title 替代背景色
985
+ * @type color
986
+ */
987
+ --cw-color-fill-alter: var(--cw-color-fill-quaternary);
988
+
989
+ /**
990
+ * @desc 控制内容区域的背景色。
991
+ * @title 内容区域背景色
992
+ * @type color
993
+ */
994
+ --cw-color-fill-content: var(--cw-color-fill-secondary);
995
+
996
+ /**
997
+ * @desc 控制内容区域背景色在鼠标悬停时的样式。
998
+ * @title 内容区域背景色(悬停)
999
+ * @type color
1000
+ */
1001
+ --cw-color-fill-content-hover: var(--cw-color-fill);
1002
+
1003
+ /**
1004
+ * @desc 控制页面元素高亮时的颜色。
1005
+ * @title 高亮颜色
1006
+ * @type color
1007
+ */
1008
+ --cw-color-highlight: var(--cw-color-error);
1009
+
1010
+ /**
1011
+ * @desc 控制弱操作图标的颜色,例如 allowClear 或 Alert 关闭按钮。
1012
+ *
1013
+ * @title 弱操作图标颜色
1014
+ *
1015
+ * @type color
1016
+ */
1017
+ --cw-color-icon: var(--cw-color-text-tertiary);
1018
+
1019
+ /**
1020
+ * @desc 控制弱操作图标在悬浮状态下的颜色,例如 allowClear 或 Alert 关闭按钮。
1021
+ * @title 弱操作图标悬浮态颜色
1022
+ * @type color
1023
+ */
1024
+ --cw-color-icon-hover: var(--cw-color-text);
1025
+
1026
+ /**
1027
+ * @desc 用于作为分割线的颜色,此颜色和 colorBorderSecondary 的颜色一致,但是用的是透明色。
1028
+ * @title 分割线颜色
1029
+ * @type color
1030
+ */
1031
+ --cw-color-split: rgba(5, 5, 5, 0.06);
1032
+
1033
+ /**
1034
+ * @desc 控制文本描述字体颜色。
1035
+ * @title 文本描述字体颜色
1036
+ * @type color
1037
+ */
1038
+ --cw-color-text-description: var(--cw-color-text-tertiary);
1039
+
1040
+ /**
1041
+ * @desc 控制禁用状态下的字体颜色。
1042
+ * @title 禁用字体颜色
1043
+ * @type color
1044
+ */
1045
+ --cw-color-text-disabled: var(--cw-color-text-quaternary);
1046
+
1047
+ /**
1048
+ * @desc 控制标题字体颜色。
1049
+ * @title 标题字体颜色
1050
+ * @type color
1051
+ */
1052
+ --cw-color-text-heading: var(--cw-color-text);
1053
+
1054
+ /**
1055
+ * @desc 控制文本标签字体颜色。
1056
+ * @title 文本标签字体颜色
1057
+ * @type color
1058
+ */
1059
+ --cw-color-text-label: var(--cw-color-text-secondary);
1060
+
1061
+ /**
1062
+ * @desc 控制带背景色的文本,例如 Primary Button 组件中的文本高亮颜色。
1063
+ * @title 固定文本高亮颜色
1064
+ * @type color
1065
+ */
1066
+ --cw-color-text-light-solid: var(--cw-color-white);
1067
+
1068
+ /**
1069
+ * @desc 控制占位文本的颜色。
1070
+ * @title 占位文本颜色
1071
+ * @type color
1072
+ */
1073
+ --cw-color-text-placeholder: var(--cw-color-text-quaternary);
1074
+
1075
+ /**
1076
+ * @desc 控制输入组件警告状态下的外轮廓线颜色。
1077
+ * @title 警告状态下的 Outline 颜色
1078
+ * @type color
1079
+ */
1080
+ --cw-color-warning-outline: rgba(255, 215, 5, 0.1);
1081
+
1082
+ /**
1083
+ * @desc 控制组件的交互大小。
1084
+ * @title 控制组件的交互大小
1085
+ * @type size
1086
+ */
1087
+ --cw-control-interactive-size: calc(var(--cw-control-height) / 2);
1088
+
1089
+ /**
1090
+ * @desc 控制组件项在激活状态下的背景颜色。
1091
+ * @title 控制组件项在激活状态下的背景颜色
1092
+ * @type color
1093
+ */
1094
+ --cw-control-item-bg-active: var(--cw-color-primary-bg);
1095
+
1096
+ /**
1097
+ * @desc 控制组件项在禁用状态下的激活背景颜色。
1098
+ * @title 控制组件项在禁用状态下的激活背景颜色
1099
+ * @type color
1100
+ */
1101
+ --cw-control-item-bg-active-disabled: var(--cw-color-fill);
1102
+
1103
+ /**
1104
+ * @desc 控制组件项在鼠标悬浮且激活状态下的背景颜色。
1105
+ * @title 控制组件项在鼠标悬浮且激活状态下的背景颜色
1106
+ * @type color
1107
+ */
1108
+ --cw-control-item-bg-active-hover: var(--cw-color-primary-bg-hover);
1109
+
1110
+ /**
1111
+ * @desc 控制组件项在鼠标悬浮时的背景颜色。
1112
+ * @title 控制组件项在鼠标悬浮时的背景颜色
1113
+ * @type color
1114
+ */
1115
+ --cw-control-item-bg-hover: var(--cw-color-fill-tertiary);
1116
+
1117
+ /**
1118
+ * @desc 控制输入组件的外轮廓线颜色。
1119
+ * @title 输入组件的 Outline 颜色
1120
+ * @type color
1121
+ */
1122
+ --cw-control-outline: rgba(5, 145, 255, 0.1);
1123
+
1124
+ /**
1125
+ * @desc 控制输入组件的外轮廓线宽度。
1126
+ * @title 输入组件的外轮廓线宽度
1127
+ * @type size
1128
+ */
1129
+ --cw-control-outline-width: calc(var(--cw-line-width) * 2);
1130
+
1131
+ /**
1132
+ * @desc 控制元素水平内间距。
1133
+ * @title 控制水平内间距
1134
+ * @type size
1135
+ */
1136
+ --cw-control-padding-horizontal: 12px;
1137
+
1138
+ /**
1139
+ * @desc 控制元素中小尺寸水平内间距。
1140
+ * @title 控制中小尺寸水平内间距
1141
+ * @type size
1142
+ */
1143
+ --cw-control-padding-horizontal-sm: 8px;
1144
+
1145
+ /**
1146
+ * @desc 控制选择器、级联选择器等中的操作图标字体大小。正常情况下与 fontSizeSM 相同。
1147
+ * @title 选择器、级联选择器等中的操作图标字体大小
1148
+ * @type size
1149
+ */
1150
+ --cw-font-size-icon: var(--cw-font-size-sm);
1151
+
1152
+ /**
1153
+ * @desc 控制标题类组件(如 h1、h2、h3)或选中项的字体粗细。
1154
+ * @title 标题类组件(如 h1、h2、h3)或选中项的字体粗细
1155
+ * @type input
1156
+ */
1157
+ --cw-font-weight-strong: 600;
1158
+
1159
+ /**
1160
+ * @desc 控制线条的宽度,当组件处于聚焦态时。
1161
+ * @title 线条宽度(聚焦态)
1162
+ * @type size
1163
+ */
1164
+ --cw-line-width-focus: calc(var(--cw-line-width) * 4);
1165
+
1166
+ /**
1167
+ * @desc 控制链接文本的装饰样式。
1168
+ * @title 链接文本装饰
1169
+ * @type input
1170
+ */
1171
+ --cw-link-decoration: none;
1172
+
1173
+ /**
1174
+ * @desc 控制链接聚焦时文本的装饰样式。
1175
+ * @title 链接聚焦时文本装饰
1176
+ * @type input
1177
+ */
1178
+ --cw-link-focus-decoration: none;
1179
+
1180
+ /**
1181
+ * @desc 控制链接鼠标悬浮时文本的装饰样式。
1182
+ * @title 链接鼠标悬浮时文本装饰
1183
+ * @type input
1184
+ */
1185
+ --cw-link-hover-decoration: none;
1186
+
1187
+ /**
1188
+ * @desc 控制元素外边距,中等尺寸。
1189
+ * @title 外边距
1190
+ * @type size
1191
+ */
1192
+ --cw-margin: var(--cw-size);
1193
+
1194
+ /**
1195
+ * @desc 控制元素外边距,大尺寸。
1196
+ * @title 外边距 LG
1197
+ * @type size
1198
+ */
1199
+ --cw-margin-lg: var(--cw-size-lg);
1200
+
1201
+ /**
1202
+ * @desc 控制元素外边距,中大尺寸。
1203
+ * @title 外边距 MD
1204
+ * @type size
1205
+ */
1206
+ --cw-margin-md: var(--cw-size-md);
1207
+
1208
+ /**
1209
+ * @desc 控制元素外边距,中小尺寸。
1210
+ * @title 外边距 SM
1211
+ * @type size
1212
+ */
1213
+ --cw-margin-sm: var(--cw-size-sm);
1214
+
1215
+ /**
1216
+ * @desc 控制元素外边距,超大尺寸。
1217
+ * @title 外边距 XL
1218
+ * @type size
1219
+ */
1220
+ --cw-margin-xl: var(--cw-size-xl);
1221
+
1222
+ /**
1223
+ * @desc 控制元素外边距,小尺寸。
1224
+ * @title 外边距 XS
1225
+ * @type size
1226
+ */
1227
+ --cw-margin-xs: var(--cw-size-xs);
1228
+
1229
+ /**
1230
+ * @desc 控制元素外边距,最大尺寸。
1231
+ * @title 外边距 XXL
1232
+ * @type size
1233
+ */
1234
+ --cw-margin-xxl: var(--cw-size-xxl);
1235
+
1236
+ /**
1237
+ * @desc 控制元素外边距,最小尺寸。
1238
+ * @title 外边距 XXS
1239
+ * @type size
1240
+ */
1241
+ --cw-margin-xxs: var(--cw-size-xxs);
1242
+
1243
+ /**
1244
+ * @desc 控制加载状态的透明度。
1245
+ * @title 加载状态透明度
1246
+ * @type input
1247
+ */
1248
+ --cw-opacity-loading: 0.65;
1249
+
1250
+ /**
1251
+ * @desc 控制元素的内间距。
1252
+ * @title 内间距
1253
+ * @type size
1254
+ */
1255
+ --cw-padding: var(--cw-size);
1256
+
1257
+ /**
1258
+ * @desc 控制内容元素水平内间距。
1259
+ * @title 内容水平内间距
1260
+ * @type size
1261
+ */
1262
+ --cw-padding-content-horizontal: var(--cw-size-ms);
1263
+
1264
+ /**
1265
+ * @desc 控制内容元素水平内间距,适用于大屏幕设备。
1266
+ * @title 内容水平内间距(LG)
1267
+ * @type size
1268
+ */
1269
+ --cw-padding-content-horizontal-lg: var(--cw-size-lg);
1270
+
1271
+ /**
1272
+ * @desc 控制内容元素水平内间距,适用于小屏幕设备。
1273
+ * @title 内容水平内间距(SM)
1274
+ * @type size
1275
+ */
1276
+ --cw-padding-content-horizontal-sm: var(--cw-size);
1277
+
1278
+ /**
1279
+ * @desc 控制内容元素垂直内间距。
1280
+ * @title 内容垂直内间距
1281
+ * @type size
1282
+ */
1283
+ --cw-padding-content-vertical: var(--cw-size-sm);
1284
+
1285
+ /**
1286
+ * @desc 控制内容元素垂直内间距,适用于大屏幕设备。
1287
+ * @title 内容垂直内间距(LG)
1288
+ * @type size
1289
+ */
1290
+ --cw-padding-content-vertical-lg: var(--cw-size-ms);
1291
+
1292
+ /**
1293
+ * @desc 控制内容元素垂直内间距,适用于小屏幕设备。
1294
+ * @title 内容垂直内间距(SM)
1295
+ * @type size
1296
+ */
1297
+ --cw-padding-content-vertical-sm: var(--cw-size-xs);
1298
+
1299
+ /**
1300
+ * @desc 控制元素的大内间距。
1301
+ * @title 大内间距
1302
+ * @type size
1303
+ */
1304
+ --cw-padding-lg: var(--cw-size-lg);
1305
+
1306
+ /**
1307
+ * @desc 控制元素的中等内间距。
1308
+ * @title 中等内间距
1309
+ * @type size
1310
+ */
1311
+ --cw-padding-md: var(--cw-size-md);
1312
+
1313
+ /**
1314
+ * @desc 控制元素的小内间距。
1315
+ * @title 小内间距
1316
+ * @type size
1317
+ */
1318
+ --cw-padding-sm: var(--cw-size-sm);
1319
+
1320
+ /**
1321
+ * @desc 控制元素的特大内间距。
1322
+ * @title 特大内间距
1323
+ * @type size
1324
+ */
1325
+ --cw-padding-xl: var(--cw-size-xl);
1326
+
1327
+ /**
1328
+ * @desc 控制元素的特小内间距。
1329
+ * @title 特小内间距
1330
+ * @type size
1331
+ */
1332
+ --cw-padding-xs: var(--cw-size-xs);
1333
+
1334
+ /**
1335
+ * @desc 控制元素的极小内间距。
1336
+ * @title 极小内间距
1337
+ * @type size
1338
+ */
1339
+ --cw-padding-xxs: var(--cw-size-xxs);
1340
+
1341
+ /**
1342
+ * @desc 控制大屏幕的屏幕宽度。
1343
+ * @title 屏幕宽度(像素) - 大屏幕
1344
+ * @type size
1345
+ */
1346
+ --cw-screen-lg: 992px;
1347
+
1348
+ /**
1349
+ * @desc 控制大屏幕的最大宽度。
1350
+ * @title 屏幕宽度(像素) - 大屏幕最大值
1351
+ * @type size
1352
+ */
1353
+ --cw-screen-lg-max: 1199px;
1354
+
1355
+ /**
1356
+ * @desc 控制大屏幕的最小宽度。
1357
+ * @title 屏幕宽度(像素) - 大屏幕最小值
1358
+ * @type size
1359
+ */
1360
+ --cw-screen-lg-min: 992px;
1361
+
1362
+ /**
1363
+ * @desc 控制中等屏幕的屏幕宽度。
1364
+ * @title 屏幕宽度(像素) - 中等屏幕
1365
+ * @type size
1366
+ */
1367
+ --cw-screen-md: 768px;
1368
+
1369
+ /**
1370
+ * @desc 控制中等屏幕的最大宽度。
1371
+ * @title 屏幕宽度(像素) - 中等屏幕最大值
1372
+ * @type size
1373
+ */
1374
+ --cw-screen-md-max: 991px;
1375
+
1376
+ /**
1377
+ * @desc 控制中等屏幕的最小宽度。
1378
+ * @title 屏幕宽度(像素) - 中等屏幕最小值
1379
+ * @type size
1380
+ */
1381
+ --cw-screen-md-min: 768px;
1382
+
1383
+ /**
1384
+ * @desc 控制小屏幕的屏幕宽度。
1385
+ * @title 屏幕宽度(像素) - 小屏幕
1386
+ * @type size
1387
+ */
1388
+ --cw-screen-sm: 576px;
1389
+
1390
+ /**
1391
+ * @desc 控制小屏幕的最大宽度。
1392
+ * @title 屏幕宽度(像素) - 小屏幕最大值
1393
+ * @type size
1394
+ */
1395
+ --cw-screen-sm-max: 767px;
1396
+
1397
+ /**
1398
+ * @desc 控制小屏幕的最小宽度。
1399
+ * @title 屏幕宽度(像素) - 小屏幕最小值
1400
+ * @type size
1401
+ */
1402
+ --cw-screen-sm-min: 576px;
1403
+
1404
+ /**
1405
+ * @desc 控制超大屏幕的屏幕宽度。
1406
+ * @title 屏幕宽度(像素) - 超大屏幕
1407
+ * @type size
1408
+ */
1409
+ --cw-screen-xl: 1200px;
1410
+
1411
+ /**
1412
+ * @desc 控制超大屏幕的最大宽度。
1413
+ * @title 屏幕宽度(像素) - 超大屏幕最大值
1414
+ * @type size
1415
+ */
1416
+ --cw-screen-xl-max: 1599px;
1417
+
1418
+ /**
1419
+ * @desc 控制超大屏幕的最小宽度。
1420
+ * @title 屏幕宽度(像素) - 超大屏幕最小值
1421
+ * @type size
1422
+ */
1423
+ --cw-screen-xl-min: 1200px;
1424
+
1425
+ /**
1426
+ * @desc 控制超小屏幕的屏幕宽度。
1427
+ * @title 屏幕宽度(像素) - 超小屏幕
1428
+ * @type size
1429
+ */
1430
+ --cw-screen-xs: 480px;
1431
+
1432
+ /**
1433
+ * @desc 控制超小屏幕的最大宽度。
1434
+ * @title 屏幕宽度(像素) - 超小屏幕最大值
1435
+ * @type size
1436
+ */
1437
+ --cw-screen-xs-max: 575px;
1438
+
1439
+ /**
1440
+ * @desc 控制超小屏幕的最小宽度。
1441
+ * @title 屏幕宽度(像素) - 超小屏幕最小值
1442
+ * @type size
1443
+ */
1444
+ --cw-screen-xs-min: 480px;
1445
+
1446
+ /**
1447
+ * @desc 控制超超大屏幕的屏幕宽度。
1448
+ * @title 屏幕宽度(像素) - 超超大屏幕
1449
+ * @type size
1450
+ */
1451
+ --cw-screen-xxl: 1600px;
1452
+
1453
+ /**
1454
+ * @desc 控制超超大屏幕的最小宽度。
1455
+ * @title 屏幕宽度(像素) - 超超大屏幕最小值
1456
+ * @type size
1457
+ */
1458
+ --cw-screen-xxl-min: 1600px;
1459
+ }
1460
+ ```
1461
+
1462
+ ## 在 `.storybook/preview.js` 文件中导入全局变量
1463
+
1464
+ ```js
1465
+ import './vars.css';
1466
+
1467
+ // ......
1468
+ ```
1469
+
1470
+ 完成后就可以在组件中使用以上的全局 css 变量