@nutui/nutui-react-taro 3.0.0-beta.1 → 3.0.0-beta.3

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 (126) hide show
  1. package/dist/cjs/packages/avatar/avatar.js +14 -16
  2. package/dist/cjs/packages/avatar/style/avatar.scss +7 -60
  3. package/dist/cjs/packages/avatar/style/style.css +5 -43
  4. package/dist/cjs/packages/avatar/style/style.harmony.css +5 -43
  5. package/dist/cjs/packages/badge/badge.js +67 -12
  6. package/dist/cjs/packages/badge/style/badge.scss +18 -24
  7. package/dist/cjs/packages/badge/style/style.css +17 -15
  8. package/dist/cjs/packages/badge/style/style.harmony.css +22 -17
  9. package/dist/cjs/packages/button/button.js +1 -1
  10. package/dist/cjs/packages/calendarcard/calendarcard.js +8 -3
  11. package/dist/cjs/packages/calendarcard/icon.js +14 -2
  12. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
  13. package/dist/cjs/packages/calendarcard/style/style.css +27 -2
  14. package/dist/cjs/packages/image/image.js +5 -5
  15. package/dist/cjs/packages/input/input.js +3 -5
  16. package/dist/cjs/packages/input/style/input.scss +4 -0
  17. package/dist/cjs/packages/input/style/style.css +4 -0
  18. package/dist/cjs/packages/input/style/style.harmony.css +4 -0
  19. package/dist/cjs/packages/navbar/navbar.js +17 -8
  20. package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
  21. package/dist/cjs/packages/navbar/style/style.css +44 -89
  22. package/dist/cjs/packages/navbar/style/style.harmony.css +45 -93
  23. package/dist/cjs/packages/overlay/style/style.harmony.css +5 -3
  24. package/dist/cjs/packages/pagination/pagination.js +2 -0
  25. package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
  26. package/dist/cjs/packages/pagination/style/style.css +8 -14
  27. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +1 -1
  28. package/dist/cjs/packages/radio/index.d.ts +8 -2
  29. package/dist/cjs/packages/radio/index.js +6 -1
  30. package/dist/cjs/packages/radio/radio.d.ts +2 -5
  31. package/dist/cjs/packages/radio/radio.js +2 -4
  32. package/dist/cjs/packages/radio/style/radio.scss +1 -0
  33. package/dist/cjs/packages/radiogroup/radiogroup.d.ts +2 -1
  34. package/dist/cjs/packages/radiogroup/radiogroup.js +3 -2
  35. package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
  36. package/dist/cjs/packages/safearea/style/style.css +1 -1
  37. package/dist/cjs/packages/safearea/style/style.harmony.css +1 -1
  38. package/dist/cjs/packages/searchbar/searchbar.d.ts +1 -1
  39. package/dist/cjs/packages/searchbar/searchbar.js +31 -33
  40. package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
  41. package/dist/cjs/packages/searchbar/style/style.css +11 -8
  42. package/dist/cjs/packages/searchbar/style/style.harmony.css +25 -12
  43. package/dist/cjs/packages/skeleton/style/style.css +5 -43
  44. package/dist/cjs/packages/tabbar/style/style.css +17 -15
  45. package/dist/cjs/packages/tabbaritem/style/style.css +17 -15
  46. package/dist/cjs/packages/tag/tag.d.ts +1 -1
  47. package/dist/cjs/packages/tag/tag.js +5 -11
  48. package/dist/cjs/packages/toast/style/style.css +56 -30
  49. package/dist/cjs/packages/toast/style/style.harmony.css +51 -62
  50. package/dist/cjs/packages/toast/style/toast.scss +65 -49
  51. package/dist/cjs/packages/toast/toast.d.ts +7 -7
  52. package/dist/cjs/packages/toast/toast.js +24 -19
  53. package/dist/cjs/packages/trendarrow/style/style.css +2 -1
  54. package/dist/cjs/packages/trendarrow/style/style.harmony.css +3 -2
  55. package/dist/cjs/packages/trendarrow/style/trendarrow.scss +2 -1
  56. package/dist/cjs/packages/trendarrow/trendarrow.js +6 -4
  57. package/dist/cjs/packages/video/video.js +3 -3
  58. package/dist/es/packages/avatar/avatar.js +14 -16
  59. package/dist/es/packages/avatar/style/avatar.scss +7 -60
  60. package/dist/es/packages/avatar/style/style.css +5 -43
  61. package/dist/es/packages/avatar/style/style.harmony.css +5 -43
  62. package/dist/es/packages/badge/badge.d.ts +7 -35
  63. package/dist/es/packages/badge/badge.js +66 -12
  64. package/dist/es/packages/badge/style/badge.scss +18 -24
  65. package/dist/es/packages/badge/style/style.css +17 -15
  66. package/dist/es/packages/badge/style/style.harmony.css +22 -17
  67. package/dist/es/packages/button/button.js +1 -1
  68. package/dist/es/packages/calendarcard/calendarcard.d.ts +13 -65
  69. package/dist/es/packages/calendarcard/calendarcard.js +9 -4
  70. package/dist/es/packages/calendarcard/icon.js +15 -3
  71. package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
  72. package/dist/es/packages/calendarcard/style/style.css +27 -2
  73. package/dist/es/packages/image/image.js +5 -5
  74. package/dist/es/packages/input/input.js +3 -5
  75. package/dist/es/packages/input/style/input.scss +4 -0
  76. package/dist/es/packages/input/style/style.css +4 -0
  77. package/dist/es/packages/input/style/style.harmony.css +4 -0
  78. package/dist/es/packages/loading/loading.d.ts +3 -15
  79. package/dist/es/packages/navbar/navbar.js +17 -8
  80. package/dist/es/packages/navbar/style/navbar.scss +46 -101
  81. package/dist/es/packages/navbar/style/style.css +44 -89
  82. package/dist/es/packages/navbar/style/style.harmony.css +45 -93
  83. package/dist/es/packages/overlay/style/style.harmony.css +5 -3
  84. package/dist/es/packages/pagination/pagination.js +2 -0
  85. package/dist/es/packages/pagination/style/pagination.scss +6 -12
  86. package/dist/es/packages/pagination/style/style.css +8 -14
  87. package/dist/es/packages/pulltorefresh/pulltorefresh.js +2 -2
  88. package/dist/es/packages/radio/index.d.ts +8 -2
  89. package/dist/es/packages/radio/index.js +5 -1
  90. package/dist/es/packages/radio/radio.d.ts +11 -50
  91. package/dist/es/packages/radio/radio.js +3 -5
  92. package/dist/es/packages/radio/style/radio.scss +1 -0
  93. package/dist/es/packages/radiogroup/radiogroup.d.ts +9 -36
  94. package/dist/es/packages/radiogroup/radiogroup.js +3 -2
  95. package/dist/es/packages/safearea/safearea.d.ts +1 -5
  96. package/dist/es/packages/safearea/style/safearea.scss +1 -1
  97. package/dist/es/packages/safearea/style/style.css +1 -1
  98. package/dist/es/packages/safearea/style/style.harmony.css +1 -1
  99. package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
  100. package/dist/es/packages/searchbar/searchbar.js +32 -34
  101. package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
  102. package/dist/es/packages/searchbar/style/style.css +11 -8
  103. package/dist/es/packages/searchbar/style/style.harmony.css +25 -12
  104. package/dist/es/packages/skeleton/style/style.css +5 -43
  105. package/dist/es/packages/tabbar/style/style.css +17 -15
  106. package/dist/es/packages/tabbaritem/style/style.css +17 -15
  107. package/dist/es/packages/tag/tag.d.ts +1 -1
  108. package/dist/es/packages/tag/tag.js +6 -14
  109. package/dist/es/packages/toast/style/style.css +56 -30
  110. package/dist/es/packages/toast/style/style.harmony.css +51 -62
  111. package/dist/es/packages/toast/style/toast.scss +65 -49
  112. package/dist/es/packages/toast/toast.d.ts +15 -71
  113. package/dist/es/packages/toast/toast.js +25 -20
  114. package/dist/es/packages/trendarrow/style/style.css +2 -1
  115. package/dist/es/packages/trendarrow/style/style.harmony.css +3 -2
  116. package/dist/es/packages/trendarrow/style/trendarrow.scss +2 -1
  117. package/dist/es/packages/trendarrow/trendarrow.d.ts +11 -55
  118. package/dist/es/packages/trendarrow/trendarrow.js +6 -4
  119. package/dist/es/packages/video/video.d.ts +5 -25
  120. package/dist/es/packages/video/video.js +3 -3
  121. package/dist/nutui.react.umd.js +533 -437
  122. package/dist/style.css +1 -1
  123. package/dist/styles/themes/default.scss +28 -28
  124. package/dist/styles/variables-jrkf.scss +21 -27
  125. package/dist/styles/variables.scss +7 -4
  126. package/package.json +2 -2
