@nutui/nutui-react-taro 4.0.0-beta.5 → 4.0.0-beta.7

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 (142) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/packages/actionsheet/style/style.harmony.css +12 -6
  3. package/dist/cjs/packages/address/style/style.harmony.css +12 -6
  4. package/dist/cjs/packages/animate/style/style.css +27 -9
  5. package/dist/cjs/packages/animate/style/style.harmony.css +27 -9
  6. package/dist/cjs/packages/animate/style-jmapp/style.css +27 -9
  7. package/dist/cjs/packages/animate/style-jrkf/style.css +27 -9
  8. package/dist/cjs/packages/audio/audio.js +14 -14
  9. package/dist/cjs/packages/audio/style/style.harmony.css +20 -8
  10. package/dist/cjs/packages/badge/badge.js +17 -17
  11. package/dist/cjs/packages/button/button.js +1 -2
  12. package/dist/cjs/packages/button/style/style.css +20 -8
  13. package/dist/cjs/packages/button/style/style.harmony.css +20 -8
  14. package/dist/cjs/packages/button/style-jmapp/style.css +20 -8
  15. package/dist/cjs/packages/button/style-jrkf/style.css +20 -8
  16. package/dist/cjs/packages/calendar/style/style.harmony.css +12 -6
  17. package/dist/cjs/packages/cascader/style/style.harmony.css +12 -6
  18. package/dist/cjs/packages/cascader/utils.js +3 -2
  19. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  20. package/dist/cjs/packages/datepicker/style/style.harmony.css +12 -6
  21. package/dist/cjs/packages/dialog/style/style.harmony.css +20 -8
  22. package/dist/cjs/packages/empty/style/style.harmony.css +20 -8
  23. package/dist/cjs/packages/imagepreview/style/style.harmony.css +12 -6
  24. package/dist/cjs/packages/indicator/indicator.js +6 -6
  25. package/dist/cjs/packages/infiniteloading/infiniteloading.js +9 -9
  26. package/dist/cjs/packages/navbar/style/style.css +3 -1
  27. package/dist/cjs/packages/navbar/style/style.harmony.css +3 -1
  28. package/dist/cjs/packages/navbar/style-jmapp/style.css +3 -1
  29. package/dist/cjs/packages/navbar/style-jrkf/style.css +3 -1
  30. package/dist/cjs/packages/noticebar/noticebar.js +120 -60
  31. package/dist/cjs/packages/noticebar/style/noticebar.scss +130 -10
  32. package/dist/cjs/packages/noticebar/style/style.css +138 -35
  33. package/dist/cjs/packages/noticebar/style/style.harmony.css +138 -35
  34. package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +130 -10
  35. package/dist/cjs/packages/noticebar/style-jmapp/style.css +113 -10
  36. package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +130 -10
  37. package/dist/cjs/packages/noticebar/style-jrkf/style.css +113 -10
  38. package/dist/cjs/packages/numberkeyboard/style/style.css +6 -6
  39. package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +18 -12
  40. package/dist/cjs/packages/numberkeyboard/style-jmapp/style.css +6 -6
  41. package/dist/cjs/packages/numberkeyboard/style-jrkf/style.css +6 -6
  42. package/dist/cjs/packages/picker/style/style.harmony.css +12 -6
  43. package/dist/cjs/packages/popover/popover.js +46 -37
  44. package/dist/cjs/packages/popover/style/popover.scss +79 -54
  45. package/dist/cjs/packages/popover/style/style.css +73 -61
  46. package/dist/cjs/packages/popover/style/style.harmony.css +85 -67
  47. package/dist/cjs/packages/popover/style-jmapp/popover.scss +79 -54
  48. package/dist/cjs/packages/popover/style-jmapp/style.css +73 -61
  49. package/dist/cjs/packages/popover/style-jrkf/popover.scss +79 -54
  50. package/dist/cjs/packages/popover/style-jrkf/style.css +73 -61
  51. package/dist/cjs/packages/popup/style/style.css +12 -6
  52. package/dist/cjs/packages/popup/style/style.harmony.css +12 -6
  53. package/dist/cjs/packages/popup/style-jmapp/style.css +12 -6
  54. package/dist/cjs/packages/popup/style-jrkf/style.css +12 -6
  55. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +54 -54
  56. package/dist/cjs/packages/quickenter/style/style.harmony.css +12 -6
  57. package/dist/cjs/packages/resultpage/style/style.harmony.css +20 -8
  58. package/dist/cjs/packages/shortpassword/style/style.harmony.css +12 -6
  59. package/dist/cjs/packages/skeleton/skeleton.js +15 -15
  60. package/dist/cjs/packages/timeselect/style/style.harmony.css +12 -6
  61. package/dist/cjs/packages/tour/style/style.harmony.css +86 -68
  62. package/dist/cjs/packages/tour/tour.js +1 -1
  63. package/dist/cjs/types/spec/noticebar/base.d.ts +5 -1
  64. package/dist/cjs/types/spec/popover/base.d.ts +4 -0
  65. package/dist/cjs/utils/is-forward-ref-component.js +2 -2
  66. package/dist/cjs/utils/render.js +1 -1
  67. package/dist/es/packages/actionsheet/style/style.harmony.css +12 -6
  68. package/dist/es/packages/address/style/style.harmony.css +12 -6
  69. package/dist/es/packages/animate/style/style.css +27 -9
  70. package/dist/es/packages/animate/style/style.harmony.css +27 -9
  71. package/dist/es/packages/animate/style-jmapp/style.css +27 -9
  72. package/dist/es/packages/animate/style-jrkf/style.css +27 -9
  73. package/dist/es/packages/audio/audio.js +14 -14
  74. package/dist/es/packages/audio/style/style.harmony.css +20 -8
  75. package/dist/es/packages/badge/badge.js +17 -17
  76. package/dist/es/packages/button/button.js +1 -2
  77. package/dist/es/packages/button/style/style.css +20 -8
  78. package/dist/es/packages/button/style/style.harmony.css +20 -8
  79. package/dist/es/packages/button/style-jmapp/style.css +20 -8
  80. package/dist/es/packages/button/style-jrkf/style.css +20 -8
  81. package/dist/es/packages/calendar/style/style.harmony.css +12 -6
  82. package/dist/es/packages/cascader/style/style.harmony.css +12 -6
  83. package/dist/es/packages/cascader/utils.js +3 -2
  84. package/dist/es/packages/configprovider/types.d.ts +1 -1
  85. package/dist/es/packages/datepicker/style/style.harmony.css +12 -6
  86. package/dist/es/packages/dialog/style/style.harmony.css +20 -8
  87. package/dist/es/packages/empty/style/style.harmony.css +20 -8
  88. package/dist/es/packages/imagepreview/style/style.harmony.css +12 -6
  89. package/dist/es/packages/indicator/indicator.js +6 -6
  90. package/dist/es/packages/infiniteloading/infiniteloading.js +9 -9
  91. package/dist/es/packages/navbar/style/style.css +3 -1
  92. package/dist/es/packages/navbar/style/style.harmony.css +3 -1
  93. package/dist/es/packages/navbar/style-jmapp/style.css +3 -1
  94. package/dist/es/packages/navbar/style-jrkf/style.css +3 -1
  95. package/dist/es/packages/noticebar/noticebar.js +120 -60
  96. package/dist/es/packages/noticebar/style/noticebar.scss +130 -10
  97. package/dist/es/packages/noticebar/style/style.css +138 -35
  98. package/dist/es/packages/noticebar/style/style.harmony.css +138 -35
  99. package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +130 -10
  100. package/dist/es/packages/noticebar/style-jmapp/style.css +113 -10
  101. package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +130 -10
  102. package/dist/es/packages/noticebar/style-jrkf/style.css +113 -10
  103. package/dist/es/packages/numberkeyboard/style/style.css +6 -6
  104. package/dist/es/packages/numberkeyboard/style/style.harmony.css +18 -12
  105. package/dist/es/packages/numberkeyboard/style-jmapp/style.css +6 -6
  106. package/dist/es/packages/numberkeyboard/style-jrkf/style.css +6 -6
  107. package/dist/es/packages/picker/style/style.harmony.css +12 -6
  108. package/dist/es/packages/popover/popover.js +46 -37
  109. package/dist/es/packages/popover/style/popover.scss +79 -54
  110. package/dist/es/packages/popover/style/style.css +73 -61
  111. package/dist/es/packages/popover/style/style.harmony.css +85 -67
  112. package/dist/es/packages/popover/style-jmapp/popover.scss +79 -54
  113. package/dist/es/packages/popover/style-jmapp/style.css +73 -61
  114. package/dist/es/packages/popover/style-jrkf/popover.scss +79 -54
  115. package/dist/es/packages/popover/style-jrkf/style.css +73 -61
  116. package/dist/es/packages/popup/style/style.css +12 -6
  117. package/dist/es/packages/popup/style/style.harmony.css +12 -6
  118. package/dist/es/packages/popup/style-jmapp/style.css +12 -6
  119. package/dist/es/packages/popup/style-jrkf/style.css +12 -6
  120. package/dist/es/packages/pulltorefresh/pulltorefresh.js +54 -54
  121. package/dist/es/packages/quickenter/style/style.harmony.css +12 -6
  122. package/dist/es/packages/resultpage/style/style.harmony.css +20 -8
  123. package/dist/es/packages/shortpassword/style/style.harmony.css +12 -6
  124. package/dist/es/packages/skeleton/skeleton.js +15 -15
  125. package/dist/es/packages/timeselect/style/style.harmony.css +12 -6
  126. package/dist/es/packages/tour/style/style.harmony.css +86 -68
  127. package/dist/es/packages/tour/tour.js +1 -1
  128. package/dist/es/types/spec/noticebar/base.d.ts +19 -3
  129. package/dist/es/types/spec/popover/base.d.ts +21 -2
  130. package/dist/es/utils/render.js +1 -1
  131. package/dist/nutui.react.umd.js +329 -1213
  132. package/dist/style-jmapp.css +1 -1
  133. package/dist/style-jmapp.scss +32 -32
  134. package/dist/style-jrkf.css +1 -1
  135. package/dist/style-jrkf.scss +30 -30
  136. package/dist/style.css +1 -1
  137. package/dist/style.scss +33 -33
  138. package/dist/styles/variables-daojia.scss +55 -9
  139. package/dist/styles/variables-jmapp.scss +52 -6
  140. package/dist/styles/variables-jrkf.scss +52 -6
  141. package/dist/styles/variables.scss +123 -15
  142. package/package.json +1 -1
