@nutui/nutui-react 3.0.0-beta.6 → 3.0.0-beta.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.
Files changed (50) hide show
  1. package/README.md +39 -9
  2. package/dist/cjs/packages/address/style/style.css +56 -89
  3. package/dist/cjs/packages/animate/style/animate.scss +0 -3
  4. package/dist/cjs/packages/animate/style/style.css +0 -3
  5. package/dist/cjs/packages/cascader/style/style.css +49 -85
  6. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  7. package/dist/cjs/packages/countdown/style/countdown.scss +21 -2
  8. package/dist/cjs/packages/countdown/style/style.css +20 -2
  9. package/dist/cjs/packages/elevator/style/elevator.scss +7 -4
  10. package/dist/cjs/packages/elevator/style/style.css +7 -4
  11. package/dist/cjs/packages/inputnumber/style/inputnumber.scss +19 -16
  12. package/dist/cjs/packages/inputnumber/style/style.css +21 -19
  13. package/dist/cjs/packages/numberkeyboard/style/numberkeyboard.scss +10 -1
  14. package/dist/cjs/packages/numberkeyboard/style/style.css +12 -0
  15. package/dist/cjs/packages/popover/style/popover.scss +16 -11
  16. package/dist/cjs/packages/popover/style/style.css +14 -2
  17. package/dist/cjs/packages/tabs/style/style.css +49 -85
  18. package/dist/cjs/packages/tabs/style/tabs.scss +68 -106
  19. package/dist/cjs/packages/tour/style/style.css +14 -2
  20. package/dist/cjs/packages/video/video.d.ts +6 -2
  21. package/dist/cjs/packages/video/video.js +16 -2
  22. package/dist/es/packages/address/style/style.css +56 -89
  23. package/dist/es/packages/animate/style/animate.scss +0 -3
  24. package/dist/es/packages/animate/style/style.css +0 -3
  25. package/dist/es/packages/cascader/style/style.css +49 -85
  26. package/dist/es/packages/configprovider/types.d.ts +1 -1
  27. package/dist/es/packages/countdown/style/countdown.scss +21 -2
  28. package/dist/es/packages/countdown/style/style.css +20 -2
  29. package/dist/es/packages/elevator/style/elevator.scss +7 -4
  30. package/dist/es/packages/elevator/style/style.css +7 -4
  31. package/dist/es/packages/inputnumber/style/inputnumber.scss +19 -16
  32. package/dist/es/packages/inputnumber/style/style.css +21 -19
  33. package/dist/es/packages/numberkeyboard/numberkeyboard.d.ts +10 -50
  34. package/dist/es/packages/numberkeyboard/style/numberkeyboard.scss +10 -1
  35. package/dist/es/packages/numberkeyboard/style/style.css +12 -0
  36. package/dist/es/packages/popover/style/popover.scss +16 -11
  37. package/dist/es/packages/popover/style/style.css +14 -2
  38. package/dist/es/packages/tabpane/tabpane.d.ts +3 -15
  39. package/dist/es/packages/tabs/style/style.css +49 -85
  40. package/dist/es/packages/tabs/style/tabs.scss +68 -106
  41. package/dist/es/packages/tabs/tabs.d.ts +12 -60
  42. package/dist/es/packages/tour/style/style.css +14 -2
  43. package/dist/es/packages/video/video.d.ts +6 -2
  44. package/dist/es/packages/video/video.js +16 -2
  45. package/dist/nutui.react.umd.js +67 -67
  46. package/dist/style.css +1 -1
  47. package/dist/styles/theme-dark.scss +2 -0
  48. package/dist/styles/theme-default.scss +2 -0
  49. package/dist/styles/variables.scss +14 -13
  50. package/package.json +2 -2
@@ -93,18 +93,14 @@
93
93
  justify-content: center;
94
94
  padding: $popover-menu-item-padding;
95
95
  border-bottom: 1px solid $popover-divider-color;
96
+ max-width: $popover-menu-item-width;
97
+ word-wrap: break-word;
96
98
 
97
99
  &:last-child {
98
100
  margin-bottom: 0px;
99
101
  border-bottom: none;
100
102
  }
101
103
 
