@nutui/nutui-react 1.4.8 → 1.4.9-beta.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/Animate.js +1 -1
  3. package/dist/esm/AnimatingNumbers.js +2 -5
  4. package/dist/esm/Badge.js +8 -2
  5. package/dist/esm/CalendarItem.js +2 -2
  6. package/dist/esm/Card.js +2 -1
  7. package/dist/esm/Cascader.js +2 -1
  8. package/dist/esm/Checkbox.js +2 -2
  9. package/dist/esm/CheckboxGroup.js +34 -69
  10. package/dist/esm/CircleProgress.js +1 -4
  11. package/dist/esm/Collapse.js +2 -1
  12. package/dist/esm/DatePicker.js +1 -27
  13. package/dist/esm/Form/style/index.js +1 -1
  14. package/dist/esm/FormItem/style/index.js +1 -1
  15. package/dist/esm/Grid.js +2 -1
  16. package/dist/esm/GridItem.js +3 -1
  17. package/dist/esm/Indicator.js +1 -1
  18. package/dist/esm/MenuItem/style/index.js +1 -1
  19. package/dist/esm/MenuItem.js +0 -2
  20. package/dist/esm/NavBar/style/index.js +1 -1
  21. package/dist/esm/NumberKeyboard/style/index.js +1 -1
  22. package/dist/esm/Picker.js +1 -1
  23. package/dist/esm/Popover/style/index.js +2 -1
  24. package/dist/esm/Popup.js +1 -1
  25. package/dist/esm/Rate.js +3 -2
  26. package/dist/esm/SearchBar/style/index.js +1 -1
  27. package/dist/esm/SideNavBar/style/index.js +1 -1
  28. package/dist/esm/Skeleton/style/index.js +1 -1
  29. package/dist/esm/Sticky.js +6 -1
  30. package/dist/esm/Swipe.js +2 -1
  31. package/dist/esm/Table/style/index.js +1 -1
  32. package/dist/esm/Tabs/style/index.js +2 -1
  33. package/dist/esm/Tabs.js +3 -2
  34. package/dist/esm/TimeSelect/style/index.js +1 -0
  35. package/dist/esm/Uploader/style/index.js +1 -0
  36. package/dist/esm/Uploader.js +74 -72
  37. package/dist/esm/WaterMark.js +1 -1
  38. package/dist/esm/{checkbox-b2f0756e.js → checkbox-6969a83f.js} +34 -16
  39. package/dist/esm/index-a90733f9.js +11 -0
  40. package/dist/esm/{tabs-5fe5fd90.js → tabs-c13f8ffe.js} +2 -0
  41. package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +2 -7
  42. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +4 -5
  43. package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +10 -0
  44. package/dist/esm/types/src/packages/tabs/tabs.d.ts +4 -1
  45. package/dist/esm/types/src/packages/uploader/upload.d.ts +3 -0
  46. package/dist/esm/types/src/packages/uploader/uploader.d.ts +4 -1
  47. package/dist/esm/types/src/utils/Interceptor.d.ts +6 -0
  48. package/dist/esm/types/src/utils/index.d.ts +2 -0
  49. package/dist/locales/base.js +1 -1
  50. package/dist/locales/en-US.js +1 -1
  51. package/dist/locales/id-ID.js +1 -1
  52. package/dist/locales/zh-CN.js +1 -1
  53. package/dist/locales/zh-TW.js +1 -1
  54. package/dist/locales/zh-UG.js +1 -1
  55. package/dist/nutui.react.es.js +435 -438
  56. package/dist/nutui.react.umd.js +435 -438
  57. package/dist/packages/datepicker/datepicker.scss +0 -3
  58. package/dist/packages/form/form.scss +1 -0
  59. package/dist/packages/formitem/formitem.scss +13 -0
  60. package/dist/packages/menuitem/menuitem.scss +4 -0
  61. package/dist/packages/navbar/navbar.scss +24 -0
  62. package/dist/packages/numberkeyboard/numberkeyboard.scss +1 -0
  63. package/dist/packages/picker/picker.scss +47 -14
  64. package/dist/packages/searchbar/searchbar.scss +1 -0
  65. package/dist/packages/sidenavbar/sidenavbar.scss +13 -0
  66. package/dist/packages/skeleton/skeleton.scss +7 -0
  67. package/dist/packages/table/table.scss +22 -0
  68. package/dist/packages/tabs/tabs.scss +65 -35
  69. package/dist/packages/timeselect/timeselect.scss +7 -0
  70. package/dist/packages/uploader/uploader.scss +85 -28
  71. package/dist/style.css +1 -1
  72. package/dist/style.es.js +1 -1
  73. package/dist/styles/variables.scss +95 -21
  74. package/dist/types/index.d.ts +16 -16
  75. package/package.json +1 -1
  76. package/dist/esm/types/src/packages/tabbar/use-props-value.d.ts +0 -7
