@neatui/css 3.6.21 → 3.7.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.
@@ -1,6 +1,11 @@
1
1
  [ui-table] {
2
2
  width: 100%;
3
3
 
4
+ // 固定宽度
5
+ &[ui-table~='fixed'] {
6
+ table-layout: fixed;
7
+ }
8
+
4
9
  th,
5
10
  td {
6
11
  &[col-fixed] {
@@ -23,9 +28,6 @@
23
28
  height: 100%;
24
29
  right: -5px;
25
30
  top: 0;
26
- // @include theme {
27
- // box-shadow: inset 5px 0 5px -5px rgba(var(--co-text), 0.15);
28
- // }
29
31
  box-shadow: inset 5px 0 5px -5px var(--co-text-ss);
30
32
  }
31
33
  }
@@ -39,9 +41,6 @@
39
41
  height: 100%;
40
42
  left: -5px;
41
43
  top: 0;
42
- // @include theme {
43
- // box-shadow: inset -5px 0 5px -5px rgba(var(--co-text), 0.15);
44
- // }
45
44
  box-shadow: inset -5px 0 5px -5px var(--co-text-ss);
46
45
  }
47
46
  }
@@ -71,48 +70,153 @@
71
70
  &[ui-table~='sz:xs'] {
72
71
  th,
73
72
  td {
74
- padding: 0.25em;
73
+ padding: 0.5em;
75
74
  }
76
75
  }
77
76
  &[ui-table~='sz:s'] {
78
77
  th,
79
78
  td {
80
- padding: 0.5em;
79
+ padding: 0.75em;
81
80
  }
82
81
  }
83
82
  &,
84
83
  &[ui-table~='sz:m'] {
85
84
  th,
86
85
  td {
87
- padding: 0.75em;
86
+ padding: 1em;
88
87
  }
89
88
  }
90
89
  &[ui-table~='sz:l'] {
91
90
  th,
92
91
  td {
93
- padding: 1em;
92
+ padding: 1.25em;
94
93
  }
95
94
  }
96
95
  &[ui-table~='sz:xl'] {
97
96
  th,
98
97
  td {
99
- padding: 1.25em;
98
+ padding: 1.5em;
100
99
  }
101
100
  }
102
101
 
103
102
  // 固定头部
104
103
  .table-head-fixed {
105
- // @include theme {
106
- background: var(--co-fore);
107
- box-shadow:
108
- 0 1px 0 var(--co-line-sm),
109
- 0 2px 0 var(--co-line-sm),
110
- 0 3px 0 var(--co-line-sm);
111
- // }
112
104
  position: sticky;
113
105
  top: 0;
114
106
  z-index: 3;
115
107
  }
