@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.
Files changed (94) hide show
  1. package/dist/cjs/packages/address/style/style.css +1 -1
  2. package/dist/cjs/packages/animatingnumbers/countup.js +7 -6
  3. package/dist/cjs/packages/animatingnumbers/style/style.css +10 -4
  4. package/dist/cjs/packages/audio/style/style.css +49 -34
  5. package/dist/cjs/packages/button/style/button.scss +36 -19
  6. package/dist/cjs/packages/button/style/style.css +49 -34
  7. package/dist/cjs/packages/calendar/style/style.css +1 -1
  8. package/dist/cjs/packages/card/style/style.css +1 -0
  9. package/dist/cjs/packages/checkbox/checkbox.d.ts +1 -4
  10. package/dist/cjs/packages/checkbox/checkbox.js +0 -2
  11. package/dist/cjs/packages/checkbox/index.d.ts +7 -2
  12. package/dist/cjs/packages/checkbox/index.js +4 -1
  13. package/dist/cjs/packages/checkbox/style/style.css +10 -0
  14. package/dist/cjs/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
  15. package/dist/cjs/packages/checkboxgroup/style/style.css +10 -0
  16. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  17. package/dist/cjs/packages/countdown/countdown.d.ts +2 -20
  18. package/dist/cjs/packages/countdown/countdown.js +3 -2
  19. package/dist/cjs/packages/countdown/index.d.ts +1 -1
  20. package/dist/cjs/packages/countdown/style/countdown.scss +8 -2
  21. package/dist/cjs/packages/countdown/style/style.css +18 -13
  22. package/dist/cjs/packages/countdown/types.d.ts +26 -0
  23. package/dist/cjs/packages/countdown/types.js +4 -0
  24. package/dist/cjs/packages/countup/style/countup.scss +10 -4
  25. package/dist/cjs/packages/countup/style/style.css +10 -4
  26. package/dist/cjs/packages/dialog/style/dialog.scss +10 -7
  27. package/dist/cjs/packages/dialog/style/style.css +58 -41
  28. package/dist/cjs/packages/progress/progress.js +1 -1
  29. package/dist/cjs/packages/progress/style/progress.scss +2 -2
  30. package/dist/cjs/packages/progress/style/style.css +3 -2
  31. package/dist/cjs/packages/rate/style/rate.scss +10 -5
  32. package/dist/cjs/packages/rate/style/style.css +7 -5
  33. package/dist/cjs/packages/tabbar/style/style.css +10 -0
  34. package/dist/cjs/packages/tabbaritem/style/style.css +10 -0
  35. package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +10 -0
  36. package/dist/cjs/packages/tag/style/style.css +1 -0
  37. package/dist/cjs/packages/tag/style/tag.scss +1 -0
  38. package/dist/cjs/packages/toast/style/index.js +1 -0
  39. package/dist/cjs/packages/toast/style/style.css +60 -0
  40. package/dist/cjs/packages/uploader/style/style.css +3 -2
  41. package/dist/cjs/utils/add-color-for-harmony.d.ts +9 -0
  42. package/dist/cjs/utils/add-color-for-harmony.js +27 -0
  43. package/dist/es/packages/address/style/style.css +1 -1
  44. package/dist/es/packages/animatingnumbers/countup.js +7 -6
  45. package/dist/es/packages/animatingnumbers/style/style.css +10 -4
  46. package/dist/es/packages/audio/style/style.css +49 -34
  47. package/dist/es/packages/button/style/button.scss +36 -19
  48. package/dist/es/packages/button/style/style.css +49 -34
  49. package/dist/es/packages/calendar/style/style.css +1 -1
  50. package/dist/es/packages/card/style/style.css +1 -0
  51. package/dist/es/packages/checkbox/checkbox.d.ts +1 -4
  52. package/dist/es/packages/checkbox/checkbox.js +1 -3
  53. package/dist/es/packages/checkbox/index.d.ts +7 -2
  54. package/dist/es/packages/checkbox/index.js +4 -1
  55. package/dist/es/packages/checkbox/style/style.css +10 -0
  56. package/dist/es/packages/checkboxgroup/checkboxgroup.d.ts +10 -50
  57. package/dist/es/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
  58. package/dist/es/packages/checkboxgroup/style/style.css +10 -0
  59. package/dist/es/packages/configprovider/types.d.ts +1 -1
  60. package/dist/es/packages/countdown/countdown.d.ts +2 -20
  61. package/dist/es/packages/countdown/countdown.js +3 -2
  62. package/dist/es/packages/countdown/index.d.ts +1 -1
  63. package/dist/es/packages/countdown/style/countdown.scss +8 -2
  64. package/dist/es/packages/countdown/style/style.css +18 -13
  65. package/dist/es/packages/countdown/types.d.ts +26 -0
  66. package/dist/es/packages/countdown/types.js +1 -0
  67. package/dist/es/packages/countup/style/countup.scss +10 -4
  68. package/dist/es/packages/countup/style/style.css +10 -4
  69. package/dist/es/packages/dialog/style/dialog.scss +10 -7
  70. package/dist/es/packages/dialog/style/style.css +58 -41
  71. package/dist/es/packages/ellipsis/ellipsis.d.ts +1 -1
  72. package/dist/es/packages/progress/progress.js +1 -1
  73. package/dist/es/packages/progress/style/progress.scss +2 -2
  74. package/dist/es/packages/progress/style/style.css +3 -2
  75. package/dist/es/packages/rate/rate.d.ts +12 -60
  76. package/dist/es/packages/rate/style/rate.scss +10 -5
  77. package/dist/es/packages/rate/style/style.css +7 -5
  78. package/dist/es/packages/tabbar/style/style.css +10 -0
  79. package/dist/es/packages/tabbar/tabbar.d.ts +7 -35
  80. package/dist/es/packages/tabbaritem/style/style.css +10 -0
  81. package/dist/es/packages/tabbaritem/style/tabbaritem.scss +10 -0
  82. package/dist/es/packages/tabbaritem/tabbaritem.d.ts +7 -35
  83. package/dist/es/packages/tag/style/style.css +1 -0
  84. package/dist/es/packages/tag/style/tag.scss +1 -0
  85. package/dist/es/packages/toast/style/index.js +1 -0
  86. package/dist/es/packages/toast/style/style.css +60 -0
  87. package/dist/es/packages/uploader/style/style.css +3 -2
  88. package/dist/es/utils/add-color-for-harmony.d.ts +9 -0
  89. package/dist/es/utils/add-color-for-harmony.js +16 -0
  90. package/dist/nutui.react.umd.js +149 -146
  91. package/dist/style.css +1 -1
  92. package/dist/styles/themes/default.scss +29 -29
  93. package/dist/styles/variables.scss +36 -30
  94. 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-base, 14px));
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-base, 14px));
76
- width: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
77
- height: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
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-xxl, 24px));
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-xxl, 24px));
119
- width: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xxl, 24px));
120
- height: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xxl, 24px));
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-xxl, 24px));
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-l, 16px));
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-l, 16px));
134
- width: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
135
- height: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
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-l, 16px));
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-s, 12px));
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-s, 12px));
161
- width: var(--nutui-button-mini-font-size, var(--nutui-font-size-s, 12px));
162
- height: var(--nutui-button-mini-font-size, var(--nutui-font-size-s, 12px));
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-s, 12px));
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
  }
