@nutui/nutui-react 3.1.0-beta.1 → 4.0.0-beta.1

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 (192) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/locales/base.d.ts +6 -0
  3. package/dist/cjs/locales/en-US.js +17 -1
  4. package/dist/cjs/locales/id-ID.js +17 -1
  5. package/dist/cjs/locales/ja-JP.js +16 -2
  6. package/dist/cjs/locales/tr-TR.js +17 -1
  7. package/dist/cjs/locales/vi-VN.js +17 -1
  8. package/dist/cjs/locales/zh-CN.js +15 -1
  9. package/dist/cjs/locales/zh-TW.js +15 -1
  10. package/dist/cjs/locales/zh-UG.js +17 -1
  11. package/dist/cjs/packages/address/style/style.css +2 -2
  12. package/dist/cjs/packages/audio/audio.js +2 -2
  13. package/dist/cjs/packages/button/button.js +30 -6
  14. package/dist/cjs/packages/button/style/button.scss +327 -227
  15. package/dist/cjs/packages/button/style/style.css +292 -47
  16. package/dist/cjs/packages/button/style-jmapp/button.scss +327 -227
  17. package/dist/cjs/packages/button/style-jmapp/style.css +268 -23
  18. package/dist/cjs/packages/button/style-jrkf/button.scss +327 -227
  19. package/dist/cjs/packages/button/style-jrkf/style.css +268 -23
  20. package/dist/cjs/packages/calendar/style/style.css +2 -2
  21. package/dist/cjs/packages/calendarcard/style/style.css +1 -1
  22. package/dist/cjs/packages/checkbox/checkbox.js +4 -3
  23. package/dist/cjs/packages/checkbox/style/checkbox.scss +19 -3
  24. package/dist/cjs/packages/checkbox/style/style.css +21 -6
  25. package/dist/cjs/packages/checkbox/style-jmapp/checkbox.scss +19 -3
  26. package/dist/cjs/packages/checkbox/style-jmapp/style.css +18 -3
  27. package/dist/cjs/packages/checkbox/style-jrkf/checkbox.scss +19 -3
  28. package/dist/cjs/packages/checkbox/style-jrkf/style.css +18 -3
  29. package/dist/cjs/packages/checkboxgroup/style/style.css +2 -2
  30. package/dist/cjs/packages/circleprogress/circleprogress.js +1 -1
  31. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  32. package/dist/cjs/packages/countdown/style/style.css +1 -1
  33. package/dist/cjs/packages/datepicker/datepicker.js +3 -5
  34. package/dist/cjs/packages/datepicker/utils.js +7 -0
  35. package/dist/cjs/packages/elevator/style/elevator.scss +6 -2
  36. package/dist/cjs/packages/elevator/style/style.css +2 -2
  37. package/dist/cjs/packages/elevator/style-jmapp/elevator.scss +6 -2
  38. package/dist/cjs/packages/elevator/style-jmapp/style.css +2 -2
  39. package/dist/cjs/packages/elevator/style-jrkf/elevator.scss +6 -2
  40. package/dist/cjs/packages/elevator/style-jrkf/style.css +2 -2
  41. package/dist/cjs/packages/ellipsis/style/style.css +1 -1
  42. package/dist/cjs/packages/inputnumber/inputnumber.js +5 -1
  43. package/dist/cjs/packages/inputnumber/style/inputnumber.scss +11 -5
  44. package/dist/cjs/packages/inputnumber/style/style.css +16 -11
  45. package/dist/cjs/packages/inputnumber/style-jmapp/inputnumber.scss +11 -5
  46. package/dist/cjs/packages/inputnumber/style-jmapp/style.css +10 -5
  47. package/dist/cjs/packages/inputnumber/style-jrkf/inputnumber.scss +11 -5
  48. package/dist/cjs/packages/inputnumber/style-jrkf/style.css +10 -5
  49. package/dist/cjs/packages/progress/progress.js +1 -1
  50. package/dist/cjs/packages/radio/radio.js +3 -2
  51. package/dist/cjs/packages/radio/style/radio.scss +9 -3
  52. package/dist/cjs/packages/radio/style/style.css +10 -5
  53. package/dist/cjs/packages/radio/style-jmapp/radio.scss +9 -3
  54. package/dist/cjs/packages/radio/style-jmapp/style.css +8 -3
  55. package/dist/cjs/packages/radio/style-jrkf/radio.scss +9 -3
  56. package/dist/cjs/packages/radio/style-jrkf/style.css +8 -3
  57. package/dist/cjs/packages/radiogroup/style/style.css +2 -2
  58. package/dist/cjs/packages/range/style/style.css +3 -3
  59. package/dist/cjs/packages/resultpage/resultpage.js +5 -5
  60. package/dist/cjs/packages/searchbar/style/searchbar.scss +5 -5
  61. package/dist/cjs/packages/searchbar/style/style.css +5 -5
  62. package/dist/cjs/packages/searchbar/style-jmapp/searchbar.scss +5 -5
  63. package/dist/cjs/packages/searchbar/style-jmapp/style.css +5 -5
  64. package/dist/cjs/packages/searchbar/style-jrkf/searchbar.scss +5 -5
  65. package/dist/cjs/packages/searchbar/style-jrkf/style.css +5 -5
  66. package/dist/cjs/packages/signature/signature.js +1 -1
  67. package/dist/cjs/packages/steps/style/style.css +2 -2
  68. package/dist/cjs/packages/swipe/swipe.js +20 -16
  69. package/dist/cjs/packages/switch/style/style.css +2 -2
  70. package/dist/cjs/packages/tabs/style/style.css +2 -2
  71. package/dist/cjs/packages/tag/style/style.css +2 -2
  72. package/dist/cjs/packages/timedetail/style/style.css +1 -1
  73. package/dist/cjs/packages/toast/Notification.js +1 -1
  74. package/dist/cjs/packages/toast/style/style.css +18 -15
  75. package/dist/cjs/packages/toast/style/toast.scss +23 -16
  76. package/dist/cjs/packages/toast/style-jmapp/style.css +17 -14
  77. package/dist/cjs/packages/toast/style-jmapp/toast.scss +23 -16
  78. package/dist/cjs/packages/toast/style-jrkf/style.css +17 -14
  79. package/dist/cjs/packages/toast/style-jrkf/toast.scss +23 -16
  80. package/dist/cjs/packages/toast/toast.js +1 -1
  81. package/dist/cjs/types/base/atoms.d.ts +3 -3
  82. package/dist/cjs/types/spec/button/base.d.ts +1 -0
  83. package/dist/cjs/utils/taro/get-system-info.d.ts +0 -5
  84. package/dist/cjs/utils/taro/get-system-info.js +2 -7
  85. package/dist/es/hooks/taro/use-custom-event.js +1 -0
  86. package/dist/es/locales/base.d.ts +6 -0
  87. package/dist/es/locales/en-US.js +17 -1
  88. package/dist/es/locales/id-ID.js +17 -1
  89. package/dist/es/locales/ja-JP.js +16 -2
  90. package/dist/es/locales/tr-TR.js +17 -1
  91. package/dist/es/locales/vi-VN.js +17 -1
  92. package/dist/es/locales/zh-CN.js +15 -1
  93. package/dist/es/locales/zh-TW.js +15 -1
  94. package/dist/es/locales/zh-UG.js +17 -1
  95. package/dist/es/packages/address/style/style.css +2 -2
  96. package/dist/es/packages/audio/audio.js +2 -2
  97. package/dist/es/packages/button/button.js +30 -6
  98. package/dist/es/packages/button/style/button.scss +327 -227
  99. package/dist/es/packages/button/style/style.css +292 -47
  100. package/dist/es/packages/button/style-jmapp/button.scss +327 -227
  101. package/dist/es/packages/button/style-jmapp/style.css +268 -23
  102. package/dist/es/packages/button/style-jrkf/button.scss +327 -227
  103. package/dist/es/packages/button/style-jrkf/style.css +268 -23
  104. package/dist/es/packages/calendar/style/style.css +2 -2
  105. package/dist/es/packages/calendarcard/style/style.css +1 -1
  106. package/dist/es/packages/checkbox/checkbox.js +4 -3
  107. package/dist/es/packages/checkbox/style/checkbox.scss +19 -3
  108. package/dist/es/packages/checkbox/style/style.css +21 -6
  109. package/dist/es/packages/checkbox/style-jmapp/checkbox.scss +19 -3
  110. package/dist/es/packages/checkbox/style-jmapp/style.css +18 -3
  111. package/dist/es/packages/checkbox/style-jrkf/checkbox.scss +19 -3
  112. package/dist/es/packages/checkbox/style-jrkf/style.css +18 -3
  113. package/dist/es/packages/checkboxgroup/style/style.css +2 -2
  114. package/dist/es/packages/circleprogress/circleprogress.js +1 -1
  115. package/dist/es/packages/configprovider/types.d.ts +1 -1
  116. package/dist/es/packages/countdown/style/style.css +1 -1
  117. package/dist/es/packages/datepicker/datepicker.js +3 -5
  118. package/dist/es/packages/datepicker/utils.js +7 -0
  119. package/dist/es/packages/elevator/style/elevator.scss +6 -2
  120. package/dist/es/packages/elevator/style/style.css +2 -2
  121. package/dist/es/packages/elevator/style-jmapp/elevator.scss +6 -2
  122. package/dist/es/packages/elevator/style-jmapp/style.css +2 -2
  123. package/dist/es/packages/elevator/style-jrkf/elevator.scss +6 -2
  124. package/dist/es/packages/elevator/style-jrkf/style.css +2 -2
  125. package/dist/es/packages/ellipsis/style/style.css +1 -1
  126. package/dist/es/packages/inputnumber/inputnumber.js +5 -1
  127. package/dist/es/packages/inputnumber/style/inputnumber.scss +11 -5
  128. package/dist/es/packages/inputnumber/style/style.css +16 -11
  129. package/dist/es/packages/inputnumber/style-jmapp/inputnumber.scss +11 -5
  130. package/dist/es/packages/inputnumber/style-jmapp/style.css +10 -5
  131. package/dist/es/packages/inputnumber/style-jrkf/inputnumber.scss +11 -5
  132. package/dist/es/packages/inputnumber/style-jrkf/style.css +10 -5
  133. package/dist/es/packages/progress/progress.js +1 -1
  134. package/dist/es/packages/radio/radio.js +3 -2
  135. package/dist/es/packages/radio/style/radio.scss +9 -3
  136. package/dist/es/packages/radio/style/style.css +10 -5
  137. package/dist/es/packages/radio/style-jmapp/radio.scss +9 -3
  138. package/dist/es/packages/radio/style-jmapp/style.css +8 -3
  139. package/dist/es/packages/radio/style-jrkf/radio.scss +9 -3
  140. package/dist/es/packages/radio/style-jrkf/style.css +8 -3
  141. package/dist/es/packages/radiogroup/style/style.css +2 -2
  142. package/dist/es/packages/range/style/style.css +3 -3
  143. package/dist/es/packages/resultpage/resultpage.js +5 -5
  144. package/dist/es/packages/searchbar/style/searchbar.scss +5 -5
  145. package/dist/es/packages/searchbar/style/style.css +5 -5
  146. package/dist/es/packages/searchbar/style-jmapp/searchbar.scss +5 -5
  147. package/dist/es/packages/searchbar/style-jmapp/style.css +5 -5
  148. package/dist/es/packages/searchbar/style-jrkf/searchbar.scss +5 -5
  149. package/dist/es/packages/searchbar/style-jrkf/style.css +5 -5
  150. package/dist/es/packages/signature/signature.js +1 -1
  151. package/dist/es/packages/steps/style/style.css +2 -2
  152. package/dist/es/packages/swipe/swipe.js +20 -16
  153. package/dist/es/packages/switch/style/style.css +2 -2
  154. package/dist/es/packages/tabs/style/style.css +2 -2
  155. package/dist/es/packages/tag/style/style.css +2 -2
  156. package/dist/es/packages/timedetail/style/style.css +1 -1
  157. package/dist/es/packages/toast/Notification.js +1 -1
  158. package/dist/es/packages/toast/style/style.css +18 -15
  159. package/dist/es/packages/toast/style/toast.scss +23 -16
  160. package/dist/es/packages/toast/style-jmapp/style.css +17 -14
  161. package/dist/es/packages/toast/style-jmapp/toast.scss +23 -16
  162. package/dist/es/packages/toast/style-jrkf/style.css +17 -14
  163. package/dist/es/packages/toast/style-jrkf/toast.scss +23 -16
  164. package/dist/es/packages/toast/toast.js +1 -1
  165. package/dist/es/types/base/atoms.d.ts +3 -3
  166. package/dist/es/types/spec/button/base.d.ts +1 -0
  167. package/dist/es/utils/taro/get-system-info.d.ts +0 -5
  168. package/dist/es/utils/taro/get-system-info.js +8 -7
  169. package/dist/nutui.react.umd.js +103 -50
  170. package/dist/style-jmapp.css +1 -1
  171. package/dist/style-jmapp.scss +32 -32
  172. package/dist/style-jrkf.css +1 -1
  173. package/dist/style-jrkf.scss +33 -33
  174. package/dist/style.css +1 -1
  175. package/dist/style.scss +39 -39
  176. package/dist/styles/theme-daojia.scss +55 -48
  177. package/dist/styles/theme-dark-daojia.scss +55 -47
  178. package/dist/styles/theme-dark.scss +108 -109
  179. package/dist/styles/theme-default.scss +110 -111
  180. package/dist/styles/theme-jmapp.scss +1 -1
  181. package/dist/styles/theme-jrkf.scss +1 -1
  182. package/dist/styles/themes/daojia.css +1 -1
  183. package/dist/styles/themes/dark-daojia.css +1 -1
  184. package/dist/styles/themes/dark.css +1 -1
  185. package/dist/styles/themes/default.css +1 -1
  186. package/dist/styles/themes/jmapp.css +1 -1
  187. package/dist/styles/themes/jrkf.css +1 -1
  188. package/dist/styles/variables-daojia.scss +1055 -1976
  189. package/dist/styles/variables-jmapp.scss +96 -5
  190. package/dist/styles/variables-jrkf.scss +96 -5
  191. package/dist/styles/variables.scss +141 -37
  192. package/package.json +1 -1