108
+
109
+ // // 排序图标
110
+ // [ui-order],
111
+ // .ux-order {
112
+ // position: relative;
113
+ // cursor: pointer;
114
+ // padding-right: 0.75em;
115
+ // &::before,
116
+ // &::after {
117
+ // content: '';
118
+ // position: absolute;
119
+ // display: block;
120
+ // width: 0;
121
+ // height: 0;
122
+ // right: 0;
123
+ // top: 50%;
124
+ // margin-top: -0.65em;
125
+ // border: 0.35em solid transparent;
126
+ // box-sizing: content-box;
127
+ // }
128
+ // &::before {
129
+ // border-bottom-color: currentColor;
130
+ // opacity: 0.3;
131
+ // }
132
+ // &::after {
133
+ // border-top-color: currentColor;
134
+ // transform: translateY(120%);
135
+ // opacity: 0.3;
136
+ // }
137
+
138
+ // &[ui-order~='0'] {
139
+ // &::before {
140
+ // opacity: 0.3;
141
+ // }
142
+ // &::after {
143
+ // opacity: 0.3;
144
+ // }
145
+ // }
146
+ // &[ui-order~='1'] {
147
+ // &::before {
148
+ // opacity: 0.3;
149
+ // }
150
+ // &::after {
151
+ // opacity: 0.9;
152
+ // }
153
+ // }
154
+ // &[ui-order~='2'] {
155
+ // &::before {
156
+ // opacity: 0.9;
157
+ // }
158
+ // &::after {
159
+ // opacity: 0.3;
160
+ // }
161
+ // }
162
+ // }
163
+ // }
164
+
165
+ // 排序图标
166
+ [ui-order],
167
+ .ux-order {
168
+ position: relative;
169
+ cursor: pointer;
170
+ // padding-right: 0.75em;
171
+ &::before,
172
+ &::after {
173
+ content: '';
174
+ position: absolute;
175
+ display: block;
176
+ width: 0.6em;
177
+ height: 0.6em;
178
+ left: 50%;
179
+ top: 50%;
180
+ margin-top: -0.45em;
181
+ margin-left: -0.3em;
182
+ border-left: 2px solid currentColor;
183
+ border-top: 2px solid currentColor;
184
+ border-radius: 1px;
185
+ }
186
+ &::before {
187
+ opacity: 0.3;
188
+ transform: rotate(45deg) scale(0.7);
189
+ }
190
+ &::after {
191
+ opacity: 0.35;
192
+ transform: translateY(45%) rotate(-135deg) scale(0.7);
193
+ }
194
+
195
+ &[ui-order~='0'] {
196
+ &::before {
197
+ opacity: 0.35;
198
+ }
199
+ &::after {
200
+ opacity: 0.35;
201
+ }
202
+ }
203
+ &[ui-order~='1'] {
204
+ &::before {
205
+ opacity: 0.35;
206
+ }
207
+ &::after {
208
+ opacity: 1;
209
+ }
210
+ }
211
+ &[ui-order~='2'] {
212
+ &::before {
213
+ opacity: 1;
214
+ }
215
+ &::after {
216
+ opacity: 0.35;
217
+ }
218
+ }
219
+ }
116
220
  }
117
221
 
