hc-basic 1.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.
- package/.browserslistrc +2 -0
- package/.editorconfig +5 -0
- package/.prettierrc +17 -0
- package/README.md +52 -0
- package/babel.config.js +5 -0
- package/lib/hc-basic.css +1 -0
- package/lib/hc-basic.umd.min.js +33 -0
- package/package.json +83 -0
- package/scss/_basicConfig.scss +217 -0
- package/scss/_config.scss +39 -0
- package/scss/_element-variables.scss +1020 -0
- package/scss/common/_components.scss +149 -0
- package/scss/common/_flex.scss +94 -0
- package/scss/common/_reset.scss +141 -0
- package/scss/common/index.scss +394 -0
- package/scss/index.scss +5 -0
- package/scss/theme.css +13139 -0
- package/vue.config.js +42 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/* TODO: Flex布局样式******Start****** */
|
|
2
|
+
@import 'flex';
|
|
3
|
+
/* TODO: Flex布局样式******End****** */
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* TODO: 背景样式******Start******
|
|
7
|
+
* class样式生成示例
|
|
8
|
+
* bg-default、bg-primary。。。
|
|
9
|
+
*/
|
|
10
|
+
@for $i from 1 through length($bgList) {
|
|
11
|
+
$item: nth($bgList, $i);
|
|
12
|
+
.bg-#{map-get($item, name)} {
|
|
13
|
+
background-color: #{map-get($item, value)};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/* TODO: 背景样式******End****** */
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* TODO: 边框样式******Start******
|
|
20
|
+
* class样式生成示例
|
|
21
|
+
* border、border-left、border-left-0
|
|
22
|
+
*/
|
|
23
|
+
@for $i from 1 through length($borderList) {
|
|
24
|
+
$item: nth($borderList, $i);
|
|
25
|
+
@for $index from 1 through length($borderDirections) {
|
|
26
|
+
$items: nth($borderDirections, $index);
|
|
27
|
+
.border-#{$items}#{map-get($item, name)} {
|
|
28
|
+
border-#{$items}: map-get($item, value);
|
|
29
|
+
}
|
|
30
|
+
.border#{map-get($item, name)} {
|
|
31
|
+
border: map-get($item, value);
|
|
32
|
+
}
|
|
33
|
+
.border-#{$items}#{map-get($item, name)}-none {
|
|
34
|
+
border: map-get($item, value);
|
|
35
|
+
border-#{$items}: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/*
|
|
40
|
+
* border:
|
|
41
|
+
* border-0 => border-none
|
|
42
|
+
* border-radius开头 => radius
|
|
43
|
+
*/
|
|
44
|
+
.border {
|
|
45
|
+
border: $borderBase;
|
|
46
|
+
}
|
|
47
|
+
.border-none {
|
|
48
|
+
border: none;
|
|
49
|
+
}
|
|
50
|
+
.radius-none {
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
}
|
|
53
|
+
.radius-2 {
|
|
54
|
+
border-radius: $--border-radius-base-hc / 2;
|
|
55
|
+
}
|
|
56
|
+
.radius {
|
|
57
|
+
border-radius: $--border-radius-base-hc;
|
|
58
|
+
}
|
|
59
|
+
.radius-circle {
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
}
|
|
62
|
+
.radius-top {
|
|
63
|
+
border-top-left-radius: $--border-radius-base-hc;
|
|
64
|
+
border-top-right-radius: $--border-radius-base-hc;
|
|
65
|
+
}
|
|
66
|
+
.radius-left {
|
|
67
|
+
border-top-left-radius: $--border-radius-base-hc;
|
|
68
|
+
border-bottom-left-radius: $--border-radius-base-hc;
|
|
69
|
+
}
|
|
70
|
+
.radius-right {
|
|
71
|
+
border-top-right-radius: $--border-radius-base-hc;
|
|
72
|
+
border-bottom-right-radius: $--border-radius-base-hc;
|
|
73
|
+
}
|
|
74
|
+
.radius-bottom {
|
|
75
|
+
border-bottom-right-radius: $--border-radius-base-hc;
|
|
76
|
+
border-bottom-left-radius: $--border-radius-base-hc;
|
|
77
|
+
}
|
|
78
|
+
/* TODO: 边框样式******End****** */
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* TODO: 栅格布局、宽高样式******Start******
|
|
82
|
+
* class样式生成示例
|
|
83
|
+
* col-1、col-2。。。
|
|
84
|
+
*/
|
|
85
|
+
@for $i from 1 through $colMax {
|
|
86
|
+
.col-#{$i} {
|
|
87
|
+
width: percentage(1/24 * $i);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@for $i from 1 through $colMax {
|
|
91
|
+
.offset-#{$i} {
|
|
92
|
+
margin-left: percentage(1/24 * $i);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.w-100 {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.h-100 {
|
|
101
|
+
height: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* TODO: 栅格布局、宽高样式******End****** */
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* TODO: 鼠标指针样式******Start******
|
|
108
|
+
* class样式生成示例
|
|
109
|
+
* cursor-pointer、cursor-wait。。。
|
|
110
|
+
*/
|
|
111
|
+
// 鼠标指针情况 $params=>鼠标形状
|
|
112
|
+
@for $i from 1 through length($cursorList) {
|
|
113
|
+
$item: nth($cursorList, $i);
|
|
114
|
+
.cursor-#{$item} {
|
|
115
|
+
cursor: $item;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/* TODO: 鼠标指针样式******End****** */
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* TODO: Display样式******Start******
|
|
122
|
+
* class样式生成示例
|
|
123
|
+
* d-none、d-flex。。。
|
|
124
|
+
*/
|
|
125
|
+
// display 显示方式
|
|
126
|
+
@for $i from 1 through length($displayList) {
|
|
127
|
+
$item: nth($displayList, $i);
|
|
128
|
+
.d-#{$item} {
|
|
129
|
+
display: $item;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/* TODO: Display样式******End****** */
|
|
133
|
+
|
|
134
|
+
/* TODO: 浮动样式******Start****** */
|
|
135
|
+
/*
|
|
136
|
+
* class样式生成示例
|
|
137
|
+
* float-left、float-right。。。
|
|
138
|
+
*/
|
|
139
|
+
// float 显示方式
|
|
140
|
+
@for $i from 1 through length($floatList) {
|
|
141
|
+
$item: nth($floatList, $i);
|
|
142
|
+
.float-#{$item} {
|
|
143
|
+
float: $item;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
.clearfix {
|
|
147
|
+
clear: both;
|
|
148
|
+
}
|
|
149
|
+
/* TODO: 浮动样式******End****** */
|
|
150
|
+
|
|
151
|
+
/*
|
|
152
|
+
* TODO: 定位样式******Start******
|
|
153
|
+
* class样式生成示例
|
|
154
|
+
* .relative、.absolute。。。
|
|
155
|
+
*/
|
|
156
|
+
// position 显示方式
|
|
157
|
+
@for $i from 1 through length($positionList) {
|
|
158
|
+
$item: nth($positionList, $i);
|
|
159
|
+
.#{$item} {
|
|
160
|
+
position: $item;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// 占据父元素的100%
|
|
164
|
+
.absolute-all {
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 0;
|
|
167
|
+
right: 0;
|
|
168
|
+
bottom: 0;
|
|
169
|
+
left: 0;
|
|
170
|
+
}
|
|
171
|
+
// 与父元素保持同等宽高
|
|
172
|
+
.absolute-y {
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 0;
|
|
175
|
+
bottom: 0;
|
|
176
|
+
}
|
|
177
|
+
/* TODO: 定位样式******End****** */
|
|
178
|
+
|
|
179
|
+
/* TODO: 边距样式******Start****** */
|
|
180
|
+
/* 该文件用于padding和margin边距集合公共class */
|
|
181
|
+
// margin: n * 4 px 显示方式, $max=> $sideBasic的最大倍数
|
|
182
|
+
/*
|
|
183
|
+
* class样式生成示例
|
|
184
|
+
* m-4、mx-4、mr-4。。。
|
|
185
|
+
* p-4、px-4、pr-4。。。
|
|
186
|
+
*/
|
|
187
|
+
@for $i from 0 through $spaceMax {
|
|
188
|
+
.m-#{$i * $sideBasic} {
|
|
189
|
+
margin: $i * $sideBasic + px;
|
|
190
|
+
}
|
|
191
|
+
.mx-#{$i * $sideBasic} {
|
|
192
|
+
margin-left: $i * $sideBasic + px;
|
|
193
|
+
margin-right: $i * $sideBasic + px;
|
|
194
|
+
}
|
|
195
|
+
.my-#{$i * $sideBasic} {
|
|
196
|
+
margin-top: $i * $sideBasic + px;
|
|
197
|
+
margin-bottom: $i * $sideBasic + px;
|
|
198
|
+
}
|
|
199
|
+
.mt-#{$i * $sideBasic} {
|
|
200
|
+
margin-top: $i * $sideBasic + px;
|
|
201
|
+
}
|
|
202
|
+
.mr-#{$i * $sideBasic} {
|
|
203
|
+
margin-right: $i * $sideBasic + px;
|
|
204
|
+
}
|
|
205
|
+
.mb-#{$i * $sideBasic} {
|
|
206
|
+
margin-bottom: $i * $sideBasic + px;
|
|
207
|
+
}
|
|
208
|
+
.ml-#{$i * $sideBasic} {
|
|
209
|
+
margin-left: $i * $sideBasic + px;
|
|
210
|
+
}
|
|
211
|
+
.p-#{$i * $sideBasic} {
|
|
212
|
+
padding: $i * $sideBasic + px;
|
|
213
|
+
}
|
|
214
|
+
.px-#{$i * $sideBasic} {
|
|
215
|
+
padding-left: $i * $sideBasic + px;
|
|
216
|
+
padding-right: $i * $sideBasic + px;
|
|
217
|
+
}
|
|
218
|
+
.py-#{$i * $sideBasic} {
|
|
219
|
+
padding-top: $i * $sideBasic + px;
|
|
220
|
+
padding-bottom: $i * $sideBasic + px;
|
|
221
|
+
}
|
|
222
|
+
.pt-#{$i * $sideBasic} {
|
|
223
|
+
padding-top: $i * $sideBasic + px;
|
|
224
|
+
}
|
|
225
|
+
.pr-#{$i * $sideBasic} {
|
|
226
|
+
padding-right: $i * $sideBasic + px;
|
|
227
|
+
}
|
|
228
|
+
.pb-#{$i * $sideBasic} {
|
|
229
|
+
padding-bottom: $i * $sideBasic + px;
|
|
230
|
+
}
|
|
231
|
+
.pl-#{$i * $sideBasic} {
|
|
232
|
+
padding-left: $i * $sideBasic + px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/* TODO: 边距样式******End****** */
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
* TODO: 字体******Start******
|
|
239
|
+
* class样式生成示例
|
|
240
|
+
* font-12、font-24。。。
|
|
241
|
+
* line-height-12、line-height-24。。。
|
|
242
|
+
*/
|
|
243
|
+
.line-height-none {
|
|
244
|
+
line-height: normal; // 1
|
|
245
|
+
}
|
|
246
|
+
/*
|
|
247
|
+
* class样式生成示例
|
|
248
|
+
* text-12、text-14。。。
|
|
249
|
+
*/
|
|
250
|
+
@for $i from 1 through length($textList) {
|
|
251
|
+
$item: nth($textList, $i);
|
|
252
|
+
.text-#{map-get($item, size)} {
|
|
253
|
+
font-size: #{map-get($item, size)}px;
|
|
254
|
+
line-height: #{map-get($item, line)}px;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/*
|
|
258
|
+
* class样式生成示例
|
|
259
|
+
* color-default、color-primary。。。
|
|
260
|
+
*/
|
|
261
|
+
@for $i from 1 through length($textColor) {
|
|
262
|
+
$item: nth($textColor, $i);
|
|
263
|
+
.color-#{map-get($item, name)} {
|
|
264
|
+
color: #{map-get($item, value)};
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// 去除文字字重
|
|
269
|
+
.fw-none {
|
|
270
|
+
font-weight: normal;
|
|
271
|
+
}
|
|
272
|
+
// 文字字重
|
|
273
|
+
.fw-bold {
|
|
274
|
+
font-weight: bold;
|
|
275
|
+
}
|
|
276
|
+
// 文字字重500
|
|
277
|
+
.fw-500 {
|
|
278
|
+
font-weight: 500;
|
|
279
|
+
}
|
|
280
|
+
// 文字字重400
|
|
281
|
+
.fw-400 {
|
|
282
|
+
font-weight: 400;
|
|
283
|
+
}
|
|
284
|
+
/* TODO: 字体样式******End****** */
|
|
285
|
+
|
|
286
|
+
/* TODO: 阴影样式******Start****** */
|
|
287
|
+
.shadow-basic {
|
|
288
|
+
box-shadow: 0px 1px 5px 0px rgba(45, 47, 51, 0.1);
|
|
289
|
+
}
|
|
290
|
+
.shadow-raised {
|
|
291
|
+
box-shadow: 0px 6px 18px 0px rgba(45, 47, 51, 0.14);
|
|
292
|
+
}
|
|
293
|
+
.shadow-overlay {
|
|
294
|
+
box-shadow: 0px 10px 32px 0px rgba(45, 47, 51, 0.18);
|
|
295
|
+
}
|
|
296
|
+
.shadow-pop {
|
|
297
|
+
box-shadow: 0px 12px 42px 0px rgba(45, 47, 51, 0.24);
|
|
298
|
+
}
|
|
299
|
+
/* TODO: 阴影样式******End****** */
|
|
300
|
+
|
|
301
|
+
.overflow-auto {
|
|
302
|
+
overflow: auto;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.overflow-hidden {
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// 文字不换行
|
|
310
|
+
.white-space-nowrap {
|
|
311
|
+
white-space: nowrap;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// 文字超出一行隐藏
|
|
315
|
+
.text-ellipsis {
|
|
316
|
+
overflow: hidden;
|
|
317
|
+
text-overflow: ellipsis;
|
|
318
|
+
white-space: nowrap;
|
|
319
|
+
}
|
|
320
|
+
// 文字超出2行隐藏
|
|
321
|
+
.text-ellipsis-2 {
|
|
322
|
+
display: -webkit-box;
|
|
323
|
+
-webkit-box-orient: vertical;
|
|
324
|
+
-webkit-line-clamp: 2;
|
|
325
|
+
overflow: hidden;
|
|
326
|
+
}
|
|
327
|
+
// 文字超出3行隐藏
|
|
328
|
+
.text-ellipsis-3 {
|
|
329
|
+
display: -webkit-box;
|
|
330
|
+
-webkit-box-orient: vertical;
|
|
331
|
+
-webkit-line-clamp: 3;
|
|
332
|
+
overflow: hidden;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.border-box {
|
|
336
|
+
box-sizing: border-box;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// TODO: 大版本删除
|
|
340
|
+
|
|
341
|
+
// 文字超出一行隐藏
|
|
342
|
+
.text-overflow-ellipsis {
|
|
343
|
+
overflow: hidden;
|
|
344
|
+
text-overflow: ellipsis;
|
|
345
|
+
white-space: nowrap;
|
|
346
|
+
}
|
|
347
|
+
// 文字超出2行隐藏
|
|
348
|
+
.text-overflow-ellipsis-2 {
|
|
349
|
+
display: -webkit-box;
|
|
350
|
+
-webkit-box-orient: vertical;
|
|
351
|
+
-webkit-line-clamp: 2;
|
|
352
|
+
overflow: hidden;
|
|
353
|
+
}
|
|
354
|
+
// 文字超出3行隐藏
|
|
355
|
+
.text-overflow-ellipsis-3 {
|
|
356
|
+
display: -webkit-box;
|
|
357
|
+
-webkit-box-orient: vertical;
|
|
358
|
+
-webkit-line-clamp: 3;
|
|
359
|
+
overflow: hidden;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// 文字字重
|
|
363
|
+
.font-weight-lighter {
|
|
364
|
+
font-weight: lighter;
|
|
365
|
+
}
|
|
366
|
+
// 去除文字字重
|
|
367
|
+
.font-weight-normal {
|
|
368
|
+
font-weight: normal;
|
|
369
|
+
}
|
|
370
|
+
// 文字字重
|
|
371
|
+
.font-weight-bold {
|
|
372
|
+
font-weight: bold;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
//滚动条样式设置
|
|
376
|
+
.noScroll::-webkit-scrollbar {
|
|
377
|
+
width: 0px;
|
|
378
|
+
height: 0px;
|
|
379
|
+
background-color: transparent;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/*定义滚动条轨道 内阴影+圆角*/
|
|
383
|
+
.noScroll::-webkit-scrollbar-track {
|
|
384
|
+
-webkit-box-shadow: inset 0 0 6px transparent;
|
|
385
|
+
border-radius: 0;
|
|
386
|
+
background-color: transparent;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/*定义滑块 内阴影+圆角*/
|
|
390
|
+
.noScroll::-webkit-scrollbar-thumb {
|
|
391
|
+
border-radius: 0;
|
|
392
|
+
-webkit-box-shadow: inset 0 0 6px transparent;
|
|
393
|
+
background-color: transparent;
|
|
394
|
+
}
|