@@ -76,7 +76,7 @@
76
76
  .nut-icon {
77
77
  width: $icon-size-12;
78
78
  height: $icon-size-12;
79
- color: var(--nutui-black-5);
79
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
80
80
  margin-right: $searchbar-inner-gap;
81
81
  }
82
82
  &::after {
@@ -94,7 +94,7 @@
94
94
  display: flex;
95
95
  flex-direction: row;
96
96
  z-index: 2;
97
- background-color: #fff;
97
+ background-color: $searchbar-content-background;
98
98
  top: scale-px(9px);
99
99
  left: scale-px(6px);
100
100
  font-size: $font-size-s;
@@ -105,7 +105,7 @@
105
105
  flex-direction: row;
106
106
  align-items: center;
107
107
  padding: scale-px(4px) scale-px(8px);
108
- background-color: #f7f8fc;
108
+ background-color: $color-background-sunken;
109
109
  border-radius: scale-px(4px);
110
110
  margin-right: scale-px(2px);
111
111
  }
@@ -114,7 +114,7 @@
114
114
  width: $icon-size-6;
115
115
  height: $icon-size-6;
116
116
  font-size: $icon-size-6;
117
- color: #c2c4cc;
117
+ color: $color-text-disabled;
118
118
  margin-left: scale-px(4px);