@@ -23,6 +23,13 @@
23
23
  .nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap, .nut-noticebar .nut-noticebar-box-center .nut-noticebar-box-wrap {
24
24
  height: auto;
25
25
  }
26
+ .nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-left-icon, .nut-noticebar .nut-noticebar-box-center .nut-noticebar-box-left-icon {
27
+ height: var(--nutui-noticebar-left-icon-wrap-width, 32px);
28
+ min-width: var(--nutui-noticebar-left-icon-wrap-width, 32px);
29
+ }
30
+ .nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap {
31
+ flex: initial;
32
+ }
26
33
  .nut-noticebar .nut-noticebar-box-wrapable .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
27
34
  position: relative;
28
35
  white-space: normal;
@@ -44,30 +51,106 @@
44
51
  }
45
52
  .nut-noticebar .nut-noticebar-box-left-icon {
46
53
  display: flex;
54
+ align-items: center;
55
+ justify-content: center;
47
56
  height: var(--nutui-noticebar-left-icon-width, 16px);
48
57
  min-width: var(--nutui-noticebar-left-icon-width, 16px);
49
58
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
50
59
  background-size: 100% 100%;
51
60
  }
52
61
  .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
53
- color: var(--nutui-noticebar-color, #d9500b);
62
+ color: var(--nutui-noticebar-icon-color, var(--nutui-color-primary, #ff6666));
63
+ }
64
+ .nut-noticebar .nut-noticebar-box-left-icon img {
65
+ border-radius: var(--nutui-noticebar-left-icon-border-radius, 4px);
66
+ }
67
+ .nut-noticebar .nut-noticebar-box-content-wrapper {
68
+ flex: 1;
69
+ overflow: hidden;
70
+ min-width: 0;
71
+ }
72
+ .nut-noticebar .nut-noticebar-box-content-main {
73
+ display: flex;
74
+ align-items: center;
75
+ }
76
+ .nut-noticebar .nut-noticebar-box-description {
77
+ font-size: var(--nutui-noticebar-description-font-size, 11px);
78
+ color: var(--nutui-noticebar-description-color, var(--nutui-color-text));
79
+ line-height: var(--nutui-noticebar-description-line-height, 16px);
80
+ white-space: nowrap;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ }
84
+ .nut-noticebar .nut-noticebar-box-tag {
85
+ display: flex;
86
+ align-items: center;
87
+ width: var(--nutui-noticebar-tag-size, 12px);
88
+ height: var(--nutui-noticebar-tag-size, 12px);
89
+ margin-left: var(--nutui-noticebar-tag-gap, 4px);
90
+ flex-shrink: 0;
91
+ }
92
+ .nut-noticebar .nut-noticebar-box-action {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ max-width: var(--nutui-noticebar-action-max-width, 99px);
97
+ margin-left: var(--nutui-noticebar-action-gap, 12px);
98
+ font-size: var(--nutui-noticebar-action-font-size, var(--nutui-font-text-xs));
99
+ color: var(--nutui-color-primary, #ff6666);
100
+ flex-shrink: 0;
101
+ white-space: nowrap;
54
102
  }
55
103
  .nut-noticebar .nut-noticebar-box-right-icon {
56
104
  display: flex;
57
105
  align-items: center;
58
106
  justify-content: center;
59
- width: var(--nutui-noticebar-right-icon-width, 16px);
60
- margin-left: var(--nutui-noticebar-icon-gap, 4px);
107
+ width: var(--nutui-noticebar-close-size, 20px);
108
+ height: var(--nutui-noticebar-close-size, 20px);
109
+ margin-left: var(--nutui-noticebar-action-gap, 12px);
110
+ flex-shrink: 0;
111
+ cursor: pointer;
61
112
  }
62
113
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
63
- width: scale-px(12px);
64
- height: scale-px(12px);
65
- color: var(--nutui-noticebar-color, #d9500b);
114
+ color: var(--nutui-noticebar-close-color, var(--nutui-color-text-help));
66
115
  }
67
116
  .nut-noticebar .nut-noticebar-box-right-icon-default {
68
117
  width: var(--nutui-icon-size-12, 12px);
69
118
  height: var(--nutui-icon-size-12, 12px);
70
119
  }
120
+ .nut-noticebar .nut-noticebar-box-close-countdown {
121
+ position: relative;
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: center;
125
+ width: var(--nutui-noticebar-close-size, 20px);
126
+ height: var(--nutui-noticebar-close-size, 20px);
127
+ background: conic-gradient(var(--nutui-noticebar-close-ring-color, var(--nutui-color-text-help)) 0% var(--progress), var(--nutui-noticebar-close-ring-shadow-color, var(--nutui-color-border)) var(--progress) 100%);
128
+ border-radius: 50%;
129
+ }
130
+ .nut-noticebar .nut-noticebar-box-close-countdown::before {
131
+ content: "";
132
+ position: absolute;
133
+ inset: scale-px(1px);
134
+ background: var(--nutui-noticebar-background, rgb(251, 248, 220));
135
+ border-radius: 50%;
136
+ }
137
+ .nut-noticebar .nut-noticebar-box-close-icon {
138
+ position: relative;
139
+ width: var(--nutui-noticebar-close-icon-size, 10px);
140
+ height: var(--nutui-noticebar-close-icon-size, 10px);
141
+ color: var(--nutui-noticebar-close-color, var(--nutui-color-text-help));
142
+ }
143
+ .nut-noticebar .nut-noticebar-box-left-icon--product {
144
+ height: scale-px(32px);
145
+ min-width: scale-px(32px);
146
+ }
147
+ .nut-noticebar .nut-noticebar-box-left-icon--product img {
148
+ background: #ffffff;
149
+ border-radius: var(--nutui-noticebar-left-icon-border-radius, 4px);
150
+ }
151
+ .nut-noticebar .nut-noticebar-box-right {
152
+ flex-shrink: 0;
153
+ }
71
154
  .nut-noticebar .nut-noticebar-box-wrap {
72
155
  display: flex;
73
156
  flex: 1;
@@ -136,11 +219,11 @@
136
219
  -webkit-box-direction: normal;
137
220
  flex-direction: column;
138
221
  }
222
+ .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-description {
223
+ white-space: normal;
224
+ }
139
225
  .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-right-icon {
140
226
  align-self: center;
141
- display: flex;
142
- justify-content: center;
143
- width: var(--nutui-noticebar-right-icon-width, 16px);
144
227
  margin-left: var(--nutui-noticebar-icon-gap, 4px);
145
228
  }
146
229
  @keyframes nut-notice-bar-play {
@@ -167,7 +250,17 @@
167
250
  [dir=rtl] .nut-noticebar .nut-noticebar-box-right-icon,
168
251
  .nut-rtl .nut-noticebar .nut-noticebar-box-right-icon {
169
252
  margin-left: 0;
170
- margin-right: var(--nutui-noticebar-icon-gap, 4px);
253
+ margin-right: var(--nutui-noticebar-action-gap, 12px);
254
+ }
255
+ [dir=rtl] .nut-noticebar .nut-noticebar-box-tag,
256
+ .nut-rtl .nut-noticebar .nut-noticebar-box-tag {
257
+ margin-left: 0;
258
+ margin-right: var(--nutui-noticebar-tag-gap, 4px);
259
+ }
260
+ [dir=rtl] .nut-noticebar .nut-noticebar-box-action,
261
+ .nut-rtl .nut-noticebar .nut-noticebar-box-action {
262
+ margin-left: 0;
263
+ margin-right: var(--nutui-noticebar-action-gap, 12px);
171
264
  }
172
265
  [dir=rtl] .nut-noticebar .nut-noticebar-box .play,
173
266
  .nut-rtl .nut-noticebar .nut-noticebar-box .play {
@@ -191,4 +284,14 @@
191
284
  .nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-right-icon {
192
285
  margin-left: 0;
193
286
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
287
+ }
288
+ [dir=rtl] .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-tag,
289
+ .nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-tag {
290
+ margin-left: 0;
291
+ margin-right: var(--nutui-noticebar-tag-gap, 4px);
292
+ }
293
+ [dir=rtl] .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-action,
294
+ .nut-rtl .nut-noticebar .nut-noticebar-vertical .nut-noticebar-box-action {
295
+ margin-left: 0;
296
+ margin-right: var(--nutui-noticebar-action-gap, 12px);
194
297
  }
@@ -8,12 +8,6 @@ page {
8
8
  --nut-icon-line-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important;
9
9
  }
10
10
 
11
- .nut-numberkeyboard {
12
- width: 100%;
13
- padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
14
- user-select: none;
15
- background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
16
- }
17
11
  .nut-numberkeyboard-close-icon {
18
12
  width: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
19
13
  height: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
@@ -22,6 +16,12 @@ page {
22
16
  width: calc(28px * var(--nut-scale-f, 1));
23
17
  height: calc(28px * var(--nut-scale-f, 1));
24
18
  }
19
+ .nut-numberkeyboard {
20
+ width: 100%;
21
+ padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
22
+ user-select: none;
23
+ background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
24
+ }
25
25
  .nut-numberkeyboard-header {
26
26
  position: relative;
27
27
  display: flex;
@@ -189,12 +189,6 @@ page {
189
189
  .nut-popup-top.nut-popup-round {
190
190
  border-radius: 0 0 var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1)))) var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1))));
191
191
  }