@@ -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-base, 14px));
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-base, 14px));
76
- width: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
77
- height: var(--nutui-button-default-font-size, var(--nutui-font-size-base, 14px));
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-xxl, 24px));
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-xxl, 24px));
119
- width: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xxl, 24px));
120
- height: var(--nutui-button-xlarge-font-size, var(--nutui-font-size-xxl, 24px));
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-xxl, 24px));
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-l, 16px));
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-l, 16px));
134
- width: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
135
- height: var(--nutui-button-large-font-size, var(--nutui-font-size-l, 16px));
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-l, 16px));
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-s, 12px));
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-s, 12px));
161
- width: var(--nutui-button-mini-font-size, var(--nutui-font-size-s, 12px));
162
- height: var(--nutui-button-mini-font-size, var(--nutui-font-size-s, 12px));
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-s, 12px));
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;
@@ -61,6 +61,7 @@
61
61
  .nut-tag .nut-icon {
62
62
  vertical-align: middle;
63
63
  margin-left: 4px;
64
+ color: var(--nutui-tag-color, #ffffff);
64
65
  }
65
66
  .nut-tag-text {
66
67
  font-size: var(--nutui-tag-font-size, var(--nutui-font-size-xxs, 10px));
@@ -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 { Checked, CheckDisabled, CheckNormal } from "@nutui/icons-react";
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 { Checkbox } from './checkbox';
1
+ import { CheckboxProps } from './checkbox';
2
+ import { CheckboxGroup } from '../checkboxgroup/checkboxgroup';
2
3
  export type { CheckboxProps, CheckboxShape } from './checkbox';
3
- export default Checkbox;
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,2 +1,5 @@
1
1
  import { Checkbox } from "./checkbox";
2
- export default Checkbox;
2
+ import { CheckboxGroup } from "../checkboxgroup/checkboxgroup";
3
+ var InnerCheckbox = Checkbox;
4
+ InnerCheckbox.Group = CheckboxGroup;
5
+ 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 {
@@ -2,56 +2,16 @@ import React from 'react';
2
2
  import { RadioGroupOption } from "../radiogroup/types";
3
3
  import { CheckboxDirection, CheckboxLabelPosition, CheckboxLimit } from "./types";
4
4
  export interface CheckboxGroupProps {
5
- /**
6
- * 是否禁用选择,将用于其下的全部复选框
7
- * @default false
8
- */
9
- disabled?: boolean
10
- /**
11
- * 当前选中项的标识符
12
- * @default -
13
- */
14
- value?: string[]
15
- /**
16
- * 初始选中项的标识符
17
- * @default -
18
- */
19
- defaultValue?: string[]
20
- /**
21
- * 列表模式
22
- * @default false
23
- */
24
- list: boolean
25
- /**
26
- * 限制最大可选数
27
- * @default -
28
- */
29
- max: number | undefined
30
- /**
31
- * 限制至少选择数
32
- * @default -
33
- */
34
- min: number | undefined
35
- /**
36
- * 文本所在的位置
37
- * @default right
38
- */
39
- labelPosition: CheckboxLabelPosition
40
- /**
41
- * 使用横纵方向 可选值 horizontal、vertical
42
- * @default vertical
43
- */
44
- direction: CheckboxDirection
45
- /**
46
- * 配置 options 渲染复选按钮
47
- * @default -
48
- */
49
- options: RadioGroupOption[]
50
- /**
51
- * 值变化时触发
52
- * @default -
53
- */
54
- onChange: (value: string[]) => void
5
+ disabled?: boolean;
6
+ value?: string[];
7
+ defaultValue?: string[];
8
+ list: boolean;
9
+ max: number | undefined;
10
+ min: number | undefined;
11
+ labelPosition: CheckboxLabelPosition;
12
+ direction: CheckboxDirection;
13
+ options: RadioGroupOption[];
14
+ onChange: (value: string[]) => void;
55
15
  onLimit: (type: CheckboxLimit) => void;
56
16
  }
57
17
  export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
@@ -6,6 +6,9 @@
6
6
  }
7
7
 
8
8
  &-vertical {
9
+ display: flex;
10
+ flex-direction: column;
11
+
9
12
  .nut-checkbox {
10
13
  margin-bottom: 5px;
11
14
 
@@ -22,8 +25,13 @@
22
25
  }
23
26
 
24
27
  &-horizontal {
28
+ display: flex;
29
+ flex-direction: row;
30
+ flex-wrap: wrap;
31
+
25
32
  .nut-checkbox {
26
33
  display: inline-flex;
34
+ flex: 1;
27
35
  margin-right: 20px;
28
36
 
29
37
  &-button-active {
@@ -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 {