119
119
  }
120
120
  }
@@ -196,7 +196,7 @@
196
196
  padding: scale-px(5px) $searchbar-gap;
197
197
 
198
198
  .nut-searchbar-content {
199
- border: scale-px(0.5px) solid #ff5c67;
199
+ border: scale-px(0.5px) solid $color-primary;
200
200
  }
201
201
  }
202
202
  }
@@ -81,7 +81,7 @@ page {
81
81
  .nut-searchbar-clear.nut-searchbar-icon .nut-icon {
82
82
  width: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
83
83
  height: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
84
- color: var(--nutui-black-5);
84
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
85
85
  margin-right: var(--nutui-searchbar-inner-gap, calc(8px * var(--nut-scale-f, 1)));
86
86
  }
87
87
  .nut-searchbar-clear.nut-searchbar-icon::after {
@@ -96,7 +96,7 @@ page {
96
96
  display: flex;
97
97
  flex-direction: row;
98
98
  z-index: 2;
99
- background-color: #fff;
99
+ background-color: var(--nutui-searchbar-content-background, var(--nutui-color-background-overlay, #ffffff));
100
100
  top: calc(9px * var(--nut-scale-f, 1));
101
101
  left: calc(6px * var(--nut-scale-f, 1));
102
102
  font-size: var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))));
@@ -107,7 +107,7 @@ page {
107
107
  flex-direction: row;
108
108
  align-items: center;
109
109
  padding: calc(4px * var(--nut-scale-f, 1)) calc(8px * var(--nut-scale-f, 1));
110
- background-color: #f7f8fc;
110
+ background-color: var(--nutui-color-background-sunken, #f7f8fc);
111
111
  border-radius: calc(4px * var(--nut-scale-f, 1));
112
112
  margin-right: calc(2px * var(--nut-scale-f, 1));
113
113
  }
@@ -115,7 +115,7 @@ page {
115
115
  width: var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
116
116
  height: var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
117
117
  font-size: var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
118
- color: #c2c4cc;
118
+ color: var(--nutui-color-text-disabled, #c2c4cc);
119
119
  margin-left: calc(4px * var(--nut-scale-f, 1));
120
120
  }
121
121
  .nut-searchbar-left, .nut-searchbar-right {
@@ -175,7 +175,7 @@ page {
175
175
  padding: calc(5px * var(--nut-scale-f, 1)) var(--nutui-searchbar-gap, calc(12px * var(--nut-scale-f, 1)));
176
176
  }
177
177
  .nut-searchbar-focus .nut-searchbar-content {
178
- border: calc(0.5px * var(--nut-scale-f, 1)) solid #ff5c67;
178
+ border: calc(0.5px * var(--nut-scale-f, 1)) solid var(--nutui-color-primary, #ff0f23);
179
179
  }
180
180
 
181
181
  [dir=rtl] .nut-searchbar-left,
@@ -76,7 +76,7 @@
76
76
  .nut-icon {
77
77
  width: $icon-size-12;
78
78
  height: $icon-size-12;
79
- color: var(--nutui-black-5);
79
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
80
80
  margin-right: $searchbar-inner-gap;
81
81
  }
82
82
  &::after {
@@ -94,7 +94,7 @@
94
94
  display: flex;
95
95
  flex-direction: row;
96
96
  z-index: 2;
97
- background-color: #fff;
97
+ background-color: $searchbar-content-background;
98
98
  top: scale-px(9px);
99
99
  left: scale-px(6px);
100
100
  font-size: $font-size-s;
@@ -105,7 +105,7 @@
105
105
  flex-direction: row;
106
106
  align-items: center;
107
107
  padding: scale-px(4px) scale-px(8px);
108
- background-color: #f7f8fc;
108
+ background-color: $color-background-sunken;
109
109
  border-radius: scale-px(4px);
110
110
  margin-right: scale-px(2px);
111
111
  }
@@ -114,7 +114,7 @@
114
114
  width: $icon-size-6;
115
115
  height: $icon-size-6;
116
116
  font-size: $icon-size-6;
117
- color: #c2c4cc;
117
+ color: $color-text-disabled;
118
118
  margin-left: scale-px(4px);
119
119
  }
120
120
  }
@@ -196,7 +196,7 @@
196
196
  padding: scale-px(5px) $searchbar-gap;
197
197
 
198
198
  .nut-searchbar-content {
199
- border: scale-px(0.5px) solid #ff5c67;
199
+ border: scale-px(0.5px) solid $color-primary;
200
200
  }
201
201
  }
202
202
  }
@@ -71,7 +71,7 @@
71
71
  .nut-searchbar-clear.nut-searchbar-icon .nut-icon {
72
72
  width: var(--nutui-icon-size-12, 12px);
73
73
  height: var(--nutui-icon-size-12, 12px);
74
- color: var(--nutui-black-5);
74
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
75
75
  margin-right: var(--nutui-searchbar-inner-gap, 8px);
76
76
  }
77
77
  .nut-searchbar-clear.nut-searchbar-icon::after {
@@ -86,7 +86,7 @@
86
86
  display: flex;
87
87
  flex-direction: row;
88
88
  z-index: 2;
89
- background-color: #fff;
89
+ background-color: var(--nutui-searchbar-content-background, var(--nutui-color-default-light));
90
90
  top: scale-px(9px);
91
91
  left: scale-px(6px);
92
92
  font-size: var(--nutui-font-text-small);
@@ -97,7 +97,7 @@
97
97
  flex-direction: row;
98
98
  align-items: center;
99
99
  padding: scale-px(4px) scale-px(8px);
100
- background-color: #f7f8fc;
100
+ background-color: var(--nutui-gray-2, #f8f8f8);
101
101
  border-radius: scale-px(4px);
102
102
  margin-right: scale-px(2px);
103
103
  }
@@ -105,7 +105,7 @@
105
105
  width: var(--nutui-icon-size-6, 6px);
106
106
  height: var(--nutui-icon-size-6, 6px);
107
107
  font-size: var(--nutui-icon-size-6, 6px);
108
- color: #c2c4cc;
108
+ color: var(--nutui-color-text-disabled);
109
109
  margin-left: scale-px(4px);
110
110
  }
111
111
  .nut-searchbar-left, .nut-searchbar-right {
@@ -165,7 +165,7 @@
165
165
  padding: scale-px(5px) var(--nutui-searchbar-gap, 16px);
166
166
  }
167
167
  .nut-searchbar-focus .nut-searchbar-content {
168
- border: scale-px(0.5px) solid #ff5c67;
168
+ border: scale-px(0.5px) solid var(--nutui-color-primary);
169
169
  }
170
170
 
171
171
  [dir=rtl] .nut-searchbar-left,
@@ -76,7 +76,7 @@
76
76
  .nut-icon {
77
77
  width: $icon-size-12;
78
78
  height: $icon-size-12;
79
- color: var(--nutui-black-5);
79
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
80
80
  margin-right: $searchbar-inner-gap;
81
81
  }
82
82
  &::after {
@@ -94,7 +94,7 @@
94
94
  display: flex;
95
95
  flex-direction: row;
96
96
  z-index: 2;
97
- background-color: #fff;
97
+ background-color: $searchbar-content-background;
98
98
  top: scale-px(9px);
99
99
  left: scale-px(6px);
100
100
  font-size: $font-size-s;
@@ -105,7 +105,7 @@
105
105
  flex-direction: row;
106
106
  align-items: center;
107
107
  padding: scale-px(4px) scale-px(8px);
108
- background-color: #f7f8fc;
108
+ background-color: $color-background-sunken;
109
109
  border-radius: scale-px(4px);
110
110
  margin-right: scale-px(2px);
111
111
  }
@@ -114,7 +114,7 @@
114
114
  width: $icon-size-6;
115
115
  height: $icon-size-6;
116
116
  font-size: $icon-size-6;
117
- color: #c2c4cc;
117
+ color: $color-text-disabled;
118
118
  margin-left: scale-px(4px);
119
119
  }