118
222
  [scroll-side-l='1'] {
@@ -1,231 +1,55 @@
1
1
  // 主题
2
2
 
3
3
  [ui-table~='@a'] {
4
- width: 100%;
5
-
6
- th {
7
- // @include theme {
8
- color: var(--co-text);
9
- // }
10
- // text-align: left;
11
- font-weight: normal;
12
- }
13
-
14
- .table-sort {
15
- display: inline-block;
16
- width: 1em;
17
- height: 1em;
18
- background-color: #fff;
19
- }
20
-
21
- td {
22
- // @include theme {
23
- color: var(--co-read);
24
- // }
25
- }
26
-
27
- &[tirm*='n'] {
28
- border-collapse: separate;
29
- }
4
+ tr {
5
+ th {
6
+ color: var(--co-text);
7
+ background-color: var(--co-weak);
8
+ }
30
9
 
31
- // 固定宽度
32
- &[ui-table~='fix'] {
33
- table-layout: fixed;
34
- }
10
+ td {
11
+ color: var(--co-read);
12
+ background-color: var(--co-fore);
13
+ }
35
14
 
36
- // 线条
37
- &[ui-table~='line'] {
38
15
  th,
39
16
  td {
40
- // @include theme {
17
+ border-right: 1px solid var(--co-line);
41
18
  border-bottom: 1px solid var(--co-line);
42
- // }
43
- padding: 0.75em 1em;
44
19
 
45
20
  &:first-child {
46
- padding-left: 0;
47
- }
48
- &:last-child {
49
- padding-right: 0;
21
+ border-left: 1px solid var(--co-line);
50
22
  }
51
23
  }
52
24
 
53
- tr:last-child {
54
- td {
55
- border-bottom: 0;
56
- }
57
- }
58
- }
25
+ &:first-child {
26
+ th {
27
+ border-top: 1px solid var(--co-line);
59
28
 
60
- // 格子
61
- &[ui-table~='grid'],
62
- &[ui-table~='cube'] {
63
- tr {
64
- // @include theme {
65
- box-shadow: inset 0 -1px 0 0 var(--co-line);
66
- // }
67
- // &:last-child {
68
- // box-shadow: 0 0 0 0;
69
- // }
70
- }
71
- th,
72
- td {
73
- // @include theme {
74
- // border-left: 1px solid var(--co-line);
75
- box-shadow: inset 1px 0 0 0 var(--co-line);
76
- // border-top: 1px solid var(--co-line);
77
- &:first-child {
78
- box-shadow: 0 0 0 0;
79
- }
80
- // }
81
- // padding: 0.75em 1em;
82
- }
83
- }
84
- &[ui-table~='grid'] {
85
- // @include theme {
86
- // border: 1px solid var(--co-line);
87
- box-shadow: inset 0 0 0px 1px var(--co-line);
88
- // }
89
- border-radius: 0.35em;
90
- border-left: 0;
91
- border-top: 0;
92
- &[trim*='n'] {
93
- th,
94
- td {
95
- // @include theme {
96
- border-right: 1px solid var(--co-line);
97
- // }
98
29
  &:first-child {
99
- // @include theme {
100
30
  border-left: 1px solid var(--co-line);
101
- // }
102
- }
103
- }
104
- tr:last-child {
105
- td {
106
- // @include theme {
107
- border-bottom: 1px solid var(--co-line);
108
- // }
109
- }
110
- }
111
- tr:first-child {
112
- th,
113
- td {
114
- // @include theme {
115
- border-top: 1px solid var(--co-line);
116
- // }
117
- }
118
- }
119
- }
120
-
121
- tr {
122
- &:first-child {
123
- th,
124
- td {
125
- &:first-child {
126
- border-radius: 0.2rem 0 0 0;
127
- }
128
- &:last-child {
129
- border-radius: 0 0.2rem 0 0;
130
- }
31
+ border-radius: 0.35rem 0 0 0;
131
32
  }
132
- }
133
- &:last-child {
134
- th,
135
- td {
136
- &:first-child {
137
- border-radius: 0 0 0 0.2rem;
138
- }
139
- &:last-child {
140
- border-radius: 0 0 0.2rem 0;
141
- }
33
+ &:last-child {
34
+ border-radius: 0 0.35rem 0 0;
142
35
  }
143
36
  }
144
37
  }
145
- }
146
-
147
- // 分割
148
- &[ui-table~='cube'] {
149
- border: 0;
150
- &:first-child {
151
- padding-left: 0;
152
- }
153
38
  &:last-child {
154
- padding-right: 0;
155
- }
156
-
157
- [ui-hide] {
158
- & + th,
159
- & + td {
160
- border-left: 0;
161
- }
162
- & + tr {
163
- th,
164
- td {
165
- border-top: 0;
39
+ td {
40
+ &:first-child {
41
+ border-radius: 0 0 0 0.35rem;
42
+ }
43
+ &:last-child {
44
+ border-radius: 0 0 0.35rem 0;
166
45
  }
167
46
  }
168
47
  }
169
48
 
170
- &[trim*='n'] {
171
- // @include theme {
172
- border: 1px solid var(--co-line);
173
- // }
174
- }
175
-
176
- th,
177
- td {
178
- &:first-child {
179
- border-left: 0;
180
- }
181
- }
182
- tr:first-child {
183
- th,
49
+ &:hover {
184
50
  td {
185
- border-top: 0;
51
+ background-color: var(--co-weak-fore-ls);
186
52
  }
187
53
  }
188
54
  }
189
-
190
- // // 小行
191
- // &[ui-table~='s'] {
192
- // th,
193
- // td {
194
- // padding: 0.5em 1em;
195
- // }
196
- // }
197
-
198
- // // 大行
199
- // &[ui-table~='l'] {
200
- // th,
201
- // td {
202
- // padding: 1em 1em;
203
- // }
204
- // }
205
-
206
- &[ui-table~=':hover'] {
207
- tr {
208
- transition: all 0.3s;
209
- &:hover {
210
- // @include theme {
211
- // background-color: rgba(var(--co-weak), 0.5);
212
- // }
213
- background-color: var(-co-weak-mm);
214
- }
215
- }
216
- }
217
-
218
- // 对齐
219
- &[ui-table~=':vt'] {
220
- th,
221
- td {
222
- vertical-align: top;
223
- }
224
- }
225
- &[ui-table~=':vb'] {
226
- th,
227
- td {
228
- vertical-align: bottom;
229
- }
230
- }
231
55
  }
@@ -3,13 +3,47 @@
3
3
 
4
4
  [ui-table~='@b'] {
5
5
  // 固定头部
6
- thead > tr,
7
- thead > tr th,
8
6
  .table-head-fixed {
9
- // @include theme {
10
- background: var(--co-fore);
11
- // }
7
+ box-shadow:
8
+ 0 1px 0 var(--co-line-sm),
9
+ 0 2px 0 var(--co-line-sm),
10
+ 0 3px 0 var(--co-line-sm);
12
11
  }
12
+
13
+ tr {
14
+ th {
15
+ color: var(--co-desc);
16
+ }
17
+
18
+ th,
19
+ td {
20
+ background: var(--co-fore);
21
+ }
22
+
23
+ &:first-child {
24
+ th {
25
+ &:first-child {
26
+ border-radius: 0.35rem 0 0 0;
27
+ }
28
+ &:last-child {
29
+ border-radius: 0 0.35rem 0 0;
30
+ }
31
+ }
32
+ }
33
+ &:last-child {
34
+ td {
35
+ border-bottom: 0;
36
+
37
+ &:first-child {
38
+ border-radius: 0 0 0 0.35rem;
39
+ }
40
+ &:last-child {
41
+ border-radius: 0 0 0.35rem 0;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
13
47
  // 表格主体
14
48
  tbody {
15
49
  tr {
@@ -17,60 +51,16 @@
17
51
  &,
18
52
  th,
19
53
  td {
20
- // @include theme {
21
54
  background-color: var(--co-fore);
22
- // }
23
55
  }
24
56
  }
25
57
  &:nth-child(odd) {
26
58
  &,
27
59
  th,
28
60
  td {
29
- background-color: var(--co-weak-fore-lm);
61
+ background-color: var(--co-weak-fore-ls);
30
62
  }
31
63
  }
32
64
  }
33
65
  }
34
- // 移入效果
35
- &[ui-table~='ux:hover'] {
36
- tbody {
37
- tr {
38
- &:nth-child(even) {
39
- &:hover {
40
- // @include theme {
41
- box-shadow:
42
- 0 0 0 2px var(--co-fore),
43
- 0 0 0 3px var(--co-line);
44
- z-index: 1;
45
- position: relative;
46
- // }
47
- }
48
- }
49
- &:nth-child(odd) {
50
- &:hover {
51
- // @include theme {
52
- box-shadow:
53
- 0 0 0 2px var(--co-weak),
54
- 0 0 0 3px var(--co-line);
55
- z-index: 1;
56
- position: relative;
57
- // }
58
- }
59
- }
60
- }
61
- }
62
- }
63
-
64
- // 滚动固定补白
65
- // &[ui-table~='ui:sticky'] {
66
- // th,
67
- // td {
68
- // &:first-child {
69
- // box-shadow: -3em 0 0 0 var(--co-fore);
70
- // }
71
- // &:last-child {
72
- // box-shadow: 3em 0 0 0 var(--co-fore);
73
- // }
74
- // }
75
- // }
76
66
  }
@@ -2,15 +2,55 @@
2
2
  @forward './base.scss';
3
3
 
4
4
  [ui-table~='@c'] {
5
- & {
6
- border-collapse: separate;
7
- border-spacing: 0 0.5em;
5
+ // 固定头部
6
+ .table-head-fixed {
7
+ background: transparent;
8
+ box-shadow: unset;
9
+ position: sticky;
10
+ top: 0;
11
+ z-index: 3;
8
12
  }
9
13
 
10
- tbody {
11
- tr {
12
- box-shadow: inset 0 0 0 1px var(--co-line);
13
- border-radius: 0.2em;
14
+ // 表格样式
15
+ tr {
16
+ th {
17
+ color: var(--co-desc);
18
+ }
19
+
20
+ th,
21
+ td {
22
+ background-color: var(--co-fore);
23
+ border-bottom: 1px solid var(--co-line-ls);
24
+ }
25
+
26
+ &:first-child {
27
+ th {
28
+ &:first-child {
29
+ border-radius: 0.35rem 0 0 0;
30
+ }
31
+ &:last-child {
32
+ border-radius: 0 0.35rem 0 0;
33
+ }
34
+ }
35
+ }
36
+ &:last-child {
37
+ td {
38
+ border-bottom: 0;
39
+
40
+ &:first-child {
41
+ border-radius: 0 0 0 0.35rem;
42
+ }
43
+ &:last-child {
44
+ border-radius: 0 0 0.35rem 0;
45
+ }
46
+ }
47
+ }
48
+
49
+ // 交互样式
50
+ &:hover {
51
+ td {
52
+ background-color: var(--co-weak-fore-ls);
53
+ }
14
54
  }
15
55
  }
16
56
  }
@@ -0,0 +1,184 @@
1
+ // 主题
2
+
3
+ [ui-table~='@d'] {
4
+ width: 100%;
5
+
6
+ th {
7
+ color: var(--co-text);
8
+ font-weight: normal;
9
+ background-color: var(--co-weak);
10
+ }
11
+
12
+ .table-sort {
13
+ display: inline-block;
14
+ width: 1em;
15
+ height: 1em;
16
+ background-color: var(--co-fore);
17
+ }
18
+
19
+ td {
20
+ color: var(--co-read);
21
+ background-color: var(--co-fore);
22
+ }
23
+
24
+ &[tirm*='n'] {
25
+ border-collapse: separate;
26
+ }
27
+
28
+ // 固定宽度
29
+ &[ui-table~='fix'] {
30
+ table-layout: fixed;
31
+ }
32
+
33
+ // 线条
34
+ &[ui-table~='line'] {
35
+ th,
36
+ td {
37
+ border-bottom: 1px solid var(--co-line-ls);
38
+ padding: 0.75em 1em;
39
+
40
+ // &:first-child {
41
+ // padding-left: 0;
42
+ // }
43
+ // &:last-child {
44
+ // padding-right: 0;
45
+ // }
46
+ }
47
+
48
+ tr:last-child {
49
+ td {
50
+ border-bottom: 0;
51
+ }
52
+ }
53
+ }
54
+
55
+ // 格子
56
+ &[ui-table~='grid'],
57
+ &[ui-table~='cube'] {
58
+ tr {
59
+ box-shadow: inset 0 -1px 0 0 var(--co-line-ls);
60
+ }
61
+ th,
62
+ td {
63
+ box-shadow: inset 1px 0 0 0 var(--co-line-ls);
64
+ &:first-child {
65
+ box-shadow: 0 0 0 0;
66
+ }
67
+ }
68
+ }
69
+ &[ui-table~='grid'] {
70
+ box-shadow: inset 0 0 0px 1px var(--co-line-ls);
71
+ border-radius: 0.35em;
72
+ border-left: 0;
73
+ border-top: 0;
74
+ &[trim*='n'] {
75
+ th,
76
+ td {
77
+ border-right: 1px solid var(--co-line-ls);
78
+ &:first-child {
79
+ border-left: 1px solid var(--co-line-ls);
80
+ }
81
+ }
82
+ tr:last-child {
83
+ td {
84
+ border-bottom: 1px solid var(--co-line-ls);
85
+ }
86
+ }
87
+ tr:first-child {
88
+ th,
89
+ td {
90
+ border-top: 1px solid var(--co-line-ls);
91
+ }
92
+ }
93
+ }
94
+
95
+ tr {
96
+ &:first-child {
97
+ th,
98
+ td {
99
+ &:first-child {
100
+ border-radius: 0.2rem 0 0 0;
101
+ }
102
+ &:last-child {
103
+ border-radius: 0 0.2rem 0 0;
104
+ }
105
+ }
106
+ }
107
+ &:last-child {
108
+ th,
109
+ td {
110
+ &:first-child {
111
+ border-radius: 0 0 0 0.2rem;
112
+ }
113
+ &:last-child {
114
+ border-radius: 0 0 0.2rem 0;
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ // 分割
122
+ &[ui-table~='cube'] {
123
+ border: 0;
124
+ &:first-child {
125
+ padding-left: 0;
126
+ }
127
+ &:last-child {
128
+ padding-right: 0;
129
+ }
130
+
131
+ [ui-hide] {
132
+ & + th,
133
+ & + td {
134
+ border-left: 0;
135
+ }
136
+ & + tr {
137
+ th,
138
+ td {
139
+ border-top: 0;
140
+ }
141
+ }
142
+ }
143
+
144
+ &[trim*='n'] {
145
+ border: 1px solid var(--co-line-ls);
146
+ }
147
+
148
+ th,
149
+ td {
150
+ &:first-child {
151
+ border-left: 0;
152
+ }
153
+ }
154
+ tr:first-child {
155
+ th,
156
+ td {
157
+ border-top: 0;
158
+ }
159
+ }
160
+ }
161
+
162
+ &[ui-table~=':hover'] {
163
+ tr {
164
+ transition: all 0.3s;
165
+ &:hover {
166
+ background-color: var(-co-weak-mm);
167
+ }
168
+ }
169
+ }
170
+
171
+ // 对齐
172
+ &[ui-table~=':vt'] {
173
+ th,
174
+ td {
175
+ vertical-align: top;
176
+ }
177
+ }
178
+ &[ui-table~=':vb'] {
179
+ th,
180
+ td {
181
+ vertical-align: bottom;
182
+ }
183
+ }
184
+ }
package/core/theme.scss CHANGED
@@ -89,7 +89,7 @@
89
89
  @if ($k != 'w' and $k != 'b') {
90
90
  --co-#{$k}-fore: #{color.mix($v, map.get($s, 'fore'), 100%)};
91
91
  }
92
- @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
92
+ @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
93
93
  --co-#{$k}-text: #{color.mix($v, map.get($s, 'text'), 100%)};
94
94
  }
95
95
 
@@ -101,7 +101,7 @@
101
101
  @if ($k != 'w' and $k != 'b') {
102
102
  --co-#{$k}-fore-#{$l}: #{color.mix($v, map.get($s, 'fore'), $ls * 100%)};
103
103
  }
104
- @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
104
+ @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
105
105
  --co-#{$k}-text-#{$l}: #{color.mix($v, map.get($s, 'text'), $ls * 100%)};
106
106
  }
107
107
  }
@@ -124,7 +124,7 @@
124
124
  --co-#{$k}-fore: #{color.mix($v, map.get($s, 'fore'), 100%)};
125
125
  }
126
126
 
127
- @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
127
+ @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
128
128
  --co-#{$k}-text: #{color.mix($v, map.get($s, 'text'), 100%)};
129
129
  }
130
130
 
@@ -138,7 +138,7 @@
138
138
  --co-#{$k}-fore-#{$l}: #{color.mix($v, map.get($s, 'fore'), $ls * 100%)};
139
139
  }
140
140
 
141
- @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
141
+ @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk' or $k == 'info') {
142
142
  --co-#{$k}-text-#{$l}: #{color.mix($v, map.get($s, 'text'), $ls * 100%)};
143
143
  }
144
144
  }
package/core/ux.scss CHANGED
@@ -189,7 +189,7 @@
189
189
  opacity: 0.3;
190
190
  }
191
191
  &::after {
192
- opacity: 0.3;
192
+ opacity: 1;
193
193
  }
194
194
  }
195
195
  &[ui-sort~='1'] {
@@ -197,12 +197,12 @@
197
197
  opacity: 0.3;
198
198
  }
199
199
  &::after {
200
- opacity: 0.9;
200
+ opacity: 1;
201
201
  }
202
202
  }
203
203
  &[ui-sort~='2'] {
204
204
  &::before {
205
- opacity: 0.9;
205
+ opacity: 1;
206
206
  }
207
207
  &::after {
208
208
  opacity: 0.3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "3.6.21",
3
+ "version": "3.7.0",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",