@nutui/nutui-react 1.4.5 → 1.4.6-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 (39) hide show
  1. package/CHANGELOG.md +36 -9
  2. package/dist/esm/Address.js +7 -7
  3. package/dist/esm/Cascader.js +1 -1
  4. package/dist/esm/Form.js +1 -1
  5. package/dist/esm/FormItem.js +2 -2
  6. package/dist/esm/Icon.js +2 -2
  7. package/dist/esm/Image.js +76 -11
  8. package/dist/esm/NoticeBar.js +0 -2
  9. package/dist/esm/Notify.js +2 -2
  10. package/dist/esm/Picker.js +0 -1
  11. package/dist/esm/Popup.js +4 -4
  12. package/dist/esm/Progress.js +15 -7
  13. package/dist/esm/SearchBar.js +5 -4
  14. package/dist/esm/Sticky.js +7 -1
  15. package/dist/esm/{formitem-5a7034ff.js → formitem-9d18eb24.js} +4 -0
  16. package/dist/esm/{icon-8dc4de10.js → icon-2242973e.js} +15 -7
  17. package/dist/esm/types/src/packages/image/image.d.ts +3 -0
  18. package/dist/locales/base.js +1 -1
  19. package/dist/locales/en-US.js +1 -1
  20. package/dist/locales/id-ID.js +1 -1
  21. package/dist/locales/zh-CN.js +1 -1
  22. package/dist/locales/zh-TW.js +1 -1
  23. package/dist/locales/zh-UG.js +1 -1
  24. package/dist/nutui.react.es.js +158 -75
  25. package/dist/nutui.react.umd.js +158 -75
  26. package/dist/packages/calendar/calendar.scss +19 -1
  27. package/dist/packages/fixednav/fixednav.scss +1 -1
  28. package/dist/packages/image/image.scss +2 -0
  29. package/dist/packages/input/input.scss +3 -18
  30. package/dist/packages/notify/notify.scss +23 -19
  31. package/dist/packages/popup/popup.scss +130 -93
  32. package/dist/packages/searchbar/searchbar.scss +6 -20
  33. package/dist/packages/sticky/sticky.scss +3 -0
  34. package/dist/packages/tag/tag.scss +6 -1
  35. package/dist/style.css +1 -1
  36. package/dist/style.es.js +1 -1
  37. package/dist/styles/variables.scss +1 -3
  38. package/dist/types/index.d.ts +3 -0
  39. package/package.json +2 -2
