oeos-components 0.4.6 → 0.4.7

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.
@@ -0,0 +1,497 @@
1
+ @import './tokens.scss';
2
+ @each $cl, $clVar in blue var(--blue), blue2 var(--blue2), 85 var(--85), 65 var(--65), 45 var(--45), black var(--black),
3
+ white var(--white), red var(--red), red2 var(--red2), yellow var(--yellow), yellow2 var(--yellow2), green var(--green),
4
+ green2 var(--green2), gray var(--gray), gray2 var(--gray2), line var(--line)
5
+ {
6
+ .cl-#{'' + $cl} {
7
+ color: $clVar;
8
+ }
9
+ .bg-#{'' + $cl} {
10
+ background: $clVar;
11
+ }
12
+ }
13
+
14
+ // 定义flex等分
15
+ @for $num from 0 through 24 {
16
+ .flex-#{$num},
17
+ .f-#{$num} {
18
+ flex: $num;
19
+ }
20
+ .o-#{$num} {
21
+ opacity: $num * 0.1;
22
+ }
23
+ @each $short, $long in p padding, m margin, h height, lh line-height {
24
+ .#{$short}#{'' + $num} {
25
+ #{$long}: $num * 8px;
26
+ }
27
+ @if ($short == p or $short == m) {
28
+ .#{$short}t#{'' + $num} {
29
+ #{$long}-top: $num * 8px;
30
+ }
31
+ .#{$short}r#{'' + $num} {
32
+ #{$long}-right: $num * 8px;
33
+ }
34
+ .#{$short}b#{'' + $num} {
35
+ #{$long}-bottom: $num * 8px;
36
+ }
37
+ .#{$short}l#{'' + $num} {
38
+ #{$long}-left: $num * 8px;
39
+ }
40
+ .#{$short}lr#{'' + $num} {
41
+ #{$long}-left: $num * 8px;
42
+ #{$long}-right: $num * 8px;
43
+ }
44
+ .#{$short}tb#{'' + $num} {
45
+ #{$long}-top: $num * 8px;
46
+ #{$long}-bottom: $num * 8px;
47
+ }
48
+ .#{$short}t {
49
+ #{$long}-top: 8px;
50
+ }
51
+ .#{$short}r {
52
+ #{$long}-right: 8px;
53
+ }
54
+ .#{$short}b {
55
+ #{$long}-bottom: 8px;
56
+ }
57
+ .#{$short}l {
58
+ #{$long}-left: 8px;
59
+ }
60
+ .#{$short}lr {
61
+ #{$long}-left: 8px;
62
+ #{$long}-right: 8px;
63
+ }
64
+ .#{$short}tb {
65
+ #{$long}-top: 8px;
66
+ #{$long}-bottom: 8px;
67
+ }
68
+ }
69
+ }
70
+ }
71
+ .p {
72
+ padding: 8px;
73
+ }
74
+ .m {
75
+ margin: 8px;
76
+ }
77
+
78
+ @for $index from -100 through 100 {
79
+ .ft-#{$index},
80
+ .fs-#{$index} {
81
+ font-size: $index + px;
82
+ }
83
+
84
+ .w-#{$index} {
85
+ width: $index + px;
86
+ }
87
+ .h-#{$index} {
88
+ height: $index + px;
89
+ }
90
+ .h-#{$index}\% {
91
+ height: $index * 1%;
92
+ }
93
+ .w-#{$index}\% {
94
+ width: $index * 1%;
95
+ }
96
+ .m-h-#{$index}\% {
97
+ min-height: $index * 1%;
98
+ }
99
+ .m-w-#{$index}\% {
100
+ min-width: $index * 1%;
101
+ }
102
+ .br-#{$index}\% {
103
+ border-radius: $index * 1%;
104
+ }
105
+ .l-h-#{$index}\% {
106
+ line-height: $index * 1%;
107
+ }
108
+ .l-h-#{$index} {
109
+ line-height: $index + px;
110
+ }
111
+ .br-#{$index} {
112
+ border-radius: $index + px;
113
+ }
114
+ .m-h-#{$index} {
115
+ min-height: $index + px;
116
+ }
117
+ .m-w-#{$index} {
118
+ min-width: $index + px;
119
+ }
120
+
121
+ // 缩写版,结果如: m-l-30
122
+ // 定义外边距
123
+ .m-#{$index} {
124
+ margin: $index + px;
125
+ }
126
+ .m-l-#{$index} {
127
+ margin-left: $index + px;
128
+ }
129
+ .m-t-#{$index} {
130
+ margin-top: $index + px;
131
+ }
132
+ .m-r-#{$index} {
133
+ margin-right: $index + px;
134
+ }
135
+ .m-b-#{$index} {
136
+ margin-bottom: $index + px;
137
+ }
138
+ .m-lr-#{$index} {
139
+ margin-left: $index + px;
140
+ margin-right: $index + px;
141
+ }
142
+ .m-tb-#{$index} {
143
+ margin-top: $index + px;
144
+ margin-bottom: $index + px;
145
+ }
146
+
147
+ // 定义内边距
148
+ .p-#{$index} {
149
+ padding: $index + px;
150
+ }
151
+ .p-l-#{$index} {
152
+ padding-left: $index + px;
153
+ }
154
+ .p-t-#{$index} {
155
+ padding-top: $index + px;
156
+ }
157
+ .p-r-#{$index} {
158
+ padding-right: $index + px;
159
+ }
160
+ .p-b-#{$index} {
161
+ padding-bottom: $index + px;
162
+ }
163
+ .p-lr-#{$index} {
164
+ padding-left: $index + px;
165
+ padding-right: $index + px;
166
+ }
167
+ .p-tb-#{$index} {
168
+ padding-top: $index + px;
169
+ padding-bottom: $index + px;
170
+ }
171
+
172
+ // 定义border
173
+ .bd-#{$index} {
174
+ border: $index + px solid var(--line-color);
175
+ }
176
+ .bd-l-#{$index} {
177
+ border-left: $index + px solid var(--line-color);
178
+ }
179
+ .bd-t-#{$index} {
180
+ border-top: $index + px solid var(--line-color);
181
+ }
182
+ .bd-r-#{$index} {
183
+ border-right: $index + px solid var(--line-color);
184
+ }
185
+ .bd-b-#{$index} {
186
+ border-bottom: $index + px solid var(--line-color);
187
+ }
188
+
189
+ // 定义上下左右 l-2 => left: 2px; t-10 => top: 10px;
190
+
191
+ .t-#{$index} {
192
+ top: $index + px;
193
+ }
194
+ .r-#{$index} {
195
+ right: $index + px;
196
+ }
197
+ .b-#{$index} {
198
+ bottom: $index + px;
199
+ }
200
+ .l-#{$index} {
201
+ left: $index + px;
202
+ }
203
+ .t-#{$index}\% {
204
+ top: $index * 1%;
205
+ }
206
+ .r-#{$index}\% {
207
+ right: $index * 1%;
208
+ }
209
+ .b-#{$index}\% {
210
+ bottom: $index * 1%;
211
+ }
212
+ .l-#{$index}\% {
213
+ left: $index * 1%;
214
+ }
215
+ .z-#{$index} {
216
+ z-index: $index;
217
+ }
218
+ }
219
+
220
+ @for $index from -1000 through 1000 {
221
+ @if $index >= 100 or $index < 0 {
222
+ @if $index % 2 == 0 or $index % 5 == 0 or $index == 1 {
223
+ .w-#{$index} {
224
+ width: $index + px;
225
+ }
226
+ .h-#{$index} {
227
+ height: $index + px;
228
+ }
229
+ .h-#{$index}\% {
230
+ height: $index * 1%;
231
+ }
232
+ .w-#{$index}\% {
233
+ width: $index * 1%;
234
+ }
235
+ .m-h-#{$index}\% {
236
+ min-height: $index * 1%;
237
+ }
238
+ .m-w-#{$index}\% {
239
+ min-width: $index * 1%;
240
+ }
241
+ .l-h-#{$index}\% {
242
+ line-height: $index * 1%;
243
+ }
244
+ .l-h-#{$index} {
245
+ line-height: $index + px;
246
+ }
247
+ .m-h-#{$index} {
248
+ min-height: $index + px;
249
+ }
250
+ .m-w-#{$index} {
251
+ min-width: $index + px;
252
+ }
253
+
254
+ // 缩写版,结果如: m-l-30
255
+ // 定义外边距
256
+ .m-#{$index} {
257
+ margin: $index + px;
258
+ }
259
+ .m-l-#{$index} {
260
+ margin-left: $index + px;
261
+ }
262
+ .m-t-#{$index} {
263
+ margin-top: $index + px;
264
+ }
265
+ .m-r-#{$index} {
266
+ margin-right: $index + px;
267
+ }
268
+ .m-b-#{$index} {
269
+ margin-bottom: $index + px;
270
+ }
271
+ .m-lr-#{$index} {
272
+ margin-left: $index + px;
273
+ margin-right: $index + px;
274
+ }
275
+ .m-tb-#{$index} {
276
+ margin-top: $index + px;
277
+ margin-bottom: $index + px;
278
+ }
279
+
280
+ // 定义内边距
281
+ .p-#{$index} {
282
+ padding: $index + px;
283
+ }
284
+ .p-l-#{$index} {
285
+ padding-left: $index + px;
286
+ }
287
+ .p-t-#{$index} {
288
+ padding-top: $index + px;
289
+ }
290
+ .p-r-#{$index} {
291
+ padding-right: $index + px;
292
+ }
293
+ .p-b-#{$index} {
294
+ padding-bottom: $index + px;
295
+ }
296
+ .p-lr-#{$index} {
297
+ padding-left: $index + px;
298
+ padding-right: $index + px;
299
+ }
300
+ .p-tb-#{$index} {
301
+ padding-top: $index + px;
302
+ padding-bottom: $index + px;
303
+ }
304
+
305
+ // 定义上下左右 l-2 => left: 2px; t-10 => top: 10px;
306
+
307
+ .t-#{$index} {
308
+ top: $index + px;
309
+ }
310
+ .r-#{$index} {
311
+ right: $index + px;
312
+ }
313
+ .b-#{$index} {
314
+ bottom: $index + px;
315
+ }
316
+ .l-#{$index} {
317
+ left: $index + px;
318
+ }
319
+ .t-#{$index}\% {
320
+ top: $index * 1%;
321
+ }
322
+ .r-#{$index}\% {
323
+ right: $index * 1%;
324
+ }
325
+ .b-#{$index}\% {
326
+ bottom: $index * 1%;
327
+ }
328
+ .l-#{$index}\% {
329
+ left: $index * 1%;
330
+ }
331
+ .z-#{$index} {
332
+ z-index: $index;
333
+ }
334
+ }
335
+ }
336
+ }
337
+
338
+ // flex布局
339
+ //类名 .f-ct-st
340
+ $justify: (
341
+ bs: baseline,
342
+ st: flex-start,
343
+ ct: center,
344
+ ed: flex-end,
345
+ bt: space-between,
346
+ sb: space-between,
347
+ ar: space-around,
348
+ lt: left,
349
+ rt: right,
350
+ un: unset,
351
+ nm: normal,
352
+ );
353
+ $align: (
354
+ bs: baseline,
355
+ st: flex-start,
356
+ ct: center,
357
+ ed: flex-end,
358
+ un: unset,
359
+ nm: normal,
360
+ tp: top,
361
+ );
362
+ @each $justifyKey, $justifyVal in $justify {
363
+ .f-#{$justifyKey} {
364
+ display: flex;
365
+ justify-content: #{$justifyVal};
366
+ align-items: center;
367
+ }
368
+ @each $alignKey, $alignVal in $align {
369
+ .f-#{$justifyKey}-#{$alignKey} {
370
+ display: flex;
371
+ justify-content: #{$justifyVal};
372
+ align-items: #{$alignVal};
373
+ }
374
+ }
375
+ }
376
+ .f {
377
+ display: flex;
378
+ }
379
+ .f-i {
380
+ display: inline-flex;
381
+ }
382
+ .f-c {
383
+ flex-direction: column;
384
+ }
385
+ .f-wrap,
386
+ .f-w {
387
+ flex-wrap: wrap;
388
+ }
389
+ @each $short, $long in s flex-start, e flex-end, c center, b baseline {
390
+ .ai-#{$short} {
391
+ align-items: $long;
392
+ }
393
+ }
394
+ @each $short, $long in e flex-end, c center, b space-between, a space-around, e space-evenly {
395
+ .jc-#{$short} {
396
+ justify-content: $long;
397
+ }
398
+ }
399
+
400
+ // overflow相关 visible hidden scroll auto
401
+ @each $short, $long in v visible, h hidden, s scroll, a auto {
402
+ .o-#{$short} {
403
+ overflow: $long;
404
+ }
405
+ }
406
+ // 垂直对齐相关 vertical-align
407
+ @each $short, $long in t top, b bottom, m middle, bl baseline, sb sub, sp super {
408
+ .v#{$short} {
409
+ vertical-align: $long;
410
+ }
411
+ }
412
+ // display显示相关
413
+ @each $short, $long in b block, i inline, ib inline-block, f flex, n none {
414
+ .d-#{$short} {
415
+ display: $long;
416
+ }
417
+ }
418
+ // position相关
419
+ @each $short, $long in r relative, a absolute, f fixed, s static {
420
+ .po-#{$short} {
421
+ position: $long;
422
+ }
423
+ }
424
+
425
+ @each $bold in 100, 200, 300, 400, 500, 600, 700, 800, 900 {
426
+ .fw-#{$bold},
427
+ .bold-#{$bold} {
428
+ font-weight: $bold;
429
+ }
430
+ }
431
+
432
+ .bd {
433
+ border: 1px solid var(--line-color);
434
+ }
435
+
436
+ .bs {
437
+ box-sizing: border-box;
438
+ }
439
+ .fw,
440
+ .bold {
441
+ font-weight: 900;
442
+ }
443
+
444
+ .h-block {
445
+ height: 100%;
446
+ }
447
+ .w-block {
448
+ width: 100%;
449
+ }
450
+ .animate {
451
+ transition: all 0.2s linear;
452
+ }
453
+
454
+ .tl {
455
+ text-align: left;
456
+ }
457
+ .tc {
458
+ text-align: center;
459
+ }
460
+ .tr {
461
+ text-align: right;
462
+ }
463
+ .sd {
464
+ box-shadow: 3px 3px 6px var(--shadow-color);
465
+ }
466
+ .ma {
467
+ margin: 0 auto;
468
+ }
469
+
470
+ .link {
471
+ cursor: pointer;
472
+ color: var(--blue);
473
+ }
474
+ .cp {
475
+ cursor: pointer;
476
+ }
477
+ .ac {
478
+ color: var(--blue);
479
+ }
480
+
481
+ //文本超出换行或隐藏,最多5行
482
+ @for $i from 1 through 5 {
483
+ .line-#{$i} {
484
+ @if $i == '1' {
485
+ overflow: hidden;
486
+ white-space: nowrap;
487
+ text-overflow: ellipsis;
488
+ } @else {
489
+ display: -webkit-box !important;
490
+ overflow: hidden;
491
+ text-overflow: ellipsis;
492
+ word-break: break-all;
493
+ -webkit-line-clamp: $i;
494
+ -webkit-box-orient: vertical !important;
495
+ }
496
+ }
497
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oeos-components",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "Vue3 中基于Element-plus二次封装基础组件文档",
5
5
  "private": false,
6
6
  "type": "module",
@@ -8,6 +8,15 @@
8
8
  "unpkg": "dist/oeos-components-umd.js",
9
9
  "module": "dist/oeos-components-es.js",
10
10
  "style": "dist/style.css",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/oeos-components-es.js",
14
+ "default": "./dist/oeos-components-es.js"
15
+ },
16
+ "./style.css": "./dist/style.css",
17
+ "./utilities.css": "./dist/utilities.css",
18
+ "./utilities.scss": "./dist/utilities.scss"
19
+ },
11
20
  "files": [
12
21
  "dist"
13
22
  ],