120
120
  }
@@ -196,7 +196,7 @@
196
196
  padding: scale-px(5px) $searchbar-gap;
197
197
 
198
198
  .nut-searchbar-content {
199
- border: scale-px(0.5px) solid #ff5c67;
199
+ border: scale-px(0.5px) solid $color-primary;
200
200
  }
201
201
  }
202
202
  }
@@ -71,7 +71,7 @@
71
71
  .nut-searchbar-clear.nut-searchbar-icon .nut-icon {
72
72
  width: var(--nutui-icon-size-12, 12px);
73
73
  height: var(--nutui-icon-size-12, 12px);
74
- color: var(--nutui-black-5);
74
+ color: var(--nutui-black-5, rgba(0, 0, 0, 0.2));
75
75
  margin-right: var(--nutui-searchbar-inner-gap, 8px);
76
76
  }
77
77
  .nut-searchbar-clear.nut-searchbar-icon::after {
@@ -86,7 +86,7 @@
86
86
  display: flex;
87
87
  flex-direction: row;
88
88
  z-index: 2;
89
- background-color: #fff;
89
+ background-color: var(--nutui-searchbar-content-background, var(--nutui-color-default-light));
90
90
  top: scale-px(9px);
91
91
  left: scale-px(6px);
92
92
  font-size: var(--nutui-font-text-small);
@@ -97,7 +97,7 @@
97
97
  flex-direction: row;
98
98
  align-items: center;
99
99
  padding: scale-px(4px) scale-px(8px);
100
- background-color: #f7f8fc;
100
+ background-color: var(--nutui-gray-2, #f0f0f0);
101
101
  border-radius: scale-px(4px);
102
102
  margin-right: scale-px(2px);
103
103
  }
@@ -105,7 +105,7 @@
105
105
  width: var(--nutui-icon-size-6, 6px);
106
106
  height: var(--nutui-icon-size-6, 6px);
107
107
  font-size: var(--nutui-icon-size-6, 6px);
108
- color: #c2c4cc;
108
+ color: var(--nutui-color-text-disabled);
109
109
  margin-left: scale-px(4px);
110
110
  }
