@neatui/css 3.7.1 → 3.8.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.
@@ -163,11 +163,9 @@
163
163
  // }
164
164
 
165
165
  // 排序图标
166
- [ui-order],
167
- .ux-order {
166
+ [ui-order~='@a'] {
168
167
  position: relative;
169
168
  cursor: pointer;
170
- // padding-right: 0.75em;
171
169
  &::before,
172
170
  &::after {
173
171
  content: '';
@@ -20,7 +20,7 @@
20
20
  th,
21
21
  td {
22
22
  background-color: var(--co-fore);
23
- border-bottom: 1px solid var(--co-line-ls);
23
+ border-bottom: 1px solid var(--co-line-lm);
24
24
  }
25
25
 
26
26
  &:first-child {
package/core/theme.scss CHANGED
@@ -5,6 +5,23 @@
5
5
  @use 'sass:map';
6
6
  @use 'sass:color';
7
7
  @use 'sass:string';
8
+ @use 'sass:math';
9
+
10
+ // 动态加深颜色
11
+ @function deep-color($c, $min: 8%, $max: 16%) {
12
+ $perc: color.channel($c, 'lightness', $space: hsl);
13
+ $L: math.div($perc, 1%);
14
+ $ratio: math.div(100 - $L, 100);
15
+ $w: $min + $ratio * ($max - $min);
16
+ @if $w < $min {
17
+ $w: $min;
18
+ }
19
+ @if $w > $max {
20
+ $w: $max;
21
+ }
22
+
23
+ @return color.mix(black, $c, $w);
24
+ }
8
25
 
9
26
  @mixin theme(
10
27
  $theme: (
@@ -18,8 +35,8 @@
18
35
  well: #4bbc73,
19
36
  warn: #fb9a2a,
20
37
  risk: #f95850,
21
- info: #0889e4
22
- )
38
+ info: #0889e4,
39
+ ),
23
40
  )
24
41
  ) {
25
42
  // 检测
@@ -61,12 +78,13 @@
61
78
  note: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 35%),
62
79
  case: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 20%),
63
80
  line: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 10%),
64
- weak: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 4%)
81
+ weak: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 4%),
82
+ deep: deep-color(map.get($s, 'back')),
65
83
  );
66
84
  $theme: map.merge(
67
85
  $theme,
68
86
  (
69
- $n: map.merge($m, $s)
87
+ $n: map.merge($m, $s),
70
88
  )
71
89
  );
72
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "3.7.1",
3
+ "version": "3.8.1",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",
@@ -1,184 +0,0 @@
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
- }