@nutui/nutui-react-taro 3.0.20-cpp → 3.0.20

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 (397) hide show
  1. package/CHANGELOG.md +71 -28
  2. package/dist/cjs/locales/base.d.ts +0 -9
  3. package/dist/cjs/locales/en-US.js +2 -21
  4. package/dist/cjs/locales/id-ID.js +2 -21
  5. package/dist/cjs/locales/ja-JP.js +2 -19
  6. package/dist/cjs/locales/tr-TR.js +2 -21
  7. package/dist/cjs/locales/vi-VN.d.ts +3 -0
  8. package/dist/cjs/locales/vi-VN.js +170 -0
  9. package/dist/cjs/locales/zh-CN.js +2 -19
  10. package/dist/cjs/locales/zh-TW.js +2 -19
  11. package/dist/cjs/locales/zh-UG.js +2 -21
  12. package/dist/cjs/packages/actionsheet/style/style.harmony.css +17 -38
  13. package/dist/cjs/packages/address/address.d.ts +1 -1
  14. package/dist/cjs/packages/address/style/style.harmony.css +17 -38
  15. package/dist/cjs/packages/animatingnumbers/countup.js +1 -3
  16. package/dist/cjs/packages/audio/style/style.harmony.css +3 -0
  17. package/dist/cjs/packages/avatar/avatar.js +6 -32
  18. package/dist/cjs/packages/avatarcropper/avatarcropper.js +6 -2
  19. package/dist/cjs/packages/badge/badge.js +3 -16
  20. package/dist/cjs/packages/button/button.d.ts +24 -2
  21. package/dist/cjs/packages/button/button.js +12 -9
  22. package/dist/cjs/packages/button/index.d.ts +1 -0
  23. package/dist/cjs/packages/button/style/button.scss +3 -0
  24. package/dist/cjs/packages/button/style/style.css +3 -0
  25. package/dist/cjs/packages/button/style/style.harmony.css +3 -0
  26. package/dist/cjs/packages/button/style-jmapp/button.scss +3 -0
  27. package/dist/cjs/packages/button/style-jmapp/style.css +3 -0
  28. package/dist/cjs/packages/button/style-jrkf/button.scss +3 -0
  29. package/dist/cjs/packages/button/style-jrkf/style.css +3 -0
  30. package/dist/cjs/packages/calendar/style/calendar.scss +1 -32
  31. package/dist/cjs/packages/calendar/style/style.css +1 -21
  32. package/dist/cjs/packages/calendar/style/style.harmony.css +18 -59
  33. package/dist/cjs/packages/calendar/style-jmapp/calendar.scss +1 -32
  34. package/dist/cjs/packages/calendar/style-jmapp/style.css +1 -21
  35. package/dist/cjs/packages/calendar/style-jrkf/calendar.scss +1 -32
  36. package/dist/cjs/packages/calendar/style-jrkf/style.css +1 -21
  37. package/dist/cjs/packages/calendarcard/calendarcard.js +8 -30
  38. package/dist/cjs/packages/calendarcard/icon.js +23 -12
  39. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +0 -19
  40. package/dist/cjs/packages/calendarcard/style/style.css +0 -13
  41. package/dist/cjs/packages/calendarcard/style/style.harmony.css +0 -13
  42. package/dist/cjs/packages/calendarcard/style-jmapp/calendarcard.scss +0 -19
  43. package/dist/cjs/packages/calendarcard/style-jmapp/style.css +0 -13
  44. package/dist/cjs/packages/calendarcard/style-jrkf/calendarcard.scss +0 -19
  45. package/dist/cjs/packages/calendarcard/style-jrkf/style.css +0 -13
  46. package/dist/cjs/packages/card/style/style.harmony.css +1 -1
  47. package/dist/cjs/packages/cascader/style/style.harmony.css +17 -38
  48. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  49. package/dist/cjs/packages/datepicker/style/style.harmony.css +18 -39
  50. package/dist/cjs/packages/dialog/dialog.js +12 -18
  51. package/dist/cjs/packages/dialog/style/dialog.scss +1 -1
  52. package/dist/cjs/packages/dialog/style/style.css +1 -1
  53. package/dist/cjs/packages/dialog/style/style.harmony.css +4 -1
  54. package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +1 -1
  55. package/dist/cjs/packages/dialog/style-jmapp/style.css +1 -1
  56. package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +1 -1
  57. package/dist/cjs/packages/dialog/style-jrkf/style.css +1 -1
  58. package/dist/cjs/packages/divider/divider.js +2 -2
  59. package/dist/cjs/packages/empty/empty.d.ts +4 -4
  60. package/dist/cjs/packages/empty/style/style.harmony.css +3 -0
  61. package/dist/cjs/packages/form/style/style.harmony.css +5 -0
  62. package/dist/cjs/packages/formitem/style/formitem.scss +4 -4
  63. package/dist/cjs/packages/formitem/style/style.css +5 -0
  64. package/dist/cjs/packages/formitem/style/style.harmony.css +5 -0
  65. package/dist/cjs/packages/formitem/style-jmapp/formitem.scss +4 -4
  66. package/dist/cjs/packages/formitem/style-jmapp/style.css +5 -0
  67. package/dist/cjs/packages/formitem/style-jrkf/formitem.scss +4 -4
  68. package/dist/cjs/packages/formitem/style-jrkf/style.css +5 -0
  69. package/dist/cjs/packages/image/image.js +3 -11
  70. package/dist/cjs/packages/imagepreview/style/style.harmony.css +17 -38
  71. package/dist/cjs/packages/input/input.js +3 -10
  72. package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
  73. package/dist/cjs/packages/lottie/lottiemp.js +18 -10
  74. package/dist/cjs/packages/numberkeyboard/style/style.css +1 -1
  75. package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +18 -39
  76. package/dist/cjs/packages/nutui.react.build.d.ts +1 -3
  77. package/dist/cjs/packages/nutui.react.build.js +14 -18
  78. package/dist/cjs/packages/nutui.react.d.ts +1 -4
  79. package/dist/cjs/packages/nutui.react.js +14 -19
  80. package/dist/cjs/packages/nutui.react.scss.d.ts +0 -1
  81. package/dist/cjs/packages/nutui.react.scss.js +0 -1
  82. package/dist/cjs/packages/overlay/overlay.js +3 -3
  83. package/dist/cjs/packages/picker/style/style.css +1 -1
  84. package/dist/cjs/packages/picker/style/style.harmony.css +18 -39
  85. package/dist/cjs/packages/popover/style/style.harmony.css +17 -38
  86. package/dist/cjs/packages/popup/popup.js +103 -188
  87. package/dist/cjs/packages/popup/style/popup.scss +1 -22
  88. package/dist/cjs/packages/popup/style/style.css +17 -38
  89. package/dist/cjs/packages/popup/style/style.harmony.css +17 -38
  90. package/dist/cjs/packages/popup/style-jmapp/popup.scss +1 -22
  91. package/dist/cjs/packages/popup/style-jmapp/style.css +1 -22
  92. package/dist/cjs/packages/popup/style-jrkf/popup.scss +1 -22
  93. package/dist/cjs/packages/popup/style-jrkf/style.css +1 -22
  94. package/dist/cjs/packages/price/price.js +13 -52
  95. package/dist/cjs/packages/progress/progress.js +4 -2
  96. package/dist/cjs/packages/range/range.js +7 -32
  97. package/dist/cjs/packages/rate/rate.js +8 -5
  98. package/dist/cjs/packages/resultpage/resultpage.js +1 -2
  99. package/dist/cjs/packages/resultpage/style/style.harmony.css +3 -0
  100. package/dist/cjs/packages/safearea/safearea.js +12 -3
  101. package/dist/cjs/packages/safearea/style/safearea.scss +6 -0
  102. package/dist/cjs/packages/safearea/style/style.css +2 -0
  103. package/dist/cjs/packages/safearea/style/style.harmony.css +2 -0
  104. package/dist/cjs/packages/safearea/style-jmapp/safearea.scss +6 -0
  105. package/dist/cjs/packages/safearea/style-jmapp/style.css +2 -0
  106. package/dist/cjs/packages/safearea/style-jrkf/safearea.scss +6 -0
  107. package/dist/cjs/packages/safearea/style-jrkf/style.css +2 -0
  108. package/dist/cjs/packages/searchbar/searchbar.js +9 -23
  109. package/dist/cjs/packages/shortpassword/style/style.harmony.css +17 -38
  110. package/dist/cjs/packages/step/step.js +8 -3
  111. package/dist/cjs/packages/step/style/step.scss +2 -0
  112. package/dist/cjs/packages/step/style/style.css +2 -0
  113. package/dist/cjs/packages/step/style/style.harmony.css +2 -0
  114. package/dist/cjs/packages/step/style-jmapp/step.scss +2 -0
  115. package/dist/cjs/packages/step/style-jmapp/style.css +2 -0
  116. package/dist/cjs/packages/step/style-jrkf/step.scss +2 -0
  117. package/dist/cjs/packages/step/style-jrkf/style.css +2 -0
  118. package/dist/cjs/packages/steps/style/steps.scss +3 -10
  119. package/dist/cjs/packages/steps/style/style.css +7 -13
  120. package/dist/cjs/packages/steps/style/style.harmony.css +9 -13
  121. package/dist/cjs/packages/steps/style-jmapp/steps.scss +3 -10
  122. package/dist/cjs/packages/steps/style-jmapp/style.css +3 -9
  123. package/dist/cjs/packages/steps/style-jrkf/steps.scss +3 -10
  124. package/dist/cjs/packages/steps/style-jrkf/style.css +3 -9
  125. package/dist/cjs/packages/swipe/swipe.js +115 -83
  126. package/dist/cjs/packages/table/style/style.css +1 -1
  127. package/dist/cjs/packages/table/style/style.harmony.css +1 -1
  128. package/dist/cjs/packages/table/style/table.scss +1 -1
  129. package/dist/cjs/packages/table/style-jmapp/style.css +1 -1
  130. package/dist/cjs/packages/table/style-jmapp/table.scss +1 -1
  131. package/dist/cjs/packages/table/style-jrkf/style.css +1 -1
  132. package/dist/cjs/packages/table/style-jrkf/table.scss +1 -1
  133. package/dist/cjs/packages/tabs/tabs.js +5 -12
  134. package/dist/cjs/packages/tag/style/style.css +1 -1
  135. package/dist/cjs/packages/tag/style/style.harmony.css +1 -1
  136. package/dist/cjs/packages/tag/style/tag.scss +1 -1
  137. package/dist/cjs/packages/tag/style-jmapp/style.css +1 -1
  138. package/dist/cjs/packages/tag/style-jmapp/tag.scss +1 -1
  139. package/dist/cjs/packages/tag/style-jrkf/style.css +1 -1
  140. package/dist/cjs/packages/tag/style-jrkf/tag.scss +1 -1
  141. package/dist/cjs/packages/timeselect/style/style.harmony.css +17 -38
  142. package/dist/cjs/packages/toast/style/style.css +4 -2
  143. package/dist/cjs/packages/toast/style/style.harmony.css +4 -2
  144. package/dist/cjs/packages/toast/style/toast.scss +4 -2
  145. package/dist/cjs/packages/toast/style-jmapp/style.css +4 -2
  146. package/dist/cjs/packages/toast/style-jmapp/toast.scss +4 -2
  147. package/dist/cjs/packages/toast/style-jrkf/style.css +4 -2
  148. package/dist/cjs/packages/toast/style-jrkf/toast.scss +4 -2
  149. package/dist/cjs/packages/toast/toast.js +1 -1
  150. package/dist/cjs/packages/tour/style/style.harmony.css +17 -38
  151. package/dist/cjs/types/index.d.ts +0 -3
  152. package/dist/cjs/types/index.js +0 -3
  153. package/dist/cjs/types/spec/button/base.d.ts +1 -2
  154. package/dist/cjs/types/spec/button/taro.d.ts +1 -5
  155. package/dist/cjs/types/spec/calendarcard/base.d.ts +0 -2
  156. package/dist/cjs/types/spec/dialog/base.d.ts +0 -1
  157. package/dist/cjs/types/spec/dialog/h5.d.ts +0 -2
  158. package/dist/cjs/types/spec/dialog/taro.d.ts +0 -2
  159. package/dist/cjs/types/spec/overlay/base.d.ts +0 -1
  160. package/dist/cjs/types/spec/popup/base.d.ts +0 -2
  161. package/dist/cjs/types/spec/price/base.d.ts +0 -1
  162. package/dist/cjs/utils/taro/{ConfigurableCSSTransition.js → ConfigurableCSSTransition copy.js } +53 -13
  163. package/dist/cjs/utils/taro/get-rect.js +2 -4
  164. package/dist/cjs/utils/taro/get-system-info.d.ts +5 -0
  165. package/dist/cjs/utils/taro/get-system-info.js +7 -2
  166. package/dist/es/hooks/taro/use-custom-event.js +0 -1
  167. package/dist/es/locales/base.d.ts +0 -9
  168. package/dist/es/locales/en-US.js +2 -21
  169. package/dist/es/locales/id-ID.js +2 -21
  170. package/dist/es/locales/ja-JP.js +2 -19
  171. package/dist/es/locales/tr-TR.js +2 -21
  172. package/dist/es/locales/vi-VN.d.ts +3 -0
  173. package/dist/es/locales/vi-VN.js +160 -0
  174. package/dist/es/locales/zh-CN.js +2 -19
  175. package/dist/es/locales/zh-TW.js +2 -19
  176. package/dist/es/locales/zh-UG.js +2 -21
  177. package/dist/es/packages/actionsheet/style/style.harmony.css +17 -38
  178. package/dist/es/packages/address/address.d.ts +1 -1
  179. package/dist/es/packages/address/style/style.harmony.css +17 -38
  180. package/dist/es/packages/animatingnumbers/countup.js +1 -3
  181. package/dist/es/packages/audio/style/style.harmony.css +3 -0
  182. package/dist/es/packages/avatar/avatar.js +6 -32
  183. package/dist/es/packages/avatarcropper/avatarcropper.js +8 -4
  184. package/dist/es/packages/badge/badge.js +3 -16
  185. package/dist/es/packages/button/button.d.ts +24 -2
  186. package/dist/es/packages/button/button.js +12 -10
  187. package/dist/es/packages/button/index.d.ts +1 -0
  188. package/dist/es/packages/button/style/button.scss +3 -0
  189. package/dist/es/packages/button/style/style.css +3 -0
  190. package/dist/es/packages/button/style/style.harmony.css +3 -0
  191. package/dist/es/packages/button/style-jmapp/button.scss +3 -0
  192. package/dist/es/packages/button/style-jmapp/style.css +3 -0
  193. package/dist/es/packages/button/style-jrkf/button.scss +3 -0
  194. package/dist/es/packages/button/style-jrkf/style.css +3 -0
  195. package/dist/es/packages/calendar/style/calendar.scss +1 -32
  196. package/dist/es/packages/calendar/style/style.css +1 -21
  197. package/dist/es/packages/calendar/style/style.harmony.css +18 -59
  198. package/dist/es/packages/calendar/style-jmapp/calendar.scss +1 -32
  199. package/dist/es/packages/calendar/style-jmapp/style.css +1 -21
  200. package/dist/es/packages/calendar/style-jrkf/calendar.scss +1 -32
  201. package/dist/es/packages/calendar/style-jrkf/style.css +1 -21
  202. package/dist/es/packages/calendarcard/calendarcard.js +9 -31
  203. package/dist/es/packages/calendarcard/icon.js +24 -13
  204. package/dist/es/packages/calendarcard/style/calendarcard.scss +0 -19
  205. package/dist/es/packages/calendarcard/style/style.css +0 -13
  206. package/dist/es/packages/calendarcard/style/style.harmony.css +0 -13
  207. package/dist/es/packages/calendarcard/style-jmapp/calendarcard.scss +0 -19
  208. package/dist/es/packages/calendarcard/style-jmapp/style.css +0 -13
  209. package/dist/es/packages/calendarcard/style-jrkf/calendarcard.scss +0 -19
  210. package/dist/es/packages/calendarcard/style-jrkf/style.css +0 -13
  211. package/dist/es/packages/card/style/style.harmony.css +1 -1
  212. package/dist/es/packages/cascader/style/style.harmony.css +17 -38
  213. package/dist/es/packages/configprovider/types.d.ts +1 -1
  214. package/dist/es/packages/datepicker/style/style.harmony.css +18 -39
  215. package/dist/es/packages/dialog/dialog.js +21 -29
  216. package/dist/es/packages/dialog/style/dialog.scss +1 -1
  217. package/dist/es/packages/dialog/style/style.css +1 -1
  218. package/dist/es/packages/dialog/style/style.harmony.css +4 -1
  219. package/dist/es/packages/dialog/style-jmapp/dialog.scss +1 -1
  220. package/dist/es/packages/dialog/style-jmapp/style.css +1 -1
  221. package/dist/es/packages/dialog/style-jrkf/dialog.scss +1 -1
  222. package/dist/es/packages/dialog/style-jrkf/style.css +1 -1
  223. package/dist/es/packages/divider/divider.js +1 -1
  224. package/dist/es/packages/empty/empty.d.ts +4 -4
  225. package/dist/es/packages/empty/style/style.harmony.css +3 -0
  226. package/dist/es/packages/form/style/style.harmony.css +5 -0
  227. package/dist/es/packages/formitem/style/formitem.scss +4 -4
  228. package/dist/es/packages/formitem/style/style.css +5 -0
  229. package/dist/es/packages/formitem/style/style.harmony.css +5 -0
  230. package/dist/es/packages/formitem/style-jmapp/formitem.scss +4 -4
  231. package/dist/es/packages/formitem/style-jmapp/style.css +5 -0
  232. package/dist/es/packages/formitem/style-jrkf/formitem.scss +4 -4
  233. package/dist/es/packages/formitem/style-jrkf/style.css +5 -0
  234. package/dist/es/packages/image/image.js +3 -11
  235. package/dist/es/packages/imagepreview/style/style.harmony.css +17 -38
  236. package/dist/es/packages/input/input.js +3 -10
  237. package/dist/es/packages/inputnumber/inputnumber.js +1 -1
  238. package/dist/es/packages/lottie/lottiemp.js +20 -12
  239. package/dist/es/packages/numberkeyboard/style/style.css +1 -1
  240. package/dist/es/packages/numberkeyboard/style/style.harmony.css +18 -39
  241. package/dist/es/packages/nutui.react.build.d.ts +1 -3
  242. package/dist/es/packages/nutui.react.build.js +1 -3
  243. package/dist/es/packages/overlay/overlay.js +3 -3
  244. package/dist/es/packages/picker/style/style.css +1 -1
  245. package/dist/es/packages/picker/style/style.harmony.css +18 -39
  246. package/dist/es/packages/popover/style/style.harmony.css +17 -38
  247. package/dist/es/packages/popup/popup.js +104 -189
  248. package/dist/es/packages/popup/style/popup.scss +1 -22
  249. package/dist/es/packages/popup/style/style.css +17 -38
  250. package/dist/es/packages/popup/style/style.harmony.css +17 -38
  251. package/dist/es/packages/popup/style-jmapp/popup.scss +1 -22
  252. package/dist/es/packages/popup/style-jmapp/style.css +1 -22
  253. package/dist/es/packages/popup/style-jrkf/popup.scss +1 -22
  254. package/dist/es/packages/popup/style-jrkf/style.css +1 -22
  255. package/dist/es/packages/price/price.js +14 -53
  256. package/dist/es/packages/progress/progress.js +4 -2
  257. package/dist/es/packages/range/range.js +8 -33
  258. package/dist/es/packages/rate/rate.js +9 -6
  259. package/dist/es/packages/resultpage/resultpage.js +1 -2
  260. package/dist/es/packages/resultpage/style/style.harmony.css +3 -0
  261. package/dist/es/packages/safearea/safearea.js +12 -3
  262. package/dist/es/packages/safearea/style/safearea.scss +6 -0
  263. package/dist/es/packages/safearea/style/style.css +2 -0
  264. package/dist/es/packages/safearea/style/style.harmony.css +2 -0
  265. package/dist/es/packages/safearea/style-jmapp/safearea.scss +6 -0
  266. package/dist/es/packages/safearea/style-jmapp/style.css +2 -0
  267. package/dist/es/packages/safearea/style-jrkf/safearea.scss +6 -0
  268. package/dist/es/packages/safearea/style-jrkf/style.css +2 -0
  269. package/dist/es/packages/searchbar/searchbar.js +9 -23
  270. package/dist/es/packages/shortpassword/style/style.harmony.css +17 -38
  271. package/dist/es/packages/step/step.js +8 -3
  272. package/dist/es/packages/step/style/step.scss +2 -0
  273. package/dist/es/packages/step/style/style.css +2 -0
  274. package/dist/es/packages/step/style/style.harmony.css +2 -0
  275. package/dist/es/packages/step/style-jmapp/step.scss +2 -0
  276. package/dist/es/packages/step/style-jmapp/style.css +2 -0
  277. package/dist/es/packages/step/style-jrkf/step.scss +2 -0
  278. package/dist/es/packages/step/style-jrkf/style.css +2 -0
  279. package/dist/es/packages/steps/style/steps.scss +3 -10
  280. package/dist/es/packages/steps/style/style.css +7 -13
  281. package/dist/es/packages/steps/style/style.harmony.css +9 -13
  282. package/dist/es/packages/steps/style-jmapp/steps.scss +3 -10
  283. package/dist/es/packages/steps/style-jmapp/style.css +3 -9
  284. package/dist/es/packages/steps/style-jrkf/steps.scss +3 -10
  285. package/dist/es/packages/steps/style-jrkf/style.css +3 -9
  286. package/dist/es/packages/swipe/swipe.js +116 -84
  287. package/dist/es/packages/table/style/style.css +1 -1
  288. package/dist/es/packages/table/style/style.harmony.css +1 -1
  289. package/dist/es/packages/table/style/table.scss +1 -1
  290. package/dist/es/packages/table/style-jmapp/style.css +1 -1
  291. package/dist/es/packages/table/style-jmapp/table.scss +1 -1
  292. package/dist/es/packages/table/style-jrkf/style.css +1 -1
  293. package/dist/es/packages/table/style-jrkf/table.scss +1 -1
  294. package/dist/es/packages/tabs/tabs.js +5 -12
  295. package/dist/es/packages/tag/style/style.css +1 -1
  296. package/dist/es/packages/tag/style/style.harmony.css +1 -1
  297. package/dist/es/packages/tag/style/tag.scss +1 -1
  298. package/dist/es/packages/tag/style-jmapp/style.css +1 -1
  299. package/dist/es/packages/tag/style-jmapp/tag.scss +1 -1
  300. package/dist/es/packages/tag/style-jrkf/style.css +1 -1
  301. package/dist/es/packages/tag/style-jrkf/tag.scss +1 -1
  302. package/dist/es/packages/timeselect/style/style.harmony.css +17 -38
  303. package/dist/es/packages/toast/style/style.css +4 -2
  304. package/dist/es/packages/toast/style/style.harmony.css +4 -2
  305. package/dist/es/packages/toast/style/toast.scss +4 -2
  306. package/dist/es/packages/toast/style-jmapp/style.css +4 -2
  307. package/dist/es/packages/toast/style-jmapp/toast.scss +4 -2
  308. package/dist/es/packages/toast/style-jrkf/style.css +4 -2
  309. package/dist/es/packages/toast/style-jrkf/toast.scss +4 -2
  310. package/dist/es/packages/toast/toast.js +1 -1
  311. package/dist/es/packages/tour/style/style.harmony.css +17 -38
  312. package/dist/es/types/index.d.ts +0 -3
  313. package/dist/es/types/index.js +0 -3
  314. package/dist/es/types/spec/button/base.d.ts +1 -2
  315. package/dist/es/types/spec/button/taro.d.ts +1 -5
  316. package/dist/es/types/spec/calendarcard/base.d.ts +0 -2
  317. package/dist/es/types/spec/dialog/base.d.ts +8 -3
  318. package/dist/es/types/spec/dialog/h5.d.ts +0 -2
  319. package/dist/es/types/spec/dialog/taro.d.ts +0 -2
  320. package/dist/es/types/spec/overlay/base.d.ts +0 -1
  321. package/dist/es/types/spec/popup/base.d.ts +5 -4
  322. package/dist/es/types/spec/price/base.d.ts +0 -4
  323. package/dist/es/utils/taro/{ConfigurableCSSTransition.js → ConfigurableCSSTransition copy.js } +53 -13
  324. package/dist/es/utils/taro/get-rect.js +2 -4
  325. package/dist/es/utils/taro/get-system-info.d.ts +5 -0
  326. package/dist/es/utils/taro/get-system-info.js +7 -8
  327. package/dist/nutui.react.umd.js +10310 -10733
  328. package/dist/style-jmapp.css +1 -1
  329. package/dist/style-jmapp.scss +41 -42
  330. package/dist/style-jrkf.css +1 -1
  331. package/dist/style-jrkf.scss +31 -32
  332. package/dist/style.css +1 -1
  333. package/dist/style.scss +30 -31
  334. package/dist/styles/jd-font.scss +2 -2
  335. package/dist/styles/theme-dark.scss +2 -1
  336. package/dist/styles/themes/daojia.css +1 -1
  337. package/dist/styles/themes/dark-daojia.css +1 -1
  338. package/dist/styles/themes/dark.css +1 -1
  339. package/dist/styles/themes/default.css +1 -1
  340. package/dist/styles/variables-daojia.scss +0 -41
  341. package/dist/styles/variables-jmapp.scss +0 -41
  342. package/dist/styles/variables-jrkf.scss +0 -41
  343. package/dist/styles/variables.scss +4 -49
  344. package/package.json +1 -1
  345. package/postinstall.js +9 -0
  346. package/dist/cjs/packages/quickenter/index.d.ts +0 -3
  347. package/dist/cjs/packages/quickenter/index.js +0 -13
  348. package/dist/cjs/packages/quickenter/quickenter.d.ts +0 -4
  349. package/dist/cjs/packages/quickenter/quickenter.js +0 -153
  350. package/dist/cjs/packages/quickenter/style/css.js +0 -2
  351. package/dist/cjs/packages/quickenter/style/index.js +0 -2
  352. package/dist/cjs/packages/quickenter/style/quickenter.scss +0 -120
  353. package/dist/cjs/packages/quickenter/style/style.css +0 -106
  354. package/dist/cjs/packages/quickenter/style/style.harmony.css +0 -506
  355. package/dist/cjs/packages/quickenter/style-jmapp/css.js +0 -2
  356. package/dist/cjs/packages/quickenter/style-jmapp/index.js +0 -2
  357. package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +0 -120
  358. package/dist/cjs/packages/quickenter/style-jmapp/style.css +0 -106
  359. package/dist/cjs/packages/quickenter/style-jrkf/css.js +0 -2
  360. package/dist/cjs/packages/quickenter/style-jrkf/index.js +0 -2
  361. package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +0 -120
  362. package/dist/cjs/packages/quickenter/style-jrkf/style.css +0 -106
  363. package/dist/cjs/types/spec/quickenter/base.d.ts +0 -27
  364. package/dist/cjs/types/spec/quickenter/base.js +0 -4
  365. package/dist/cjs/types/spec/quickenter/h5.d.ts +0 -5
  366. package/dist/cjs/types/spec/quickenter/h5.js +0 -4
  367. package/dist/cjs/types/spec/quickenter/taro.d.ts +0 -5
  368. package/dist/cjs/types/spec/quickenter/taro.js +0 -4
  369. package/dist/cjs/utils/should-render-price-raw.d.ts +0 -2
  370. package/dist/cjs/utils/should-render-price-raw.js +0 -46
  371. package/dist/es/packages/quickenter/index.d.ts +0 -3
  372. package/dist/es/packages/quickenter/index.js +0 -2
  373. package/dist/es/packages/quickenter/quickenter.d.ts +0 -4
  374. package/dist/es/packages/quickenter/quickenter.js +0 -141
  375. package/dist/es/packages/quickenter/style/css.js +0 -2
  376. package/dist/es/packages/quickenter/style/index.js +0 -2
  377. package/dist/es/packages/quickenter/style/quickenter.scss +0 -120
  378. package/dist/es/packages/quickenter/style/style.css +0 -106
  379. package/dist/es/packages/quickenter/style/style.harmony.css +0 -506
  380. package/dist/es/packages/quickenter/style-jmapp/css.js +0 -2
  381. package/dist/es/packages/quickenter/style-jmapp/index.js +0 -2
  382. package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +0 -120
  383. package/dist/es/packages/quickenter/style-jmapp/style.css +0 -106
  384. package/dist/es/packages/quickenter/style-jrkf/css.js +0 -2
  385. package/dist/es/packages/quickenter/style-jrkf/index.js +0 -2
  386. package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +0 -120
  387. package/dist/es/packages/quickenter/style-jrkf/style.css +0 -106
  388. package/dist/es/types/spec/quickenter/base.d.ts +0 -45
  389. package/dist/es/types/spec/quickenter/base.js +0 -1
  390. package/dist/es/types/spec/quickenter/h5.d.ts +0 -5
  391. package/dist/es/types/spec/quickenter/h5.js +0 -1
  392. package/dist/es/types/spec/quickenter/taro.d.ts +0 -5
  393. package/dist/es/types/spec/quickenter/taro.js +0 -1
  394. package/dist/es/utils/should-render-price-raw.d.ts +0 -2
  395. package/dist/es/utils/should-render-price-raw.js +0 -30
  396. /package/dist/cjs/utils/taro/{ConfigurableCSSTransition.d.ts → ConfigurableCSSTransition copy.d.ts} +0 -0
  397. /package/dist/es/utils/taro/{ConfigurableCSSTransition.d.ts → ConfigurableCSSTransition copy.d.ts} +0 -0
