@nutui/nutui-react 3.0.0-beta.2 → 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/avatar/style/avatar.scss +7 -60
- package/dist/cjs/packages/avatar/style/style.css +5 -43
- package/dist/cjs/packages/badge/badge.js +5 -3
- package/dist/cjs/packages/badge/style/badge.scss +18 -24
- package/dist/cjs/packages/badge/style/style.css +17 -15
- 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/calendarcard/calendarcard.js +8 -3
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/cjs/packages/calendarcard/style/style.css +27 -2
- 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/navbar/navbar.js +10 -5
- package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
- package/dist/cjs/packages/navbar/style/style.css +44 -89
- package/dist/cjs/packages/pagination/pagination.js +2 -0
- package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
- package/dist/cjs/packages/pagination/style/style.css +8 -14
- 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/radio/index.d.ts +8 -2
- package/dist/cjs/packages/radio/index.js +6 -1
- package/dist/cjs/packages/radio/radio.d.ts +1 -4
- package/dist/cjs/packages/radio/radio.js +0 -2
- package/dist/cjs/packages/radio/style/radio.scss +1 -0
- package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
- package/dist/cjs/packages/rate/style/rate.scss +10 -5
- package/dist/cjs/packages/rate/style/style.css +7 -5
- package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
- package/dist/cjs/packages/safearea/style/style.css +1 -1
- package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/cjs/packages/searchbar/style/style.css +11 -8
- package/dist/cjs/packages/skeleton/style/style.css +5 -43
- package/dist/cjs/packages/tabbar/style/style.css +27 -15
- package/dist/cjs/packages/tabbaritem/style/style.css +27 -15
- 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/avatar/style/avatar.scss +7 -60
- package/dist/es/packages/avatar/style/style.css +5 -43
- package/dist/es/packages/badge/badge.d.ts +7 -35
- package/dist/es/packages/badge/badge.js +5 -3
- package/dist/es/packages/badge/style/badge.scss +18 -24
- package/dist/es/packages/badge/style/style.css +17 -15
- 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/calendarcard/calendarcard.d.ts +13 -65
- package/dist/es/packages/calendarcard/calendarcard.js +9 -4
- package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/es/packages/calendarcard/style/style.css +27 -2
- 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/loading/loading.d.ts +3 -15
- package/dist/es/packages/navbar/navbar.js +10 -5
- package/dist/es/packages/navbar/style/navbar.scss +46 -101
- package/dist/es/packages/navbar/style/style.css +44 -89
- package/dist/es/packages/pagination/pagination.js +2 -0
- package/dist/es/packages/pagination/style/pagination.scss +6 -12
- package/dist/es/packages/pagination/style/style.css +8 -14
- 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/radio/index.d.ts +8 -2
- package/dist/es/packages/radio/index.js +5 -1
- package/dist/es/packages/radio/radio.d.ts +10 -49
- package/dist/es/packages/radio/radio.js +0 -2
- package/dist/es/packages/radio/style/radio.scss +1 -0
- package/dist/es/packages/radiogroup/radiogroup.d.ts +7 -35
- package/dist/es/packages/radiogroup/radiogroup.js +1 -1
- 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/safearea/safearea.d.ts +1 -5
- package/dist/es/packages/safearea/style/safearea.scss +1 -1
- package/dist/es/packages/safearea/style/style.css +1 -1
- package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
- package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/es/packages/searchbar/style/style.css +11 -8
- package/dist/es/packages/skeleton/style/style.css +5 -43
- package/dist/es/packages/tabbar/style/style.css +27 -15
- package/dist/es/packages/tabbar/tabbar.d.ts +7 -35
- package/dist/es/packages/tabbaritem/style/style.css +27 -15
- 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/packages/video/video.d.ts +5 -25
- 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 +250 -235
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +28 -28
- package/dist/styles/variables.scss +43 -34
- package/package.json +1 -1
- package/dist/cjs/packages/nutui.react.build.rn.d.ts +0 -203
- package/dist/cjs/packages/nutui.react.build.rn.js +0 -418
- package/dist/cjs/packages/nutui.react.rn.d.ts +0 -304
- package/dist/cjs/packages/nutui.react.rn.js +0 -519
- package/dist/cjs/packages/popup/index.rn.d.ts +0 -3
- package/dist/cjs/packages/popup/index.rn.js +0 -12
- package/dist/cjs/packages/popup/popup.rn.d.ts +0 -26
- package/dist/cjs/packages/popup/popup.rn.js +0 -186
- package/dist/es/packages/nutui.react.build.rn.d.ts +0 -203
- package/dist/es/packages/nutui.react.build.rn.js +0 -203
- package/dist/es/packages/nutui.react.rn.d.ts +0 -304
- package/dist/es/packages/nutui.react.rn.js +0 -304
- package/dist/es/packages/popup/index.rn.d.ts +0 -3
- package/dist/es/packages/popup/index.rn.js +0 -2
- package/dist/es/packages/popup/popup.rn.d.ts +0 -26
- package/dist/es/packages/popup/popup.rn.js +0 -174
|
@@ -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 */
|
|
@@ -21,9 +20,9 @@
|
|
|
21
20
|
text-align: center;
|
|
22
21
|
cursor: pointer;
|
|
23
22
|
transition: $button-transition;
|
|
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: $button-default-color;
|
|
29
28
|
background: $button-default-background-color;
|
|
@@ -99,6 +98,23 @@
|
|
|
99
98
|
padding: 0;
|
|
100
99
|
}
|
|
101
100
|
|
|
101
|
+
&-round {
|
|
102
|
+
border-radius: $button-border-radius;
|
|
103
|
+
|
|
104
|
+
&-xlarge,
|
|
105
|
+
&-large {
|
|
106
|
+
border-radius: $button-large-border-radius;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&-small {
|
|
110
|
+
border-radius: $button-small-border-radius;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&-mini {
|
|
114
|
+
border-radius: $button-mini-border-radius;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
102
118
|
&-default {
|
|
103
119
|
padding: $button-default-padding;
|
|
104
120
|
border-style: solid;
|
|
@@ -136,6 +152,14 @@
|
|
|
136
152
|
padding: $button-xlarge-padding;
|
|
137
153
|
font-size: $button-xlarge-font-size;
|
|
138
154
|
font-weight: $button-large-font-weight;
|
|
155
|
+
border-radius: $radius-base;
|
|
156
|
+
|
|
157
|
+
.nut-button-text {
|
|
158
|
+
margin-left: $button-xlarge-text-icon-margin;
|
|
159
|
+
&-right {
|
|
160
|
+
margin-right: $button-xlarge-text-icon-margin;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
139
163
|
|
|
140
164
|
.nut-icon {
|
|
141
165
|
font-size: $button-xlarge-font-size;
|
|
@@ -153,6 +177,14 @@
|
|
|
153
177
|
padding: $button-large-padding;
|
|
154
178
|
font-size: $button-large-font-size;
|
|
155
179
|
font-weight: $button-large-font-weight;
|
|
180
|
+
border-radius: $radius-base;
|
|
181
|
+
|
|
182
|
+
.nut-button-text {
|
|
183
|
+
margin-left: $button-xlarge-text-icon-margin;
|
|
184
|
+
&-right {
|
|
185
|
+
margin-right: $button-xlarge-text-icon-margin;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
156
188
|
|
|
157
189
|
.nut-icon {
|
|
158
190
|
font-size: $button-large-font-size;
|
|
@@ -170,6 +202,7 @@
|
|
|
170
202
|
height: $button-small-height;
|
|
171
203
|
padding: $button-small-padding;
|
|
172
204
|
font-size: $button-small-font-size;
|
|
205
|
+
border-radius: $radius-s;
|
|
173
206
|
|
|
174
207
|
.nut-icon {
|
|
175
208
|
font-size: $button-small-font-size;
|
|
@@ -186,6 +219,7 @@
|
|
|
186
219
|
height: $button-mini-height;
|
|
187
220
|
padding: $button-mini-padding;
|
|
188
221
|
font-size: $button-mini-font-size;
|
|
222
|
+
border-radius: $radius-s;
|
|
189
223
|
|
|
190
224
|
.nut-icon {
|
|
191
225
|
font-size: $button-mini-font-size;
|
|
@@ -412,23 +446,6 @@
|
|
|
412
446
|
opacity: 0.9;
|
|
413
447
|
}
|
|
414
448
|
|
|
415
|
-
&-round {
|
|
416
|
-
border-radius: $button-border-radius;
|
|
417
|
-
|
|
418
|
-
&-xlarge,
|
|
419
|
-
&-large {
|
|
420
|
-
border-radius: $button-large-border-radius;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
&-small {
|
|
424
|
-
border-radius: $button-small-border-radius;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
&-mini {
|
|
428
|
-
border-radius: $button-mini-border-radius;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
449
|
&-square {
|
|
433
450
|
border-radius: $button-square-border-radius;
|
|
434
451
|
}
|
|
@@ -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
|
}
|
|
@@ -583,7 +583,7 @@
|
|
|
583
583
|
height: 44px;
|
|
584
584
|
margin: 10px 18px;
|
|
585
585
|
border-radius: 22px;
|
|
586
|
-
background: var(--nutui-color-primary, #ff0f23);
|
|
586
|
+
background: linear-gradient(90deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%);
|
|
587
587
|
color: var(--nutui-color-primary-text, #ffffff);
|
|
588
588
|
text-align: center;
|
|
589
589
|
line-height: 44px;
|
|
@@ -2,70 +2,18 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
import type { CalendarCardDay, CalendarCardMonth, CalendarCardRef, CalendarCardValue } from './types';
|
|
4
4
|
export interface CalendarCardProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
defaultValue?: CalendarCardValue
|
|
20
|
-
/**
|
|
21
|
-
* 设置周起始日,0 为周日,1 为周一
|
|
22
|
-
* @default 1
|
|
23
|
-
*/
|
|
24
|
-
firstDayOfWeek?: number
|
|
25
|
-
/**
|
|
26
|
-
* 限制范围开始日期
|
|
27
|
-
* @default -
|
|
28
|
-
*/
|
|
29
|
-
startDate?: Date
|
|
30
|
-
/**
|
|
31
|
-
* 限制范围结束日期
|
|
32
|
-
* @default -
|
|
33
|
-
*/
|
|
34
|
-
endDate?: Date
|
|
35
|
-
/**
|
|
36
|
-
* 设置不可选日期
|
|
37
|
-
* @default -
|
|
38
|
-
*/
|
|
39
|
-
disableDay?: (day: CalendarCardDay) => boolean
|
|
40
|
-
/**
|
|
41
|
-
* 日期信息
|
|
42
|
-
* @default -
|
|
43
|
-
*/
|
|
44
|
-
renderDay?: (day: CalendarCardDay) => ReactNode
|
|
45
|
-
/**
|
|
46
|
-
* 日期顶部信息
|
|
47
|
-
* @default -
|
|
48
|
-
*/
|
|
49
|
-
renderDayTop?: (day: CalendarCardDay) => ReactNode
|
|
50
|
-
/**
|
|
51
|
-
* 日期底部信息
|
|
52
|
-
* @default -
|
|
53
|
-
*/
|
|
54
|
-
renderDayBottom?: (day: CalendarCardDay) => ReactNode
|
|
55
|
-
/**
|
|
56
|
-
* 点击后触发
|
|
57
|
-
* @default -
|
|
58
|
-
*/
|
|
59
|
-
onDayClick?: (day: CalendarCardDay) => void
|
|
60
|
-
/**
|
|
61
|
-
* 切换月份时触发
|
|
62
|
-
* @default -
|
|
63
|
-
*/
|
|
64
|
-
onPageChange: (data: CalendarCardMonth) => void
|
|
65
|
-
/**
|
|
66
|
-
* 选择值发生变化时触发
|
|
67
|
-
* @default -
|
|
68
|
-
*/
|
|
69
|
-
onChange: (value: CalendarCardValue) => void
|
|
5
|
+
type: 'single' | 'multiple' | 'range' | 'week';
|
|
6
|
+
value?: CalendarCardValue;
|
|
7
|
+
defaultValue?: CalendarCardValue;
|
|
8
|
+
firstDayOfWeek?: number;
|
|
9
|
+
startDate?: Date;
|
|
10
|
+
endDate?: Date;
|
|
11
|
+
disableDay?: (day: CalendarCardDay) => boolean;
|
|
12
|
+
renderDay?: (day: CalendarCardDay) => ReactNode;
|
|
13
|
+
renderDayTop?: (day: CalendarCardDay) => ReactNode;
|
|
14
|
+
renderDayBottom?: (day: CalendarCardDay) => ReactNode;
|
|
15
|
+
onDayClick?: (day: CalendarCardDay) => void;
|
|
16
|
+
onPageChange: (data: CalendarCardMonth) => void;
|
|
17
|
+
onChange: (value: CalendarCardValue) => void;
|
|
70
18
|
}
|
|
71
19
|
export declare const CalendarCard: React.ForwardRefExoticComponent<Partial<CalendarCardProps> & React.RefAttributes<CalendarCardRef>>;
|
|
@@ -2,7 +2,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
3
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
4
4
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
5
|
-
import React, { useState,
|
|
5
|
+
import React, { useEffect, useState, useCallback } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { ArrowLeft, ArrowRight, DoubleLeft, DoubleRight } from "./icon";
|
|
8
8
|
import { ComponentDefaults } from "../../utils/typings";
|
|
@@ -70,7 +70,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
70
70
|
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
var getDays = function(month) {
|
|
73
|
+
var getDays = useCallback(function(month) {
|
|
74
74
|
var y = month.year;
|
|
75
75
|
var m = month.month;
|
|
76
76
|
var days = _to_consumable_array(getPrevMonthDays(y, m, firstDayOfWeek)).concat(_to_consumable_array(getCurrentMonthDays(y, m)));
|
|
@@ -87,13 +87,18 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
return days;
|
|
90
|
-
}
|
|
90
|
+
}, [
|
|
91
|
+
firstDayOfWeek
|
|
92
|
+
]);
|
|
91
93
|
useEffect(function() {
|
|
92
94
|
var newDays = getDays(month);
|
|
93
95
|
setDays(newDays);
|
|
94
96
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(month);
|
|
95
97
|
}, [
|
|
96
|
-
month
|
|
98
|
+
month,
|
|
99
|
+
getDays,
|
|
100
|
+
onPageChange,
|
|
101
|
+
firstDayOfWeek
|
|
97
102
|
]);
|
|
98
103
|
var isSameDay = function(day1, day2) {
|
|
99
104
|
return (day1 === null || day1 === void 0 ? void 0 : day1.year) === (day2 === null || day2 === void 0 ? void 0 : day2.year) && (day1 === null || day1 === void 0 ? void 0 : day1.month) === (day2 === null || day2 === void 0 ? void 0 : day2.month) && (day1 === null || day1 === void 0 ? void 0 : day1.date) === (day2 === null || day2 === void 0 ? void 0 : day2.date);
|
|
@@ -55,6 +55,9 @@
|
|
|
55
55
|
|
|
56
56
|
&-top,
|
|
57
57
|
&-bottom {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
58
61
|
width: 100%;
|
|
59
62
|
height: 12px;
|
|
60
63
|
font-size: 12px;
|
|
@@ -67,14 +70,22 @@
|
|
|
67
70
|
|
|
68
71
|
&.active {
|
|
69
72
|
background-color: $calendar-active-background-color;
|
|
70
|
-
color: $color-primary-text;
|
|
71
73
|
border-radius: $calendar-day-active-border-radius;
|
|
74
|
+
.nut-calendarcard-day-top,
|
|
75
|
+
.nut-calendarcard-day-inner,
|
|
76
|
+
.nut-calendarcard-day-bottom {
|
|
77
|
+
color: $color-primary-text;
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
&.start,
|
|
75
82
|
&.end {
|
|
76
83
|
background-color: $calendar-active-background-color;
|
|
77
|
-
|
|
84
|
+
.nut-calendarcard-day-top,
|
|
85
|
+
.nut-calendarcard-day-inner,
|
|
86
|
+
.nut-calendarcard-day-bottom {
|
|
87
|
+
color: $color-primary-text;
|
|
88
|
+
}
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
&.start {
|
|
@@ -89,7 +100,11 @@
|
|
|
89
100
|
|
|
90
101
|
&.mid {
|
|
91
102
|
background-color: $calendar-choose-background-color;
|
|
92
|
-
|
|
103
|
+
.nut-calendarcard-day-top,
|
|
104
|
+
.nut-calendarcard-day-inner,
|
|
105
|
+
.nut-calendarcard-day-bottom {
|
|
106
|
+
color: $calendar-choose-color;
|
|
107
|
+
}
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
.nut-calendar-day-info {
|
|
@@ -100,7 +115,11 @@
|
|
|
100
115
|
&.prev,
|
|
101
116
|
&.next,
|
|
102
117
|
&.disabled {
|
|
103
|
-
|
|
118
|
+
.nut-calendarcard-day-top,
|
|
119
|
+
.nut-calendarcard-day-inner,
|
|
120
|
+
.nut-calendarcard-day-bottom {
|
|
121
|
+
color: $calendar-disable-color;
|
|
122
|
+
}
|
|
104
123
|
cursor: not-allowed;
|
|
105
124
|
}
|
|
106
125
|
}
|
|
@@ -128,11 +147,13 @@
|
|
|
128
147
|
}
|
|
129
148
|
}
|
|
130
149
|
}
|
|
150
|
+
|
|
131
151
|
&-day {
|
|
132
152
|
&.start,
|
|
133
153
|
&.end {
|
|
134
154
|
border-radius: 0;
|
|
135
155
|
}
|
|
156
|
+
|
|
136
157
|
&.start {
|
|
137
158
|
border-top-right-radius: $calendar-day-active-border-radius;
|
|
138
159
|
border-bottom-right-radius: $calendar-day-active-border-radius;
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
cursor: auto;
|
|
48
48
|
}
|
|
49
49
|
.nut-calendarcard-day-top, .nut-calendarcard-day-bottom {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
50
53
|
width: 100%;
|
|
51
54
|
height: 12px;
|
|
52
55
|
font-size: 12px;
|
|
@@ -57,11 +60,21 @@
|
|
|
57
60
|
}
|
|
58
61
|
.nut-calendarcard-day.active {
|
|
59
62
|
background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
|
|
60
|
-
color: var(--nutui-color-primary-text, #ffffff);
|
|
61
63
|
border-radius: var(--nutui-calendar-day-active-border-radius, 4px);
|
|
62
64
|
}
|
|
65
|
+
.nut-calendarcard-day.active .nut-calendarcard-day-top,
|
|
66
|
+
.nut-calendarcard-day.active .nut-calendarcard-day-inner,
|
|
67
|
+
.nut-calendarcard-day.active .nut-calendarcard-day-bottom {
|
|
68
|
+
color: var(--nutui-color-primary-text, #ffffff);
|
|
69
|
+
}
|
|
63
70
|
.nut-calendarcard-day.start, .nut-calendarcard-day.end {
|
|
64
71
|
background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
|
|
72
|
+
}
|
|
73
|
+
.nut-calendarcard-day.start .nut-calendarcard-day-top,
|
|
74
|
+
.nut-calendarcard-day.start .nut-calendarcard-day-inner,
|
|
75
|
+
.nut-calendarcard-day.start .nut-calendarcard-day-bottom, .nut-calendarcard-day.end .nut-calendarcard-day-top,
|
|
76
|
+
.nut-calendarcard-day.end .nut-calendarcard-day-inner,
|
|
77
|
+
.nut-calendarcard-day.end .nut-calendarcard-day-bottom {
|
|
65
78
|
color: var(--nutui-color-primary-text, #ffffff);
|
|
66
79
|
}
|
|
67
80
|
.nut-calendarcard-day.start {
|
|
@@ -74,15 +87,27 @@
|
|
|
74
87
|
}
|
|
75
88
|
.nut-calendarcard-day.mid {
|
|
76
89
|
background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
|
|
90
|
+
}
|
|
91
|
+
.nut-calendarcard-day.mid .nut-calendarcard-day-top,
|
|
92
|
+
.nut-calendarcard-day.mid .nut-calendarcard-day-inner,
|
|
93
|
+
.nut-calendarcard-day.mid .nut-calendarcard-day-bottom {
|
|
77
94
|
color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
|
|
78
95
|
}
|
|
79
96
|
.nut-calendarcard-day .nut-calendar-day-info {
|
|
80
97
|
color: var(--nutui-color-primary-text, #ffffff);
|
|
81
98
|
}
|
|
82
99
|
.nut-calendarcard-day.prev, .nut-calendarcard-day.next, .nut-calendarcard-day.disabled {
|
|
83
|
-
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
84
100
|
cursor: not-allowed;
|
|
85
101
|
}
|
|
102
|
+
.nut-calendarcard-day.prev .nut-calendarcard-day-top,
|
|
103
|
+
.nut-calendarcard-day.prev .nut-calendarcard-day-inner,
|
|
104
|
+
.nut-calendarcard-day.prev .nut-calendarcard-day-bottom, .nut-calendarcard-day.next .nut-calendarcard-day-top,
|
|
105
|
+
.nut-calendarcard-day.next .nut-calendarcard-day-inner,
|
|
106
|
+
.nut-calendarcard-day.next .nut-calendarcard-day-bottom, .nut-calendarcard-day.disabled .nut-calendarcard-day-top,
|
|
107
|
+
.nut-calendarcard-day.disabled .nut-calendarcard-day-inner,
|
|
108
|
+
.nut-calendarcard-day.disabled .nut-calendarcard-day-bottom {
|
|
109
|
+
color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
110
|
+
}
|
|
86
111
|
|
|
87
112
|
[dir=rtl] .nut-calendarcard-header-left .left, [dir=rtl] .nut-calendarcard-header-right .left,
|
|
88
113
|
.nut-rtl .nut-calendarcard-header-left .left,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import CheckboxGroup from "../checkboxgroup";
|
|
3
2
|
import { BasicComponent } from "../../utils/typings";
|
|
4
3
|
import { CheckboxLabelPosition } from "../checkboxgroup/types";
|
|
5
4
|
export type CheckboxShape = 'button' | 'round';
|
|
@@ -17,6 +16,4 @@ export interface CheckboxProps extends BasicComponent {
|
|
|
17
16
|
label: ReactNode;
|
|
18
17
|
onChange: (value: boolean) => void;
|
|
19
18
|
}
|
|
20
|
-
export declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
21
|
-
Group: typeof CheckboxGroup;
|
|
22
|
-
};
|
|
19
|
+
export declare const Checkbox: FunctionComponent<Partial<CheckboxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
@@ -4,9 +4,8 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
6
|
import React, { useContext, useEffect, useState } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { CheckDisabled, Checked, CheckNormal } from "@nutui/icons-react";
|
|
8
8
|
import classNames from "classnames";
|
|
9
|
-
import CheckboxGroup from "../checkboxgroup";
|
|
10
9
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
10
|
import Context from "../checkboxgroup/context";
|
|
12
11
|
import { usePropsValue } from "../../utils/use-props-value";
|
|
@@ -162,4 +161,3 @@ export var Checkbox = function(props) {
|
|
|
162
161
|
}), renderCheckboxItem());
|
|
163
162
|
};
|
|
164
163
|
Checkbox.displayName = 'NutCheckBox';
|
|
165
|
-
Checkbox.Group = CheckboxGroup;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CheckboxProps } from './checkbox';
|
|
2
|
+
import { CheckboxGroup } from '../checkboxgroup/checkboxgroup';
|
|
2
3
|
export type { CheckboxProps, CheckboxShape } from './checkbox';
|
|
3
|
-
|
|
4
|
+
type CompoundedComponent = React.FC<Partial<CheckboxProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
|
|
5
|
+
Group: typeof CheckboxGroup;
|
|
6
|
+
};
|
|
7
|
+
declare const InnerCheckbox: CompoundedComponent;
|
|
8
|
+
export default InnerCheckbox;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
.nut-checkboxgroup .nut-checkbox-button {
|
|
2
2
|
background-color: var(--nutui-color-background, #f5f6fa);
|
|
3
3
|
}
|
|
4
|
+
.nut-checkboxgroup-vertical {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
4
8
|
.nut-checkboxgroup-vertical .nut-checkbox {
|
|
5
9
|
margin-bottom: 5px;
|
|
6
10
|
}
|
|
@@ -12,8 +16,14 @@
|
|
|
12
16
|
border: var(--nutui-radio-button-active-border, 1px solid var(--nutui-color-primary, #ff0f23));
|
|
13
17
|
background-color: var(--nutui-color-primary-light-pressed, #ffebf1);
|
|
14
18
|
}
|
|
19
|
+
.nut-checkboxgroup-horizontal {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
}
|
|
15
24
|
.nut-checkboxgroup-horizontal .nut-checkbox {
|
|
16
25
|
display: inline-flex;
|
|
26
|
+
flex: 1;
|
|
17
27
|
margin-right: 20px;
|
|
18
28
|
}
|
|
19
29
|
.nut-checkboxgroup-horizontal .nut-checkbox-button-active {
|