@@ -3,8 +3,8 @@
3
3
  align-items: center;
4
4
  width: 100%;
5
5
  padding: 6px 16px;
6
- background: #F7F8FC;
7
- color: #1A1A1A;
6
+ background: #f5f6fa;
7
+ color: #1a1a1a;
8
8
  font-size: 14px;
9
9
  box-sizing: border-box;
10
10
  justify-content: center;
@@ -27,15 +27,16 @@
27
27
  .nut-searchbar-clear {
28
28
  width: 16px;
29
29
  height: 16px;
30
- color: undefined;
30
+ color: rgba(0, 0, 0, 0.2);
31
31
  }
32
32
  .nut-searchbar-rightin {
33
33
  width: 16px;
34
34
  height: 16px;
35
- color: undefined;
35
+ color: rgba(0, 0, 0, 0.2);
36
36
  }
37
37
  .nut-searchbar-left, .nut-searchbar-right {
38
- display: flex;
38
+ display: inline-flex;
39
+ align-items: center;
39
40
  }
40
41
  .nut-searchbar-left.nut-icon, .nut-searchbar-right.nut-icon {
41
42
  width: 20px;
@@ -50,10 +51,17 @@
50
51
  .nut-searchbar-left > span {
51
52
  margin-right: 16px;
52
53
  }
54
+ .nut-searchbar-left > i {
55
+ margin-right: 16px;
56
+ }
53
57
  .nut-searchbar-left > svg {
54
58
  margin-right: 16px;
55
59
  }
56
- .nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > svg:last-child {
60
+ .nut-searchbar-left .nut-icon {
61
+ margin-right: 16px;
62
+ }
63
+ .nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > i:last-child, .nut-searchbar-left > svg:last-child,
64
+ .nut-searchbar-left .nut-icon:last-child {
57
65
  margin-right: 0;
58
66
  }
59
67
  .nut-searchbar-right {
@@ -65,10 +73,17 @@
65
73
  .nut-searchbar-right > span {
66
74
  margin-left: 16px;
67
75
  }
76
+ .nut-searchbar-right > i {
77
+ margin-left: 16px;
78
+ }
68
79
  .nut-searchbar-right > svg {
69
80
  margin-left: 16px;
70
81
  }
71
- .nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > svg:first-child {
82
+ .nut-searchbar-right .nut-icon {
83
+ margin-left: 16px;
84
+ }
85
+ .nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > i:first-child, .nut-searchbar-right > svg:first-child,
86
+ .nut-searchbar-right .nut-icon:first-child {
72
87
  margin-left: 0;
73
88
  }
74
89
  .nut-searchbar-left > text {
@@ -89,7 +104,7 @@
89
104
  .nut-searchbar-right > text:first-child, .nut-searchbar-right > view:first-child {
90
105
  margin-left: 0;
91
106
  }
92
- .nut-searchbar-input-box {
107
+ .nut-searchbar-input-box, .nut-searchbar-input {
93
108
  display: flex;
94
109
  align-items: center;
95
110
  flex: 1;
@@ -99,12 +114,10 @@
99
114
  outline: 0;
100
115
  box-sizing: border-box;
101
116
  width: 100%;
102
- height: 32px;
103
- line-height: 32px;
104
117
  padding: 0 4px;
105
118
  font-size: 14px;
106
- color: #1A1A1A;
107
- caret-color: #1A1A1A;
119
+ color: #1a1a1a;
120
+ caret-color: #1a1a1a;
108
121
  background: transparent;
109
122
  text-align: left;
110
123
  }
@@ -73,6 +73,11 @@
73
73
  .nut-avatar {
74
74
  position: relative;
75
75
  flex: 0 0 auto;
76
+ display: flex;
77
+ justify-content: center;
78
+ align-items: center;
79
+ width: var(--nutui-avatar-normal-width, 40px);
80
+ height: var(--nutui-avatar-normal-height, 40px);
76
81
  }
77
82
  .nut-avatar-round {
78
83
  border-radius: 999px;
@@ -96,21 +101,12 @@
96
101
  .nut-avatar-icon {
97
102
  background-size: 100% 100%;
98
103
  }
99
- .nut-avatar .nut-icon-img {
100
- width: 100%;
101
- height: 100%;
102
- }
103
104
  .nut-avatar-text {
104
105
  display: flex;
105
106
  justify-content: center;
106
107
  align-items: center;
107
- width: 100%;
108
- height: 100%;
109
108
  }
110
109
  .nut-avatar-large {
111
- display: flex;
112
- justify-content: center;
113
- align-items: center;
114
110
  width: var(--nutui-avatar-large-width, 60px);
115
111
  height: var(--nutui-avatar-large-height, 60px);
116
112
  }
@@ -118,30 +114,15 @@
118
114
  width: var(--nutui-avatar-large-width, 60px);
119
115
  height: var(--nutui-avatar-large-height, 60px);
120
116
  }
121
- .nut-avatar-large-img-image {
122
- width: var(--nutui-avatar-large-width, 60px);
123
- height: var(--nutui-avatar-large-height, 60px);
124
- }
125
117
  .nut-avatar-large-icon {
126
118
  width: var(--nutui-avatar-large-width, 60px);
127
119
  height: var(--nutui-avatar-large-height, 60px);
128
120
  }
129
- .nut-avatar-large .nut-icon-img {
130
- width: 100%;
131
- height: 100%;
132
- }
133
121
  .nut-avatar-large-text {
134
122
  width: var(--nutui-avatar-large-width, 60px);
135
123
  height: var(--nutui-avatar-large-height, 60px);
136
124
  }
137
125
  .nut-avatar-small {
138
- display: flex;
139
- justify-content: center;
140
- align-items: center;
141
- width: var(--nutui-avatar-small-width, 32px);
142
- height: var(--nutui-avatar-small-height, 32px);
143
- }
144
- .nut-avatar-small-img-image {
145
126
  width: var(--nutui-avatar-small-width, 32px);
146
127
  height: var(--nutui-avatar-small-height, 32px);
147
128
  }
@@ -149,25 +130,6 @@
149
130
  width: var(--nutui-avatar-small-width, 32px);
150
131
  height: var(--nutui-avatar-small-height, 32px);
151
132
  }
152
- .nut-avatar-normal {
153
- display: flex;
154
- justify-content: center;
155
- align-items: center;
156
- width: var(--nutui-avatar-normal-width, 40px);
157
- height: var(--nutui-avatar-normal-height, 40px);
158
- }
159
- .nut-avatar-normal-img-image {
160
- width: var(--nutui-avatar-normal-width, 40px);
161
- height: var(--nutui-avatar-normal-height, 40px);
162
- }
163
- .nut-avatar-normal .nut-icon-img {
164
- width: 100%;
165
- height: 100%;
166
- }
167
- .nut-avatar-normal-text {
168
- width: var(--nutui-avatar-normal-width, 40px);
169
- height: var(--nutui-avatar-normal-height, 40px);
170
- }
171
133
 
172
134
  .nut-skeleton {
173
135
  display: inline-block;
@@ -1,6 +1,13 @@
1
1
  .nut-badge {
2
2
  position: relative;
3
- display: inline-block;
3
+ display: inline-flex;
4
+ width: auto;
5
+ /* #ifdef harmony */
6
+ min-width: 1px;
7
+ /* #endif */
8
+ /* #ifndef harmony */
9
+ min-width: auto;
10
+ /* #endif */
4
11
  }
5
12
  .nut-badge-icon {
6
13
  position: absolute;
@@ -8,8 +15,6 @@
8
15
  justify-content: center;
9
16
  align-items: center;
10
17
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
11
- top: -10%;
12
- right: -15%;
13
18
  padding: var(--nutui-badge-icon-padding, 3px);
14
19
  text-align: center;
15
20
  border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
@@ -27,7 +32,12 @@
27
32
  display: flex;
28
33
  justify-content: center;
29
34
  align-items: center;
35
+ /* #ifdef harmony */
36
+ background: var(--nutui-color-primary, #ff0f23);
37
+ /* #endif */
38
+ /* #ifndef harmony */
30
39
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
40
+ /* #endif */
31
41
  color: var(--nutui-badge-color, #fff);
32
42
  padding: var(--nutui-badge-padding, 0 4px);
33
43
  font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
@@ -45,7 +55,9 @@
45
55
  padding: 0;
46
56
  }
47
57
  .nut-badge-content {
48
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(100%));
58
+ /* #ifndef rn */
59
+ transform: var(--nutui-badge-content-transform, translateX(100%));
60
+ /* #endif */
49
61
  }
50
62
  .nut-badge-dot {
51
63
  width: var(--nutui-badge-dot-width, 7px);
@@ -54,22 +66,12 @@
54
66
  border-radius: var(--nutui-badge-dot-width, 7px);
55
67
  padding: 0;
56
68
  }
57
- .nut-badge-outline .nut-badge-content {
69
+ .nut-badge-outline {
58
70
  background: var(--nutui-color-primary-text, #ffffff);
59
71
  border: 1px solid var(--nutui-color-primary, #ff0f23);
60
72
  color: var(--nutui-color-primary, #ff0f23);
61
73
  }
62
74
 
63
- [dir=rtl] .nut-badge-icon,
64
- .nut-rtl .nut-badge-icon {
65
- right: auto;
66
- left: -15%;
67
- }
68
- [dir=rtl] .nut-badge-content,
69
- .nut-rtl .nut-badge-content {
70
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
71
- }
72
-
73
75
  .nut-tabbar-item {
74
76
  display: flex;
75
77
  flex-direction: column;
@@ -1,6 +1,13 @@
1
1
  .nut-badge {
2
2
  position: relative;
3
- display: inline-block;
3
+ display: inline-flex;
4
+ width: auto;
5
+ /* #ifdef harmony */
6
+ min-width: 1px;
7
+ /* #endif */
8
+ /* #ifndef harmony */
9
+ min-width: auto;
10
+ /* #endif */
4
11
  }
5
12
  .nut-badge-icon {
6
13
  position: absolute;
@@ -8,8 +15,6 @@
8
15
  justify-content: center;
9
16
  align-items: center;
10
17
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
11
- top: -10%;
12
- right: -15%;
13
18
  padding: var(--nutui-badge-icon-padding, 3px);
14
19
  text-align: center;
15
20
  border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
@@ -27,7 +32,12 @@
27
32
  display: flex;
28
33
  justify-content: center;
29
34
  align-items: center;
35
+ /* #ifdef harmony */
36
+ background: var(--nutui-color-primary, #ff0f23);
37
+ /* #endif */
38
+ /* #ifndef harmony */
30
39
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
40
+ /* #endif */
31
41
  color: var(--nutui-badge-color, #fff);
32
42
  padding: var(--nutui-badge-padding, 0 4px);
33
43
  font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
@@ -45,7 +55,9 @@
45
55
  padding: 0;
46
56
  }
47
57
  .nut-badge-content {
48
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(100%));
58
+ /* #ifndef rn */
59
+ transform: var(--nutui-badge-content-transform, translateX(100%));
60
+ /* #endif */
49
61
  }
50
62
  .nut-badge-dot {
51
63
  width: var(--nutui-badge-dot-width, 7px);
@@ -54,22 +66,12 @@
54
66
  border-radius: var(--nutui-badge-dot-width, 7px);
55
67
  padding: 0;
56
68
  }
57
- .nut-badge-outline .nut-badge-content {
69
+ .nut-badge-outline {
58
70
  background: var(--nutui-color-primary-text, #ffffff);
59
71
  border: 1px solid var(--nutui-color-primary, #ff0f23);
60
72
  color: var(--nutui-color-primary, #ff0f23);
61
73
  }
62
74
 
63
- [dir=rtl] .nut-badge-icon,
64
- .nut-rtl .nut-badge-icon {
65
- right: auto;
66
- left: -15%;
67
- }
68
- [dir=rtl] .nut-badge-content,
69
- .nut-rtl .nut-badge-content {
70
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
71
- }
72
-
73
75
  .nut-tabbar-item {
74
76
  display: flex;
75
77
  flex-direction: column;
@@ -1,5 +1,5 @@
1
- import React, { FunctionComponent, ReactNode } from 'react';
2
1
  import type { MouseEvent } from 'react';
2
+ import React, { FunctionComponent, ReactNode } from 'react';
3
3
  import { ITouchEvent } from '@tarojs/components';
4
4
  import { BasicComponent } from "../../utils/typings";
5
5
  export type TagType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
@@ -3,8 +3,8 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
3
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
5
  import React, { useState } from "react";
6
- import { View, Text } from "@tarojs/components";
7
- // import { Close } from '@nutui/icons-react-taro'
6
+ import { View } from "@tarojs/components";
7
+ import { Close } from "@nutui/icons-react-taro";
8
8
  import classNames from "classnames";
9
9
  import { ComponentDefaults } from "../../utils/typings";
10
10
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -65,21 +65,13 @@ export var Tag = function(props) {
65
65
  setVisible(false);
66
66
  onClose && onClose(e);
67
67
  }
68
- }, closeIcon) : // TODO: icon 适配
69
- // <Close
70
- // size={8}
71
- // onClick={(e) => {
72
- // setVisible(false)
73
- // onClose && onClose(e)
74
- // }}
75
- // />
76
- /*#__PURE__*/ React.createElement(Text, {
68
+ }, closeIcon) : /*#__PURE__*/ React.createElement(Close, {
69
+ size: 8,
77
70
  onClick: function(e) {
78
71
  setVisible(false);
79
72
  onClose && onClose(e);
80
- },
81
- className: "".concat(classPrefix, "-custom-icon")
82
- }, "X")) : /*#__PURE__*/ React.createElement(View, {
73
+ }
74
+ })) : /*#__PURE__*/ React.createElement(View, {
83
75
  className: classes,
84
76
  style: _object_spread({}, style, getStyle()),
85
77
  onClick: function(e) {
@@ -7,12 +7,20 @@
7
7
  }
8
8
  }
9
9
  .nut-toast {
10
+ /* #ifdef rn */
11
+ position: absolute;
12
+ /* #endif */
13
+ /* #ifndef rn */
10
14
  position: fixed;
15
+ /* #endif */
11
16
  left: 0;
12
17
  top: 0;
18
+ display: flex;
19
+ flex-direction: row;
20
+ justify-content: center;
21
+ align-items: center;
13
22
  width: 100%;
14
23
  height: 100%;
15
- text-align: center;
16
24
  pointer-events: none;
17
25
  z-index: 1300;
18
26
  }
@@ -20,18 +28,24 @@
20
28
  --nutui-overlay-bg-color: rgba(0, 0, 0, 0);
21
29
  --nutui-overlay-zIndex: 1300;
22
30
  }
23
- .nut-toast-small .nut-toast-inner {
24
- font-size: var(--nutui-font-size-s, 12px);
25
- }
26
- .nut-toast-large .nut-toast-inner {
27
- font-size: var(--nutui-font-size-l, 16px);
31
+ .nut-toast-overlay-default-taro {
32
+ /* #ifdef harmony */
33
+ background-color: rgba(0, 0, 0, 0);
34
+ z-index: 1300;
35
+ /* #endif */
36
+ /* #ifndef harmony */
37
+ --nutui-overlay-bg-color: rgba(0, 0, 0, 0);
38
+ --nutui-overlay-zIndex: 1300;
39
+ /* #endif */
28
40
  }
29
41
  .nut-toast-inner {
30
- display: flex;
31
- flex-direction: column;
32
42
  position: absolute;
33
- left: 50%;
34
43
  top: var(--nutui-toast-inner-top, 50%);
44
+ transform: translate(0, -50%);
45
+ display: flex;
46
+ flex-direction: column;
47
+ justify-content: center;
48
+ align-items: center;
35
49
  min-width: 30%;
36
50
  max-width: 95.7%;
37
51
  font-size: var(--nutui-toast-text-font-size, 14px);
@@ -41,18 +55,28 @@
41
55
  background: var(--nutui-toast-inner-bg-color, var(--nutui-color-mask, rgba(0, 0, 0, 0.7)));
42
56
  border-radius: var(--nutui-toast-inner-border-radius, 16px);
43
57
  color: var(--nutui-toast-font-color, #ffffff);
44
- transform: translate(-50%, -50%);
45
58
  }
46
- .nut-toast-inner.normal {
59
+ .nut-toast-inner-normal {
47
60
  word-break: normal;
48
61
  word-wrap: normal;
49
62
  }
50
- .nut-toast-inner.break-word {
63
+ .nut-toast-inner-break-word {
51
64
  word-break: normal;
52
65
  word-wrap: break-word;
53
66
  }
67
+ .nut-toast-inner-small {
68
+ font-size: var(--nutui-font-size-s, 12px);
69
+ }
70
+ .nut-toast-inner-large {
71
+ font-size: var(--nutui-font-size-l, 16px);
72
+ }
54
73
  .nut-toast-center {
55
- top: var(--nutui-toast-inner-top, 50%);
74
+ /* #ifdef rn */
75
+ top: var(--nutui-toast-inner-top, 38%);
76
+ /* #endif */
77
+ /* #ifndef rn */
78
+ top: var(--nutui-toast-inner-top, 48%);
79
+ /* #endif */
56
80
  }
57
81
  .nut-toast-bottom {
58
82
  top: var(--nutui-toast-inner-top, 80%);
@@ -60,40 +84,43 @@
60
84
  .nut-toast-top {
61
85
  top: var(--nutui-toast-inner-top, 20%);
62
86
  }
63
- .nut-toast-text:empty {
87
+ .nut-toast-text {
88
+ color: #ffffff;
89
+ text-align: var(--nutui-toast-inner-text-align, center);
90
+ }
91
+ .nut-toast-text-empty {
64
92
  margin-bottom: -8px;
65
93
  }
66
94
  .nut-toast-title {
67
95
  color: #ffffff;
68
96
  font-size: var(--nutui-toast-title-font-size, 16px);
69
97
  font-weight: 500;
98
+ text-align: var(--nutui-toast-inner-text-align, center);
70
99
  }
71
- .nut-toast-title:empty {
72
- margin-bottom: -8px;
100
+ .nut-toast-icon {
101
+ width: 24px;
102
+ height: 24px;
103
+ color: #ffffff;
73
104
  }
74
- .nut-toast-has-icon .nut-toast-icon-wrapper {
105
+ .nut-toast-icon-wrapper {
75
106
  width: 100%;
76
107
  display: flex;
77
108
  align-items: center;
78
109
  justify-content: center;
79
110
  margin-bottom: 8px;
111
+ color: #ffffff;
80
112
  }
81
- .nut-toast-has-icon .nut-toast-icon-wrapper .nut-icon {
113
+ .nut-toast-icon-wrapper-icon {
82
114
  width: 24px;
83
115
  height: 24px;
84
116
  }
85
- .nut-toast-loading .nut-toast-inner {
86
- display: inline-flex;
87
- flex-direction: column;
88
- justify-content: center;
89
- align-items: center;
90
- }
91
- .nut-toast-loading .nut-toast-icon-wrapper {
92
- animation: rotation 2s linear infinite;
117
+ .nut-toast-rtl {
118
+ left: auto;
119
+ right: 0;
93
120
  }
94
- .nut-toast-loading .nut-toast-icon-wrapper .nut-icon {
95
- width: 24px;
96
- height: 24px;
121
+ .nut-toast-rtl-inner {
122
+ left: auto;
123
+ right: 50%;
97
124
  }
98
125
 
99
126
  [dir=rtl] .nut-toast,
@@ -105,7 +132,6 @@
105
132
  .nut-rtl .nut-toast-inner {
106
133
  left: auto;
107
134
  right: 50%;
108
- transform: translate(50%, -50%);
109
135
  }
110
136
 
111
137
  .toast-fade-enter-active {