102
- // &:hover:not(:only-child) {
103
- // cursor: pointer;
104
- // color: $popover-hover-text-color;
105
- // background-color: $popover-hover-background-color;
106
- // }
107
-
108
104
  &:hover:nth-of-type(2) {
109
105
  border-radius: 8px 8px 0px 0px;
110
106
  }
@@ -128,9 +124,10 @@
128
124
  }
129
125
 
130
126
  &-name {
131
- width: 100%;
127
+ width: calc(100% - 34px);
132
128
  word-break: keep-all;
133
129
  margin: 0 6px 0 4px;
130
+ flex: 1;
134
131
  }
135
132
 
136
133
  &-action-icon {
@@ -170,7 +167,6 @@
170
167
 
171
168
  &-top-start {
172
169
  left: 0;
173
-
174
170
  .nut-popover-arrow-top-start {
175
171
  left: 16px;
176
172
  transform: translateX(0%);
@@ -186,7 +182,6 @@
186
182
 
187
183
  &-bottom-end {
188
184
  right: 0;
189
-
190
185
  .nut-popover-arrow-bottom-end {
191
186
  right: 16px;
192
187
  transform: translateX(0%);
@@ -195,7 +190,6 @@
195
190
 
196
191
  &-bottom-start {
197
192
  left: 0;
198
-
199
193
  .nut-popover-arrow-bottom-start {
200
194
  left: 16px;
201
195
  transform: translateX(0%);
@@ -225,7 +219,18 @@
225
219
  color: $popover-content-background-color;
226
220
 
227
221
  .nut-popover-arrow {
228
- border-bottom-color: $popover-text-color;
222
+ &-top {
223
+ border-top-color: $popover-text-color;
224
+ }
225
+ &-bottom {
226
+ border-bottom-color: $popover-text-color;
227
+ }
228
+ &-left {
229
+ border-left-color: $popover-text-color;
230
+ }
231
+ &-right {
232
+ border-right-color: $popover-text-color;
233
+ }
229
234
  }
230
235
 
231
236
  .nut-popover-content {
@@ -493,6 +493,8 @@
493
493
  justify-content: center;
494
494
  padding: var(--nutui-popover-menu-item-padding, 8px);
495
495
  border-bottom: 1px solid var(--nutui-popover-divider-color, var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
496
+ max-width: var(--nutui-popover-menu-item-width, 160px);
497
+ word-wrap: break-word;
496
498
  }
497
499
  .nut-popover .nut-popover-content .nut-popover-menu-item:last-child {
498
500
  margin-bottom: 0px;
@@ -518,9 +520,10 @@
518
520
  font-size: 12px;
519
521
  }
520
522
  .nut-popover .nut-popover-content .nut-popover-menu-item-name {
521
- width: 100%;
523
+ width: calc(100% - 34px);
522
524
  word-break: keep-all;
523
525
  margin: 0 6px 0 4px;
526
+ flex: 1;
524
527
  }
525
528
  .nut-popover .nut-popover-content .nut-popover-menu-item-action-icon {
526
529
  display: flex;
@@ -591,9 +594,18 @@
591
594
  background: var(--nutui-popover-text-color, #1a1a1a);
592
595
  color: var(--nutui-popover-content-background-color, #ffffff);
593
596
  }
594
- .nut-popover-dark .nut-popover-arrow {
597
+ .nut-popover-dark .nut-popover-arrow-top {
598
+ border-top-color: var(--nutui-popover-text-color, #1a1a1a);
599
+ }
600
+ .nut-popover-dark .nut-popover-arrow-bottom {
595
601
  border-bottom-color: var(--nutui-popover-text-color, #1a1a1a);
596
602
  }
603
+ .nut-popover-dark .nut-popover-arrow-left {
604
+ border-left-color: var(--nutui-popover-text-color, #1a1a1a);
605
+ }
606
+ .nut-popover-dark .nut-popover-arrow-right {
607
+ border-right-color: var(--nutui-popover-text-color, #1a1a1a);
608
+ }
597
609
  .nut-popover-dark .nut-popover-content {
598
610
  background: var(--nutui-popover-text-color, #1a1a1a) !important;
599
611
  color: var(--nutui-popover-content-background-color, #ffffff) !important;
@@ -3,21 +3,9 @@ interface TabPanelInnerProps {
3
3
  autoHeightClassName: string;
4
4
  }
5
5
  export interface TabPaneProps {
6
- /**
7
- * 标题
8
- * @default -
9
- */
10
- title: string | number
11
- /**
12
- * 标签 Key , 匹配的标识符, 默认为索引值
13
- * @default -
14
- */
15
- value: string | number
16
- /**
17
- * 是否禁用标签
18
- * @default false
19
- */
20
- disabled: boolean
6
+ title: string | number;
7
+ value: string | number;
8
+ disabled: boolean;
21
9
  className: string;
22
10
  children?: React.ReactNode;
23
11
  }
@@ -21,12 +21,17 @@
21
21
  display: flex;
22
22
  }
23
23
 
24
+ .nut-tabs-horizontal {
25
+ flex-direction: column;
26
+ }
27
+
24
28
  .nut-tabs-titles {
25
29
  display: flex;
26
30
  box-sizing: border-box;
27
31
  height: var(--nutui-tabs-titles-height, 44px);
28
32
  user-select: none;
29
- overflow: hidden;
33
+ overflow-x: auto;
34
+ overflow-y: hidden;
30
35
  background: var(--nutui-tabs-titles-background-color, var(--nutui-color-background, #f5f6fa));
31
36
  scrollbar-width: none;
32
37
  }
@@ -37,7 +42,6 @@
37
42
  }
38
43
  .nut-tabs-titles .nut-tabs-list {
39
44
  width: 100%;
40
- height: auto;
41
45
  display: flex;
42
46
  flex-shrink: 0;
43
47
  }
@@ -53,10 +57,6 @@
53
57
  .nut-tabs-titles-right .nut-tabs-titles-item {
54
58
  padding: 0 22px;
55
59
  }
56
- .nut-tabs-titles-scrollable {
57
- overflow-x: auto;
58
- overflow-y: hidden;
59
- }
60
60
  .nut-tabs-titles-item {
61
61
  position: relative;
62
62
  display: flex;
@@ -72,11 +72,14 @@
72
72
  text-overflow: ellipsis;
73
73
  white-space: nowrap;
74
74
  }
75
+ .nut-tabs-titles-item .nut-icon {
76
+ color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
77
+ }
75
78
  .nut-tabs-titles-item-left, .nut-tabs-titles-item-right {
76
79
  flex: none;
77
80
  }
78
81
  .nut-tabs-titles-item-text {
79
- text-align: center;
82
+ color: var(--nutui-tabs-titles-item-color, var(--nutui-color-title, #1a1a1a));
80
83
  }
81
84
  .nut-tabs-titles-item-smile, .nut-tabs-titles-item-line {
82
85
  position: absolute;
@@ -84,9 +87,9 @@
84
87
  width: 0;
85
88
  height: 0;
86
89
  content: " ";
87
- bottom: var(--nutui-tabs-line-bottom, 15%);
88
90
  left: 50%;
89
91
  transform: translate(-50%, 0);
92
+ bottom: var(--nutui-tabs-line-bottom, 15%);
90
93
  border-radius: var(--nutui-tabs-line-border-radius, 2px);
91
94
  opacity: var(--nutui-tabs-tab-line-opacity, 1);
92
95
  overflow: hidden;
@@ -99,9 +102,11 @@
99
102
  font-size: 20px;
100
103
  width: 100%;
101
104
  height: 100%;
102
- color: var(--nutui-color-primary, #ff0f23);
103
105
  }
104
- .nut-tabs-titles-item-active {
106
+ .nut-tabs-titles-item-active .nut-icon {
107
+ color: var(--nutui-tabs-titles-item-active-color, var(--nutui-color-primary, #ff0f23));
108
+ }
109
+ .nut-tabs-titles-item-active .nut-tabs-titles-item-text {
105
110
  color: var(--nutui-tabs-titles-item-active-color, var(--nutui-color-primary, #ff0f23));
106
111
  font-weight: var(--nutui-tabs-titles-item-active-font-weight, var(--nutui-font-weight-bold, 600));
107
112
  }
@@ -117,10 +122,20 @@
117
122
  width: 40px;
118
123
  height: 20px;
119
124
  }
125
+ .nut-tabs-titles-item-active .nut-tabs-titles-item-smile .nut-icon {
126
+ color: var(--nutui-tabs-titles-item-active-color, var(--nutui-color-primary, #ff0f23));
127
+ }
120
128
  .nut-tabs-titles-item-disabled {
121
129
  color: var(--nutui-color-text-disabled, #c2c4cc);
122
130
  }
123
- .nut-tabs-titles-simple .nut-tabs-titles-item-active {
131
+ .nut-tabs-titles-item-disabled .nut-icon {
132
+ color: var(--nutui-color-text-disabled, #c2c4cc);
133
+ }
134
+ .nut-tabs-titles-item-disabled .nut-tabs-titles-item-text {
135
+ color: var(--nutui-color-text-disabled, #c2c4cc);
136
+ }
137
+ .nut-tabs-titles-simple .nut-tabs-titles-item-active .nut-tabs-titles-item-text,
138
+ .nut-tabs-titles-simple .nut-tabs-titles-item-active .nut-icon {
124
139
  color: var(--nutui-color-title, #1a1a1a);
125
140
  font-size: var(--nutui-tabs-titles-item-active-font-size, var(--nutui-font-size-l, 16px));
126
141
  }
@@ -149,11 +164,10 @@
149
164
  }
150
165
  .nut-tabs-titles-button .nut-tabs-titles-item-active .nut-tabs-titles-item-text {
151
166
  background: var(--nutui-color-default-light);
152
- color: var(--nutui-color-text, #505259);
167
+ color: var(--nutui-tabs-titles-item-active-color, var(--nutui-color-primary, #ff0f23));
153
168
  border-radius: var(--nutui-tabs-button-border-radius, 50px);
154
169
  font-weight: var(--nutui-font-weight-bold, 600);
155
170
  background-color: var(--nutui-tabs-button-active-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
156
- color: var(--nutui-color-primary, #ff0f23);
157
171
  border: var(--nutui-tabs-button-active-border, 1px solid var(--nutui-color-primary, #ff0f23));
158
172
  }
159
173
  .nut-tabs-titles-divider {
@@ -178,68 +192,29 @@
178
192
  display: none;
179
193
  }
180
194
 
181
- [dir=rtl] .nut-tabs-titles-item-smile, [dir=rtl] .nut-tabs-titles-item-line,
182
- .nut-rtl .nut-tabs-titles-item-smile,
183
- .nut-rtl .nut-tabs-titles-item-line {
184
- left: auto;
185
- right: 50%;
186
- transform: translate(50%, 0);
187
- }
188
- [dir=rtl] .nut-tabs-titles-divider .nut-tabs-titles-item::after,
189
- .nut-rtl .nut-tabs-titles-divider .nut-tabs-titles-item::after {
190
- right: auto;
191
- left: 0;
192
- }
193
-
194
- .nut-tabs-horizontal {
195
- flex-direction: column;
196
- position: relative;
197
- }
198
-
199
- .nut-tabs-vertical {
200
- flex-direction: row;
201
- width: 100%;
202
- }
203
195
  .nut-tabs-vertical .nut-tabs-ellipsis {
204
196
  text-overflow: ellipsis;
205
197
  white-space: nowrap;
206
198
  overflow: hidden;
207
199
  }
208
200
  .nut-tabs-vertical .nut-tabs-titles {
209
- box-sizing: border-box;
210
201
  flex-direction: column;
211
202
  height: 100%;
212
- padding: 0;
213
203
  width: var(--nutui-tabs-vertical-titles-width, 100px);
214
204
  flex-shrink: 0;
215
205
  }
216
206
  .nut-tabs-vertical .nut-tabs-titles .nut-tabs-list {
217
- width: 100%;
218
- display: flex;
219
207
  flex-direction: column;
220
- flex-shrink: 0;
221
- }
222
- .nut-tabs-vertical .nut-tabs-titles-line .nut-tabs-titles-item {
223
- padding-left: 14px;
224
- }
225
- .nut-tabs-vertical .nut-tabs-titles-scrollable {
226
- overflow-x: hidden;
227
- overflow-y: auto;
228
208
  }
229
209
  .nut-tabs-vertical .nut-tabs-titles-item {
230
210
  height: var(--nutui-tabs-vertical-titles-item-height, 40px);
231
- margin: 0;
232
211
  flex: none;
233
212
  }
234
213
  .nut-tabs-vertical .nut-tabs-titles-item-smile {
235
- width: 0;
236
- height: 0;
237
214
  overflow: hidden;
238
215
  transition: width 0.3s ease;
239
216
  }
240
217
  .nut-tabs-vertical .nut-tabs-titles-item-line {
241
- width: 0;
242
- height: 0;
243
218
  transform: translate(0, -50%);
244
219
  transition: height 0.3s ease;
245
220
  }
@@ -259,21 +234,17 @@
259
234
  right: -12px;
260
235
  bottom: -2%;
261
236
  left: auto;
262
- width: 40px;
263
- height: 20px;
264
237
  transform: rotate(320deg);
265
238
  }
266
239
  .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles {
267
240
  flex-direction: row;
268
- overflow-x: auto;
269
- overflow-y: hidden;
270
241
  height: var(--nutui-tabs-titles-height, 44px);
242
+ width: 100%;
243
+ padding: 0 !important;
271
244
  }
272
245
  .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles .nut-tabs-list {
273
- width: 100%;
274
- display: flex;
275
246
  flex-direction: row;
276
- flex-shrink: 0;
247
+ height: auto;
277
248
  }
278
249
  .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-content {
279
250
  flex-direction: row;
@@ -284,6 +255,9 @@
284
255
  .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles-item-active .nut-tabs-titles-item-line {
285
256
  left: 50%;
286
257
  transform: translate(-50%, 0);
258
+ width: var(--nutui-tabs-tab-line-width, 12px);
259
+ height: var(--nutui-tabs-tab-line-height, 2px);
260
+ background: var(--nutui-tabs-tab-line-color, var(--nutui-color-primary, #ff0f23));
287
261
  }
288
262
  .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles-item-active .nut-tabs-titles-item-smile {
289
263
  left: 50%;
@@ -301,28 +275,26 @@
301
275
  .nut-tabs-vertical .nut-tabs-content .nut-tabpane {
302
276
  height: 100%;
303
277
  }
304
- .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles {
278
+
279
+ .nut-tabs-content {
305
280
  display: flex;
306
- flex-direction: row;
307
- padding: 0 !important;
308
- width: 100%;
281
+ box-sizing: border-box;
309
282
  }
310
- .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles .nut-tabs-titles-item {
311
- display: flex;
312
- align-items: center;
313
- justify-content: center;
314
- flex: 1 0 auto;
283
+ .nut-tabs-content-wrap {
284
+ overflow: hidden;
315
285
  }
316
- .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles .nut-tabs-titles-item-active {
317
- color: var(--nutui-color-primary, #ff0f23);
318
- font-weight: var(--nutui-tabs-titles-item-active-font-weight, var(--nutui-font-weight-bold, 600));
319
- font-size: var(--nutui-tabs-titles-item-active-font-size, var(--nutui-font-size-l, 16px));
286
+
287
+ [dir=rtl] .nut-tabs-titles-item-smile, [dir=rtl] .nut-tabs-titles-item-line,
288
+ .nut-rtl .nut-tabs-titles-item-smile,
289
+ .nut-rtl .nut-tabs-titles-item-line {
290
+ left: auto;
291
+ right: 50%;
292
+ transform: translate(50%, 0);
320
293
  }
321
- .nut-tabs-vertical .nut-tabs-horizontal .nut-tabs-titles .nut-tabs-titles-item-active .nut-tabs-titles-item-line {
322
- content: " ";
323
- width: var(--nutui-tabs-tab-line-width, 12px);
324
- height: var(--nutui-tabs-tab-line-height, 2px);
325
- background: var(--nutui-tabs-tab-line-color, var(--nutui-color-primary, #ff0f23));
294
+ [dir=rtl] .nut-tabs-titles-divider .nut-tabs-titles-item::after,
295
+ .nut-rtl .nut-tabs-titles-divider .nut-tabs-titles-item::after {
296
+ right: auto;
297
+ left: 0;
326
298
  }
327
299
 
328
300
  [dir=rtl] .nut-tabs-vertical .nut-tabs-titles-line .nut-tabs-titles-item,
@@ -352,12 +324,4 @@
352
324
  right: 50%;
353
325
  left: auto;
354
326
  transform: translate(50%, 0) rotate(0deg);
355
- }
356
-
357
- .nut-tabs-content {
358
- display: flex;
359
- box-sizing: border-box;
360
- }
361
- .nut-tabs-content-wrap {
362
- overflow: hidden;
363
327
  }