@nutui/nutui-react 2.0.0-alpha.4 → 2.0.0-alpha.6

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 (47) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/esm/Avatar.js +30 -25
  3. package/dist/esm/AvatarGroup.js +10 -15
  4. package/dist/esm/Cascader.js +46 -58
  5. package/dist/esm/Checkbox.js +1 -2
  6. package/dist/esm/CheckboxGroup.js +18 -20
  7. package/dist/esm/DatePicker.js +10 -10
  8. package/dist/esm/Ellipsis.js +13 -12
  9. package/dist/esm/Empty.js +18 -26
  10. package/dist/esm/Image.js +3 -5
  11. package/dist/esm/Picker.js +175 -160
  12. package/dist/esm/Skeleton.js +1 -1
  13. package/dist/esm/Swipe.js +4 -10
  14. package/dist/esm/TabPane.js +39 -3
  15. package/dist/esm/Tabbar/style/index.js +1 -1
  16. package/dist/esm/Table.js +20 -34
  17. package/dist/esm/TextArea.js +53 -81
  18. package/dist/esm/cellgroup2.js +5 -4
  19. package/dist/esm/checkbox2.js +34 -47
  20. package/dist/esm/tabs2.js +10 -0
  21. package/dist/locales/base.js +1 -1
  22. package/dist/locales/en-US.js +1 -1
  23. package/dist/locales/id-ID.js +1 -1
  24. package/dist/locales/zh-CN.js +1 -1
  25. package/dist/locales/zh-TW.js +1 -1
  26. package/dist/locales/zh-UG.js +1 -1
  27. package/dist/nutui.react.mjs +723 -682
  28. package/dist/nutui.react.umd.js +723 -682
  29. package/dist/packages/cascader/cascader.scss +0 -26
  30. package/dist/packages/cellgroup/cellgroup.scss +20 -16
  31. package/dist/packages/checkbox/checkbox.scss +8 -11
  32. package/dist/packages/empty/empty.scss +0 -9
  33. package/dist/packages/picker/picker.scss +66 -137
  34. package/dist/packages/tabbar/tabbar.scss +1 -0
  35. package/dist/packages/table/table.scss +0 -56
  36. package/dist/packages/textarea/textarea.scss +5 -12
  37. package/dist/style.css +1 -1
  38. package/dist/style.mjs +1 -1
  39. package/dist/styles/themes/default.scss +0 -1
  40. package/dist/styles/variables-jmapp.scss +1 -4
  41. package/dist/styles/variables.scss +2 -6
  42. package/dist/types/index.d.ts +75 -91
  43. package/package.json +1 -1
  44. package/dist/esm/Icon.js +0 -83
  45. package/dist/esm/tabpane2.js +0 -42
  46. package/dist/packages/icon/icon.scss +0 -0
  47. /package/dist/esm/{AvatarContext.js → context.js} +0 -0
@@ -1,30 +1,4 @@
1
1
 
2
- .nut-theme-dark {
3
- .nut-cascader {
4
- .nut-cascader__bar {
5
- background: $dark5;
6
- color: $dark1;
7
- }
8
-
9
- .nut-tabs__titles {
10
- background: $dark5;
11
- }
12
-
13
- &__title {
14
- color: $dark1;
15
- background-color: $dark5;
16
- }
17
-
18
- .nut-tabpane {
19
- background-color: $dark5;
20
- }
21
-
22
- .nut-cascader-item {
23
- color: $dark1;
24
- }
25
- }
26
- }
27
-
28
2
  .nut-cascader {
29
3
  width: 100%;
30
4
  font-size: $cascader-font-size;
@@ -27,25 +27,29 @@
27
27
  overflow: hidden;
28
28
  background-color: $cell-group-background-color;
29
29
  margin: 10px 0;
30
+ .nut-cell {
31
+ margin: 0;
32
+ box-shadow: none;
33
+ border-radius: 0;
34
+ }
30
35
  }
31
36
 
