@nutui/nutui-react 1.1.3 → 1.1.4-beta.2

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 (82) hide show
  1. package/dist/esm/Address.js +22 -28
  2. package/dist/esm/Avatar/style/index.js +1 -1
  3. package/dist/esm/Avatar.js +97 -20
  4. package/dist/esm/Badge.js +0 -2
  5. package/dist/esm/Barrage.js +0 -1
  6. package/dist/esm/Calendar.js +6 -2
  7. package/dist/esm/CalendarItem.js +14 -13
  8. package/dist/esm/CheckboxGroup.js +1 -1
  9. package/dist/esm/CircleProgress.js +93 -56
  10. package/dist/esm/Collapse.js +2 -2
  11. package/dist/esm/ConfigProvider/style/index.js +2 -0
  12. package/dist/esm/ConfigProvider.js +146 -0
  13. package/dist/esm/CountDown.js +8 -4
  14. package/dist/esm/Dialog.js +7 -3
  15. package/dist/esm/FixedNav.js +5 -1
  16. package/dist/esm/Infiniteloading.js +7 -3
  17. package/dist/esm/Input.js +5 -1
  18. package/dist/esm/NoticeBar.js +1 -1
  19. package/dist/esm/Pagination.js +6 -2
  20. package/dist/esm/Picker.js +6 -2
  21. package/dist/esm/Range.js +5 -1
  22. package/dist/esm/ShortPassword.js +9 -5
  23. package/dist/esm/Signature.js +7 -3
  24. package/dist/esm/Skeleton.js +20 -12
  25. package/dist/esm/Step.js +14 -3
  26. package/dist/esm/Steps.js +4 -1
  27. package/dist/esm/Swiper.js +2 -1
  28. package/dist/esm/TabbarItem.js +9 -0
  29. package/dist/esm/TextArea.js +5 -1
  30. package/dist/esm/Toast.js +4 -10
  31. package/dist/esm/Uploader/style/index.js +2 -1
  32. package/dist/esm/Uploader.js +84 -18
  33. package/dist/esm/nutui-react.es.js +1 -0
  34. package/dist/locales/base.d.ts +91 -0
  35. package/dist/locales/base.js +5 -0
  36. package/dist/locales/en-US.d.ts +3 -0
  37. package/dist/locales/en-US.js +95 -0
  38. package/dist/locales/zh-CN.d.ts +3 -0
  39. package/dist/locales/zh-CN.js +97 -0
  40. package/dist/locales/zh-TW.d.ts +3 -0
  41. package/dist/locales/zh-TW.js +95 -0
  42. package/dist/nutui.react.es.js +519 -213
  43. package/dist/nutui.react.umd.js +26 -26
  44. package/dist/packages/avatar/avatar.scss +16 -6
  45. package/dist/packages/avatargroup/avatargroup.scss +14 -0
  46. package/dist/packages/circleprogress/circleprogress.scss +12 -53
  47. package/dist/packages/configprovider/configprovider.scss +0 -0
  48. package/dist/packages/skeleton/skeleton.scss +1 -3
  49. package/dist/packages/step/step.scss +29 -29
  50. package/dist/packages/uploader/uploader.scss +97 -14
  51. package/dist/style.css +1 -1
  52. package/dist/style.es.js +1 -1
  53. package/dist/styles/themes/default.scss +2 -0
  54. package/dist/styles/variables.scss +36 -4
  55. package/dist/types/avatar/__tests__/avatar.spec.d.ts +1 -0
  56. package/dist/types/avatar/avatar.d.ts +6 -3
  57. package/dist/types/avatargroup/AvatarContext.d.ts +2 -0
  58. package/dist/types/avatargroup/__tests__/avatargroup.spec.d.ts +1 -0
  59. package/dist/types/avatargroup/avatargroup.d.ts +14 -0
  60. package/dist/types/avatargroup/index.d.ts +2 -0
  61. package/dist/types/barrage/__tests__/barrage.spec.d.ts +1 -0
  62. package/dist/types/button/button.d.ts +2 -2
  63. package/dist/types/checkbox/__test__/checkbox.spec.d.ts +1 -0
  64. package/dist/types/circleprogress/__tests__/circleprogress.spec.d.ts +1 -0
  65. package/dist/types/circleprogress/circleprogress.d.ts +11 -5
  66. package/dist/types/configprovider/configprovider.d.ts +12 -0
  67. package/dist/types/configprovider/index.d.ts +3 -0
  68. package/dist/types/icon/__test__/icon.spec.d.ts +1 -0
  69. package/dist/types/infiniteloading/__tests__/infiniteloading.spec.d.ts +1 -0
  70. package/dist/types/inputnumber/__tests__/inputnumber.spec.d.ts +1 -0
  71. package/dist/types/nutui.react.d.ts +2 -1
  72. package/dist/types/overlay/__tests__/overlay.spec.d.ts +1 -0
  73. package/dist/types/skeleton/__test__/skeleton.spec.d.ts +1 -0
  74. package/dist/types/skeleton/skeleton.d.ts +2 -2
  75. package/dist/types/step/step.d.ts +1 -0
  76. package/dist/types/steps/__tests__/steps.spec.d.ts +1 -0
  77. package/dist/types/steps/steps.d.ts +1 -0
  78. package/dist/types/tabbaritem/tabbaritem.d.ts +1 -0
  79. package/dist/types/toast/Notification.d.ts +1 -7
  80. package/dist/types/uploader/__tests__/uploader.spec.d.ts +1 -0
  81. package/dist/types/uploader/uploader.d.ts +9 -1
  82. package/package.json +9 -4
