@nutui/nutui-react 3.0.0-beta.3 → 3.0.0-beta.4
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.
- package/dist/cjs/packages/address/style/style.css +1 -1
- package/dist/cjs/packages/animatingnumbers/countup.js +7 -6
- package/dist/cjs/packages/animatingnumbers/style/style.css +10 -4
- package/dist/cjs/packages/audio/style/style.css +49 -34
- package/dist/cjs/packages/button/style/button.scss +36 -19
- package/dist/cjs/packages/button/style/style.css +49 -34
- package/dist/cjs/packages/calendar/style/style.css +1 -1
- package/dist/cjs/packages/card/style/style.css +1 -0
- package/dist/cjs/packages/checkbox/checkbox.d.ts +1 -4
- package/dist/cjs/packages/checkbox/checkbox.js +0 -2
- package/dist/cjs/packages/checkbox/index.d.ts +7 -2
- package/dist/cjs/packages/checkbox/index.js +4 -1
- package/dist/cjs/packages/checkbox/style/style.css +10 -0
- package/dist/cjs/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
- package/dist/cjs/packages/checkboxgroup/style/style.css +10 -0
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/countdown.d.ts +2 -20
- package/dist/cjs/packages/countdown/countdown.js +3 -2
- package/dist/cjs/packages/countdown/index.d.ts +1 -1
- package/dist/cjs/packages/countdown/style/countdown.scss +8 -2
- package/dist/cjs/packages/countdown/style/style.css +18 -13
- package/dist/cjs/packages/countdown/types.d.ts +26 -0
- package/dist/cjs/packages/countdown/types.js +4 -0
- package/dist/cjs/packages/countup/style/countup.scss +10 -4
- package/dist/cjs/packages/countup/style/style.css +10 -4
- package/dist/cjs/packages/dialog/style/dialog.scss +10 -7
- package/dist/cjs/packages/dialog/style/style.css +58 -41
- package/dist/cjs/packages/progress/progress.js +1 -1
- package/dist/cjs/packages/progress/style/progress.scss +2 -2
- package/dist/cjs/packages/progress/style/style.css +3 -2
- package/dist/cjs/packages/rate/style/rate.scss +10 -5
- package/dist/cjs/packages/rate/style/style.css +7 -5
- package/dist/cjs/packages/tabbar/style/style.css +10 -0
- package/dist/cjs/packages/tabbaritem/style/style.css +10 -0
- package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +10 -0
- package/dist/cjs/packages/tag/style/style.css +1 -0
- package/dist/cjs/packages/tag/style/tag.scss +1 -0
- package/dist/cjs/packages/toast/style/index.js +1 -0
- package/dist/cjs/packages/toast/style/style.css +60 -0
- package/dist/cjs/packages/uploader/style/style.css +3 -2
- package/dist/cjs/utils/add-color-for-harmony.d.ts +9 -0
- package/dist/cjs/utils/add-color-for-harmony.js +27 -0
- package/dist/es/packages/address/style/style.css +1 -1
- package/dist/es/packages/animatingnumbers/countup.js +7 -6
- package/dist/es/packages/animatingnumbers/style/style.css +10 -4
- package/dist/es/packages/audio/style/style.css +49 -34
- package/dist/es/packages/button/style/button.scss +36 -19
- package/dist/es/packages/button/style/style.css +49 -34
- package/dist/es/packages/calendar/style/style.css +1 -1
- package/dist/es/packages/card/style/style.css +1 -0
- package/dist/es/packages/checkbox/checkbox.d.ts +1 -4
- package/dist/es/packages/checkbox/checkbox.js +1 -3
- package/dist/es/packages/checkbox/index.d.ts +7 -2
- package/dist/es/packages/checkbox/index.js +4 -1
- package/dist/es/packages/checkbox/style/style.css +10 -0
- package/dist/es/packages/checkboxgroup/checkboxgroup.d.ts +10 -50
- package/dist/es/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
- package/dist/es/packages/checkboxgroup/style/style.css +10 -0
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/countdown.d.ts +2 -20
- package/dist/es/packages/countdown/countdown.js +3 -2
- package/dist/es/packages/countdown/index.d.ts +1 -1
- package/dist/es/packages/countdown/style/countdown.scss +8 -2
- package/dist/es/packages/countdown/style/style.css +18 -13
- package/dist/es/packages/countdown/types.d.ts +26 -0
- package/dist/es/packages/countdown/types.js +1 -0
- package/dist/es/packages/countup/style/countup.scss +10 -4
- package/dist/es/packages/countup/style/style.css +10 -4
- package/dist/es/packages/dialog/style/dialog.scss +10 -7
- package/dist/es/packages/dialog/style/style.css +58 -41
- package/dist/es/packages/ellipsis/ellipsis.d.ts +1 -1
- package/dist/es/packages/progress/progress.js +1 -1
- package/dist/es/packages/progress/style/progress.scss +2 -2
- package/dist/es/packages/progress/style/style.css +3 -2
- package/dist/es/packages/rate/rate.d.ts +12 -60
- package/dist/es/packages/rate/style/rate.scss +10 -5
- package/dist/es/packages/rate/style/style.css +7 -5
- package/dist/es/packages/tabbar/style/style.css +10 -0
- package/dist/es/packages/tabbar/tabbar.d.ts +7 -35
- package/dist/es/packages/tabbaritem/style/style.css +10 -0
- package/dist/es/packages/tabbaritem/style/tabbaritem.scss +10 -0
- package/dist/es/packages/tabbaritem/tabbaritem.d.ts +7 -35
- package/dist/es/packages/tag/style/style.css +1 -0
- package/dist/es/packages/tag/style/tag.scss +1 -0
- package/dist/es/packages/toast/style/index.js +1 -0
- package/dist/es/packages/toast/style/style.css +60 -0
- package/dist/es/packages/uploader/style/style.css +3 -2
- package/dist/es/utils/add-color-for-harmony.d.ts +9 -0
- package/dist/es/utils/add-color-for-harmony.js +16 -0
- package/dist/nutui.react.umd.js +149 -146
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +29 -29
- package/dist/styles/variables.scss +36 -30
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.nut-button {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
|
-
display: inline-block;
|
|
5
4
|
/* #ifdef rn harmony*/
|
|
6
5
|
width: 80px;
|
|
7
6
|
/* #endif */
|
|
@@ -16,14 +15,14 @@
|
|
|
16
15
|
margin: 0;
|
|
17
16
|
padding: 0;
|
|
18
17
|
height: var(--nutui-button-default-height, 32px);
|
|
19
|
-
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-
|
|
18
|
+
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-s, 12px));
|
|
20
19
|
font-weight: var(--nutui-button-default-font-weight, var(--nutui-font-weight, 400));
|
|
21
20
|
text-align: center;
|
|
22
21
|
cursor: pointer;
|
|
23
22
|
transition: opacity 0.2s;
|
|
24
|
-
-webkit-appearance: none;
|
|
25
23
|
user-select: none;
|
|
26
24
|
touch-action: manipulation;
|
|
25
|
+
-webkit-appearance: none;
|
|
27
26
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
28
27
|
color: var(--nutui-button-default-color, var(--nutui-color-title, #1a1a1a));
|
|
29
28
|
background: var(--nutui-button-default-background-color, transparent);
|
|
@@ -72,9 +71,9 @@
|
|
|
72
71
|
/* #endif */
|
|
73
72
|
}
|
|
74
73
|
.nut-button-wrap .nut-icon {
|
|
75
|
-
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-
|
|
76
|
-
width: var(--nutui-button-default-font-size, var(--nutui-font-size-
|
|
77
|
-
height: var(--nutui-button-default-font-size, var(--nutui-font-size-
|
|
74
|
+
font-size: var(--nutui-button-default-font-size, var(--nutui-font-size-s, 12px));
|
|
75
|
+
width: var(--nutui-button-default-font-size, var(--nutui-font-size-s, 12px));
|
|
76
|
+
height: var(--nutui-button-default-font-size, var(--nutui-font-size-s, 12px));
|
|
78
77
|
}
|
|
79
78
|
.nut-button-loading::before, .nut-button-disabled::before {
|
|
80
79
|
display: none;
|
|
@@ -87,6 +86,18 @@
|
|
|
87
86
|
width: var(--nutui-button-default-height, 32px);
|
|
88
87
|
padding: 0;
|
|
89
88
|
}
|
|
89
|
+
.nut-button-round {
|
|
90
|
+
border-radius: var(--nutui-button-border-radius, 8px);
|
|
91
|
+
}
|
|
92
|
+
.nut-button-round-xlarge, .nut-button-round-large {
|
|
93
|
+
border-radius: var(--nutui-button-large-border-radius, 12px);
|
|
94
|
+
}
|
|
95
|
+
.nut-button-round-small {
|
|
96
|
+
border-radius: var(--nutui-button-small-border-radius, 8px);
|
|
97
|
+
}
|
|
98
|
+
.nut-button-round-mini {
|
|
99
|
+
border-radius: var(--nutui-button-mini-border-radius, 6px);
|
|
100
|
+
}
|
|
90
101
|
.nut-button-default {
|
|
91
102
|
padding: var(--nutui-button-default-padding, 0px 12px);
|
|
92
103
|
border-style: solid;
|
|
@@ -111,37 +122,52 @@
|
|
|
111
122
|
.nut-button-xlarge {
|
|
112
123
|
height: var(--nutui-button-xlarge-height, 48px);
|
|
113
124
|
padding: var(--nutui-button-xlarge-padding, 0px 24px);
|
|
114
|
-
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-
|
|
125
|
+
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
115
126
|
font-weight: var(--nutui-button-large-font-weight, var(--nutui-font-weight-bold, 600));
|
|
127
|
+
border-radius: var(--nutui-radius-base, 8px);
|
|
128
|
+
}
|
|
129
|
+
.nut-button-xlarge .nut-button-text {
|
|
130
|
+
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
131
|
+
}
|
|
132
|
+
.nut-button-xlarge .nut-button-text-right {
|
|
133
|
+
margin-right: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
116
134
|
}
|
|
117
135
|
.nut-button-xlarge .nut-icon {
|
|
118
|
-
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-
|
|
119
|
-
width: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-
|
|
120
|
-
height: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-
|
|
136
|
+
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
137
|
+
width: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
138
|
+
height: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
121
139
|
}
|
|
122
140
|
.nut-button-xlarge-children {
|
|
123
|
-
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-
|
|
141
|
+
font-size: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xl, 18px));
|
|
124
142
|
font-weight: var(--nutui-button-large-font-weight, var(--nutui-font-weight-bold, 600));
|
|
125
143
|
}
|
|
126
144
|
.nut-button-large {
|
|
127
145
|
height: var(--nutui-button-large-height, 40px);
|
|
128
146
|
padding: var(--nutui-button-large-padding, 0px 16px);
|
|
129
|
-
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-
|
|
147
|
+
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-base, 14px));
|
|
130
148
|
font-weight: var(--nutui-button-large-font-weight, var(--nutui-font-weight-bold, 600));
|
|
149
|
+
border-radius: var(--nutui-radius-base, 8px);
|
|
150
|
+
}
|
|
151
|
+
.nut-button-large .nut-button-text {
|
|
152
|
+
margin-left: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
153
|
+
}
|
|
154
|
+
.nut-button-large .nut-button-text-right {
|
|
155
|
+
margin-right: var(--nutui-button-xlarge-text-icon-margin, 6px);
|
|
131
156
|
}
|
|
132
157
|
.nut-button-large .nut-icon {
|
|
133
|
-
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-
|
|
134
|
-
width: var(--nutui-button-large-font-size, var(--nutui-font-size-
|
|
135
|
-
height: var(--nutui-button-large-font-size, var(--nutui-font-size-
|
|
158
|
+
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-base, 14px));
|
|
159
|
+
width: var(--nutui-button-large-font-size, var(--nutui-font-size-base, 14px));
|
|
160
|
+
height: var(--nutui-button-large-font-size, var(--nutui-font-size-base, 14px));
|
|
136
161
|
}
|
|
137
162
|
.nut-button-large-children {
|
|
138
|
-
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-
|
|
163
|
+
font-size: var(--nutui-button-large-font-size, var(--nutui-font-size-base, 14px));
|
|
139
164
|
font-weight: var(--nutui-button-large-font-weight, var(--nutui-font-weight-bold, 600));
|
|
140
165
|
}
|
|
141
166
|
.nut-button-small {
|
|
142
167
|
height: var(--nutui-button-small-height, 28px);
|
|
143
168
|
padding: var(--nutui-button-small-padding, 0px 8px);
|
|
144
169
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
170
|
+
border-radius: var(--nutui-radius-s, 6px);
|
|
145
171
|
}
|
|
146
172
|
.nut-button-small .nut-icon {
|
|
147
173
|
font-size: var(--nutui-button-small-font-size, var(--nutui-font-size-s, 12px));
|
|
@@ -154,15 +180,16 @@
|
|
|
154
180
|
.nut-button-mini {
|
|
155
181
|
height: var(--nutui-button-mini-height, 24px);
|
|
156
182
|
padding: var(--nutui-button-mini-padding, 0px 8px);
|
|
157
|
-
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-
|
|
183
|
+
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
184
|
+
border-radius: var(--nutui-radius-s, 6px);
|
|
158
185
|
}
|
|
159
186
|
.nut-button-mini .nut-icon {
|
|
160
|
-
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-
|
|
161
|
-
width: var(--nutui-button-mini-font-size, var(--nutui-font-size-
|
|
162
|
-
height: var(--nutui-button-mini-font-size, var(--nutui-font-size-
|
|
187
|
+
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
188
|
+
width: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
189
|
+
height: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
163
190
|
}
|
|
164
191
|
.nut-button-mini-children {
|
|
165
|
-
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-
|
|
192
|
+
font-size: var(--nutui-button-mini-font-size, var(--nutui-font-size-xs, 11px));
|
|
166
193
|
}
|
|
167
194
|
.nut-button-primary {
|
|
168
195
|
color: var(--nutui-button-primary-color, var(--nutui-color-primary-text, #ffffff));
|
|
@@ -173,7 +200,7 @@
|
|
|
173
200
|
color: var(--nutui-button-primary-color, var(--nutui-color-primary-text, #ffffff));
|
|
174
201
|
}
|
|
175
202
|
.nut-button-primary-solid {
|
|
176
|
-
background: var(--nutui-color-primary, #ff0f23);
|
|
203
|
+
background: linear-gradient(90deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%);
|
|
177
204
|
color: var(--nutui-button-primary-color, var(--nutui-color-primary-text, #ffffff));
|
|
178
205
|
border-color: transparent;
|
|
179
206
|
}
|
|
@@ -333,18 +360,6 @@
|
|
|
333
360
|
cursor: default;
|
|
334
361
|
opacity: 0.9;
|
|
335
362
|
}
|
|
336
|
-
.nut-button-round {
|
|
337
|
-
border-radius: var(--nutui-button-border-radius, 8px);
|
|
338
|
-
}
|
|
339
|
-
.nut-button-round-xlarge, .nut-button-round-large {
|
|
340
|
-
border-radius: var(--nutui-button-large-border-radius, 12px);
|
|
341
|
-
}
|
|
342
|
-
.nut-button-round-small {
|
|
343
|
-
border-radius: var(--nutui-button-small-border-radius, 8px);
|
|
344
|
-
}
|
|
345
|
-
.nut-button-round-mini {
|
|
346
|
-
border-radius: var(--nutui-button-mini-border-radius, 6px);
|
|
347
|
-
}
|
|
348
363
|
.nut-button-square {
|
|
349
364
|
border-radius: var(--nutui-button-square-border-radius, 0);
|
|
350
365
|
}
|
|
@@ -430,7 +445,6 @@
|
|
|
430
445
|
flex-direction: column;
|
|
431
446
|
align-items: center;
|
|
432
447
|
width: var(--nutui-dialog-width, 295px);
|
|
433
|
-
max-height: 67%;
|
|
434
448
|
min-height: var(--nutui-dialog-min-height, 124px);
|
|
435
449
|
padding: var(--nutui-dialog-padding, 24px);
|
|
436
450
|
box-sizing: border-box;
|
|
@@ -461,25 +475,28 @@
|
|
|
461
475
|
display: flex;
|
|
462
476
|
justify-content: center;
|
|
463
477
|
align-items: center;
|
|
464
|
-
top: var(--nutui-dialog-close-top, 16px);
|
|
465
478
|
color: var(--nutui-dialog-close-color, #ffffff);
|
|
466
479
|
}
|
|
467
480
|
.nut-dialog-close .nut-icon {
|
|
468
|
-
font-size:
|
|
469
|
-
|
|
470
|
-
|
|
481
|
+
font-size: var(--nutui-dialog-close-width, 18px);
|
|
482
|
+
width: var(--nutui-dialog-close-width, 18px);
|
|
483
|
+
height: var(--nutui-dialog-close-height, 18px);
|
|
471
484
|
}
|
|
472
485
|
.nut-dialog-close-top-right {
|
|
486
|
+
top: var(--nutui-dialog-close-top, 16px);
|
|
473
487
|
right: var(--nutui-dialog-close-right, 16px);
|
|
474
488
|
}
|
|
475
489
|
.nut-dialog-close-top-left {
|
|
490
|
+
top: var(--nutui-dialog-close-top, 16px);
|
|
476
491
|
left: var(--nutui-dialog-close-left, 16px);
|
|
477
492
|
}
|
|
478
493
|
.nut-dialog-close-bottom {
|
|
479
|
-
top: initial;
|
|
480
494
|
bottom: -56px;
|
|
481
495
|
left: 50%;
|
|
482
|
-
transform:
|
|
496
|
+
transform: translateY(-50%);
|
|
497
|
+
}
|
|
498
|
+
.nut-dialog-close-bottom .nut-icon {
|
|
499
|
+
color: var(--nutui-dialog-close-color, #ffffff);
|
|
483
500
|
}
|
|
484
501
|
.nut-dialog-close:active {
|
|
485
502
|
opacity: 0.7;
|
|
@@ -51,7 +51,7 @@ var Progress = function Progress(props) {
|
|
|
51
51
|
var _useState = (0, _sliced_to_array._)((0, _react.useState)(0), 2), displayPercent = _useState[0], setDispalyPercent = _useState[1];
|
|
52
52
|
var stylesInner = {
|
|
53
53
|
width: "".concat(displayPercent, "%"),
|
|
54
|
-
|
|
54
|
+
background: color || '#FF0F23'
|
|
55
55
|
};
|
|
56
56
|
(0, _react.useEffect)(function() {
|
|
57
57
|
setDispalyPercent(percent);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
justify-content: center;
|
|
30
30
|
transition: all 0.4s;
|
|
31
31
|
border-radius: $progress-border-radius;
|
|
32
|
-
background
|
|
32
|
+
background: $progress-color;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&-text {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
top: $progress-text-position-top;
|
|
40
40
|
bottom: $progress-text-position-bottom;
|
|
41
41
|
transition: all 0.4s;
|
|
42
|
-
|
|
42
|
+
transform: translate(-50%);
|
|
43
43
|
|
|
44
44
|
&-inner {
|
|
45
45
|
display: flex;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
transition: all 0.4s;
|
|
29
29
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
30
|
-
background
|
|
30
|
+
background: var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
31
31
|
}
|
|
32
32
|
.nut-progress-text {
|
|
33
33
|
display: flex;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
top: var(--nutui-progress-text-position-top, -4px);
|
|
37
37
|
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
38
38
|
transition: all 0.4s;
|
|
39
|
+
transform: translate(-50%);
|
|
39
40
|
}
|
|
40
41
|
.nut-progress-text-inner {
|
|
41
42
|
display: flex;
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
50
51
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
51
52
|
line-height: 1;
|
|
52
|
-
background: var(--nutui-progress-text-background, #ff0f23);
|
|
53
|
+
background: var(--nutui-progress-text-background, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
53
54
|
}
|
|
54
55
|
@keyframes progressActive {
|
|
55
56
|
0% {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
position: relative;
|
|
21
|
-
margin-
|
|
21
|
+
margin-left: $rate-item-margin;
|
|
22
22
|
|
|
23
|
-
&:
|
|
24
|
-
margin-
|
|
23
|
+
&:first-child {
|
|
24
|
+
margin-left: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&-half {
|
|
@@ -39,11 +39,16 @@
|
|
|
39
39
|
|
|
40
40
|
&-icon {
|
|
41
41
|
display: flex;
|
|
42
|
-
color: $rate-icon-color;
|
|
43
42
|
cursor: pointer;
|
|
44
43
|
|
|
44
|
+
.nut-icon {
|
|
45
|
+
color: $rate-icon-color;
|
|
46
|
+
}
|
|
47
|
+
|
|
45
48
|
&-disabled {
|
|
46
|
-
|
|
49
|
+
.nut-icon {
|
|
50
|
+
color: $rate-icon-inactive-color;
|
|
51
|
+
}
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
&.nut-rate-item-icon.nut-rate-item-icon-half {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-shrink: 0;
|
|
14
14
|
position: relative;
|
|
15
|
-
margin-
|
|
15
|
+
margin-left: var(--nutui-rate-item-margin, 14px);
|
|
16
16
|
}
|
|
17
|
-
.nut-rate-item:
|
|
18
|
-
margin-
|
|
17
|
+
.nut-rate-item:first-child {
|
|
18
|
+
margin-left: 0;
|
|
19
19
|
}
|
|
20
20
|
.nut-rate-item-half {
|
|
21
21
|
position: absolute;
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
}
|
|
31
31
|
.nut-rate-item-icon {
|
|
32
32
|
display: flex;
|
|
33
|
-
color: var(--nutui-rate-icon-color, var(--nutui-color-primary, #ff0f23));
|
|
34
33
|
cursor: pointer;
|
|
35
34
|
}
|
|
36
|
-
.nut-rate-item-icon-
|
|
35
|
+
.nut-rate-item-icon .nut-icon {
|
|
36
|
+
color: var(--nutui-rate-icon-color, var(--nutui-color-primary, #ff0f23));
|
|
37
|
+
}
|
|
38
|
+
.nut-rate-item-icon-disabled .nut-icon {
|
|
37
39
|
color: var(--nutui-rate-icon-inactive-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
38
40
|
}
|
|
39
41
|
.nut-rate-item-icon.nut-rate-item-icon.nut-rate-item-icon-half {
|
|
@@ -110,10 +110,20 @@
|
|
|
110
110
|
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
111
111
|
}
|
|
112
112
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box {
|
|
113
|
+
/* #ifdef harmony*/
|
|
114
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
115
|
+
/* #endif*/
|
|
116
|
+
/* #ifndef harmony*/
|
|
113
117
|
color: inherit;
|
|
118
|
+
/* #endif*/
|
|
114
119
|
}
|
|
115
120
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
|
|
121
|
+
/* #ifdef harmony*/
|
|
122
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
123
|
+
/* #endif*/
|
|
124
|
+
/* #ifndef harmony*/
|
|
116
125
|
color: inherit;
|
|
126
|
+
/* #endif*/
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
.nut-tabbar {
|
|
@@ -110,8 +110,18 @@
|
|
|
110
110
|
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
111
111
|
}
|
|
112
112
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box {
|
|
113
|
+
/* #ifdef harmony*/
|
|
114
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
115
|
+
/* #endif*/
|
|
116
|
+
/* #ifndef harmony*/
|
|
113
117
|
color: inherit;
|
|
118
|
+
/* #endif*/
|
|
114
119
|
}
|
|
115
120
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
|
|
121
|
+
/* #ifdef harmony*/
|
|
122
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
123
|
+
/* #endif*/
|
|
124
|
+
/* #ifndef harmony*/
|
|
116
125
|
color: inherit;
|
|
126
|
+
/* #endif*/
|
|
117
127
|
}
|
|
@@ -40,10 +40,20 @@
|
|
|
40
40
|
color: $tabbar-active-color;
|
|
41
41
|
|
|
42
42
|
.nut-tabbar-item-icon-box {
|
|
43
|
+
/* #ifdef harmony*/
|
|
44
|
+
color: $tabbar-active-color;
|
|
45
|
+
/* #endif*/
|
|
46
|
+
/* #ifndef harmony*/
|
|
43
47
|
color: inherit;
|
|
48
|
+
/* #endif*/
|
|
44
49
|
|
|
45
50
|
.nut-icon {
|
|
51
|
+
/* #ifdef harmony*/
|
|
52
|
+
color: $tabbar-active-color;
|
|
53
|
+
/* #endif*/
|
|
54
|
+
/* #ifndef harmony*/
|
|
46
55
|
color: inherit;
|
|
56
|
+
/* #endif*/
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
}
|
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
.nut-overlay {
|
|
2
|
+
/* #ifdef rn */
|
|
3
|
+
position: absolute;
|
|
4
|
+
/* #endif */
|
|
5
|
+
/* #ifndef rn */
|
|
6
|
+
position: fixed;
|
|
7
|
+
/* #endif */
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
background-color: var(--nutui-overlay-bg-color, var(--nutui-color-mask, rgba(0, 0, 0, 0.7)));
|
|
15
|
+
z-index: var(--nutui-overlay-zIndex, 1000);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[dir=rtl] .nut-overlay,
|
|
19
|
+
.nut-rtl .nut-overlay {
|
|
20
|
+
left: auto;
|
|
21
|
+
right: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nut-overflow-hidden {
|
|
25
|
+
overflow: hidden !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes nut-fade-in {
|
|
29
|
+
0% {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
}
|
|
32
|
+
1% {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
100% {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@keyframes nut-fade-out {
|
|
40
|
+
0% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
1% {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
100% {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.nut-overlay-slide-enter-active, .nut-overlay-slide-appear-active {
|
|
51
|
+
animation-fill-mode: both;
|
|
52
|
+
animation-name: nut-fade-in;
|
|
53
|
+
animation-duration: var(--nutui-overlay-animation-duration, 0.3s);
|
|
54
|
+
}
|
|
55
|
+
.nut-overlay-slide-exit-active {
|
|
56
|
+
animation-fill-mode: both;
|
|
57
|
+
animation-name: nut-fade-out;
|
|
58
|
+
animation-duration: var(--nutui-overlay-animation-duration, 0.3s);
|
|
59
|
+
}
|
|
60
|
+
|
|
1
61
|
@keyframes rotation {
|
|
2
62
|
0% {
|
|
3
63
|
-webkit-transform: rotate(0deg);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
transition: all 0.4s;
|
|
29
29
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
30
|
-
background
|
|
30
|
+
background: var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
31
31
|
}
|
|
32
32
|
.nut-progress-text {
|
|
33
33
|
display: flex;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
top: var(--nutui-progress-text-position-top, -4px);
|
|
37
37
|
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
38
38
|
transition: all 0.4s;
|
|
39
|
+
transform: translate(-50%);
|
|
39
40
|
}
|
|
40
41
|
.nut-progress-text-inner {
|
|
41
42
|
display: flex;
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
50
51
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
51
52
|
line-height: 1;
|
|
52
|
-
background: var(--nutui-progress-text-background, #ff0f23);
|
|
53
|
+
background: var(--nutui-progress-text-background, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
53
54
|
}
|
|
54
55
|
@keyframes progressActive {
|
|
55
56
|
0% {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 为支持 Harmony 的 React 元素添加颜色属性
|
|
4
|
+
* @param maybeElement - 要处理的 React 节点
|
|
5
|
+
* @param color - 要添加的颜色值(如:'#ff0000')
|
|
6
|
+
* @returns 处理后的 React 节点
|
|
7
|
+
*/
|
|
8
|
+
declare function addColorForHarmony(maybeElement: ReactNode, color?: string): string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined;
|
|
9
|
+
export default addColorForHarmony;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
13
|
+
var _platformtaro = require("./platform-taro");
|
|
14
|
+
/**
|
|
15
|
+
* 为支持 Harmony 的 React 元素添加颜色属性
|
|
16
|
+
* @param maybeElement - 要处理的 React 节点
|
|
17
|
+
* @param color - 要添加的颜色值(如:'#ff0000')
|
|
18
|
+
* @returns 处理后的 React 节点
|
|
19
|
+
*/ function addColorForHarmony(maybeElement, color) {
|
|
20
|
+
if (/*#__PURE__*/ _react.default.isValidElement(maybeElement) && (0, _platformtaro.harmony)()) {
|
|
21
|
+
return /*#__PURE__*/ _react.default.cloneElement(maybeElement, {
|
|
22
|
+
color: color
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return maybeElement;
|
|
26
|
+
}
|
|
27
|
+
var _default = addColorForHarmony;
|
|
@@ -984,7 +984,7 @@
|
|
|
984
984
|
line-height: 42px;
|
|
985
985
|
margin: auto;
|
|
986
986
|
text-align: center;
|
|
987
|
-
background: var(--nutui-color-primary, #ff0f23);
|
|
987
|
+
background: linear-gradient(90deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%);
|
|
988
988
|
border-radius: 21px;
|
|
989
989
|
font-size: 15px;
|
|
990
990
|
color: var(--nutui-color-primary-text, #ffffff);
|
|
@@ -36,7 +36,7 @@ export var CountUp = function(props) {
|
|
|
36
36
|
var currNumber = "".concat(thousands ? intNumber.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') : intNumber).concat(splitArr[1] ? '.' : '').concat(splitArr[1] || '');
|
|
37
37
|
return currNumber.split('');
|
|
38
38
|
};
|
|
39
|
-
var
|
|
39
|
+
var numberArr = useMemo(getShowNumber, [
|
|
40
40
|
value,
|
|
41
41
|
length,
|
|
42
42
|
thousands
|
|
@@ -44,7 +44,7 @@ export var CountUp = function(props) {
|
|
|
44
44
|
var setNumberTransform = useCallback(function() {
|
|
45
45
|
if (countupRef.current) {
|
|
46
46
|
var numberItems = countupRef.current.querySelectorAll('.nut-countup-number');
|
|
47
|
-
var numberFilterArr =
|
|
47
|
+
var numberFilterArr = numberArr.filter(function(item) {
|
|
48
48
|
return !Number.isNaN(Number(item));
|
|
49
49
|
});
|
|
50
50
|
Object.keys(numberItems).forEach(function(key) {
|
|
@@ -59,10 +59,10 @@ export var CountUp = function(props) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}, [
|
|
62
|
-
|
|
62
|
+
numberArr
|
|
63
63
|
]);
|
|
64
64
|
var numberEaseStyle = {
|
|
65
|
-
|
|
65
|
+
transitionDuration: "".concat(duration, "s")
|
|
66
66
|
};
|
|
67
67
|
useEffect(function() {
|
|
68
68
|
timerRef.current = window.setTimeout(function() {
|
|
@@ -72,7 +72,7 @@ export var CountUp = function(props) {
|
|
|
72
72
|
window.clearTimeout(timerRef.current);
|
|
73
73
|
};
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
numberArr,
|
|
76
76
|
delay,
|
|
77
77
|
setNumberTransform
|
|
78
78
|
]);
|
|
@@ -81,7 +81,7 @@ export var CountUp = function(props) {
|
|
|
81
81
|
ref: countupRef
|
|
82
82
|
}, /*#__PURE__*/ React.createElement("ul", {
|
|
83
83
|
className: "".concat(classPrefix, "-list")
|
|
84
|
-
},
|
|
84
|
+
}, numberArr.map(function(item, idx) {
|
|
85
85
|
return /*#__PURE__*/ React.createElement("li", {
|
|
86
86
|
className: "".concat(classPrefix, "-listitem ").concat(!Number.isNaN(Number(item)) ? "".concat(classPrefix, "-listitem-number") : ''),
|
|
87
87
|
key: idx
|
|
@@ -90,6 +90,7 @@ export var CountUp = function(props) {
|
|
|
90
90
|
style: numberEaseStyle
|
|
91
91
|
}, _to_consumable_array(numbers).concat(_to_consumable_array(numbers)).map(function(number, subidx) {
|
|
92
92
|
return /*#__PURE__*/ React.createElement("span", {
|
|
93
|
+
className: "".concat(classPrefix, "-number-text"),
|
|
93
94
|
key: subidx
|
|
94
95
|
}, number);
|
|
95
96
|
})) : /*#__PURE__*/ React.createElement("span", {
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
.nut-countup-listitem {
|
|
8
8
|
height: var(--nutui-countup-height, 32px);
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
font-weight: var(--nutui-font-weight-bold, 600);
|
|
10
|
+
user-select: none;
|
|
11
|
+
-webkit-tap-highlight-color: transparent;
|
|
13
12
|
}
|
|
14
13
|
.nut-countup-listitem-number {
|
|
15
14
|
margin: 0 var(--nutui-countup-lr-margin, 0);
|
|
@@ -22,14 +21,21 @@
|
|
|
22
21
|
height: 80%;
|
|
23
22
|
align-items: flex-end;
|
|
24
23
|
color: var(--nutui-countup-bg-color, inherit);
|
|
24
|
+
font-size: var(--nutui-countup-base-size, 18px);
|
|
25
|
+
font-weight: var(--nutui-font-weight-bold, 600);
|
|
25
26
|
}
|
|
26
27
|
.nut-countup-number {
|
|
27
28
|
display: flex;
|
|
28
29
|
flex-direction: column;
|
|
29
30
|
align-items: center;
|
|
30
31
|
width: var(--nutui-countup-width, auto);
|
|
32
|
+
transition: transform 1s ease-in-out;
|
|
33
|
+
transform: translate(0, 0);
|
|
31
34
|
}
|
|
32
|
-
.nut-countup-number
|
|
35
|
+
.nut-countup-number-text {
|
|
33
36
|
height: var(--nutui-countup-height, 32px);
|
|
34
37
|
line-height: var(--nutui-countup-height, 32px);
|
|
38
|
+
color: var(--nutui-countup-color, var(--nutui-color-title, #1a1a1a));
|
|
39
|
+
font-size: var(--nutui-countup-base-size, 18px);
|
|
40
|
+
font-weight: var(--nutui-font-weight-bold, 600);
|
|
35
41
|
}
|