32
- .nut-cell {
33
- margin: 0;
34
- box-shadow: none;
35
- border-radius: 0;
36
- &__divider {
37
- position: absolute;
38
- box-sizing: border-box;
39
- pointer-events: none;
40
- right: $cell-divider-right;
41
- bottom: 0;
42
- left: $cell-divider-left;
43
- transform: scaleY(0.5);
44
- border-bottom: $cell-divider-border-bottom;
45
- }
46
- &:last-child {
37
+ &__wrap--divider {
38
+ .nut-cell {
47
39
  &__divider {
48
- border: 0 !important;
40
+ position: absolute;
41
+ box-sizing: border-box;
42
+ pointer-events: none;
43
+ right: $cell-divider-right;
44
+ bottom: 0;
45
+ left: $cell-divider-left;
46
+ transform: scaleY(0.5);
47
+ border-top: $cell-divider-border-bottom;
48
+ }
49
+ &:last-child {
50
+ .nut-cell__divider {
51
+ border-top: 0 !important;
52
+ }
49
53
  }
50
54
  }
51
55
  }
@@ -1,47 +1,44 @@
1
1
 
2
- .nut-theme-dark {
3
- .nut-checkbox {
4
- &__label {
5
- color: $dark1;
6
- &--disabled {
7
- color: $checkbox-label-disable-color;
8
- }
9
- }
10
- }
11
- }
12
-
13
2
  .nut-checkbox {
14
3
  display: flex;
15
4
  align-items: center;
5
+
16
6
  &--reverse {
17
7
  flex-direction: row-reverse;
8
+
18
9
  .nut-checkbox__label {
19
10
  margin-right: $checkbox-label-margin-left;
20
11
  margin-left: 0;
21
12
  }
22
13
  }
14
+
23
15
  &__label {
24
16
  margin-left: $checkbox-label-margin-left;
25
17
  font-size: $checkbox-label-font-size;
26
18
  color: $checkbox-label-color;
19
+
27
20
  &--disabled {
28
21
  color: $checkbox-label-disable-color;
29
22
  }
30
23
  }
24
+
31
25
  &__icon {
32
26
  color: $primary-color;
33
27
  font-size: $checkbox-icon-font-size;
34
28
  transition-duration: 0.3s;
35
29
  transition-property: color, border-color, background-color;
36
30
  }
31
+
37
32
  &__icon--unchecked {
38
33
  color: $checkbox-icon-disable-color;
39
34
  font-size: $checkbox-icon-font-size;
40
35
  }
36
+
41
37
  &__icon--indeterminate {
42
38
  color: $primary-color;
43
39
  font-size: $checkbox-icon-font-size;
44
40
  }
41
+
45
42
  &__icon--disable {
46
43
  color: $disable-color;
47
44
  font-size: $checkbox-icon-font-size;
@@ -1,12 +1,3 @@
1
- .nut-theme-dark {
2
- .nut-empty {
3
- background: $dark6;
4
- &__description {
5
- color: $dark1;
6
- }
7
- }
8
- }
9
-
10
1
  .nut-empty {
11
2
  box-sizing: border-box;
12
3
  display: flex;
@@ -1,105 +1,28 @@
1
1
 
2
- .nut-theme-dark {
3
- .nut-picker {
4
- background-color: $dark6;
5
-
6
- &__title {
7
- color: $dark1;
8
- }
9
-
10
- &__confirm-btn {
11
- color: $picker-ok-color;
12
- cursor: pointer;
13
- }
14
-
15
- .nut-picker__control {
16
- background-color: $dark10;
17
- }
18
-
19
- .nut-picker-indicator {
20
- background-color: $dark7;
21
- z-index: 0;
22
- border-top: 1px solid $gray2;
23
- border-bottom: 1px solid $gray2;
24
- }
25
-
26
- .nut-picker-mask {
27
- position: absolute;
28
- top: 0;
29
- left: 0;
30
- right: 0;
31
- bottom: 0;
32
- background-image: linear-gradient(
33
- 180deg,
34
- rgba(31, 31, 31, 1),
35
- rgba(31, 31, 31, 0.4)
36
- ),
37
- linear-gradient(0deg, rgba(31, 31, 31, 1), rgba(31, 31, 31, 0.4));
38
- background-position: top, bottom;
39
- background-size: 100% 108px;
40
- background-repeat: no-repeat;
41
- z-index: 3;
42
- }
43
-
44
- .nut-picker-list {
45
- .nut-picker-roller {
46
- &-item {
47
- color: $white;
48
-
49
- &-tile {
50
- color: $white;
51
- }
52
- }
53
- }
54
- }
55
-
56
- &-roller-mask {
57
- background-image: linear-gradient(
58
- 180deg,
59
- rgba(27, 27, 27, 0.9),
60
- rgba(27, 27, 27, 0.4)
61
- ),
62
- linear-gradient(0deg, rgba(27, 27, 27, 0.9), rgba(27, 27, 27, 0.4));
63
- background-repeat: no-repeat;
64
- background-position: top, bottom;
65
- background-size: 100% 108px;
66
- z-index: 1;
67
- }
68
-
69
- &-content {
70
- color: $dark1;
71
- }
72
-
73
- &-item {
74
- color: $dark1;
75
- }
76
- }
77
- }
78
-
79
2
  .nut-picker {
80
3
  background-color: $background-color3;
81
4
  width: 100%;
82
- }
83
5
 
84
- .nut-picker__control {
85
- display: flex;
86
- height: 56px;
87
- font-size: 16px;
88
- align-items: center;
89
- justify-content: space-between;
90
- padding: $picker-bar-button-padding;
6
+ &__control {
7
+ display: flex;
8
+ height: 56px;
9
+ font-size: 16px;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ padding: $picker-bar-button-padding;
13
+ }
91
14
 
92
- .nut-picker__cancel-btn {
93
- color: $picker-cancel-color;
15
+ &__cancel-btn {
16
+ color: $picker-bar-cancel-color;
94
17
  font-size: $picker-bar-cancel-font-size;
95
18
  }
96
19
 
97
- .nut-picker__confirm-btn {
98
- color: $picker-ok-color;
20
+ &__confirm-btn {
21
+ color: $picker-bar-ok-color;
99
22
  font-size: $picker-bar-ok-font-size;
100
23
  }
101
24
 
102
- .nut-picker__title {
25
+ &__title {
103
26
  flex: 1;
104
27
  overflow: hidden;
105
28
  text-overflow: ellipsis;
@@ -109,13 +32,13 @@
109
32
  font-size: $picker-bar-title-font-size;
110
33
  font-weight: $picker-bar-title-font-weight;
111
34
  }
112
- }
113
35
 
114
- .nut-picker__panel {
115
- display: flex;
116
- position: relative;
36
+ &__panel {
37
+ display: flex;
38
+ position: relative;
39
+ }
117
40
 
118
- .nut-picker-indicator {
41
+ &-indicator {
119
42
  position: absolute;
120
43
  top: 108px;
121
44
  height: $picker-item-height;
@@ -127,20 +50,20 @@
127
50
  font-size: $picker-item-text-font-size;
128
51
  z-index: 3;
129
52
  }
130
- }
131
53
 
132
- .nut-picker-list {
133
- flex: 1;
134
- position: relative;
135
- height: $picker-list-height;
136
- overflow: hidden;
137
- text-align: center;
54
+ &-list {
55
+ flex: 1;
56
+ position: relative;
57
+ height: $picker-list-height;
58
+ overflow: hidden;
59
+ text-align: center;
60
+ }
138
61
 
139
- .nut-picker-list-panel {
62
+ &-list-panel {
140
63
  transform-style: preserve-3d;
141
64
  }
142
65
 
143
- .nut-picker-mask {
66
+ &-mask {
144
67
  position: absolute;
145
68
  top: 0;
146
69
  left: 0;
@@ -153,22 +76,27 @@
153
76
  z-index: 3;
154
77
  }
155
78
 
156
- .nut-picker-content,
157
- .nut-picker-roller {
79
+ &-view-panel {
80
+ height: $picker-list-height;
81
+ flex-grow: 1;
82
+ }
83
+
84
+ &-content,
85
+ &-roller {
158
86
  position: absolute;
159
87
  top: 108px;
160
88
  width: 100%;
161
89
  height: $picker-item-height;
162
90
  }
163
91
 
164
- .nut-picker-content {
92
+ &-content {
165
93
  background: #fff;
166
94
  z-index: 2;
167
95
  overflow: hidden;
168
96
  }
169
97
 
170
- .nut-picker-item,
171
- .nut-picker-roller-item {
98
+ &-item,
99
+ &-roller-item {
172
100
  white-space: nowrap;
173
101
  overflow: hidden;
174
102
  text-overflow: ellipsis;
@@ -179,41 +107,42 @@
179
107
  text-align: center;
180
108
  }
181
109
 
182
- .nut-picker-item {
110
+ &-item {
183
111
  font-size: 16px;
184
112
  background: #fff;
185
113
  }
186
114
 
187
- .nut-picker-roller {
115
+ &-roller {
188
116
  z-index: 1;
189
117
  transform-style: preserve-3d;
118
+ }
190
119
 
191
- .nut-picker-roller-item {
192
- backface-visibility: hidden;
193
- -moz-backface-visibility: hidden;
194
- -webkit-backface-visibility: hidden;
195
- position: absolute;
196
- top: 0;
197
- width: 100%;
198
- color: $gray1;
199
- }
200
-
201
- .nut-picker-roller-item-title {
202
- display: block;
203
- width: 100%;
204
- height: 36px;
205
- line-height: 36px;
206
- color: $gray1;
207
- font-size: $picker-bar-title-font-size;
208
- }
209
-
210
- .nut-picker-roller-item-hidden {
211
- visibility: hidden;
212
- opacity: 0;
213
- }
120
+ &-roller-item {
121
+ backface-visibility: hidden;
122
+ -moz-backface-visibility: hidden;
123
+ -webkit-backface-visibility: hidden;
124
+ position: absolute;
125
+ top: 0;
126
+ width: 100%;
127
+ color: $gray1;
128
+ }
129
+
130
+ &-roller-item-title {
131
+ display: block;
132
+ width: 100%;
133
+ height: 36px;
134
+ line-height: 36px;
135
+ text-align: center;
136
+ color: $gray1;
137
+ font-size: $picker-bar-title-font-size;
214
138
  }
215
- }
216
139
 
217
- .nut-picker-placeholder {
218
- height: 1px;
140
+ &-roller-item-hidden {
141
+ visibility: hidden;
142
+ opacity: 0;
143
+ }
144
+
145
+ &-placeholder {
146
+ height: 1px;
147
+ }
219
148
  }
@@ -1,3 +1,4 @@
1
+
1
2
  .nut-tabbar {
2
3
  border: 0px;
3
4
  box-shadow: $tabbar-box-shadow;
@@ -1,52 +1,3 @@
1
- .nut-theme-dark {
2
- .nut-table {
3
- margin-bottom: 3px;
4
-
5
- &__main {
6
- color: $dark1;
7
- background-color: $dark5;
8
-
9
- &--striped {
10
- .nut-table__main__head {
11
- &__tr {
12
- background-color: $dark6;
13
- }
14
- }
15
-
16
- .nut-table__main__body {
17
- &__tr:nth-child(odd) {
18
- background-color: $dark4;
19
- }
20
- }
21
-
22
- .nut-table__main__body {
23
- &__tr:nth-child(even) {
24
- background-color: $dark6;
25
- }
26
- }
27
- }
28
- }
29
-
30
- .nut-table__nodata {
31
- background-color: $dark6;
32
-
33
- .nut-table__nodata {
34
- color: $dark1;
35
- }
36
- }
37
-
38
- &__summary {
39
- color: $dark1;
40
- background-color: $dark4;
41
- }
42
-
43
- &__nodata {
44
- color: $dark1;
45
- background-color: $dark4;
46
- }
47
- }
48
- }
49
-
50
1
  .nut-table {
51
2
  display: flex;
52
3
  width: 100%;
@@ -133,13 +84,6 @@
133
84
  }
134
85
 
135
86
  &__summary {
136
- display: flex;
137
- align-items: center;
138
- height: 30px;
139
- padding: $table-cols-padding;
140
- }
141
-
142
- &__nodata {
143
87
  color: $title-color;
144
88
  background-color: $background-color3;
145
89
  display: flex;
@@ -1,13 +1,3 @@
1
- .nut-theme-dark {
2
- .nut-textarea {
3
- background: $dark5;
4
-
5
- &__textarea {
6
- color: $dark1;
7
- }
8
- }
9
- }
10
-
11
1
  .nut-textarea {
12
2
  position: relative;
13
3
  width: 100%;
@@ -34,7 +24,6 @@
34
24
  }
35
25
 
36
26
  &__textarea {
37
- // min-height: $textarea-height;
38
27
  outline: none;
39
28
  display: block;
40
29
  box-sizing: border-box;
@@ -43,13 +32,17 @@
43
32
  margin: 0;
44
33
  padding: 0;
45
34
  font-size: $textarea-font;
46
- line-height: $textarea-text-line-height;
47
35
  color: $textarea-text-color;
48
36
  caret-color: $textarea-text-curror-color;
49
37
  text-align: left;
50
38
  background-color: transparent;
51
39
  border: 0;
52
40
  resize: none;
41
+
42
+ .taro-textarea {
43
+ background-color: transparent;
44
+ resize: none;
45
+ }
53
46
  }
54
47
 
55
48
  .cpoyText {