@@ -1,106 +0,0 @@
1
- @charset "UTF-8";
2
- /* #ifdef harmony */
3
- /* #endif */
4
- /* #ifndef harmony */
5
- /* #endif */
6
- .nut-quickenter {
7
- width: 100%;
8
- /* 限制弹层最大高度,包含安全区 */
9
- max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
10
- background: var(--nutui-quickenter-bg-color, #f5f5f5);
11
- border-radius: 0 0 12px 12px;
12
- overflow: hidden;
13
- box-sizing: border-box;
14
- display: flex;
15
- flex-direction: column;
16
- box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
17
- }
18
- .nut-quickenter.safe-area-top {
19
- /* 使用 env fallback,确保旧浏览器返回 0 */
20
- padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
21
- }
22
- .nut-quickenter-control {
23
- display: flex;
24
- align-items: center;
25
- justify-content: space-between;
26
- padding: 30px 16px 0;
27
- box-sizing: border-box;
28
- }
29
- .nut-quickenter-title {
30
- flex: 1;
31
- overflow: hidden;
32
- text-overflow: ellipsis;
33
- white-space: nowrap;
34
- text-align: left;
35
- color: var(--nutui-quickenter-title-color, var(--nutui-color-title));
36
- font-size: var(--nutui-quickenter-title-font-size, var(--nutui-font-text));
37
- }
38
- .nut-quickenter-close-btn {
39
- color: var(--nutui-quickenter-close-icon-color, #808080);
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- }
44
- .nut-quickenter-close-btn svg,
45
- .nut-quickenter-close-btn .nut-icon {
46
- width: var(--nutui-quickenter-close-icon-size, 12px);
47
- height: var(--nutui-quickenter-close-icon-size, 12px);
48
- }
49
- .nut-quickenter-content {
50
- flex: 1;
51
- padding: 10px 28px;
52
- overflow-y: hidden;
53
- box-sizing: border-box;
54
- }
55
- .nut-quickenter-content-scrollable {
56
- overflow-y: auto;
57
- -webkit-overflow-scrolling: touch;
58
- }
59
- .nut-quickenter-list {
60
- display: flex;
61
- flex-wrap: wrap;
62
- align-items: flex-start;
63
- width: 100%;
64
- }
65
- .nut-quickenter-item {
66
- display: flex;
67
- flex-direction: column;
68
- align-items: center;
69
- justify-content: flex-start;
70
- width: 56px;
71
- padding: 0 0 12px 0;
72
- box-sizing: border-box;
73
- cursor: pointer;
74
- margin-right: calc((100% - 224px) / 3);
75
- }
76
- .nut-quickenter-item:nth-child(4n) {
77
- margin-right: 0;
78
- }
79
- .nut-quickenter-item-icon {
80
- width: 56px;
81
- height: 56px;
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- border-radius: 50%;
86
- background: var(--nutui-quickenter-item-icon-bg-color, #ffffff);
87
- color: var(--nutui-quickenter-item-icon-color, var(--nutui-color-title));
88
- margin-bottom: 8px;
89
- flex-shrink: 0;
90
- }
91
- .nut-quickenter-item-icon svg,
92
- .nut-quickenter-item-icon .nut-icon {
93
- width: 22px;
94
- height: 22px;
95
- }
96
- .nut-quickenter-item-title {
97
- font-size: var(--nutui-quickenter-item-title-font-size, var(--nutui-font-text-small));
98
- color: var(--nutui-quickenter-item-title-color, var(--nutui-color-title));
99
- text-align: center;
100
- line-height: 1.4;
101
- white-space: normal;
102
- word-wrap: break-word;
103
- width: 72px;
104
- margin-left: -8px;
105
- margin-right: -8px;
106
- }
@@ -1,2 +0,0 @@
1
- import '../../popup/style-jrkf/css';
2
- import './style.css';
@@ -1,2 +0,0 @@
1
- import '../../popup/style-jrkf';
2
- import './quickenter.scss';
@@ -1,120 +0,0 @@
1
- .nut-quickenter {
2
- width: 100%;
3
- /* 限制弹层最大高度,包含安全区 */
4
- max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
5
- background: $quickenter-bg-color;
6
- border-radius: 0 0 12px 12px;
7
- overflow: hidden;
8
- box-sizing: border-box;
9
- display: flex;
10
- flex-direction: column;
11
- box-shadow: $quickenter-box-shadow;
12
- // backdrop-filter: $quickenter-backdrop-filter;
13
-
14
- &.safe-area-top {
15
- /* 使用 env fallback,确保旧浏览器返回 0 */
16
- padding-top: calc(
17
- env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
18
- );
19
- }
20
-
21
- &-control {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- padding: 30px 16px 0;
26
- box-sizing: border-box;
27
- }
28
-
29
- &-title {
30
- flex: 1;
31
- overflow: hidden;
32
- text-overflow: ellipsis;
33
- white-space: nowrap;
34
- text-align: left;
35
- color: $quickenter-title-color;
36
- font-size: $quickenter-title-font-size;
37
- }
38
-
39
- &-close-btn {
40
- color: $quickenter-close-icon-color;
41
- display: flex;
42
- align-items: center;
43
- justify-content: center;
44
-
45
- svg,
46
- .nut-icon {
47
- width: $quickenter-close-icon-size;
48
- height: $quickenter-close-icon-size;
49
- }
50
- }
51
-
52
- &-content {
53
- flex: 1;
54
- padding: 10px 28px;
55
- overflow-y: hidden; // 始终可滚动,防止内容被遮挡
56
- box-sizing: border-box;
57
-
58
- &-scrollable {
59
- overflow-y: auto; // Only scroll when > 8 items
60
- -webkit-overflow-scrolling: touch;
61
- }
62
- }
63
-
64
- &-list {
65
- display: flex;
66
- flex-wrap: wrap;
67
- align-items: flex-start;
68
- width: 100%;
69
- }
70
-
71
- &-item {
72
- display: flex;
73
- flex-direction: column;
74
- align-items: center;
75
- justify-content: flex-start;
76
- width: 56px;
77
- padding: 0 0 12px 0; // Reduced from 16px to ensure 2 rows fit in 256px
78
- box-sizing: border-box;
79
- cursor: pointer;
80
-
81
- // Calculate gap for 4 items per row: (100% - 4 * 56px) / 3
82
- margin-right: calc((100% - 224px) / 3);
83
-
84
- &:nth-child(4n) {
85
- margin-right: 0;
86
- }
87
-
88
- &-icon {
89
- width: 56px;
90
- height: 56px;
91
- display: flex;
92
- align-items: center;
93
- justify-content: center;
94
- border-radius: 50%;
95
- background: $quickenter-item-icon-bg-color;
96
- color: $quickenter-item-icon-color;
97
- margin-bottom: 8px;
98
- flex-shrink: 0;
99
-
100
- svg,
101
- .nut-icon {
102
- width: 22px;
103
- height: 22px;
104
- }
105
- }
106
-
107
- &-title {
108
- font-size: $quickenter-item-title-font-size;
109
- color: $quickenter-item-title-color;
110
- text-align: center;
111
- line-height: 1.4;
112
- // Allow multi-line if text is long, preventing truncation
113
- white-space: normal;
114
- word-wrap: break-word;
115
- width: 72px; // Allow text to be slightly wider than icon
116
- margin-left: -8px; // Center 72px title over 56px icon
117
- margin-right: -8px;
118
- }
119
- }
120
- }
@@ -1,106 +0,0 @@
1
- @charset "UTF-8";
2
- /* #ifdef harmony */
3
- /* #endif */
4
- /* #ifndef harmony */
5
- /* #endif */
6
- .nut-quickenter {
7
- width: 100%;
8
- /* 限制弹层最大高度,包含安全区 */
9
- max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
10
- background: var(--nutui-quickenter-bg-color, #f5f5f5);
11
- border-radius: 0 0 12px 12px;
12
- overflow: hidden;
13
- box-sizing: border-box;
14
- display: flex;
15
- flex-direction: column;
16
- box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
17
- }
18
- .nut-quickenter.safe-area-top {
19
- /* 使用 env fallback,确保旧浏览器返回 0 */
20
- padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
21
- }
22
- .nut-quickenter-control {
23
- display: flex;
24
- align-items: center;
25
- justify-content: space-between;
26
- padding: 30px 16px 0;
27
- box-sizing: border-box;
28
- }
29
- .nut-quickenter-title {
30
- flex: 1;
31
- overflow: hidden;
32
- text-overflow: ellipsis;
33
- white-space: nowrap;
34
- text-align: left;
35
- color: var(--nutui-quickenter-title-color, var(--nutui-color-title));
36
- font-size: var(--nutui-quickenter-title-font-size, var(--nutui-font-text));
37
- }
38
- .nut-quickenter-close-btn {
39
- color: var(--nutui-quickenter-close-icon-color, #808080);
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- }
44
- .nut-quickenter-close-btn svg,
45
- .nut-quickenter-close-btn .nut-icon {
46
- width: var(--nutui-quickenter-close-icon-size, 12px);
47
- height: var(--nutui-quickenter-close-icon-size, 12px);
48
- }
49
- .nut-quickenter-content {
50
- flex: 1;
51
- padding: 10px 28px;
52
- overflow-y: hidden;
53
- box-sizing: border-box;
54
- }
55
- .nut-quickenter-content-scrollable {
56
- overflow-y: auto;
57
- -webkit-overflow-scrolling: touch;
58
- }
59
- .nut-quickenter-list {
60
- display: flex;
61
- flex-wrap: wrap;
62
- align-items: flex-start;
63
- width: 100%;
64
- }
65
- .nut-quickenter-item {
66
- display: flex;
67
- flex-direction: column;
68
- align-items: center;
69
- justify-content: flex-start;
70
- width: 56px;
71
- padding: 0 0 12px 0;
72
- box-sizing: border-box;
73
- cursor: pointer;
74
- margin-right: calc((100% - 224px) / 3);
75
- }
76
- .nut-quickenter-item:nth-child(4n) {
77
- margin-right: 0;
78
- }
79
- .nut-quickenter-item-icon {
80
- width: 56px;
81
- height: 56px;
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- border-radius: 50%;
86
- background: var(--nutui-quickenter-item-icon-bg-color, #ffffff);
87
- color: var(--nutui-quickenter-item-icon-color, var(--nutui-color-title));
88
- margin-bottom: 8px;
89
- flex-shrink: 0;
90
- }
91
- .nut-quickenter-item-icon svg,
92
- .nut-quickenter-item-icon .nut-icon {
93
- width: 22px;
94
- height: 22px;
95
- }
96
- .nut-quickenter-item-title {
97
- font-size: var(--nutui-quickenter-item-title-font-size, var(--nutui-font-text-small));
98
- color: var(--nutui-quickenter-item-title-color, var(--nutui-color-title));
99
- text-align: center;
100
- line-height: 1.4;
101
- white-space: normal;
102
- word-wrap: break-word;
103
- width: 72px;
104
- margin-left: -8px;
105
- margin-right: -8px;
106
- }
@@ -1,27 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { BaseProps } from '../../base/props';
3
- export type QuickEnterRef = QuickEnterActions;
4
- export type QuickEnterActions = {
5
- open: () => void;
6
- close: () => void;
7
- };
8
- export interface QuickEnterOption extends Record<string, any> {
9
- title?: string;
10
- icon?: ReactNode;
11
- type?: string;
12
- url?: string;
13
- badge?: boolean | ReactNode;
14
- badgeProps?: any;
15
- }
16
- export interface BaseQuickEnter<POPUP_PROPS = any> extends BaseProps {
17
- visible?: boolean;
18
- title?: ReactNode;
19
- options?: QuickEnterOption[];
20
- popupProps?: POPUP_PROPS;
21
- closeOnOverlayClick?: boolean;
22
- closeIcon?: ReactNode;
23
- safeAreaInsetTop?: boolean;
24
- onClose?: () => void;
25
- onChange?: (item: QuickEnterOption, index: number) => void;
26
- children?: ReactNode;
27
- }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -1,5 +0,0 @@
1
- import { BaseQuickEnter, QuickEnterOption } from './base';
2
- import { WebPopupProps } from '../popup/h5';
3
- export interface WebQuickEnterProps extends BaseQuickEnter<WebPopupProps> {
4
- }
5
- export type { QuickEnterOption };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -1,5 +0,0 @@
1
- import { BaseQuickEnter, QuickEnterOption } from './base';
2
- import { TaroPopupProps } from '../popup/taro';
3
- export interface TaroQuickEnterProps extends BaseQuickEnter<TaroPopupProps> {
4
- }
5
- export type { QuickEnterOption };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -1,2 +0,0 @@
1
- export declare function shouldRenderPriceAsRaw(s: string): boolean;
2
- export declare function hasNonPriceChars(s: string): boolean;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get hasNonPriceChars () {
13
- return hasNonPriceChars;
14
- },
15
- get shouldRenderPriceAsRaw () {
16
- return shouldRenderPriceAsRaw;
17
- }
18
- });
19
- var RE_NUM = /\d+(?:\.\d+)?/g;
20
- // 价格合法字符:数字、小数点、负号、大写货币代码(HK USD EUR 等)、常见货币符号 Unicode 区块(含全角 ¥)
21
- var PRICE_CHARS = /^[\d.\-A-Z¥¥$€£₩₹₽₺₴₪฿\u20A0-\u20CF\uFE69\uFF04\uFFE5]*$/;
22
- // 无法提取出有效价格时直接按原文展示,避免把纯文案误格式化成 0 或空串
23
- function hasNoExtractablePrice(s) {
24
- var t = s.trim();
25
- if (!t) return true;
26
- if (!/\d/.test(t)) return true;
27
- if (t.replace(/[^\d.]/g, '') === '') return true;
28
- return false;
29
- }
30
- function shouldRenderPriceAsRaw(s) {
31
- if (hasNoExtractablePrice(s)) {
32
- return true;
33
- }
34
- var t = s.trim();
35
- var matches = Array.from(t.matchAll(RE_NUM));
36
- if (matches.length < 2) return false;
37
- var a = matches[0];
38
- var b = matches[1];
39
- var i0 = a.index;
40
- var i1 = b.index;
41
- var between = t.slice(i0 + a[0].length, i1);
42
- return !PRICE_CHARS.test(between);
43
- }
44
- function hasNonPriceChars(s) {
45
- return !PRICE_CHARS.test(s);
46
- }
@@ -1,3 +0,0 @@
1
- import QuickEnter from "./quickenter";
2
- export type { TaroQuickEnterProps as QuickEnterProps } from "../../types";
3
- export default QuickEnter;
@@ -1,2 +0,0 @@
1
- import QuickEnter from "./quickenter";
2
- export default QuickEnter;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { QuickEnterActions, TaroQuickEnterProps } from "../../types";
3
- declare const QuickEnter: React.ForwardRefExoticComponent<Partial<TaroQuickEnterProps> & React.RefAttributes<QuickEnterActions>>;
4
- export default QuickEnter;
@@ -1,141 +0,0 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
- import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
- import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
- import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
5
- import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
6
- import React, { useImperativeHandle } from "react";
7
- import { View } from "@tarojs/components";
8
- import Taro from "@tarojs/taro";
9
- import classNames from "classnames";
10
- import { Close } from "@nutui/icons-react-taro";
11
- import Popup from "../popup/index";
12
- import { ComponentDefaults } from "../../utils/typings";
13
- import { usePropsValue } from "../../hooks/use-props-value";
14
- import Badge from "../badge/index";
15
- import { useConfig } from "../configprovider";
16
- var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
17
- options: [],
18
- visible: false,
19
- closeOnOverlayClick: true,
20
- safeAreaInsetTop: true
21
- });
22
- var InternalQuickEnter = function(props, ref) {
23
- var _ref = _object_spread({}, defaultProps, props), children = _ref.children, visible = _ref.visible, title = _ref.title, _ref_options = _ref.options, options = _ref_options === void 0 ? [] : _ref_options, closeOnOverlayClick = _ref.closeOnOverlayClick, _ref_popupProps = _ref.popupProps, popupProps = _ref_popupProps === void 0 ? {} : _ref_popupProps, className = _ref.className, style = _ref.style, onClose = _ref.onClose, onChange = _ref.onChange, closeIcon = _ref.closeIcon, safeAreaInsetTop = _ref.safeAreaInsetTop, rest = _object_without_properties(_ref, [
24
- "children",
25
- "visible",
26
- "title",
27
- "options",
28
- "closeOnOverlayClick",
29
- "popupProps",
30
- "className",
31
- "style",
32
- "onClose",
33
- "onChange",
34
- "closeIcon",
35
- "safeAreaInsetTop"
36
- ]);
37
- var locale = useConfig().locale;
38
- var mergedTitle = title || locale.quickenter.title;
39
- var classPrefix = 'nut-quickenter';
40
- var classes = classNames(classPrefix, className, {
41
- 'safe-area-top': safeAreaInsetTop
42
- });
43
- var _usePropsValue = _sliced_to_array(usePropsValue({
44
- value: props.visible,
45
- defaultValue: false,
46
- finalValue: false,
47
- onChange: function(v) {
48
- if (!v) {
49
- var _props_onClose;
50
- (_props_onClose = props.onClose) === null || _props_onClose === void 0 ? void 0 : _props_onClose.call(props);
51
- }
52
- }
53
- }), 2), innerVisible = _usePropsValue[0], setInnerVisible = _usePropsValue[1];
54
- var actions = {
55
- open: function() {
56
- setInnerVisible(true);
57
- },
58
- close: function() {
59
- setInnerVisible(false);
60
- }
61
- };
62
- useImperativeHandle(ref, function() {
63
- return actions;
64
- });
65
- var onCancelEvent = function() {
66
- setInnerVisible(false);
67
- };
68
- var handleItemClick = function(item, index) {
69
- if (item.url) {
70
- Taro.navigateTo({
71
- url: item.url
72
- });
73
- }
74
- onChange === null || onChange === void 0 ? void 0 : onChange(item, index);
75
- };
76
- var renderTitleBar = function() {
77
- return /*#__PURE__*/ React.createElement(View, {
78
- className: "".concat(classPrefix, "-control")
79
- }, /*#__PURE__*/ React.createElement(View, {
80
- className: "".concat(classPrefix, "-title")
81
- }, mergedTitle), /*#__PURE__*/ React.createElement(View, {
82
- className: "".concat(classPrefix, "-close-btn"),
83
- onClick: function(e) {
84
- e.stopPropagation();
85
- onCancelEvent();
86
- }
87
- }, closeIcon || /*#__PURE__*/ React.createElement(Close, {
88
- ariaLabel: locale.close
89
- })));
90
- };
91
- var renderContent = function() {
92
- return /*#__PURE__*/ React.createElement(View, {
93
- className: classNames("".concat(classPrefix, "-content"), _define_property({}, "".concat(classPrefix, "-content-scrollable"), options.length > 8))
94
- }, /*#__PURE__*/ React.createElement(View, {
95
- className: "".concat(classPrefix, "-list")
96
- }, options.map(function(item, index) {
97
- var _item_badgeProps, _item_badgeProps1;
98
- var _item_badge, _item_badge1;
99
- return /*#__PURE__*/ React.createElement(View, {
100
- key: index,
101
- className: "".concat(classPrefix, "-item"),
102
- ariaLabel: "".concat(item.title, " ").concat((_item_badge = item.badge) !== null && _item_badge !== void 0 ? _item_badge : (_item_badgeProps = item.badgeProps) === null || _item_badgeProps === void 0 ? void 0 : _item_badgeProps.value),
103
- onClick: function() {
104
- return handleItemClick(item, index);
105
- }
106
- }, /*#__PURE__*/ React.createElement(View, {
107
- className: "".concat(classPrefix, "-item-icon"),
108
- ariaHidden: true
109
- }, /*#__PURE__*/ React.createElement(Badge, _object_spread_props(_object_spread({}, item.badgeProps), {
110
- value: (_item_badge1 = item.badge) !== null && _item_badge1 !== void 0 ? _item_badge1 : (_item_badgeProps1 = item.badgeProps) === null || _item_badgeProps1 === void 0 ? void 0 : _item_badgeProps1.value
111
- }), item.icon)), /*#__PURE__*/ React.createElement(View, {
112
- className: "".concat(classPrefix, "-item-title"),
113
- ariaHidden: true
114
- }, item.title));
115
- })));
116
- };
117
- var renderQuickEnterElement = function() {
118
- return /*#__PURE__*/ React.createElement(View, _object_spread({
119
- className: classes,
120
- style: style
121
- }, rest), renderTitleBar(), children, renderContent());
122
- };
123
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Popup, _object_spread_props(_object_spread({
124
- style: {
125
- background: 'transparent'
126
- }
127
- }, popupProps), {
128
- overlayStyle: {
129
- background: 'transparent'
130
- },
131
- visible: innerVisible,
132
- position: "top",
133
- onOverlayClick: function() {
134
- if (!closeOnOverlayClick) return;
135
- onCancelEvent();
136
- },
137
- onClose: onCancelEvent
138
- }), renderQuickEnterElement()));
139
- };
140
- var QuickEnter = /*#__PURE__*/ React.forwardRef(InternalQuickEnter);
141
- export default QuickEnter;
@@ -1,2 +0,0 @@
1
- import '../../popup/style/css';
2
- import './style.css';
@@ -1,2 +0,0 @@
1
- import '../../popup/style';
2
- import './quickenter.scss';