@@ -14,10 +14,6 @@
14
14
 
15
15
  &.active {
16
16
  color: $dark1;
17
-
18
- .nut-tabs__titles-item__text {
19
- color: $dark1;
20
- }
21
17
  }
22
18
 
23
19
  &__text {
@@ -53,7 +49,7 @@
53
49
  box-sizing: border-box;
54
50
  flex-direction: column;
55
51
  height: 100%;
56
- padding: 10px 0 !important;
52
+ padding: 0 !important;
57
53
  width: $tabs-vertical-titles-width;
58
54
  flex-shrink: 0;
59
55
 
@@ -62,15 +58,15 @@
62
58
  overflow-y: auto;
63
59
  }
64
60
 
65
- &-item {
61
+ .nut-tabs__titles-item {
66
62
  height: $tabs-vertical-titles-item-height;
67
63
  flex: none;
68
64
 
69
- &__smile {
65
+ .nut-tabs__titles-item__smile {
70
66
  transition: width 0.3s ease;
71
67
  }
72
68
 
73
- &__line {
69
+ .nut-tabs__titles-item__line {
74
70
  bottom: none;
75
71
  transform: translate(0, -50%);
76
72
  transition: height 0.3s ease;
@@ -79,13 +75,13 @@
79
75
  }
80
76
 
81
77
  &.active {
82
- background-color: $background-color3;
78
+ background-color: $tabs-horizontal-titles-item-active-background-color;
83
79
 
84
80
  .nut-tabs__titles-item__line {
85
81
  left: 10px;
86
- width: 3px;
87
- background: $tabs-vertical-tab-line-color;
82
+ width: $tabs-vertical-titles-item-active-line-width;
88
83
  height: $tabs-vertical-titles-item-active-line-height;
84
+ background: $tabs-vertical-tab-line-color;
89
85
  }
90
86
 
91
87
  .nut-tabs__titles-item__smile {
@@ -113,9 +109,52 @@
113
109
  height: 100%;
114
110
  }
115
111
  }
112
+
113
+ .horizontal {
114
+ .nut-tabs__titles {
115
+ display: flex;
116
+ flex-direction: row;
117
+ padding: 0 !important;
118
+ width: 100%;
119
+
120
+ .nut-tabs__titles-item {
121
+ display: flex;
122
+ align-items: center;
123
+ justify-content: center;
124
+ flex: 1 0 auto;
125
+
126
+ .nut-tabs__titles-item__smile,
127
+ .nut-tabs__titles-item__line {
128
+ position: absolute;
129
+ transition: width 0.3s ease;
130
+ width: 0;
131
+ height: 0;
132
+ content: ' ';
133
+ bottom: $tabs-horizontal-tab-line-bottom;
134
+ left: 50%;
135
+ transform: translate(-50%, 0);
136
+ overflow: hidden;
137
+ border-radius: $tabs-horizontal-tab-line-border-radius;
138
+ opacity: $tabs-horizontal-tab-line-opacity;
139
+ }
140
+
141
+ &.active {
142
+ color: $tabs-titles-item-active-color;
143
+ font-weight: $tabs-titles-item-active-font-weight;
144
+
145
+ .nut-tabs__titles-item__line {
146
+ content: ' ';
147
+ width: $tabs-horizontal-titles-item-active-line-width;
148
+ height: $tabs-horizontal-titles-item-active-line-height;
149
+ background: $tabs-horizontal-tab-line-color;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
116
155
  }
117
156
 
118
- &__titles {
157
+ .nut-tabs__titles {
119
158
  height: $tabs-horizontal-titles-height;
120
159
  padding: 0 10px;
121
160
  display: flex;
@@ -169,33 +208,26 @@
169
208
  }
170
209
  }
171
210
 
172
- &-item {
211
+ .nut-tabs__titles-item {
173
212
  position: relative;
174
213
  font-size: $tabs-titles-item-font-size;
175
214
  min-width: $tabs-horizontal-titles-item-min-width;
176
- width: 0;
177
215
  display: flex;
178
216
  align-items: center;
179
217
  justify-content: center;
180
218
  flex: 1 0 auto;
181
219
  color: $tabs-titles-item-color;
182
220
 
183
- &-left-align {
184
- flex: none;
185
- }
186
-
187
- &__text {
188
- color: $gray1;
221
+ .nut-tabs__titles-item__text {
222
+ text-align: center;
189
223
 
190
224
  &.ellipsis {
191
225
  @include oneline-ellipsis();
192
226
  }
193
-
194
- text-align: center;
195
227
  }
196
228
 
197
- &__smile,
198
- &__line {
229
+ .nut-tabs__titles-item__smile,
230
+ .nut-tabs__titles-item__line {
199
231
  position: absolute;
200
232
  transition: width 0.3s ease;
201
233
  width: 0;
@@ -206,9 +238,10 @@
206
238
  transform: translate(-50%, 0);
207
239
  overflow: hidden;
208
240
  border-radius: $tabs-horizontal-tab-line-border-radius;
241
+ opacity: $tabs-horizontal-tab-line-opacity;
209
242
  }
210
243
 
211
- &__smile {
244
+ .nut-tabs__titles-item__smile {
212
245
  .nut-icon {
213
246
  position: absolute;
214
247
  font-size: 12px;
@@ -218,25 +251,22 @@
218
251
  }
219
252
  }
220
253
 
254
+ &.nut-tabs__titles-item-left-align {
255
+ flex: none;
256
+ }
257
+
221
258
  &.disabled {
222
259
  color: $disable-color;
223
-
224
- .nut-tabs__titles-item__text {
225
- color: $disable-color;
226
- }
227
260
  }
228
261
 
229
262
  &.active {
230
- font-weight: 600;
231
-
232
- .nut-tabs__titles-item__text {
233
- color: $gray1;
234
- }
263
+ color: $tabs-titles-item-active-color;
264
+ font-weight: $tabs-titles-item-active-font-weight;
235
265
 
236
266
  .nut-tabs__titles-item__line {
237
267
  content: ' ';
238
268
  width: $tabs-horizontal-titles-item-active-line-width;
239
- height: 3px;
269
+ height: $tabs-horizontal-titles-item-active-line-height;
240
270
  background: $tabs-horizontal-tab-line-color;
241
271
  }
242
272
  }
@@ -1,14 +1,18 @@
1
+
1
2
  .nut-theme-dark {
2
3
  .nut-timeselect {
3
4
  background-color: $dark6;
5
+
4
6
  &__title {
5
7
  background-color: $dark6;
6
8
  color: $dark1;
7
9
  }
10
+
8
11
  &__content {
9
12
  &-left {
10
13
  background-color: $dark5;
11
14
  color: $dark1;
15
+
12
16
  .nut-timepannel-active {
13
17
  background-color: $dark6;
14
18
  color: $dark1;
@@ -16,9 +20,11 @@
16
20
  }
17
21
  }
18
22
  }
23
+
19
24
  .nut-timedetail__item {
20
25
  background-color: $dark4;
21
26
  color: $dark1;
27
+
22
28
  &-active {
23
29
  background-color: $dark-brand-color;
24
30
  }
@@ -53,6 +59,7 @@
53
59
  overflow: auto;
54
60
  background-color: $background-color2;
55
61
  color: $title-color;
62
+
56
63
  .nut-timepannel-active {
57
64
  background-color: red;
58
65
  }
@@ -1,9 +1,11 @@
1
1
  @import '../../styles/mixins/text-ellipsis.scss';
2
+
2
3
  .nut-theme-dark {
3
4
  .nut-uploader {
4
5
  // background-color: $gray2;
5
6
  &__preview {
6
7
  margin-bottom: 0;
8
+
7
9
  &-img {
8
10
  i {
9
11
  color: $dark1 !important;
@@ -11,16 +13,19 @@
11
13
  }
12
14
  }
13
15
  }
16
+
14
17
  .nut-progress {
15
18
  .nut-progress-text__inner {
16
19
  color: $white !important;
17
20
  }
18
21
  }
22
+
19
23
  .nut-uploader__preview-list {
20
24
  background: $dark5;
21
25
  color: $dark1;
22
26
  }
23
27
  }
28
+
24
29
  .nut-uploader {
25
30
  position: relative;
26
31
  display: flex;
@@ -32,12 +37,31 @@
32
37
 
33
38
  &__upload {
34
39
  position: relative;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
35
43
  background: $uploader-background;
36
44
  width: $uploader-picture-width;
37
45
  height: $uploader-picture-height;
46
+ border: $uploader-picture-border;
47
+ border-radius: $uploader-picture-border-radius;
48
+ }
49
+
50
+ &__icon {
38
51
  display: flex;
39
- align-items: center;
52
+ flex-direction: column;
40
53
  justify-content: center;
54
+ align-items: center;
55
+
56
+ i {
57
+ opacity: $uploader-picture-icon-opacity;
58
+ margin-bottom: $uploader-picture-icon-margin-bottom;
59
+ }
60
+
61
+ &-tip {
62
+ font-size: $uploader-picture-icon-tip-font-size;
63
+ color: $uploader-picture-icon-tip-color;
64
+ }
41
65
  }
42
66
 
43
67
  &__input {
@@ -49,49 +73,67 @@
49
73
  overflow: hidden;
50
74
  cursor: pointer !important;
51
75
  opacity: 0;
76
+
52
77
  &:disabled {
53
78
  cursor: not-allowed;
54
79
  }
55
80
  }
56
81
 
82
+ &__upload-disabled {
83
+ background: $uploader-background-disabled;
84
+
85
+ .nut-uploader__icon {
86
+ i {
87
+ opacity: $uploader-picture-icon-opacity-disabled;
88
+ margin-bottom: $uploader-picture-icon-margin-bottom;
89
+ }
90
+ }
91
+ }
92
+
57
93
  &__preview {
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- margin-right: 10px;
62
- margin-bottom: 10px;
94
+ position: relative;
95
+ margin-right: $uploader-preview-margin-right;
96
+ margin-bottom: $uploader-preview-margin-bottom;
63
97
  box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
98
+
64
99
  &__progress {
65
100
  position: absolute;
66
101
  left: 0;
67
102
  top: 0;
68
- width: 100%;
69
- height: 100%;
70
- background: rgba(0, 0, 0, 0.6);
71
103
  display: flex;
72
104
  flex-direction: column;
73
105
  align-items: center;
74
106
  justify-content: center;
107
+ width: 100%;
108
+ height: 100%;
109
+ background: $uploader-preview-progress-background;
110
+ border-radius: $uploader-picture-border-radius;
111
+
112
+ i {
113
+ margin-bottom: $uploader-picture-icon-margin-bottom;
114
+ }
115
+
75
116
  &__msg {
76
117
  color: #fff;
77
118
  font-size: 12px;
78
- margin-top: 6px;
79
119
  }
80
120
  }
121
+
81
122
  &.list {
82
123
  width: 100%;
83
124
  margin-right: 0px;
84
125
  margin-bottom: 0px;
85
126
  margin-top: 10px;
86
127
  }
128
+
87
129
  &-list {
88
130
  width: 100%;
89
131
  height: 32px;
90
132
  display: flex;
91
133
  flex-direction: column;
92
134
  position: relative;
93
- padding-right: 20px;
94
- background-color: $gray4;
135
+ background-color: $gray5;
136
+
95
137
  .nut-uploader__preview-img__file__name {
96
138
  -webkit-line-clamp: 1;
97
139
  padding: 2px;
@@ -103,49 +145,60 @@
103
145
  right: 4px;
104
146
  top: 6px;
105
147
  }
148
+
106
149
  .nut-progress {
107
150
  position: absolute;
108
151
  left: 0;
109
152
  right: 0;
110
153
  bottom: 0;
154
+
111
155
  .nut-progress-outer {
112
156
  height: 2px !important;
113
157
  }
114
158
  }
115
159
  }
160
+
161
+ .close {
162
+ position: absolute;
163
+ right: $uploader-preview-close-right;
164
+ top: $uploader-preview-close-top;
165
+ transform: translate(50%, -50%);
166
+ }
167
+
116
168
  &-img {
117
169
  position: relative;
118
170
  width: $uploader-picture-width;
119
171
  height: $uploader-picture-height;
172
+ border-radius: $uploader-picture-border-radius;
173
+
120
174
  i {
121
175
  color: $gray1;
122
176
  }
123
- .close {
124
- position: absolute;
125
- right: 0;
126
- top: 0;
127
- transform: translate(50%, -50%);
128
- }
177
+
129
178
  .tips {
130
179
  position: absolute;
131
180
  bottom: 0;
132
181
  left: 0;
133
- right: 0;
134
- text-align: center;
135
- display: flex;
136
- align-items: center;
137
- justify-content: center;
138
182
  font-size: 12px;
139
183
  color: $white;
140
- height: 0px;
141
- transition: height 0.3s;
142
- background: rgba(0, 0, 0, 0.54);
184
+ text-align: center;
185
+ box-sizing: border-box;
186
+ height: $uploader-preview-tips-height;
187
+ line-height: $uploader-preview-tips-height;
188
+ border-radius: $uploader-picture-border-radius;
189
+ border-top-left-radius: 0;
190
+ border-top-right-radius: 0;
191
+ padding: $uploader-preview-tips-padding;
192
+ background: $uploader-preview-tips-background;
143
193
  @include oneline-ellipsis();
144
194
  }
195
+
145
196
  &__c {
146
- height: 100%;
147
- width: 100%;
197
+ max-width: 100%;
198
+ max-height: 100%;
199
+ border-radius: 6px;
148
200
  }
201
+
149
202
  &__file {
150
203
  height: 100%;
151
204
  width: 100%;
@@ -159,12 +212,15 @@
159
212
  width: 100%;
160
213
  font-size: 12px;
161
214
  color: $text-color;
215
+
162
216
  &.error {
163
217
  color: red !important;
164
218
  }
219
+
165
220
  &.success {
166
221
  color: #1890ff !important;
167
222
  }
223
+
168
224
  .nut-icon-link {
169
225
  &::before {
170
226
  margin-left: -25%;
@@ -172,6 +228,7 @@
172
228
  transform: none;
173
229
  }
174
230
  }
231
+
175
232
  @include moreline-ellipsis();
176
233
  }
177
234
  }