@@ -4,8 +4,17 @@
4
4
  background-position: center center;
5
5
  display: inline-block;
6
6
  position: relative;
7
- margin-right: 24px;
8
7
  flex: 0 0 auto; // 防止被压缩
8
+ text-align: center;
9
+ img {
10
+ position: absolute;
11
+ width: 100%;
12
+ height: 100%;
13
+ top: 50%;
14
+ left: 50%;
15
+ transform: translate(-50%, -50%);
16
+ flex-shrink: 0;
17
+ }
9
18
  .icon {
10
19
  background-size: 100% 100%;
11
20
  position: absolute;
@@ -25,24 +34,25 @@
25
34
  overflow: hidden;
26
35
  }
27
36
  }
28
- .avatar-large {
37
+ .nut-avatar-large {
29
38
  width: $avatar-large-width;
30
39
  height: $avatar-large-height;
31
40
  line-height: $avatar-large-height;
32
41
  }
33
- .avatar-small {
42
+ .nut-avatar-small {
34
43
  width: $avatar-small-width;
35
44
  height: $avatar-small-height;
36
45
  line-height: $avatar-small-height;
37
46
  }
38
- .avatar-normal {
47
+ .nut-avatar-normal {
39
48
  width: $avatar-normal-width;
40
49
  height: $avatar-normal-height;
41
50
  line-height: $avatar-normal-height;
42
51
  }
43
- .avatar-round {
52
+ .nut-avatar-round {
44
53
  border-radius: 50%;
54
+ overflow: hidden;
45
55
  }
46
- .avatar-square {
56
+ .nut-avatar-square {
47
57
  border-radius: $avatar-square;
48
58
  }
@@ -0,0 +1,14 @@
1
+ .nut-avatar-group {
2
+ background-size: 100% 100%;
3
+ background-repeat: no-repeat;
4
+ background-position: center center;
5
+ display: inline-block;
6
+ position: relative;
7
+ flex: 0 0 auto; // 防止被压缩
8
+ .nut-avatar {
9
+ border: 1px solid #fff;
10
+ &:not(:first-of-type) {
11
+ margin-left: -8px;
12
+ }
13
+ }
14
+ }
@@ -1,65 +1,24 @@
1
1
  .nut-circleprogress {
2
2
  position: relative;
3
3
 
4
- .nut-circleprogress-content {
5
- position: absolute;
6
- top: 50%;
7
- left: 50%;
8
- transform: translate(-50%, -50%);
9
- }
10
- .nut-circleprogress__right {
11
- width: 50%;
12
- height: 100%;
13
- position: relative;
14
- overflow: hidden;
15
- float: right;
16
- }
17
- .nut-circleprogress__left {
18
- width: 50%;
19
- height: 100%;
20
- position: relative;
21
- overflow: hidden;
22
- float: left;
4
+ &-hover {
5
+ stroke: $circleprogress-primary-color;
6
+ transition: stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s;
23
7
  }
24
8
 
25
- .nut-circleprogress__line {
26
- position: absolute;
27
- width: 100%;
28
- height: 100%;
29
- top: 0;
30
- overflow: hidden;
31
- &.nut-circleprogress__l {
32
- top: 0px;
33
- transform: rotate(0deg);
34
- left: 0px;
35
- }
36
-
37
- &.nut-circleprogress__r {
38
- top: 0px;
39
- transform: rotate(180deg);
40
- right: 0px;
41
- }
9
+ &-path {
10
+ stroke: $circleprogress-path-color;
42
11
  }
43
12
 
44
- .nut-circleprogress__progress {
13
+ &-text {
45
14
  position: absolute;
46
15
  top: 50%;
47
- left: 50%;
48
- transform: translate(-50%, -50%);
49
- font-size: 16px;
50
- font-family: PingFangSC;
51
- font-weight: normal;
52
- color: rgba(29, 29, 33, 1);
53
- }
54
-
55
- .nut-circleprogress__line__c {
56
- width: 200%;
57
- height: 100%;
58
- border: 10px solid transparent;
59
- border-radius: 50%;
60
- position: absolute;
16
+ left: 0;
61
17
  box-sizing: border-box;
62
- top: 0;
63
- transform: rotate(-45deg);
18
+ width: 100%;
19
+ transform: translateY(-50%);
20
+ text-align: center;
21
+ color: $circleprogress-text-color;
22
+ font-size: $circleprogress-text-size;
64
23
  }
65
24
  }
@@ -16,13 +16,11 @@
16
16
  height: 100%;
17
17
  background: rgb(239, 239, 239);
18
18
  margin-top: 10px;
19
- }
20
-
21
- .skeleton-lines {
22
19
  &:last-child {
23
20
  width: 70% !important;
24
21
  }
25
22
  }
23
+
26
24
  .blockClass--round {
27
25
  border-radius: 10px;
28
26
  }
@@ -17,15 +17,15 @@
17
17
  right: -50%;
18
18
  display: inline-block;
19
19
  height: 1px;
20
- background: #909ca4;
20
+ background: $steps-base-line-color;
21
21
  }
22
22
  &-icon {
23
23
  position: relative;
24
24
  display: flex;
25
- width: 25px;
26
- height: 25px;
27
- line-height: 25px;
28
- font-size: 13px;
25
+ width: $steps-base-icon-width;
26
+ height: $steps-base-icon-height;
27
+ line-height: $steps-base-icon-line-height;
28
+ font-size: $steps-base-icon-font-size;
29
29
  align-items: center;
30
30
  justify-content: center;
31
31
  z-index: 1;
@@ -53,14 +53,14 @@
53
53
  }
54
54
  &-title {
55
55
  display: block;
56
- margin-bottom: 10px;
57
- font-size: 14px;
58
- color: #909ca4;
56
+ margin-bottom: $steps-base-title-margin-bottom;
57
+ font-size: $steps-base-title-font-size;
58
+ color: $steps-base-title-color;
59
59
  }
60
60
  &-content {
61
61
  display: block;
62
- font-size: 14px;
63
- color: #666;
62
+ font-size: $steps-base-content-font-size;
63
+ color: $steps-base-content-color;
64
64
  }
65
65
  &:last-child {
66
66
  .nut-step-line {
@@ -69,53 +69,53 @@
69
69
  }
70
70
  &.nut-step-finish {
71
71
  .nut-step-head {
72
- color: $primary-color;
73
- border-color: $primary-color;
72
+ color: $steps-finish-head-color;
73
+ border-color: $steps-finish-head-border-color;
74
74
  }
75
75
  .nut-step-icon.is-text {
76
- background-color: $white;
76
+ background-color: $steps-finish-icon-text-color;
77
77
  }
78
78
  .nut-step-icon.is-icon {
79
- background-color: $white;
79
+ background-color: $steps-finish-icon-text-color;
80
80
  }
81
81
  .nut-step-line {
82
- background: $primary-color;
82
+ background: $steps-finish-line-background;
83
83
  }
84
84
  .nut-step-title {
85
- color: $primary-color;
85
+ color: $steps-finish-title-color;
86
86
  }
87
87
  }
88
88
  &.nut-step-process {
89
89
  .nut-step-head {
90
- color: $white;
91
- border-color: $primary-color;
90
+ color: $steps-process-head-color;
91
+ border-color: $steps-process-head-border-color;
92
92
  }
93
93
  .nut-step-icon.is-text {
94
- background-color: $primary-color;
94
+ background-color: $steps-process-icon-text-color;
95
95
  }
96
96
  .nut-step-icon.is-icon {
97
- background-color: $primary-color;
97
+ background-color: $steps-process-icon-text-color;
98
98
  }
99
99
  .nut-step-title {
100
- color: $primary-color;
100
+ color: $steps-process-title-color;
101
101
  }
102
102
  }
103
103
  &.nut-step-wait {
104
104
  .nut-step-head {
105
- color: #909ca4;
106
- border-color: #909ca4;
105
+ color: $steps-wait-head-color;
106
+ border-color: $steps-wait-head-border-color;
107
107
  }
108
108
  .nut-step-icon.is-text {
109
- background-color: $white;
109
+ background-color: $steps-wait-icon-bg-color;
110
110
  }
111
111
  .nut-step-icon.is-icon {
112
- background-color: $step-wait-bg-color;
112
+ background-color: $steps-wait-icon-bg-color;
113
113
  .nut-icon {
114
- color: $white;
114
+ color: $steps-wait-icon-color;
115
115
  }
116
116
  }
117
117
  .nut-step-content {
118
- color: #909ca4;
118
+ color: $steps-wait-content-color;
119
119
  }
120
120
  }
121
121
  }
@@ -155,10 +155,10 @@
155
155
  }
156
156
  .nut-step-wait {
157
157
  .nut-step-icon {
158
- background-color: #959fb1;
158
+ background-color: $steps-wait-icon-bg-color;
159
159
  }
160
160
  .nut-step-content {
161
- color: #909ca4;
161
+ color: $steps-wait-content-color;
162
162
  }
163
163
  }
164
164
  .nut-step-finish {
@@ -1,3 +1,4 @@
1
+ @import '../../styles/mixins/text-ellipsis.scss';
1
2
 
2
3
  .nut-uploader {
3
4
  position: relative;
@@ -11,21 +12,21 @@
11
12
  &__upload {
12
13
  position: relative;
13
14
  background: $uploader-background;
14
- width: $uploader-width;
15
- height: $uploader-height;
15
+ width: $uploader-picture-width;
16
+ height: $uploader-picture-height;
16
17
  display: flex;
17
18
  align-items: center;
18
19
  justify-content: center;
19
20
  }
20
21
 
21
22
  &__input {
22
- position: absolute;
23
+ position: absolute !important;
23
24
  top: 0;
24
25
  left: 0;
25
- width: 100%;
26
- height: 100%;
26
+ width: 100% !important;
27
+ height: 100% !important;
27
28
  overflow: hidden;
28
- cursor: pointer;
29
+ cursor: pointer !important;
29
30
  opacity: 0;
30
31
  &:disabled {
31
32
  cursor: not-allowed;
@@ -33,17 +34,68 @@
33
34
  }
34
35
 
35
36
  &__preview {
36
- width: $uploader-width;
37
- height: $uploader-height;
38
37
  display: flex;
39
38
  align-items: center;
40
39
  justify-content: center;
41
40
  margin-right: 10px;
42
41
  margin-bottom: 10px;
43
- &-img {
44
- position: relative;
42
+ box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
43
+
44
+ &__progress {
45
+ position: absolute;
46
+ left: 0;
47
+ top: 0;
45
48
  width: 100%;
46
49
  height: 100%;
50
+ background: rgba(0, 0, 0, 0.6);
51
+ display: flex;
52
+ flex-direction: column;
53
+ align-items: center;
54
+ justify-content: center;
55
+ &__msg {
56
+ color: $white;
57
+ font-size: 12px;
58
+ margin-top: 6px;
59
+ }
60
+ }
61
+ &.list {
62
+ width: 100%;
63
+ margin-right: 0px;
64
+ margin-bottom: 0px;
65
+ margin-top: 10px;
66
+ }
67
+ &-list {
68
+ width: 100%;
69
+ height: 32px;
70
+ display: flex;
71
+ flex-direction: column;
72
+ position: relative;
73
+ padding-right: 20px;
74
+ .nut-uploader__preview-img__file__name {
75
+ -webkit-line-clamp: 1;
76
+ padding: 2px;
77
+ height: 24px;
78
+ }
79
+
80
+ .nut-uploader__preview-img__file__del {
81
+ position: absolute;
82
+ right: 4px;
83
+ top: 6px;
84
+ }
85
+ .nut-progress {
86
+ position: absolute;
87
+ left: 0;
88
+ right: 0;
89
+ bottom: 0;
90
+ .nut-progress-outer {
91
+ height: 2px !important;
92
+ }
93
+ }
94
+ }
95
+ &-img {
96
+ position: relative;
97
+ width: $uploader-picture-width;
98
+ height: $uploader-picture-height;
47
99
  .close {
48
100
  position: absolute;
49
101
  right: 0;
@@ -56,17 +108,48 @@
56
108
  left: 0;
57
109
  right: 0;
58
110
  text-align: center;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
59
114
  font-size: 12px;
60
115
  color: $white;
61
- height: 30px;
62
- line-height: 30px;
63
- text-align: c;
116
+ height: 0px;
117
+ transition: height 0.3s;
64
118
  background: rgba(0, 0, 0, 0.54);
119
+ @include oneline-ellipsis();
65
120
  }
66
121
  &__c {
67
122
  height: 100%;
68
123
  width: 100%;
69
- object-fit: cover;
124
+ }
125
+ &__file {
126
+ height: 100%;
127
+ width: 100%;
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ transition: all 0.3s;
132
+
133
+ &__name {
134
+ display: flex;
135
+ width: 100%;
136
+ font-size: 12px;
137
+ color: $text-color;
138
+ &.error {
139
+ color: red !important;
140
+ }
141
+ &.success {
142
+ color: #1890ff !important;
143
+ }
144
+ .nut-icon-link {
145
+ &::before {
146
+ margin-left: -25%;
147
+ margin-top: -25%;
148
+ transform: none;
149
+ }
150
+ }
151
+ @include moreline-ellipsis();
152
+ }
70
153
  }
71
154
  }
72
155
  }