@nutui/nutui-react 2.7.5 → 2.7.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.
@@ -4,12 +4,17 @@
4
4
  display: flex;
5
5
  }
6
6
 
7
+ .nut-tabs-horizontal {
8
+ flex-direction: column;
9
+ }
10
+
7
11
  .nut-tabs-titles {
8
12
  display: flex;
9
13
  box-sizing: border-box;
10
14
  height: $tabs-titles-height;
11
15
  user-select: none;
12
- overflow: hidden;
16
+ overflow-x: auto;
17
+ overflow-y: hidden;
13
18
  background: $tabs-titles-background-color;
14
19
  scrollbar-width: none;
15
20
 
@@ -21,7 +26,6 @@
21
26
 
22
27
  .nut-tabs-list {
23
28
  width: 100%;
24
- height: auto;
25
29
  display: flex;
26
30
  flex-shrink: 0;
27
31
  }
@@ -40,11 +44,6 @@
40
44
  }
41
45
  }
42
46
 
43
- &-scrollable {
44
- overflow-x: auto;
45
- overflow-y: hidden;
46
- }
47
-
48
47
  &-item {
49
48
  position: relative;
50
49
  display: flex;
@@ -60,13 +59,17 @@
60
59
  text-overflow: ellipsis;
61
60
  white-space: nowrap;
62
61
 
62
+ .nut-icon {
63
+ color: $tabs-titles-item-color;
64
+ }
65
+
63
66
  &-left,
64
67
  &-right {
65
68
  flex: none;
66
69
  }
67
70
 
68
71
  &-text {
69
- text-align: center;
72
+ color: $tabs-titles-item-color;
70
73
  }
71
74
 
72
75
  &-smile,
@@ -76,9 +79,9 @@
76
79
  width: 0;
77
80
  height: 0;
78
81
  content: ' ';
79
- bottom: $tabs-tab-line-bottom;
80
82
  left: 50%;
81
83
  transform: translate(-50%, 0);
84
+ bottom: $tabs-tab-line-bottom;
82
85
  border-radius: $tabs-tab-line-border-radius;
83
86
  opacity: $tabs-tab-line-opacity;
84
87
  overflow: hidden;
@@ -92,13 +95,18 @@
92
95
  font-size: 20px;
93
96
  width: 100%;
94
97
  height: 100%;
95
- color: $color-primary;
96
98
  }
97
99
  }
98
100
 
99
101
  &-active {
100
- color: $tabs-titles-item-active-color;
101
- font-weight: $tabs-titles-item-active-font-weight;
102
+ .nut-icon {
103
+ color: $tabs-titles-item-active-color;
104
+ }
105
+
106
+ .nut-tabs-titles-item-text {
107
+ color: $tabs-titles-item-active-color;
108
+ font-weight: $tabs-titles-item-active-font-weight;
109
+ }
102
110
 
103
111
  .nut-tabs-titles-item-line {
104
112
  overflow: unset;
@@ -112,28 +120,38 @@
112
120
  overflow: unset;
113
121
  width: 40px;
114
122
  height: 20px;
123
+
124
+ .nut-icon {
125
+ color: $tabs-titles-item-active-color;
126
+ }
115
127
  }
116
128
  }
117
129
 
118
130
  &-disabled {
119
131
  color: $color-text-disabled;
132
+ .nut-icon {
133
+ color: $color-text-disabled;
134
+ }
135
+ .nut-tabs-titles-item-text {
136
+ color: $color-text-disabled;
137
+ }
120
138
  }
121
139
  }
122
140
 
