@nutui/nutui-react 3.0.0-beta.3 → 3.0.0-beta.5
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/card.scss +3 -18
- package/dist/cjs/packages/card/style/style.css +4 -13
- 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/grid/grid.js +2 -6
- package/dist/cjs/packages/grid/style/grid.scss +2 -2
- package/dist/cjs/packages/grid/style/style.css +8 -6
- package/dist/cjs/packages/griditem/griditem.js +12 -6
- package/dist/cjs/packages/griditem/style/griditem.scss +6 -4
- package/dist/cjs/packages/griditem/style/style.css +6 -4
- package/dist/cjs/packages/imagepreview/style/imagepreview.scss +4 -0
- package/dist/cjs/packages/imagepreview/style/style.css +3 -0
- 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/resultpage/resultpage.js +23 -17
- package/dist/cjs/packages/resultpage/style/resultpage.scss +5 -3
- package/dist/cjs/packages/resultpage/style/style.css +10 -8
- package/dist/cjs/packages/resultpage/types.d.ts +1 -1
- 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/card.d.ts +11 -55
- package/dist/es/packages/card/style/card.scss +3 -18
- package/dist/es/packages/card/style/style.css +4 -13
- 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/grid/grid.js +2 -6
- package/dist/es/packages/grid/style/grid.scss +2 -2
- package/dist/es/packages/grid/style/style.css +8 -6
- package/dist/es/packages/griditem/griditem.js +12 -6
- package/dist/es/packages/griditem/style/griditem.scss +6 -4
- package/dist/es/packages/griditem/style/style.css +6 -4
- package/dist/es/packages/imagepreview/imagepreview.d.ts +14 -70
- package/dist/es/packages/imagepreview/style/imagepreview.scss +4 -0
- package/dist/es/packages/imagepreview/style/style.css +3 -0
- 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/resultpage/resultpage.js +23 -16
- package/dist/es/packages/resultpage/style/resultpage.scss +5 -3
- package/dist/es/packages/resultpage/style/style.css +10 -8
- package/dist/es/packages/resultpage/types.d.ts +1 -1
- 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 +244 -187
- package/dist/style.css +1 -1
- package/dist/styles/jd-font.scss +8 -0
- package/dist/styles/themes/default.scss +2 -105
- package/dist/styles/variables.scss +46 -35
- 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;
|
|
@@ -16,12 +16,11 @@ var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
|
16
16
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
17
17
|
var _griditem = require("../griditem/griditem");
|
|
18
18
|
var _context = /*#__PURE__*/ _interop_require_default._(require("./context"));
|
|
19
|
-
var _pxcheck = require("../../utils/px-check");
|
|
20
19
|
var defaultProps = {
|
|
21
20
|
columns: 4,
|
|
22
|
-
gap:
|
|
21
|
+
gap: 9,
|
|
23
22
|
center: true,
|
|
24
|
-
square:
|
|
23
|
+
square: true,
|
|
25
24
|
reverse: false,
|
|
26
25
|
direction: 'vertical'
|
|
27
26
|
};
|
|
@@ -48,9 +47,6 @@ var Grid = function Grid(props) {
|
|
|
48
47
|
if (style) {
|
|
49
48
|
styleSelf = style;
|
|
50
49
|
}
|
|
51
|
-
if (gap) {
|
|
52
|
-
styleSelf.paddingLeft = (0, _pxcheck.pxCheck)(gap);
|
|
53
|
-
}
|
|
54
50
|
return styleSelf;
|
|
55
51
|
};
|
|
56
52
|
return /*#__PURE__*/ _react.default.createElement("div", (0, _object_spread._)({
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
position: relative;
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
color: var(--nutui-grid-item-text-color, var(--nutui-color-title, #1a1a1a));
|
|
7
|
+
overflow: hidden;
|
|
7
8
|
}
|
|
8
9
|
.nut-grid-item-text {
|
|
9
10
|
color: var(--nutui-grid-item-text-color, var(--nutui-color-title, #1a1a1a));
|
|
@@ -31,12 +32,13 @@
|
|
|
31
32
|
border: 0 solid var(--nutui-grid-border-color, var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
|
|
32
33
|
}
|
|
33
34
|
.nut-grid-item-content-border {
|
|
34
|
-
border-right-width:
|
|
35
|
-
border-bottom-width:
|
|
35
|
+
border-right-width: var(--nutui-grid-border-width, 0px);
|
|
36
|
+
border-bottom-width: var(--nutui-grid-border-width, 0px);
|
|
36
37
|
}
|
|
37
38
|
.nut-grid-item-content-surround {
|
|
38
|
-
border-top-width:
|
|
39
|
-
border-left-width:
|
|
39
|
+
border-top-width: var(--nutui-grid-border-width, 0px);
|
|
40
|
+
border-left-width: var(--nutui-grid-border-width, 0px);
|
|
41
|
+
border-radius: var(--nutui-grid-item-border-radius, var(--nutui-radius-l, 8px));
|
|
40
42
|
}
|
|
41
43
|
.nut-grid-item-content-center {
|
|
42
44
|
align-items: center;
|
|
@@ -108,8 +110,8 @@
|
|
|
108
110
|
border: 0 solid var(--nutui-grid-border-color, var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
|
|
109
111
|
}
|
|
110
112
|
.nut-grid-border {
|
|
111
|
-
border-top-width:
|
|
112
|
-
border-left-width:
|
|
113
|
+
border-top-width: var(--nutui-grid-border-width, 0px);
|
|
114
|
+
border-left-width: var(--nutui-grid-border-width, 0px);
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
[dir=rtl] .nut-grid-border,
|
|
@@ -21,9 +21,9 @@ var _pxcheck = require("../../utils/px-check");
|
|
|
21
21
|
var defaultProps = {
|
|
22
22
|
text: '',
|
|
23
23
|
columns: 4,
|
|
24
|
-
gap:
|
|
24
|
+
gap: 9,
|
|
25
25
|
center: true,
|
|
26
|
-
square:
|
|
26
|
+
square: true,
|
|
27
27
|
reverse: false,
|
|
28
28
|
direction: 'vertical'
|
|
29
29
|
};
|
|
@@ -46,16 +46,22 @@ var GridItem = function GridItem(props) {
|
|
|
46
46
|
var classes = (0, _classnames.default)(classPrefix, className);
|
|
47
47
|
var context = (0, _react.useContext)(_context.default);
|
|
48
48
|
var rootStyle = function rootStyle() {
|
|
49
|
+
var width = "calc((100% - ".concat(Number(gap) * (Number(columns) - 1), "px) / ").concat(Number(columns), ")");
|
|
49
50
|
var styles = (0, _object_spread._)({
|
|
50
|
-
flexBasis:
|
|
51
|
+
flexBasis: width
|
|
51
52
|
}, style);
|
|
52
53
|
if (square) {
|
|
53
|
-
styles.paddingTop =
|
|
54
|
-
}
|
|
55
|
-
|
|
54
|
+
styles.paddingTop = width;
|
|
55
|
+
}
|
|
56
|
+
if (gap) {
|
|
57
|
+
if ((index + 1) % Number(columns)) {
|
|
58
|
+
styles.marginRight = (0, _pxcheck.pxCheck)(gap);
|
|
59
|
+
}
|
|
56
60
|
if (index >= Number(columns)) {
|
|
57
61
|
styles.marginTop = (0, _pxcheck.pxCheck)(gap);
|
|
58
62
|
}
|
|
63
|
+
} else {
|
|
64
|
+
styles.borderRadius = 0;
|
|
59
65
|
}
|
|
60
66
|
return styles;
|
|
61
67
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
position: relative;
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
color: $grid-item-text-color;
|
|
7
|
+
overflow: hidden;
|
|
7
8
|
|
|
8
9
|
&-text {
|
|
9
10
|
color: $grid-item-text-color;
|
|
@@ -35,13 +36,14 @@
|
|
|
35
36
|
border: 0 solid $grid-border-color;
|
|
36
37
|
|
|
37
38
|
&-border {
|
|
38
|
-
border-right-width:
|
|
39
|
-
border-bottom-width:
|
|
39
|
+
border-right-width: $grid-border-width;
|
|
40
|
+
border-bottom-width: $grid-border-width;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
&-surround {
|
|
43
|
-
border-top-width:
|
|
44
|
-
border-left-width:
|
|
44
|
+
border-top-width: $grid-border-width;
|
|
45
|
+
border-left-width: $grid-border-width;
|
|
46
|
+
border-radius: $grid-item-border-radius;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
&-center {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
position: relative;
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
color: var(--nutui-grid-item-text-color, var(--nutui-color-title, #1a1a1a));
|
|
7
|
+
overflow: hidden;
|
|
7
8
|
}
|
|
8
9
|
.nut-grid-item-text {
|
|
9
10
|
color: var(--nutui-grid-item-text-color, var(--nutui-color-title, #1a1a1a));
|
|
@@ -31,12 +32,13 @@
|
|
|
31
32
|
border: 0 solid var(--nutui-grid-border-color, var(--nutui-color-border, rgba(0, 0, 0, 0.06)));
|
|
32
33
|
}
|
|
33
34
|
.nut-grid-item-content-border {
|
|
34
|
-
border-right-width:
|
|
35
|
-
border-bottom-width:
|
|
35
|
+
border-right-width: var(--nutui-grid-border-width, 0px);
|
|
36
|
+
border-bottom-width: var(--nutui-grid-border-width, 0px);
|
|
36
37
|
}
|
|
37
38
|
.nut-grid-item-content-surround {
|
|
38
|
-
border-top-width:
|
|
39
|
-
border-left-width:
|
|
39
|
+
border-top-width: var(--nutui-grid-border-width, 0px);
|
|
40
|
+
border-left-width: var(--nutui-grid-border-width, 0px);
|
|
41
|
+
border-radius: var(--nutui-grid-item-border-radius, var(--nutui-radius-l, 8px));
|
|
40
42
|
}
|
|
41
43
|
.nut-grid-item-content-center {
|
|
42
44
|
align-items: center;
|
|
@@ -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 {
|
|
@@ -9,13 +9,12 @@ Object.defineProperty(exports, "ResultPage", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
-
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
12
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
14
13
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
15
14
|
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
16
|
-
var
|
|
17
|
-
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
15
|
+
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
18
16
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
17
|
+
var _iconsreact = require("@nutui/icons-react");
|
|
19
18
|
var _typings = require("../../utils/typings");
|
|
20
19
|
var _button = require("../button/button");
|
|
21
20
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
@@ -30,23 +29,28 @@ var ResultPage = function ResultPage(props) {
|
|
|
30
29
|
var classPrefix = "nut-resultpage";
|
|
31
30
|
var cls = (0, _classnames.default)(classPrefix, className);
|
|
32
31
|
var defaultStatus = {
|
|
33
|
-
success:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
success: /*#__PURE__*/ _react.default.createElement(_iconsreact.Success, {
|
|
33
|
+
color: "#00D900"
|
|
34
|
+
}),
|
|
35
|
+
error: /*#__PURE__*/ _react.default.createElement(_iconsreact.Failure, {
|
|
36
|
+
color: "#FF0F23"
|
|
37
|
+
}),
|
|
38
|
+
warning: /*#__PURE__*/ _react.default.createElement(_iconsreact.Warning, {
|
|
39
|
+
color: "#FFBF00"
|
|
40
|
+
}),
|
|
41
|
+
info: /*#__PURE__*/ _react.default.createElement(_iconsreact.Tips, {
|
|
42
|
+
color: "#0073FF"
|
|
43
|
+
}),
|
|
44
|
+
waiting: /*#__PURE__*/ _react.default.createElement(_iconsreact.Ask, {
|
|
45
|
+
color: "#0073FF"
|
|
46
|
+
})
|
|
38
47
|
};
|
|
39
|
-
var _useState = (0, _sliced_to_array._)((0, _react.useState)({
|
|
40
|
-
backgroundImage: "url(".concat(typeof icon === 'string' && icon ? icon : defaultStatus[status], ")"),
|
|
41
|
-
backgroundSize: '100% 100%'
|
|
42
|
-
}), 1), imgStyle = _useState[0];
|
|
43
48
|
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
44
49
|
className: cls,
|
|
45
50
|
style: style
|
|
46
|
-
},
|
|
47
|
-
className: "".concat(classPrefix, "-icon")
|
|
48
|
-
|
|
49
|
-
}) : icon, typeof title === 'string' && title ? /*#__PURE__*/ _react.default.createElement("div", {
|
|
51
|
+
}, /*#__PURE__*/ _react.default.createElement("div", {
|
|
52
|
+
className: "".concat(classPrefix, "-icon")
|
|
53
|
+
}, icon || defaultStatus[status]), typeof title === 'string' && title ? /*#__PURE__*/ _react.default.createElement("div", {
|
|
50
54
|
className: "".concat(classPrefix, "-title")
|
|
51
55
|
}, title) : title, typeof description === 'string' && description ? /*#__PURE__*/ _react.default.createElement("div", {
|
|
52
56
|
className: "".concat(classPrefix, "-description")
|
|
@@ -59,7 +63,9 @@ var ResultPage = function ResultPage(props) {
|
|
|
59
63
|
return /*#__PURE__*/ _react.default.createElement("div", {
|
|
60
64
|
className: "".concat(classPrefix, "-action"),
|
|
61
65
|
key: index
|
|
62
|
-
}, /*#__PURE__*/ _react.default.createElement(_button.Button,
|
|
66
|
+
}, /*#__PURE__*/ _react.default.createElement(_button.Button, (0, _object_spread_props._)((0, _object_spread._)({}, rest), {
|
|
67
|
+
size: "large"
|
|
68
|
+
}), action === null || action === void 0 ? void 0 : action.text));
|
|
63
69
|
})) : null, children);
|
|
64
70
|
};
|
|
65
71
|
ResultPage.displayName = 'NutResultPage';
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
margin: 0 auto;
|
|
7
7
|
&-icon {
|
|
8
|
-
|
|
9
|
-
width: $resultpage-icon-size;
|
|
8
|
+
display: inline-flex;
|
|
10
9
|
margin-bottom: $resultpage-icon-margin-bottom;
|
|
11
|
-
|
|
10
|
+
.nut-icon {
|
|
11
|
+
height: $resultpage-icon-size;
|
|
12
|
+
width: $resultpage-icon-size;
|
|
13
|
+
}
|
|
12
14
|
}
|
|
13
15
|
&-title {
|
|
14
16
|
width: $resultpage-width;
|
|
@@ -6,21 +6,23 @@
|
|
|
6
6
|
margin: 0 auto;
|
|
7
7
|
}
|
|
8
8
|
.nut-resultpage-icon {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
margin-bottom: var(--nutui-resultpage-icon-margin-bottom, 12px);
|
|
11
|
+
}
|
|
12
|
+
.nut-resultpage-icon .nut-icon {
|
|
13
|
+
height: var(--nutui-resultpage-icon-size, 36px);
|
|
14
|
+
width: var(--nutui-resultpage-icon-size, 36px);
|
|
13
15
|
}
|
|
14
16
|
.nut-resultpage-title {
|
|
15
|
-
width: var(--nutui-resultpage-width,
|
|
16
|
-
margin-bottom: var(--nutui-resultpage-title-margin-bottom,
|
|
17
|
+
width: var(--nutui-resultpage-width, 240px);
|
|
18
|
+
margin-bottom: var(--nutui-resultpage-title-margin-bottom, 12px);
|
|
17
19
|
font-size: var(--nutui-resultpage-title-font-size, var(--nutui-font-size-xl, 18px));
|
|
18
20
|
color: var(--nutui-resultpage-title-color, var(--nutui-color-title, #1a1a1a));
|
|
19
21
|
font-weight: var(--nutui-font-weight-bold, 600);
|
|
20
22
|
text-align: center;
|
|
21
23
|
}
|
|
22
24
|
.nut-resultpage-description {
|
|
23
|
-
width: var(--nutui-resultpage-width,
|
|
25
|
+
width: var(--nutui-resultpage-width, 240px);
|
|
24
26
|
line-height: var(--nutui-resultpage-description-line-height, 20px);
|
|
25
27
|
font-size: var(--nutui-resultpage-description-font-size, var(--nutui-font-size-base, 14px));
|
|
26
28
|
color: var(--nutui-resultpage-description-color, var(--nutui-color-text, #505259));
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
.nut-resultpage-actions {
|
|
34
36
|
display: flex;
|
|
35
37
|
flex-direction: row;
|
|
36
|
-
margin-top: var(--nutui-resultpage-actions-margin-top,
|
|
38
|
+
margin-top: var(--nutui-resultpage-actions-margin-top, 16px);
|
|
37
39
|
}
|
|
38
40
|
.nut-resultpage-action {
|
|
39
41
|
margin-left: 6px;
|