@@ -1,11 +1,14 @@
1
+
1
2
  .nut-theme-dark {
2
3
  .nut-calendar {
3
4
  background: $dark5;
4
5
  color: $dark1;
6
+
5
7
  .nut-calendar-header {
6
8
  background: $dark5;
7
9
  color: $dark1;
8
10
  }
11
+
9
12
  .nut-calendar-content {
10
13
  .calendar-months-panel {
11
14
  .calendar-month-con {
@@ -18,6 +21,7 @@
18
21
  }
19
22
  }
20
23
  }
24
+
21
25
  .nut-calendar-footer {
22
26
  background: $dark5;
23
27
  color: $dark1;
@@ -48,12 +52,15 @@
48
52
  .nut-calendar-taro {
49
53
  height: 60vh;
50
54
  }
55
+
51
56
  .popup-box {
52
57
  height: 100%;
53
58
  }
59
+
54
60
  .nut-calendar-content {
55
61
  overflow-y: auto;
56
62
  }
63
+
57
64
  ::-webkit-scrollbar {
58
65
  display: none;
59
66
  }
@@ -77,6 +84,7 @@
77
84
  line-height: 22px;
78
85
  font-size: $calendar-sub-title-font;
79
86
  }
87
+
80
88
  .calendar-top-slot {
81
89
  height: $calendar-top-slot-height;
82
90
  }
@@ -103,15 +111,18 @@
103
111
  flex: 1;
104
112
  width: 100%;
105
113
  display: block;
114
+
106
115
  .calendar-months-panel {
107
116
  position: relative;
108
117
  width: 100%;
109
118
  height: auto;
110
119
  display: block;
111
120
  box-sizing: border-box;
121
+
112
122
  .viewArea {
113
123
  display: block;
114
124
  }
125
+
115
126
  .calendar-month {
116
127
  display: flex;
117
128
  flex-direction: column;
@@ -144,6 +155,7 @@
144
155
 
145
156
  .calendar-month-con {
146
157
  overflow: hidden;
158
+
147
159
  .calendar-month-item {
148
160
  .calendar-month-day:nth-child(7n + 0),
149
161
  .calendar-month-day:nth-child(7n + 1) {
@@ -174,6 +186,7 @@
174
186
  font-size: 12px;
175
187
  line-height: 14px;
176
188
  }
189
+
177
190
  .calendar-day-tip {
178
191
  position: absolute;
179
192
  bottom: 6px;
@@ -182,9 +195,11 @@
182
195
  line-height: 14px;
183
196
  color: $calendar-primary-color;
184
197
  }
198
+
185
199
  .calendar-curr-tips-top {
186
200
  top: 6px;
187
201
  }
202
+
188
203
  .calendar-curr-tips-bottom {
189
204
  bottom: 6px;
190
205
  }
@@ -197,9 +212,11 @@
197
212
  .calendar-curr-tips {
198
213
  visibility: hidden;
199
214
  }
215
+
200
216
  .calendar-curr-tip-curr {
201
217
  visibility: hidden;
202
218
  }
219
+
203
220
  .calendar-day-tip {
204
221
  color: $white;
205
222
  }
@@ -242,6 +259,7 @@
242
259
  }
243
260
  }
244
261
  }
245
- .nutui-popup__close-icon {
262
+
263
+ .nut-popup__close-icon {
246
264
  top: 7px !important;
247
265
  }
@@ -32,7 +32,7 @@
32
32
  position: absolute;
33
33
  right: 0;
34
34
 
35
- z-index: $fixednav-index + 1;
35
+ z-index: $fixednav-index;
36
36
  width: 80px;
37
37
  padding-left: 12px;
38
38
  height: 100%;
@@ -35,6 +35,7 @@
35
35
  align-items: center;
36
36
  justify-content: center;
37
37
  background: #f7f8fa;
38
+ background-size: 100% 100%;
38
39
  }
39
40
  .nut-img-error {
40
41
  width: 100%;
@@ -47,5 +48,6 @@
47
48
  align-items: center;
48
49
  justify-content: center;
49
50
  background: #f7f8fa;
51
+ background-size: 100% 100%;
50
52
  }
51
53
  }
@@ -54,18 +54,9 @@ textarea {
54
54
  border: 0;
55
55
  text-decoration: none;
56
56
  }
57
- // &-label {
58
- // width: 80px;
59
- // overflow: hidden;
60
- // text-align: left;
61
- // display: flex;
62
- // .label-string {
63
- // overflow: hidden;
64
- // white-space: nowrap;
65
- // text-overflow: ellipsis;
66
- // color: $gray1;
67
- // }
68
- // }
57
+ .label-string {
58
+ color: $gray1;
59
+ }
69
60
  &__clear {
70
61
  width: 16px;
71
62
  height: 16px;
@@ -113,11 +104,6 @@ textarea {
113
104
  vertical-align: middle;
114
105
  }
115
106
  &-right-mark {
116
- // .nut-input-value {
117
- // display: flex;
118
- // align-items: center;
119
- // justify-content: space-between;
120
- // }
121
107
  .nut-input-main-con {
122
108
  display: flex;
123
109
  align-items: center;
@@ -159,7 +145,6 @@ textarea {
159
145
  margin-top: 4px;
160
146
  color: #808080;
161
147
  font-size: 12px;
162
- // line-height: var(--van-field-word-limit-line-height);
163
148
  }
164
149
  &-left-icon,
165
150
  &-right-icon {
@@ -1,22 +1,3 @@
1
- .popup-top {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- width: 100%;
6
- overflow-y: auto;
7
- transition: transform 0.3s;
8
- z-index: 9999;
9
- }
10
- .popup-bottom {
11
- position: fixed;
12
- bottom: 0;
13
- left: 0;
14
- width: 100%;
15
- overflow-y: auto;
16
- transition: transform 0.3s;
17
- z-index: 9999;
18
- }
19
-
20
1
  /*入场动画开始*/
21
2
  .fade-enter {
22
3
  opacity: 0;
@@ -59,6 +40,7 @@
59
40
  opacity: 1;
60
41
  transition: opacity 1s;
61
42
  }
43
+
62
44
  .nut-notify {
63
45
  box-sizing: border-box;
64
46
  padding: $notify-padding;
@@ -68,9 +50,31 @@
68
50
  text-align: center;
69
51
  word-wrap: break-word;
70
52
  height: $notify-height;
53
+
54
+ &--popup-top {
55
+ position: fixed;
56
+ top: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ overflow-y: auto;
60
+ transition: transform 0.3s;
61
+ z-index: 9999;
62
+ }
63
+
64
+ &--popup-bottom {
65
+ position: fixed;
66
+ bottom: 0;
67
+ left: 0;
68
+ width: 100%;
69
+ overflow-y: auto;
70
+ transition: transform 0.3s;
71
+ z-index: 9999;
72
+ }
73
+
71
74
  &--base {
72
75
  background: $notify-base-background-color;
73
76
  }
77
+
74
78
  &--primary {
75
79
  background: $notify-primary-background-color;
76
80
  }
@@ -1,79 +1,86 @@
1
+
1
2
  .nut-theme-dark {
2
3
  .nut-popup {
3
4
  background: $dark6;
4
5
  }
5
- .nutui-popup {
6
+
7
+ .nut-popup {
6
8
  &__close-icon {
7
9
  color: $dark1;
8
10
  }
9
11
  }
10
- .popup-slide-center-enter-done {
12
+
13
+ .nut-popup-slide-center-enter-done {
11
14
  color: $dark1;
12
15
  }
13
16
  }
14
17
 
15
- .popup-slide {
16
- &-center-enter,
17
- &-center-exit {
18
- opacity: 0;
19
- }
20
- &-center-enter-active {
21
- opacity: 1;
22
- transition: opacity 0.5s ease;
23
- }
18
+ .nut-popup {
19
+ position: fixed;
20
+ max-height: 100%;
21
+ overflow-y: auto;
22
+ background-color: $white;
23
+ color: $gray1;
24
+ -webkit-overflow-scrolling: touch;
24
25
 
25
- &-top-enter,
26
- &-top-exit {
27
- transform: translate(0, -100%);
28
- }
29
- &-top-enter-active {
30
- transform: translate(0, 0);
31
- }
26
+ &__close-icon {
27
+ position: absolute !important;
28
+ z-index: 1;
29
+ color: #969799;
30
+ font-size: 18px;
31
+ cursor: pointer;
32
+ width: 30px;
33
+ height: 30px;
34
+ line-height: 30px;
35
+ text-align: center;
32
36
 
33
- &-right-enter,
34
- &-right-exit {
35
- transform: translate(100%, 0);
36
- }
37
- &-right-enter-active {
38
- transform: translate(0, 0);
39
- }
37
+ &:active {
38
+ opacity: 0.7;
39
+ }
40
40
 
41
- &-bottom-enter,
42
- &-bottom-exit {
43
- transform: translate(0, 100%);
44
- }
45
- &-bottom-enter-active {
46
- transform: translate(0, 0);
47
- }
41
+ &--top-left {
42
+ top: $popup-close-icon-margin;
43
+ left: $popup-close-icon-margin;
44
+ }
48
45
 
49
- &-left-enter,
50
- &-left-exit {
51
- transform: translate(-100%, 0);
52
- }
53
- &-left-enter-active {
54
- transform: translate(0, 0);
46
+ &--top-right {
47
+ top: $popup-close-icon-margin;
48
+ right: $popup-close-icon-margin;
49
+ }
50
+
51
+ &--bottom-left {
52
+ bottom: $popup-close-icon-margin;
53
+ left: $popup-close-icon-margin;
54
+ }
55
+
56
+ &--bottom-right {
57
+ right: $popup-close-icon-margin;
58
+ bottom: $popup-close-icon-margin;
59
+ }
55
60
  }
56
61
  }
57
62
 
58
- .popup-center {
63
+ .nut-popup-center {
59
64
  top: 50%;
60
65
  left: 50%;
61
66
  transform: translate(-50%, -50%);
67
+
62
68
  &.round {
63
69
  border-radius: $popup-border-radius;
64
70
  }
65
71
  }
66
72
 
67
- .popup-bottom {
73
+ .nut-popup-bottom {
68
74
  bottom: 0;
69
75
  left: 0;
70
76
  width: 100%;
77
+
71
78
  &.round {
72
79
  border-radius: $popup-border-radius $popup-border-radius 0 0;
73
80
  }
74
81
  }
75
82
 
76
- .popup-right {
83
+ .nut-popup-right {
77
84
  top: 0;
78
85
  right: 0;
79
86
 
@@ -82,7 +89,7 @@
82
89
  }
83
90
  }
84
91
 
85
- .popup-left {
92
+ .nut-popup-left {
86
93
  top: 0;
87
94
  left: 0;
88
95
 
@@ -91,7 +98,7 @@
91
98
  }
92
99
  }
93
100
 
94
- .popup-top {
101
+ .nut-popup-top {
95
102
  top: 0;
96
103
  left: 0;
97
104
  width: 100%;
@@ -101,64 +108,94 @@
101
108
  }
102
109
  }
103
110
 
104
- .nut-popup {
105
- position: fixed;
106
- max-height: 100%;
107
- overflow-y: auto;
108
- background-color: $white;
109
- color: $gray1;
110
- transition: transform 0.5s;
111
- -webkit-overflow-scrolling: touch;
112
- }
111
+ .nut-popup-slide {
112
+ &-center-enter,
113
+ &-center-exit {
114
+ opacity: 0;
115
+ }
113
116
 
114
- .nut-overflow-hidden {
115
- overflow: hidden !important;
116
- }
117
+ &-center-enter-active {
118
+ opacity: 1;
119
+ transition: opacity 0.5s ease;
120
+ }
117
121
 
118
- .nutui-popup {
119
- &__close-icon {
120
- position: absolute !important;
121
- z-index: 1;
122
- color: #969799;
123
- font-size: 18px;
124
- cursor: pointer;
125
- width: 30px;
126
- height: 30px;
127
- line-height: 30px;
128
- text-align: center;
122
+ &-top-enter {
123
+ transform: translate(0, -100%);
124
+ }
129
125
 
130
- &:active {
131
- opacity: 0.7;
132
- }
126
+ &-top-enter-active {
127
+ transform: translate(0, 0);
128
+ transition: transform 0.5s;
129
+ }
133
130
 
134
- &--top-left {
135
- top: $popup-close-icon-margin;
136
- left: $popup-close-icon-margin;
137
- }
131
+ &-top-exit {
132
+ transform: translate(0, 0);
133
+ }
138
134
 
139
- &--top-right {
140
- top: $popup-close-icon-margin;
141
- right: $popup-close-icon-margin;
142
- }
135
+ &-top-exit-active,
136
+ &-top-exit-done {
137
+ transform: translate(0, -100%);
138
+ transition: transform 0.5s;
139
+ }
143
140
 
144
- &--bottom-left {
145
- bottom: $popup-close-icon-margin;
146
- left: $popup-close-icon-margin;
147
- }
141
+ &-right-enter {
142
+ transform: translate(100%, 0);
143
+ }
148
144
 
149
- &--bottom-right {
150
- right: $popup-close-icon-margin;
151
- bottom: $popup-close-icon-margin;
152
- }
145
+ &-right-enter-active {
146
+ transform: translate(0, 0);
147
+ transition: transform 0.5s;
153
148
  }
154
- }
155
149
 
156
- .fade-enter {
157
- transform: translate(0, -100%);
158
- }
159
- .fade-enter-active {
160
- transform: translate(0, 0);
150
+ &-right-exit {
151
+ transform: translate(0, 0);
152
+ }
153
+
154
+ &-right-exit-active,
155
+ &-right-exit-done {
156
+ transform: translate(100%, 0);
157
+ transition: transform 0.5s;
158
+ }
159
+
160
+ &-bottom-enter {
161
+ transform: translate(0, 100%);
162
+ }
163
+
164
+ &-bottom-enter-active {
165
+ transform: translate(0, 0);
166
+ transition: transform 0.5s;
167
+ }
168
+
169
+ &-bottom-exit {
170
+ transform: translate(0, 0);
171
+ }
172
+
173
+ &-bottom-exit-active,
174
+ &-bottom-exit-done {
175
+ transform: translate(0, 100%);
176
+ transition: transform 0.5s;
177
+ }
178
+
179
+ &-left-enter {
180
+ transform: translate(-100%, 0);
181
+ }
182
+
183
+ &-left-enter-active {
184
+ transform: translate(0, 0);
185
+ transition: transform 0.5s;
186
+ }
187
+
188
+ &-left-exit {
189
+ transform: translate(0, 0);
190
+ }
191
+
192
+ &-left-exit-active,
193
+ &-left-exit-done {
194
+ transform: translate(-100%, 0);
195
+ transition: transform 0.5s;
196
+ }
161
197
  }
162
- .fade-exit {
163
- transform: translate(0, -100%);
198
+
199
+ .nut-overflow-hidden {
200
+ overflow: hidden !important;
164
201
  }
@@ -48,15 +48,13 @@
48
48
  align-items: center;
49
49
  justify-content: center;
50
50
  height: $searchbar-input-height;
51
+ background: $searchbar-input-background;
51
52
  }
52
53
  &__icon {
53
- position: absolute !important;
54
- }
55
- &__leftin-icon {
56
- left: 10px;
54
+ padding: 0 5px 0 10px;
57
55
  }
58
56
  &__rightin-icon {
59
- right: 5px;
57
+ padding: 0 5px;
60
58
  }
61
59
  .nut-searchbar__input-box {
62
60
  display: flex;
@@ -69,12 +67,13 @@
69
67
  box-sizing: border-box;
70
68
  width: $searchbar-input-width;
71
69
  height: $searchbar-input-height;
70
+ line-height: $searchbar-input-height;
72
71
  width: 100%;
73
72
  padding: $searchbar-input-padding;
74
73
  border-radius: 0;
75
74
  font-size: $font-size-small;
76
- background: $searchbar-input-background;
77
75
  color: $searchbar-input-text-color;
76
+ background: transparent;
78
77
  }
79
78
  &__round {
80
79
  border-radius: $searchbar-input-border-radius;
@@ -83,9 +82,7 @@
83
82
  cursor: not-allowed;
84
83
  }
85
84
  &__clear {
86
- position: absolute !important;
87
- z-index: 888;
88
- right: 8px;
85
+ padding: 0 10px 0 5px;
89
86
  i {
90
87
  color: $gray1 !important;
91
88
  }
@@ -118,14 +115,3 @@
118
115
  margin-left: 10px;
119
116
  }
120
117
  }
121
- .nut-searchbar-taro {
122
- .nut-searchbar__leftin-icon {
123
- //top: 41%;
124
- }
125
- .nut-searchbar__rightin-icon {
126
- top: 41%;
127
- }
128
- .nut-searchbar__clear {
129
- top: 33%;
130
- }
131
- }
@@ -0,0 +1,3 @@
1
+ .nut-sticky-fixed {
2
+ position: fixed;
3
+ }
@@ -1,6 +1,11 @@
1
1
  .nut-tag {
2
2
  padding: 0 4px;
3
- border-radius: 4px;
3
+ display: inline-flex;
4
+ justify-content: center;
5
+ align-items: center;
6
+ font-size: $tag-font-size;
7
+ border-radius: $tag-default-border-radius;
8
+ height: $tag-height;
4
9
  ._icon {
5
10
  vertical-align: middle;
6
11
  margin-left: 4px;