123
141
  &-simple {
124
- .nut-tabs-titles-item-active {
125
- color: $color-title;
126
- font-size: $tabs-titles-item-active-font-size;
142
+ .nut-tabs-titles-item {
143
+ &-active {
144
+ .nut-tabs-titles-item-text,
145
+ .nut-icon {
146
+ color: $color-title;
147
+ font-size: $tabs-titles-item-active-font-size;
148
+ }
149
+ }
127
150
  }
128
151
  }
129
152
 
130
153
  &-card {
131
- padding: 0;
132
- background-color: $color-default-light;
133
-
134
154
  .nut-tabs-titles-item {
135
- padding: 0;
136
-
137
155
  &-active {
138
156
  font-weight: $font-weight-bold;
139
157
  background-color: $white;
@@ -157,22 +175,19 @@
157
175
  .nut-tabs-titles-item-active {
158
176
  .nut-tabs-titles-item-text {
159
177
  background: $color-default-light;
160
- color: $color-text;
178
+ color: $tabs-titles-item-active-color;
161
179
  border-radius: $tabs-tab-button-border-radius;
162
180
  font-weight: $font-weight-bold;
163
181
  background-color: $tabs-tab-button-active-background-color;
164
- color: $color-text-link;
165
182
  border: $tabs-tab-button-active-border;
166
183
  }
167
184
  }
168
185
  }
169
186
 
170
187
  &-divider {
171
- padding: 0;
172
188
  border-bottom: 1px solid $color-border;
173
189
 
174
190
  .nut-tabs-titles-item {
175
- padding: 0;
176
191
  position: relative;
177
192
 
178
193
  &::after {
@@ -195,83 +210,35 @@
195
210
  }
196
211
  }
197
212
 
198
- [dir='rtl'] .nut-tabs-titles,
199
- .nut-rtl .nut-tabs-titles {
200
- &-item {
201
- &-smile,
202
- &-line {
203
- left: auto;
204
- right: 50%;
205
- transform: translate(50%, 0);
206
- }
207
- }
208
- &-divider {
209
- .nut-tabs-titles-item {
210
- &::after {
211
- right: auto;
212
- left: 0;
213
- }
214
- }
215
- }
216
- }
217
-
218
- .nut-tabs-horizontal {
219
- flex-direction: column;
220
- position: relative;
221
- }
222
-
223
213
  .nut-tabs-vertical {
224
- flex-direction: row;
225
- width: 100%;
226
-
227
214
  .nut-tabs-ellipsis {
228
- text-overflow: ellipsis;
229
- white-space: nowrap;
230
- overflow: hidden;
215
+ white-space: break-spaces;
216
+ padding-left: 6px;
217
+ width: 90px;
218
+ line-height: $font-size-base;
231
219
  }
232
220
 
233
221
  .nut-tabs-titles {
234
- box-sizing: border-box;
235
222
  flex-direction: column;
236
223
  height: 100%;
237
- padding: 0;
238
224
  width: $tabs-vertical-titles-width;
239
225
  flex-shrink: 0;
240
226
 
241
227
  .nut-tabs-list {
242
- width: 100%;
243
- display: flex;
244
228
  flex-direction: column;
245
- flex-shrink: 0;
246
- }
247
-
248
- &-line {
249
- .nut-tabs-titles-item {
250
- padding-left: 14px;
251
- }
252
229
  }
253
230
  }
254
231
 
255
- .nut-tabs-titles-scrollable {
256
- overflow-x: hidden;
257
- overflow-y: auto;
258
- }
259
-
260
232
  .nut-tabs-titles-item {
261
233
  height: $tabs-vertical-titles-item-height;
262
- margin: 0;
263
234
  flex: none;
264
235
 
265
236
  &-smile {
266
- width: 0;
267
- height: 0;
268
237
  overflow: hidden;
269
238
  transition: width 0.3s ease;
270
239
  }
271
240
 
272
241
  &-line {
273
- width: 0;
274
- height: 0;
275
242
  transform: translate(0, -50%);
276
243
  transition: height 0.3s ease;
277
244
 
@@ -293,8 +260,6 @@
293
260
  right: -12px;
294
261
  bottom: -2%;
295
262
  left: auto;
296
- width: 40px;
297
- height: 20px;
298
263
  transform: rotate(320deg);
299
264
  }
300
265
  }
@@ -303,15 +268,13 @@
303
268
  .nut-tabs-horizontal {
304
269
  .nut-tabs-titles {
305
270
  flex-direction: row;
306
- overflow-x: auto;
307
- overflow-y: hidden;
308
271
  height: $tabs-titles-height;
272
+ width: 100%;
273
+ padding: 0 !important;
309
274
 
310
275
  .nut-tabs-list {
311
- width: 100%;
312
- display: flex;
313
276
  flex-direction: row;
314
- flex-shrink: 0;
277
+ height: auto;
315
278
  }
316
279
  }
317
280
 
@@ -325,6 +288,9 @@
325
288
  .nut-tabs-titles-item-line {
326
289
  left: 50%;
327
290
  transform: translate(-50%, 0);
291
+ width: $tabs-tab-line-width;
292
+ height: $tabs-tab-line-height;
293
+ background: $tabs-tab-line-color;
328
294
  }
329
295
 
330
296
  .nut-tabs-titles-item-smile {
@@ -348,32 +314,32 @@
348
314
  height: 100%;
349
315
  }
350
316
  }
317
+ }
351
318
 
352
- .nut-tabs-horizontal {
353
- .nut-tabs-titles {
354
- display: flex;
355
- flex-direction: row;
356
- padding: 0 !important;
357
- width: 100%;
358
-
359
- .nut-tabs-titles-item {
360
- display: flex;
361
- align-items: center;
362
- justify-content: center;
363
- flex: 1 0 auto;
319
+ .nut-tabs-content {
320
+ display: flex;
321
+ box-sizing: border-box;
364
322
 
365
- &-active {
366
- color: $color-primary;
367
- font-weight: $tabs-titles-item-active-font-weight;
368
- font-size: $tabs-titles-item-active-font-size;
323
+ &-wrap {
324
+ overflow: hidden;
325
+ }
326
+ }
369
327
 
370
- .nut-tabs-titles-item-line {
371
- content: ' ';
372
- width: $tabs-tab-line-width;
373
- height: $tabs-tab-line-height;
374
- background: $tabs-tab-line-color;
375
- }
376
- }
328
+ [dir='rtl'] .nut-tabs-titles,
329
+ .nut-rtl .nut-tabs-titles {
330
+ &-item {
331
+ &-smile,
332
+ &-line {
333
+ left: auto;
334
+ right: 50%;
335
+ transform: translate(50%, 0);
336
+ }
337
+ }
338
+ &-divider {
339
+ .nut-tabs-titles-item {
340
+ &::after {
341
+ right: auto;
342
+ left: 0;
377
343
  }
378
344
  }
379
345
  }
@@ -421,12 +387,3 @@
421
387
  }
422
388
  }
423
389
  }
424
-
425
- .nut-tabs-content {
426
- display: flex;
427
- box-sizing: border-box;
428
-
429
- &-wrap {
430
- overflow: hidden;
431
- }
432
- }