111
111
  .nut-searchbar-left, .nut-searchbar-right {
@@ -165,7 +165,7 @@
165
165
  padding: scale-px(5px) var(--nutui-searchbar-gap, 16px);
166
166
  }
167
167
  .nut-searchbar-focus .nut-searchbar-content {
168
- border: scale-px(0.5px) solid #ff5c67;
168
+ border: scale-px(0.5px) solid var(--nutui-color-primary, #ff6666);
169
169
  }
170
170
 
171
171
  [dir=rtl] .nut-searchbar-left,
@@ -9,7 +9,7 @@ import { canUseDom } from "../../utils/can-use-dom";
9
9
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
10
10
  type: 'png',
11
11
  lineWidth: 2,
12
- strokeStyle: '#1A1A1A',
12
+ strokeStyle: 'var(--nutui-color-title, #1a1a1a)',
13
13
  unsupported: ''
14
14
  });
15
15
  var InternalSignature = function(props, ref) {
@@ -240,7 +240,7 @@ page {
240
240
  .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-icon,
241
241
  .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-text, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-icon,
242
242
  .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-text {
243
- background-color: var(--nutui-steps-enhanced-finish-head-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
243
+ background-color: var(--nutui-steps-enhanced-finish-head-background-color, var(--nutui-color-primary-light-pressed, #ffe8ee));
244
244
  }
245
245
  .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-icon .nut-icon,
246
246
  .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-text .nut-icon, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-icon .nut-icon,
@@ -251,5 +251,5 @@ page {
251
251
  color: var(--nutui-steps-enhanced-finish-head-text-color, var(--nutui-color-primary-stop-1, #ff475d));
252
252
  }
253
253
  .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-dot, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-dot {
254
- background-color: var(--nutui-steps-enhanced-finish-head-dot-background-color, var(--nutui-color-primary-disabled-special, #ffadbe));
254
+ background-color: var(--nutui-steps-enhanced-finish-head-dot-background-color, var(--nutui-color-primary-disabled-special, #ff91a5));
255
255
  }
@@ -32,6 +32,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
32
32
  left: 0,
33
33
  right: 0
34
34
  }), 2), actionWidth = _useState1[0], setActionWidth = _useState1[1];
35
+ var actionWidthRef = useRef(actionWidth);
36
+ actionWidthRef.current = actionWidth;
35
37
  var wrapperStyle = {
36
38
  transform: "translate3d(".concat(state.offset, "px, 0, 0)"),
37
39
  transitionDuration: state.dragging ? '0s' : '.6s'
@@ -58,7 +60,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
58
60
  var newState = _object_spread_props(_object_spread({}, state), {
59
61
  dragging: true
60
62
  });
61
- var isEdge = !opened || touch.deltaX.current * startOffset.current < 0;
63
+ var isEdge = !opened.current || touch.deltaX.current * startOffset.current < 0;
62
64
  if (isEdge) {
63
65
  preventDefault(event, true);
64
66
  }
@@ -84,7 +86,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
84
86
  var toggle = function(side) {
85
87
  var offset = Math.abs(state.offset);
86
88
  var base = 0.3;
87
- var baseNum = opened ? 1 - base : base;
89
+ var baseNum = opened.current ? 1 - base : base;
88
90
  var width = side === 'left' ? leftWidth : rightWidth;
89
91
  if (width && offset > Number(width) * baseNum) {
90
92
  open(side);
@@ -134,26 +136,28 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
134
136
  };
135
137
  var leftRef = useCallback(function(node) {
136
138
  if (node !== null) {
137
- setActionWidth(function(v) {
138
- return _object_spread_props(_object_spread({}, v), {
139
- left: getNodeWidth(node)
139
+ var width = getNodeWidth(node);
140
+ if (width !== actionWidthRef.current.left) {
141
+ setActionWidth(function(v) {
142
+ return _object_spread_props(_object_spread({}, v), {
143
+ left: width
144
+ });
140
145
  });
141
- });
146
+ }
142
147
  }
143
- }, [
144
- props.leftAction
145
- ]);
148
+ }, []);
146
149
  var rightRef = useCallback(function(node) {
147
150
  if (node !== null) {
148
- setActionWidth(function(v) {
149
- return _object_spread_props(_object_spread({}, v), {
150
- right: getNodeWidth(node)
151
+ var width = getNodeWidth(node);
152
+ if (width !== actionWidthRef.current.right) {
153
+ setActionWidth(function(v) {
154
+ return _object_spread_props(_object_spread({}, v), {
155
+ right: width
156
+ });
151
157
  });
152
- });
158
+ }
153
159
  }
154
- }, [
155
- props.rightAction
156
- ]);
160
+ }, []);
157
161
  var renderActionContent = function(side, measuredRef) {
158
162
  if (props["".concat(side, "Action")]) {
159
163
  return /*#__PURE__*/ React.createElement("div", {
@@ -63,7 +63,7 @@ page {
63
63
  .nut-switch-button .nut-icon {
64
64
  width: calc((var(--nutui-switch-height, calc(28px * var(--nut-scale-f, 1))) - var(--nutui-switch-border-width, calc(2px * var(--nut-scale-f, 1))) * 2) / 2);
65
65
  height: calc((var(--nutui-switch-height, calc(28px * var(--nut-scale-f, 1))) - var(--nutui-switch-border-width, calc(2px * var(--nut-scale-f, 1))) * 2) / 2);
66
- color: var(--nutui-switch-active-disabled-background-color, var(--nutui-color-primary-disabled-special, #ffadbe));
66
+ color: var(--nutui-switch-active-disabled-background-color, var(--nutui-color-primary-disabled-special, #ff91a5));
67
67
  }
68
68
  .nut-switch-close {
69
69
  background-color: var(--nutui-switch-inactive-background-color, var(--nutui-color-text-disabled, #c2c4cc));
@@ -109,7 +109,7 @@ page {
109
109
  color: var(--nutui-switch-inactive-disabled-label-text-color, var(--nutui-color-text-disabled, #c2c4cc));
110
110
  }
111
111
  .nut-switch-disabled {
112
- background-color: var(--nutui-switch-active-disabled-background-color, var(--nutui-color-primary-disabled-special, #ffadbe));
112
+ background-color: var(--nutui-switch-active-disabled-background-color, var(--nutui-color-primary-disabled-special, #ff91a5));
113
113
  }
114
114
  .nut-switch-disabled-close {
115
115
  background-color: var(--nutui-switch-inactive-disabled-background-color, var(--nutui-color-background, #f2f3f5));
@@ -163,7 +163,7 @@ page {
163
163
  color: var(--nutui-tabs-titles-item-active-color, var(--nutui-color-primary, #ff0f23));
164
164
  border-radius: var(--nutui-tabs-button-border-radius, calc(50px * var(--nut-scale-f, 1)));
165
165
  font-weight: var(--nutui-font-weight-bold, 600);
166
- background-color: var(--nutui-tabs-button-active-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
166
+ background-color: var(--nutui-tabs-button-active-background-color, var(--nutui-color-primary-light-pressed, #ffe8ee));
167
167
  border: var(--nutui-tabs-button-active-border, calc(1px * var(--nut-scale-f, 1)) solid var(--nutui-color-primary, #ff0f23));
168
168
  }
169
169
  .nut-tabs-titles-divider {
@@ -228,7 +228,7 @@ page {
228
228
  left: calc(10px * var(--nut-scale-f, 1));
229
229
  width: var(--nutui-tabs-vertical-tab-line-width, calc(3px * var(--nut-scale-f, 1)));
230
230
  height: var(--nutui-tabs-vertical-tab-line-height, calc(12px * var(--nut-scale-f, 1)));
231
- background: var(--nutui-tabs-vertical-tab-line-color, linear-gradient(180deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-light-pressed, #ffebf1) 100%));
231
+ background: var(--nutui-tabs-vertical-tab-line-color, linear-gradient(180deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-light-pressed, #ffe8ee) 100%));
232
232
  }
233
233
  .nut-tabs-vertical .nut-tabs-titles-item-active .nut-tabs-titles-item-smile {
234
234
  right: calc(-12px * var(--nut-scale-f, 1));
@@ -43,7 +43,7 @@ page {
43
43
  background: #fa2c19;
44
44
  }
45
45
  .nut-tag-info {
46
- background: var(--nutui-tag-info-background-color, var(--nutui-color-info, #0073ff));
46
+ background: var(--nutui-tag-info-background-color, var(--nutui-color-info, #0c82f7));
47
47
  }
48
48
  .nut-tag-success {
49
49
  background: var(--nutui-tag-success-background-color, #4fc08d);
@@ -52,7 +52,7 @@ page {
52
52
  background: var(--nutui-tag-danger-background-color, var(--nutui-color-danger, #ff0f23));
53
53
  }
54
54
  .nut-tag-warning {
55
- background: var(--nutui-tag-warning-background-color, var(--nutui-color-warning, #ffbf00));
55
+ background: var(--nutui-tag-warning-background-color, var(--nutui-color-warning, #ffaa00));
56
56
  }
57
57
  .nut-tag-round {
58
58
  border-radius: var(--nutui-tag-round-border-radius, calc(8px * var(--nut-scale-f, 1)));
@@ -32,7 +32,7 @@ page {
32
32
  border: calc(1px * var(--nut-scale-f, 1)) solid transparent;
33
33
  }
34
34
  .nut-timedetail-item.active {
35
- background-color: var(--nutui-color-primary-light-pressed, #ffebf1);
35
+ background-color: var(--nutui-color-primary-light-pressed, #ffe8ee);
36
36
  border: calc(1px * var(--nut-scale-f, 1)) solid var(--nutui-color-primary, #ff0f23);
37
37
  color: var(--nutui-color-primary, #ff0f23);
38
38
  font-weight: var(--nutui-font-weight-bold, 600);
@@ -130,7 +130,7 @@ var Notification = /*#__PURE__*/ function(_superClass) {
130
130
  className: "".concat(classPrefix, " ").concat(classes),
131
131
  id: "toast-".concat(id)
132
132
  }, /*#__PURE__*/ React.createElement("div", {
133
- className: classNames("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak), _define_property({}, "".concat(classPrefix, "-inner-descrption"), content)),
133
+ className: classNames("".concat(classPrefix, "-inner"), "".concat(classPrefix, "-").concat(position), contentClassName, "".concat(classPrefix, "-inner-").concat(size), "".concat(classPrefix, "-inner-").concat(wordBreak)),
134
134
  style: _object_spread({}, contentStyle),
135
135
  role: "alert",
136
136
  "aria-label": (title !== null && title !== void 0 ? title : '') + (content !== null && content !== void 0 ? content : '')
@@ -52,19 +52,20 @@ page {
52
52
  flex-direction: column;
53
53
  justify-content: center;
54
54
  align-items: center;
55
- min-width: calc(96px * var(--nut-scale-f, 1));
56
- max-width: 60%;
55
+ min-width: var(--nutui-toast-inner-min-width, calc(88px * var(--nut-scale-f, 1)));
56
+ max-width: var(--nutui-toast-inner-max-width, calc(200px * var(--nut-scale-f, 1)));
57
57
  box-sizing: border-box;
58
58
  font-size: var(--nutui-toast-text-font-size, var(--nutui-font-size-base, calc(14px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
59
59
  text-align: var(--nutui-toast-inner-text-align, center);
60
- padding: var(--nutui-toast-inner-padding, calc(13px * var(--nut-scale-f, 1)) calc(16px * var(--nut-scale-f, 1)));
60
+ padding: var(--nutui-toast-inner-padding, calc(12px * var(--nut-scale-f, 1)) calc(16px * var(--nut-scale-f, 1)));
61
61
  word-break: break-all;
62
62
  background: var(--nutui-toast-inner-bg-color, var(--nutui-color-mask, rgba(0, 0, 0, 0.7)));
63
63
  border-radius: var(--nutui-toast-inner-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1))));
64
64
  color: var(--nutui-toast-font-color, #ffffff);
65
65
  }
66
- .nut-toast-inner-descrption {
67
- max-width: 68.2%;
66
+ .nut-toast-has-icon .nut-toast-inner {
67
+ min-width: var(--nutui-toast-inner-has-icon-min-width, calc(97px * var(--nut-scale-f, 1)));
68
+ max-width: var(--nutui-toast-inner-has-icon-max-width, calc(225px * var(--nut-scale-f, 1)));
68
69
  }
69
70
  .nut-toast-inner-normal {
70
71
  word-break: normal;
@@ -90,8 +91,9 @@ page {
90
91
  top: var(--nutui-toast-inner-top, 20%);
91
92
  }
92
93
  .nut-toast-text {
93
- color: #ffffff;
94
+ color: var(--nutui-toast-font-color, var(--nutui-white, #ffffff));
94
95
  text-align: var(--nutui-toast-inner-text-align, center);
96
+ font-weight: var(--nutui-toast-text-font-weight, 400);
95
97
  /* #ifdef harmony dynamic*/
96
98
  line-height: normal;
97
99
  /* #endif */
@@ -101,9 +103,9 @@ page {
101
103
  height: auto;
102
104
  }
103
105
  .nut-toast-title {
104
- color: #ffffff;
106
+ color: var(--nutui-toast-font-color, var(--nutui-white, #ffffff));
105
107
  font-size: var(--nutui-toast-title-font-size, var(--nutui-font-size-md, calc(16px * var(--nut-scale-font, var(--nut-scale-f, 1)))));
106
- font-weight: 600;
108
+ font-weight: var(--nutui-toast-title-font-weight, 600);
107
109
  text-align: var(--nutui-toast-inner-text-align, center);
108
110
  /* #ifdef harmony dynamic*/
109
111
  line-height: normal;
@@ -113,21 +115,22 @@ page {
113
115
  /* #endif */
114
116
  }
115
117
  .nut-toast .nut-icon {
116
- width: calc(24px * var(--nut-scale-f, 1));
117
- height: calc(24px * var(--nut-scale-f, 1));
118
- color: #ffffff;
118
+ width: calc(20px * var(--nut-scale-f, 1));
119
+ height: calc(20px * var(--nut-scale-f, 1));
120
+ color: var(--nutui-toast-icon-color, var(--nutui-toast-font-color, var(--nutui-white, #ffffff)));
119
121
  }
120
122
  .nut-toast-icon-wrapper {
121
123
  width: 100%;
122
124
  display: flex;
123
125
  align-items: center;
124
126
  justify-content: center;
125
- margin: calc(3px * var(--nut-scale-f, 1)) 0 calc(5px * var(--nut-scale-f, 1));
126
- color: #ffffff;
127
+ margin: 0;
128
+ padding: calc(10px * var(--nut-scale-f, 1)) 0;
129
+ color: var(--nutui-toast-icon-color, var(--nutui-toast-font-color, var(--nutui-white, #ffffff)));
127
130
  }
128
131
  .nut-toast-icon-wrapper-icon {
129
- width: calc(24px * var(--nut-scale-f, 1));
130
- height: calc(24px * var(--nut-scale-f, 1));
132
+ width: calc(20px * var(--nut-scale-f, 1));
133
+ height: calc(20px * var(--nut-scale-f, 1));
131
134
  }
132
135
  .nut-toast-rtl {
133
136
  left: auto;
@@ -42,9 +42,8 @@
42
42
  flex-direction: column;
43
43
  justify-content: center;
44
44
  align-items: center;
45
- min-width: scale-px(96px);
46
- max-width: 60%;
47
- // max-width: 224px;
45
+ min-width: var(--nutui-toast-inner-min-width, scale-px(88px));
46
+ max-width: var(--nutui-toast-inner-max-width, scale-px(200px));
48
47
  box-sizing: border-box;
49
48
  font-size: $toast-text-font-size;
50
49
  text-align: $toast-inner-text-align;
@@ -54,9 +53,9 @@
54
53
  border-radius: $toast-inner-border-radius;
55
54
  color: $toast-font-color;
56
55
 
57
- &-descrption {
58
- max-width: 68.2%;
59
- // max-width: 256px;
56
+ .nut-toast-has-icon & {
57
+ min-width: var(--nutui-toast-inner-has-icon-min-width, scale-px(97px));
58
+ max-width: var(--nutui-toast-inner-has-icon-max-width, scale-px(225px));
60
59
  }
61
60
 
62
61
  &-normal {
@@ -91,8 +90,9 @@
91
90
  }
92
91
 
93
92
  &-text {
94
- color: #ffffff;
93
+ color: var(--nutui-toast-font-color, var(--nutui-white, #ffffff));
95
94
  text-align: $toast-inner-text-align;
95
+ font-weight: var(--nutui-toast-text-font-weight, 400);
96
96
  /* #ifdef harmony dynamic*/
97
97
  line-height: normal;
98
98
  /* #endif */
@@ -103,9 +103,9 @@
103
103
  }
104
104
 
105
105
  &-title {
106
- color: #ffffff;
106
+ color: var(--nutui-toast-font-color, var(--nutui-white, #ffffff));
107
107
  font-size: $toast-title-font-size;
108
- font-weight: 600;
108
+ font-weight: var(--nutui-toast-title-font-weight, 600);
109
109
  text-align: $toast-inner-text-align;
110
110
  /* #ifdef harmony dynamic*/
111
111
  line-height: normal;
@@ -116,9 +116,12 @@
116
116
  }
117
117
 
118
118
  .nut-icon {
119
- width: scale-px(24px);
120
- height: scale-px(24px);
121
- color: #ffffff;
119
+ width: scale-px(20px);
120
+ height: scale-px(20px);
121
+ color: var(
122
+ --nutui-toast-icon-color,
123
+ var(--nutui-toast-font-color, var(--nutui-white, #ffffff))
124
+ );
122
125
  }
123
126
 
124
127
  &-icon-wrapper {
@@ -126,12 +129,16 @@
126
129
  display: flex;
127
130
  align-items: center;
128
131
  justify-content: center;
129
- margin: scale-px(3px) 0 scale-px(5px);
130
- color: #ffffff;
132
+ margin: 0;
133
+ padding: scale-px(10px) 0;
134
+ color: var(
135
+ --nutui-toast-icon-color,
136
+ var(--nutui-toast-font-color, var(--nutui-white, #ffffff))
137
+ );
131
138
 
132
139
  &-icon {
133
- width: scale-px(24px);
134
- height: scale-px(24px);
140
+ width: scale-px(20px);
141
+ height: scale-px(20px);
135
142
  }
136
143
  }
137
144