192
- .nut-popup-slide {
193
- /* 从顶部滑出 */
194
- /* 从右侧滑出 */
195
- /* 从底部滑出 */
196
- /* 从左侧滑出 */
197
- }
198
192
  @keyframes popup-scale-fade-in {
199
193
  from {
200
194
  opacity: 0;
@@ -251,6 +245,9 @@ page {
251
245
  animation-name: popup-fade-out;
252
246
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
253
247
  }
248
+ .nut-popup-slide {
249
+ /* 从顶部滑出 */
250
+ }
254
251
  @keyframes popup-slide-top-enter {
255
252
  from {
256
253
  transform: translate3d(0, -100%, 0);
@@ -278,6 +275,9 @@ page {
278
275
  animation-name: popup-slide-top-exit;
279
276
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
280
277
  }
278
+ .nut-popup-slide {
279
+ /* 从右侧滑出 */
280
+ }
281
281
  @keyframes popup-slide-right-enter {
282
282
  from {
283
283
  transform: translate3d(100%, 0, 0);
@@ -305,6 +305,9 @@ page {
305
305
  animation-name: popup-slide-right-exit;
306
306
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
307
307
  }
308
+ .nut-popup-slide {
309
+ /* 从底部滑出 */
310
+ }
308
311
  @keyframes popup-slide-bottom-enter {
309
312
  from {
310
313
  transform: translate3d(0, 100%, 0);
@@ -332,6 +335,9 @@ page {
332
335
  animation-name: slide-bottom-exit;
333
336
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
334
337
  }
338
+ .nut-popup-slide {
339
+ /* 从左侧滑出 */
340
+ }
335
341
  @keyframes popup-slide-left-enter {
336
342
  from {
337
343
  transform: translate3d(-100%, 0, 0);
@@ -412,12 +418,6 @@ page {
412
418
  right: 0;
413
419
  }
414
420
 
415
- .nut-numberkeyboard {
416
- width: 100%;
417
- padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
418
- user-select: none;
419
- background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
420
- }
421
421
  .nut-numberkeyboard-close-icon {
422
422
  width: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
423
423
  height: var(--nutui-icon-size-18, calc(18px * var(--nut-scale-icon, var(--nut-scale-f, 1))));
@@ -426,6 +426,12 @@ page {
426
426
  width: calc(28px * var(--nut-scale-f, 1));
427
427
  height: calc(28px * var(--nut-scale-f, 1));
428
428
  }
429
+ .nut-numberkeyboard {
430
+ width: 100%;
431
+ padding: var(--nutui-numberkeyboard-padding, 0 0 calc(22px * var(--nut-scale-f, 1)) 0);
432
+ user-select: none;
433
+ background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-background, #f2f3f5));
434
+ }
429
435
  .nut-numberkeyboard-header {
430
436
  position: relative;
431
437
  display: flex;
@@ -2,12 +2,6 @@
2
2
  /* #endif */
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
- .nut-numberkeyboard {
6
- width: 100%;
7
- padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
8
- user-select: none;
9
- background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
10
- }
11
5
  .nut-numberkeyboard-close-icon {
12
6
  width: var(--nutui-icon-size-18, 18px);
13
7
  height: var(--nutui-icon-size-18, 18px);
@@ -16,6 +10,12 @@
16
10
  width: scale-px(28px);
17
11
  height: scale-px(28px);
18
12
  }
13
+ .nut-numberkeyboard {
14
+ width: 100%;
15
+ padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
16
+ user-select: none;
17
+ background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
18
+ }
19
19
  .nut-numberkeyboard-header {
20
20
  position: relative;
21
21
  display: flex;
@@ -2,12 +2,6 @@
2
2
  /* #endif */
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
- .nut-numberkeyboard {
6
- width: 100%;
7
- padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
8
- user-select: none;
9
- background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
10
- }
11
5
  .nut-numberkeyboard-close-icon {
12
6
  width: var(--nutui-icon-size-18, 18px);
13
7
  height: var(--nutui-icon-size-18, 18px);
@@ -16,6 +10,12 @@
16
10
  width: scale-px(28px);
17
11
  height: scale-px(28px);
18
12
  }
13
+ .nut-numberkeyboard {
14
+ width: 100%;
15
+ padding: var(--nutui-numberkeyboard-padding, 0 0 22px 0);
16
+ user-select: none;
17
+ background-color: var(--nutui-numberkeyboard-background-color, var(--nutui-color-surface-1));
18
+ }
19
19
  .nut-numberkeyboard-header {
20
20
  position: relative;
21
21
  display: flex;
@@ -189,12 +189,6 @@ page {
189
189
  .nut-popup-top.nut-popup-round {
190
190
  border-radius: 0 0 var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1)))) var(--nutui-popup-border-radius, var(--nutui-radius-xl, calc(12px * var(--nut-scale-f, 1))));
191
191
  }
192
- .nut-popup-slide {
193
- /* 从顶部滑出 */
194
- /* 从右侧滑出 */
195
- /* 从底部滑出 */
196
- /* 从左侧滑出 */
197
- }
198
192
  @keyframes popup-scale-fade-in {
199
193
  from {
200
194
  opacity: 0;
@@ -251,6 +245,9 @@ page {
251
245
  animation-name: popup-fade-out;
252
246
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
253
247
  }
248
+ .nut-popup-slide {
249
+ /* 从顶部滑出 */
250
+ }
254
251
  @keyframes popup-slide-top-enter {
255
252
  from {
256
253
  transform: translate3d(0, -100%, 0);
@@ -278,6 +275,9 @@ page {
278
275
  animation-name: popup-slide-top-exit;
279
276
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
280
277
  }
278
+ .nut-popup-slide {
279
+ /* 从右侧滑出 */
280
+ }
281
281
  @keyframes popup-slide-right-enter {
282
282
  from {
283
283
  transform: translate3d(100%, 0, 0);
@@ -305,6 +305,9 @@ page {
305
305
  animation-name: popup-slide-right-exit;
306
306
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
307
307
  }
308
+ .nut-popup-slide {
309
+ /* 从底部滑出 */
310
+ }
308
311
  @keyframes popup-slide-bottom-enter {
309
312
  from {
310
313
  transform: translate3d(0, 100%, 0);
@@ -332,6 +335,9 @@ page {
332
335
  animation-name: slide-bottom-exit;
333
336
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
334
337
  }
338
+ .nut-popup-slide {
339
+ /* 从左侧滑出 */
340
+ }
335
341
  @keyframes popup-slide-left-enter {
336
342
  from {
337
343
  transform: translate3d(-100%, 0, 0);
@@ -30,18 +30,21 @@ var _pxtransform = require("../../utils/taro/px-transform");
30
30
  var _useuuid = require("../../hooks/use-uuid");
31
31
  var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
32
32
  list: [],
33
- theme: 'light',
33
+ type: 'status',
34
+ theme: 'dark',
34
35
  location: 'bottom',
35
36
  visible: false,
36
37
  offset: [
37
38
  0,
38
39
  8
39
40
  ],
40
- arrowOffset: 0,
41
+ arrowOffset: 20,
41
42
  targetId: '',
42
43
  showArrow: true,
43
44
  closeOnOutsideClick: true,
44
45
  closeOnActionClick: true,
46
+ autoShow: false,
47
+ duration: 0,
45
48
  overlay: false,
46
49
  onClick: function onClick() {},
47
50
  onOpen: function onOpen() {},
@@ -50,9 +53,10 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
50
53
  var classPrefix = "nut-popover";
51
54
  var Popover = function Popover(props) {
52
55
  var rtl = (0, _index1.useRtl)();
53
- var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, list = _$_object_spread.list, theme = _$_object_spread.theme, location = _$_object_spread.location, visible = _$_object_spread.visible, offset = _$_object_spread.offset, arrowOffset = _$_object_spread.arrowOffset, targetId = _$_object_spread.targetId, overlay = _$_object_spread.overlay, closeOnOutsideClick = _$_object_spread.closeOnOutsideClick, closeOnActionClick = _$_object_spread.closeOnActionClick, className = _$_object_spread.className, showArrow = _$_object_spread.showArrow, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onSelect = _$_object_spread.onSelect, rest = (0, _object_without_properties._)(_$_object_spread, [
56
+ var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, list = _$_object_spread.list, type = _$_object_spread.type, theme = _$_object_spread.theme, location = _$_object_spread.location, visible = _$_object_spread.visible, offset = _$_object_spread.offset, arrowOffset = _$_object_spread.arrowOffset, targetId = _$_object_spread.targetId, overlay = _$_object_spread.overlay, closeOnOutsideClick = _$_object_spread.closeOnOutsideClick, closeOnActionClick = _$_object_spread.closeOnActionClick, autoShow = _$_object_spread.autoShow, duration = _$_object_spread.duration, className = _$_object_spread.className, showArrow = _$_object_spread.showArrow, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onSelect = _$_object_spread.onSelect, rest = (0, _object_without_properties._)(_$_object_spread, [
54
57
  "children",
55
58
  "list",
59
+ "type",
56
60
  "theme",
57
61
  "location",
58
62
  "visible",
@@ -62,6 +66,8 @@ var Popover = function Popover(props) {
62
66
  "overlay",
63
67
  "closeOnOutsideClick",
64
68
  "closeOnActionClick",
69
+ "autoShow",
70
+ "duration",
65
71
  "className",
66
72
  "showArrow",
67
73
  "style",
@@ -84,6 +90,27 @@ var Popover = function Popover(props) {
84
90
  }, [
85
91
  visible
86
92
  ]);
93
+ (0, _react.useEffect)(function() {
94
+ if (autoShow) {
95
+ onOpen === null || onOpen === void 0 ? void 0 : onOpen();
96
+ }
97
+ }, []);
98
+ (0, _react.useEffect)(function() {
99
+ if (visible && duration > 0) {
100
+ var timer = setTimeout(function() {
101
+ onClick === null || onClick === void 0 ? void 0 : onClick();
102
+ onClose === null || onClose === void 0 ? void 0 : onClose();
103
+ }, duration);
104
+ return function() {
105
+ return clearTimeout(timer);
106
+ };
107
+ }
108
+ }, [
109
+ visible,
110
+ duration,
111
+ onClick,
112
+ onClose
113
+ ]);
87
114
  var uid = (0, _useuuid.useUuid)();
88
115
  var popoverId = "popover-".concat(uid);
89
116
  var getWrapperPosition = function getWrapperPosition() {
@@ -177,7 +204,7 @@ var Popover = function Popover(props) {
177
204
  onClose === null || onClose === void 0 ? void 0 : onClose();
178
205
  }
179
206
  };
180
- var classes = (0, _classnames.default)(classPrefix, (0, _define_property._)({}, "".concat(classPrefix, "-").concat(theme), theme === 'dark'), className);
207
+ var classes = (0, _classnames.default)(classPrefix, "".concat(classPrefix, "--").concat(type), (0, _define_property._)({}, "".concat(classPrefix, "-light"), theme === 'light'), className);
181
208
  var popoverArrow = function popoverArrow() {
182
209
  var prefixCls = 'nut-popover-arrow';
183
210
  var direction = location.split('-')[0];
@@ -201,6 +228,7 @@ var Popover = function Popover(props) {
201
228
  }
202
229
  if (width) {
203
230
  var dir = rtl ? 'right' : 'left';
231
+ var edgeOffset = arrowOffset;
204
232
  if ([
205
233
  'bottom',
206
234
  'top'
@@ -211,10 +239,10 @@ var Popover = function Popover(props) {
211
239
  styles[dir] = (0, _pxtransform.pxTransform)(-(popWidth - width) / 2 + wrapperPosition[dir] + parallel);
212
240
  }
213
241
  if (skew === 'left') {
214
- styles.left = (0, _pxtransform.pxTransform)(left + parallel);
242
+ styles.left = (0, _pxtransform.pxTransform)(left + width / 2 - edgeOffset + parallel);
215
243
  }
216
244
  if (skew === 'right') {
217
- styles.left = (0, _pxtransform.pxTransform)(right + parallel);
245
+ styles.left = (0, _pxtransform.pxTransform)(left + width / 2 + edgeOffset + parallel);
218
246
  }
219
247
  }
220
248
  if ([
@@ -224,7 +252,7 @@ var Popover = function Popover(props) {
224
252
  var contentW = direction === 'left' ? -(popWidth + cross) : width + cross;
225
253
  styles.left = (0, _pxtransform.pxTransform)(left + contentW);
226
254
  if (!skew) {
227
- styles.top = (0, _pxtransform.pxTransform)(top - popHeight / 2 + height / 2 - 4 + parallel);
255
+ styles.top = (0, _pxtransform.pxTransform)(top - popHeight / 2 + height / 2 + parallel);
228
256
  }
229
257
  if (skew === 'top') {
230
258
  styles.top = (0, _pxtransform.pxTransform)(top + parallel);
@@ -241,37 +269,18 @@ var Popover = function Popover(props) {
241
269
  var styles = {};
242
270
  var direction = location.split('-')[0];
243
271
  var skew = location.split('-')[1];
244
- var base = 16;
245
- if (arrowOffset !== 0) {
246
- var dir = rtl ? 'right' : 'left';
247
- var dir2 = rtl ? 'left' : 'right';
248
- if ([
249
- 'bottom',
250
- 'top'
251
- ].includes(direction)) {
252
- if (!skew) {
253
- styles[dir] = "calc(50% + ".concat(arrowOffset, "px)");
254
- }
255
- if (skew === 'left') {
256
- styles[dir] = "".concat(base + arrowOffset, "px");
257
- }
258
- if (skew === 'right') {
259
- styles[dir2] = "".concat(base - arrowOffset, "px");
260
- }
272
+ var dir = rtl ? 'right' : 'left';
273
+ var dir2 = rtl ? 'left' : 'right';
274
+ var edgeOffset = arrowOffset;
275
+ if ([
276
+ 'bottom',
277
+ 'top'
278
+ ].includes(direction)) {
279
+ if (skew === 'left') {
280
+ styles[dir] = "".concat(edgeOffset, "px");
261
281
  }
262
- if ([
263
- 'left',
264
- 'right'
265
- ].includes(direction)) {
266
- if (!skew) {
267
- styles.top = "calc(50% - ".concat(arrowOffset, "px)");
268
- }
269
- if (skew === 'top') {
270
- styles.top = "".concat(base - arrowOffset, "px");
271
- }
272
- if (skew === 'bottom') {
273
- styles.bottom = "".concat(base + arrowOffset, "px");
274
- }
282
+ if (skew === 'right') {
283
+ styles[dir2] = "".concat(edgeOffset, "px");
275
284
  }
276
285
  }
277
286
  return styles;