@nutui/nutui-react 1.5.2-beta.0 → 1.5.2-beta.2

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 (350) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/esm/ActionSheet/style/index.js +2 -0
  3. package/dist/esm/ActionSheet.js +92 -0
  4. package/dist/esm/Address/style/index.js +4 -0
  5. package/dist/esm/Address.js +622 -0
  6. package/dist/esm/Animate/style/index.js +2 -0
  7. package/dist/esm/Animate.js +55 -0
  8. package/dist/esm/AnimatingNumbers/style/index.js +3 -0
  9. package/dist/esm/AnimatingNumbers.js +127 -0
  10. package/dist/esm/Audio/style/index.js +4 -0
  11. package/dist/esm/Audio.js +266 -0
  12. package/dist/esm/Avatar/style/index.js +2 -0
  13. package/dist/esm/Avatar.js +132 -0
  14. package/dist/esm/AvatarContext-15733596.js +3 -0
  15. package/dist/esm/AvatarGroup/style/index.js +2 -0
  16. package/dist/esm/AvatarGroup.js +43 -0
  17. package/dist/esm/BackTop/style/index.js +2 -0
  18. package/dist/esm/BackTop.js +139 -0
  19. package/dist/esm/Badge/style/index.js +2 -0
  20. package/dist/esm/Badge.js +73 -0
  21. package/dist/esm/Barrage/style/index.js +2 -0
  22. package/dist/esm/Barrage.js +99 -0
  23. package/dist/esm/Button/style/index.js +2 -0
  24. package/dist/esm/Button.js +109 -0
  25. package/dist/esm/Calendar/style/index.js +2 -0
  26. package/dist/esm/Calendar.js +129 -0
  27. package/dist/esm/CalendarItem/style/index.js +2 -0
  28. package/dist/esm/CalendarItem.js +676 -0
  29. package/dist/esm/Card/style/index.js +4 -0
  30. package/dist/esm/Card.js +63 -0
  31. package/dist/esm/Cascader/style/index.js +3 -0
  32. package/dist/esm/Cascader.js +673 -0
  33. package/dist/esm/Cell/style/index.js +2 -0
  34. package/dist/esm/Cell.js +103 -0
  35. package/dist/esm/CellGroup/style/index.js +2 -0
  36. package/dist/esm/CellGroup.js +5 -0
  37. package/dist/esm/Checkbox/style/index.js +3 -0
  38. package/dist/esm/Checkbox.js +8 -0
  39. package/dist/esm/CheckboxGroup/style/index.js +2 -0
  40. package/dist/esm/CheckboxGroup.js +113 -0
  41. package/dist/esm/CircleProgress/style/index.js +2 -0
  42. package/dist/esm/CircleProgress.js +116 -0
  43. package/dist/esm/Col/style/index.js +2 -0
  44. package/dist/esm/Col.js +58 -0
  45. package/dist/esm/Collapse/style/index.js +2 -0
  46. package/dist/esm/Collapse.js +99 -0
  47. package/dist/esm/CollapseItem/style/index.js +2 -0
  48. package/dist/esm/CollapseItem.js +148 -0
  49. package/dist/esm/ConfigProvider/style/index.js +2 -0
  50. package/dist/esm/ConfigProvider.js +187 -0
  51. package/dist/esm/CountDown/style/index.js +2 -0
  52. package/dist/esm/CountDown.js +249 -0
  53. package/dist/esm/DatePicker/style/index.js +2 -0
  54. package/dist/esm/DatePicker.js +310 -0
  55. package/dist/esm/Dialog/style/index.js +3 -0
  56. package/dist/esm/Dialog.js +296 -0
  57. package/dist/esm/Divider/style/index.js +2 -0
  58. package/dist/esm/Divider.js +36 -0
  59. package/dist/esm/Drag/style/index.js +2 -0
  60. package/dist/esm/Drag.js +120 -0
  61. package/dist/esm/Elevator/style/index.js +2 -0
  62. package/dist/esm/Elevator.js +236 -0
  63. package/dist/esm/Ellipsis/style/index.js +2 -0
  64. package/dist/esm/Ellipsis.js +177 -0
  65. package/dist/esm/Empty/style/index.js +2 -0
  66. package/dist/esm/Empty.js +82 -0
  67. package/dist/esm/FixedNav/style/index.js +3 -0
  68. package/dist/esm/FixedNav.js +105 -0
  69. package/dist/esm/Form/style/index.js +2 -0
  70. package/dist/esm/Form.js +219 -0
  71. package/dist/esm/FormItem/style/index.js +2 -0
  72. package/dist/esm/FormItem.js +5 -0
  73. package/dist/esm/Grid/style/index.js +2 -0
  74. package/dist/esm/Grid.js +83 -0
  75. package/dist/esm/GridItem/style/index.js +2 -0
  76. package/dist/esm/GridItem.js +125 -0
  77. package/dist/esm/Icon/style/index.js +4 -0
  78. package/dist/esm/Icon.js +5 -0
  79. package/dist/esm/Image/style/index.js +2 -0
  80. package/dist/esm/Image.js +170 -0
  81. package/dist/esm/ImagePreview/style/index.js +4 -0
  82. package/dist/esm/ImagePreview.js +226 -0
  83. package/dist/esm/Indicator/style/index.js +2 -0
  84. package/dist/esm/Indicator.js +52 -0
  85. package/dist/esm/Infiniteloading/style/index.js +2 -0
  86. package/dist/esm/Infiniteloading.js +217 -0
  87. package/dist/esm/Input/style/index.js +2 -0
  88. package/dist/esm/Input.js +363 -0
  89. package/dist/esm/InputNumber/style/index.js +2 -0
  90. package/dist/esm/InputNumber.js +277 -0
  91. package/dist/esm/Layout/style/index.js +2 -0
  92. package/dist/esm/Layout.js +14 -0
  93. package/dist/esm/Menu/style/index.js +3 -0
  94. package/dist/esm/Menu.js +154 -0
  95. package/dist/esm/MenuItem/style/index.js +3 -0
  96. package/dist/esm/MenuItem.js +177 -0
  97. package/dist/esm/NavBar/style/index.js +2 -0
  98. package/dist/esm/NavBar.js +116 -0
  99. package/dist/esm/NoticeBar/style/index.js +2 -0
  100. package/dist/esm/NoticeBar.js +570 -0
  101. package/dist/esm/Notify/style/index.js +2 -0
  102. package/dist/esm/Notify.js +236 -0
  103. package/dist/esm/NumberKeyboard/style/index.js +2 -0
  104. package/dist/esm/NumberKeyboard.js +249 -0
  105. package/dist/esm/Overlay/style/index.js +2 -0
  106. package/dist/esm/Overlay.js +6 -0
  107. package/dist/esm/Pagination/style/index.js +2 -0
  108. package/dist/esm/Pagination.js +170 -0
  109. package/dist/esm/Picker/style/index.js +2 -0
  110. package/dist/esm/Picker.js +496 -0
  111. package/dist/esm/Popover/style/index.js +3 -0
  112. package/dist/esm/Popover.js +225 -0
  113. package/dist/esm/Popup/style/index.js +3 -0
  114. package/dist/esm/Popup.js +195 -0
  115. package/dist/esm/Price/style/index.js +2 -0
  116. package/dist/esm/Price.js +86 -0
  117. package/dist/esm/Progress/style/index.js +2 -0
  118. package/dist/esm/Progress.js +124 -0
  119. package/dist/esm/PullToRefresh/style/index.js +2 -0
  120. package/dist/esm/PullToRefresh.js +277 -0
  121. package/dist/esm/Radio/style/index.js +3 -0
  122. package/dist/esm/Radio.js +6 -0
  123. package/dist/esm/RadioGroup/style/index.js +2 -0
  124. package/dist/esm/RadioGroup.js +123 -0
  125. package/dist/esm/Range/style/index.js +2 -0
  126. package/dist/esm/Range.js +407 -0
  127. package/dist/esm/Rate/style/index.js +2 -0
  128. package/dist/esm/Rate.js +123 -0
  129. package/dist/esm/Row/style/index.js +2 -0
  130. package/dist/esm/Row.js +50 -0
  131. package/dist/esm/SearchBar/style/index.js +2 -0
  132. package/dist/esm/SearchBar.js +237 -0
  133. package/dist/esm/ShortPassword/style/index.js +3 -0
  134. package/dist/esm/ShortPassword.js +193 -0
  135. package/dist/esm/SideNavBar/style/index.js +2 -0
  136. package/dist/esm/SideNavBar.js +58 -0
  137. package/dist/esm/SideNavBarItem/style/index.js +2 -0
  138. package/dist/esm/SideNavBarItem.js +25 -0
  139. package/dist/esm/Signature/style/index.js +2 -0
  140. package/dist/esm/Signature.js +155 -0
  141. package/dist/esm/Skeleton/style/index.js +2 -0
  142. package/dist/esm/Skeleton.js +100 -0
  143. package/dist/esm/Step/style/index.js +2 -0
  144. package/dist/esm/Step.js +89 -0
  145. package/dist/esm/Steps/style/index.js +2 -0
  146. package/dist/esm/Steps.js +40 -0
  147. package/dist/esm/Sticky/style/index.js +2 -0
  148. package/dist/esm/Sticky.js +192 -0
  149. package/dist/esm/SubSideNavBar/style/index.js +2 -0
  150. package/dist/esm/SubSideNavBar.js +79 -0
  151. package/dist/esm/Swipe/style/index.js +2 -0
  152. package/dist/esm/Swipe.js +232 -0
  153. package/dist/esm/Swiper/style/index.js +2 -0
  154. package/dist/esm/Swiper.js +492 -0
  155. package/dist/esm/SwiperItem/style/index.js +2 -0
  156. package/dist/esm/SwiperItem.js +38 -0
  157. package/dist/esm/Switch/style/index.js +2 -0
  158. package/dist/esm/Switch.js +73 -0
  159. package/dist/esm/TabPane/style/index.js +2 -0
  160. package/dist/esm/TabPane.js +6 -0
  161. package/dist/esm/Tabbar/style/index.js +2 -0
  162. package/dist/esm/Tabbar.js +70 -0
  163. package/dist/esm/TabbarItem/style/index.js +2 -0
  164. package/dist/esm/TabbarItem.js +80 -0
  165. package/dist/esm/Table/style/index.js +2 -0
  166. package/dist/esm/Table.js +142 -0
  167. package/dist/esm/Tabs/style/index.js +4 -0
  168. package/dist/esm/Tabs.js +9 -0
  169. package/dist/esm/Tag/style/index.js +2 -0
  170. package/dist/esm/Tag.js +111 -0
  171. package/dist/esm/TextArea/style/index.js +2 -0
  172. package/dist/esm/TextArea.js +150 -0
  173. package/dist/esm/TimeDetail/style/index.js +2 -0
  174. package/dist/esm/TimeDetail.js +69 -0
  175. package/dist/esm/TimePannel/style/index.js +2 -0
  176. package/dist/esm/TimePannel.js +31 -0
  177. package/dist/esm/TimeSelect/style/index.js +4 -0
  178. package/dist/esm/TimeSelect.js +173 -0
  179. package/dist/esm/Toast/style/index.js +2 -0
  180. package/dist/esm/Toast.js +271 -0
  181. package/dist/esm/TrendArrow/style/index.js +2 -0
  182. package/dist/esm/TrendArrow.js +101 -0
  183. package/dist/esm/Uploader/style/index.js +4 -0
  184. package/dist/esm/Uploader.js +568 -0
  185. package/dist/esm/UserContext-101ad4a4.js +3 -0
  186. package/dist/esm/UserContext-2629d479.js +3 -0
  187. package/dist/esm/UserContext-b33bcf21.js +3 -0
  188. package/dist/esm/Video/style/index.js +2 -0
  189. package/dist/esm/Video.js +92 -0
  190. package/dist/esm/VirtualList/style/index.js +2 -0
  191. package/dist/esm/VirtualList.js +315 -0
  192. package/dist/esm/WaterMark/style/index.js +2 -0
  193. package/dist/esm/WaterMark.js +113 -0
  194. package/dist/esm/bem-3b438e61.js +8 -0
  195. package/dist/esm/cellgroup-fcc72767.js +34 -0
  196. package/dist/esm/checkbox-44e13cd0.js +137 -0
  197. package/dist/esm/date-c7aad4c0.js +97 -0
  198. package/dist/esm/formitem-8a73a5fb.js +157 -0
  199. package/dist/esm/get-scroll-parent-5f85dee8.js +24 -0
  200. package/dist/esm/grid.context-2ee27d95.js +6 -0
  201. package/dist/esm/icon-4ef1581c.js +70 -0
  202. package/dist/esm/index-030b7245.js +11 -0
  203. package/dist/esm/nutui-react.es.js +94 -0
  204. package/dist/esm/offsetContext-3ab00d40.js +16 -0
  205. package/dist/esm/overlay-de6c79d5.js +83 -0
  206. package/dist/esm/radio-9f141e6b.js +118 -0
  207. package/dist/esm/render-bbebb760.js +79 -0
  208. package/dist/esm/tabpane-01075e6c.js +29 -0
  209. package/dist/esm/tabs-e1b4e4b1.js +181 -0
  210. package/dist/esm/typings-f27b58f4.js +8 -0
  211. package/dist/esm/useClientRect-56bb675b.js +39 -0
  212. package/dist/esm/useTouch-cf73a407.js +99 -0
  213. package/dist/locales/base.d.ts +129 -0
  214. package/dist/locales/base.js +5 -0
  215. package/dist/locales/en-US.d.ts +3 -0
  216. package/dist/locales/en-US.js +135 -0
  217. package/dist/locales/id-ID.d.ts +3 -0
  218. package/dist/locales/id-ID.js +135 -0
  219. package/dist/locales/zh-CN.d.ts +3 -0
  220. package/dist/locales/zh-CN.js +137 -0
  221. package/dist/locales/zh-TW.d.ts +3 -0
  222. package/dist/locales/zh-TW.js +135 -0
  223. package/dist/locales/zh-UG.d.ts +3 -0
  224. package/dist/locales/zh-UG.js +135 -0
  225. package/dist/nutui.react.mjs +2 -2
  226. package/dist/nutui.react.umd.js +2 -2
  227. package/dist/packages/actionsheet/actionsheet.scss +103 -0
  228. package/dist/packages/address/address.scss +243 -0
  229. package/dist/packages/animate/animate.scss +284 -0
  230. package/dist/packages/animatingnumbers/animatingnumbers.scss +0 -0
  231. package/dist/packages/animatingnumbers/countup.scss +45 -0
  232. package/dist/packages/audio/audio.scss +93 -0
  233. package/dist/packages/avatar/avatar.scss +58 -0
  234. package/dist/packages/avatargroup/avatargroup.scss +14 -0
  235. package/dist/packages/backtop/backtop.scss +29 -0
  236. package/dist/packages/badge/badge.scss +53 -0
  237. package/dist/packages/barrage/barrage.scss +60 -0
  238. package/dist/packages/button/button.scss +245 -0
  239. package/dist/packages/calendar/calendar.scss +265 -0
  240. package/dist/packages/calendaritem/calendaritem.scss +0 -0
  241. package/dist/packages/card/card.scss +83 -0
  242. package/dist/packages/cascader/cascader.scss +108 -0
  243. package/dist/packages/cell/cell.scss +107 -0
  244. package/dist/packages/cellgroup/cellgroup.scss +46 -0
  245. package/dist/packages/checkbox/checkbox.scss +49 -0
  246. package/dist/packages/checkboxgroup/checkboxgroup.scss +33 -0
  247. package/dist/packages/circleprogress/circleprogress.scss +33 -0
  248. package/dist/packages/col/col.scss +24 -0
  249. package/dist/packages/collapse/collapse.scss +0 -0
  250. package/dist/packages/collapseitem/collapseitem.scss +161 -0
  251. package/dist/packages/configprovider/configprovider.scss +0 -0
  252. package/dist/packages/countdown/countdown.scss +3 -0
  253. package/dist/packages/datepicker/datepicker.scss +0 -0
  254. package/dist/packages/dialog/dialog.scss +135 -0
  255. package/dist/packages/divider/divider.scss +73 -0
  256. package/dist/packages/drag/drag.scss +10 -0
  257. package/dist/packages/elevator/elevator.scss +124 -0
  258. package/dist/packages/ellipsis/ellipsis.scss +17 -0
  259. package/dist/packages/empty/empty.scss +42 -0
  260. package/dist/packages/fixednav/fixednav.scss +141 -0
  261. package/dist/packages/form/form.scss +31 -0
  262. package/dist/packages/formitem/formitem.scss +100 -0
  263. package/dist/packages/grid/grid.scss +10 -0
  264. package/dist/packages/griditem/griditem.scss +108 -0
  265. package/dist/packages/icon/icon.scss +132 -0
  266. package/dist/packages/image/image.scss +53 -0
  267. package/dist/packages/imagepreview/imagepreview.scss +51 -0
  268. package/dist/packages/indicator/indicator.scss +70 -0
  269. package/dist/packages/infiniteloading/infiniteloading.scss +69 -0
  270. package/dist/packages/input/input.scss +203 -0
  271. package/dist/packages/inputnumber/inputnumber.scss +79 -0
  272. package/dist/packages/layout/layout.scss +2 -0
  273. package/dist/packages/menu/menu.scss +75 -0
  274. package/dist/packages/menuitem/menuitem.scss +120 -0
  275. package/dist/packages/navbar/navbar.scss +185 -0
  276. package/dist/packages/noticebar/noticebar.scss +156 -0
  277. package/dist/packages/notify/notify.scss +93 -0
  278. package/dist/packages/numberkeyboard/numberkeyboard.scss +147 -0
  279. package/dist/packages/overlay/overlay.scss +75 -0
  280. package/dist/packages/pagination/pagination.scss +81 -0
  281. package/dist/packages/picker/picker.scss +225 -0
  282. package/dist/packages/popover/popover.scss +288 -0
  283. package/dist/packages/popup/popup.scss +201 -0
  284. package/dist/packages/price/price.scss +37 -0
  285. package/dist/packages/progress/progress.scss +114 -0
  286. package/dist/packages/pulltorefresh/pulltorefresh.scss +26 -0
  287. package/dist/packages/radio/radio.scss +84 -0
  288. package/dist/packages/radiogroup/radiogroup.scss +86 -0
  289. package/dist/packages/range/range.scss +224 -0
  290. package/dist/packages/rate/rate.scss +36 -0
  291. package/dist/packages/row/row.scss +83 -0
  292. package/dist/packages/searchbar/searchbar.scss +146 -0
  293. package/dist/packages/shortpassword/shortpassword.scss +203 -0
  294. package/dist/packages/sidenavbar/sidenavbar.scss +100 -0
  295. package/dist/packages/sidenavbaritem/sidenavbaritem.scss +25 -0
  296. package/dist/packages/signature/signature.scss +39 -0
  297. package/dist/packages/skeleton/skeleton.scss +70 -0
  298. package/dist/packages/step/step.scss +274 -0
  299. package/dist/packages/steps/steps.scss +7 -0
  300. package/dist/packages/sticky/sticky.scss +3 -0
  301. package/dist/packages/subsidenavbar/subsidenavbar.scss +35 -0
  302. package/dist/packages/swipe/swipe.scss +33 -0
  303. package/dist/packages/swiper/swiper.scss +45 -0
  304. package/dist/packages/swiperitem/swiperitem.scss +3 -0
  305. package/dist/packages/switch/switch.scss +87 -0
  306. package/dist/packages/tabbar/tabbar.scss +46 -0
  307. package/dist/packages/tabbaritem/tabbaritem.scss +97 -0
  308. package/dist/packages/table/table.scss +152 -0
  309. package/dist/packages/tabpane/tabpane.scss +23 -0
  310. package/dist/packages/tabs/tabs.scss +284 -0
  311. package/dist/packages/tag/tag.scss +67 -0
  312. package/dist/packages/textarea/textarea.scss +60 -0
  313. package/dist/packages/timedetail/timedetail.scss +45 -0
  314. package/dist/packages/timepannel/timepannel.scss +17 -0
  315. package/dist/packages/timeselect/timeselect.scss +73 -0
  316. package/dist/packages/toast/toast.scss +98 -0
  317. package/dist/packages/trendarrow/trendarrow.scss +17 -0
  318. package/dist/packages/uploader/uploader.scss +237 -0
  319. package/dist/packages/video/video.scss +18 -0
  320. package/dist/packages/virtuallist/virtuallist.scss +87 -0
  321. package/dist/packages/watermark/watermark.scss +13 -0
  322. package/dist/style.css +1 -0
  323. package/dist/style.mjs +9 -0
  324. package/dist/styles/animation/drop.scss +24 -0
  325. package/dist/styles/animation/ease.scss +23 -0
  326. package/dist/styles/animation/fade.scss +20 -0
  327. package/dist/styles/animation/icon.scss +245 -0
  328. package/dist/styles/animation/index.scss +7 -0
  329. package/dist/styles/animation/rotate.scss +10 -0
  330. package/dist/styles/animation/zoom.scss +26 -0
  331. package/dist/styles/font/config.json +175 -0
  332. package/dist/styles/font/demo.css +539 -0
  333. package/dist/styles/font/demo_index.html +3063 -0
  334. package/dist/styles/font/iconfont.css +515 -0
  335. package/dist/styles/font/iconfont.eot +0 -0
  336. package/dist/styles/font/iconfont.js +68 -0
  337. package/dist/styles/font/iconfont.json +884 -0
  338. package/dist/styles/font/iconfont.svg +356 -0
  339. package/dist/styles/font/iconfont.ttf +0 -0
  340. package/dist/styles/font/iconfont.woff +0 -0
  341. package/dist/styles/font/iconfont.woff2 +0 -0
  342. package/dist/styles/mixins/index.scss +2 -0
  343. package/dist/styles/mixins/make-animation.scss +24 -0
  344. package/dist/styles/mixins/text-ellipsis.scss +20 -0
  345. package/dist/styles/theme-dark.scss +26 -0
  346. package/dist/styles/theme-default.scss +40 -0
  347. package/dist/styles/themes/default.scss +97 -0
  348. package/dist/styles/variables.scss +2610 -0
  349. package/dist/types/index.d.ts +2201 -0
  350. package/package.json +1 -1
@@ -0,0 +1,236 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
+ import * as React from 'react';
13
+ import * as ReactDOM from 'react-dom';
14
+ import classNames from 'classnames';
15
+ import { CSSTransition } from 'react-transition-group';
16
+ import { c as cn } from './bem-3b438e61.js';
17
+ import { r as render } from './render-bbebb760.js';
18
+ import '@bem-react/classname';
19
+ var Notification = /*#__PURE__*/function (_React$PureComponent) {
20
+ _inherits(Notification, _React$PureComponent);
21
+ var _super = _createSuper(Notification);
22
+ function Notification(props) {
23
+ var _this;
24
+ _classCallCheck(this, Notification);
25
+ _this = _super.call(this, props);
26
+ _defineProperty(_assertThisInitialized(_this), "closeTimer", void 0);
27
+ _this.close = _this.close.bind(_assertThisInitialized(_this));
28
+ _this.startCloseTimer = _this.startCloseTimer.bind(_assertThisInitialized(_this));
29
+ _this.clearCloseTimer = _this.clearCloseTimer.bind(_assertThisInitialized(_this));
30
+ _this.clickCover = _this.clickCover.bind(_assertThisInitialized(_this));
31
+ _this.state = {
32
+ show: true
33
+ };
34
+ return _this;
35
+ }
36
+ _createClass(Notification, [{
37
+ key: "close",
38
+ value: function close() {
39
+ this.setState({
40
+ show: false
41
+ });
42
+ this.clearCloseTimer();
43
+ if (this.props.id) {
44
+ var element = document.getElementById(this.props.id);
45
+ element && element.parentNode && element.parentNode.removeChild(element);
46
+ }
47
+ this.props.onClosed();
48
+ }
49
+ }, {
50
+ key: "startCloseTimer",
51
+ value: function startCloseTimer() {
52
+ var _this2 = this;
53
+ var duration = this.props.duration;
54
+ if (duration) {
55
+ this.closeTimer = window.setTimeout(function () {
56
+ _this2.close();
57
+ }, duration);
58
+ }
59
+ }
60
+ }, {
61
+ key: "clearCloseTimer",
62
+ value: function clearCloseTimer() {
63
+ if (this.closeTimer) {
64
+ clearTimeout(this.closeTimer);
65
+ this.closeTimer = -1;
66
+ }
67
+ }
68
+ }, {
69
+ key: "clickCover",
70
+ value: function clickCover() {
71
+ this.props.onClick();
72
+ }
73
+ }, {
74
+ key: "componentDidMount",
75
+ value: function componentDidMount() {
76
+ this.startCloseTimer();
77
+ }
78
+ }, {
79
+ key: "componentWillUnmount",
80
+ value: function componentWillUnmount() {
81
+ this.clearCloseTimer();
82
+ }
83
+ }, {
84
+ key: "render",
85
+ value: function render() {
86
+ var _this$props = this.props,
87
+ children = _this$props.children,
88
+ style = _this$props.style,
89
+ msg = _this$props.msg,
90
+ color = _this$props.color,
91
+ background = _this$props.background,
92
+ type = _this$props.type,
93
+ className = _this$props.className,
94
+ position = _this$props.position,
95
+ isWrapTeleport = _this$props.isWrapTeleport;
96
+ this.state;
97
+ cn('notify');
98
+ var classes = classNames(_defineProperty({
99
+ 'nut-notify--popup-top': position === 'top',
100
+ 'nut-notify--popup-bottom': position === 'bottom',
101
+ 'nut-notify': true
102
+ }, "nut-notify--".concat(type), true));
103
+ return React.createElement(React.Fragment, null, React.createElement(CSSTransition, {
104
+ "in": this.state.show,
105
+ timeout: 300,
106
+ classNames: "fade",
107
+ unmountOnExit: true,
108
+ appear: true,
109
+ position: position,
110
+ isWrapTeleport: isWrapTeleport
111
+ }, React.createElement("div", {
112
+ className: "".concat(classes, " ").concat(className),
113
+ style: {
114
+ color: "".concat(color || ''),
115
+ background: "".concat(background || '')
116
+ },
117
+ onClick: this.clickCover
118
+ }, children || msg)));
119
+ }
120
+ }]);
121
+ return Notification;
122
+ }(React.PureComponent);
123
+ _defineProperty(Notification, "newInstance", void 0);
124
+ Notification.newInstance = function (properties, callback) {
125
+ var element = document.createElement('div');
126
+ var id = properties.id ? properties.id : "".concat(new Date().getTime());
127
+ element.id = id;
128
+ properties.id = id;
129
+ document.body.appendChild(element);
130
+ var called = false;
131
+ function ref(instance) {
132
+ if (called) {
133
+ return;
134
+ }
135
+ called = true;
136
+ callback({
137
+ component: instance,
138
+ destroy: function destroy() {
139
+ setTimeout(function () {
140
+ ReactDOM.unmountComponentAtNode(element);
141
+ element && element.parentNode && element.parentNode.removeChild(element);
142
+ }, 300);
143
+ }
144
+ });
145
+ }
146
+ render(React.createElement(Notification, _objectSpread(_objectSpread({}, properties), {}, {
147
+ ref: ref
148
+ })), element);
149
+ };
150
+ var messageInstance = null;
151
+ var options = {
152
+ msg: '',
153
+ id: '',
154
+ duration: 3000,
155
+ color: '',
156
+ type: 'danger',
157
+ className: '',
158
+ position: 'top',
159
+ onClosed: function onClosed() {},
160
+ onClick: function onClick() {}
161
+ };
162
+ function getInstance(props, callback) {
163
+ if (messageInstance) {
164
+ messageInstance.destroy();
165
+ messageInstance = null;
166
+ }
167
+ Notification.newInstance(props, function (notification) {
168
+ return callback && callback(notification);
169
+ });
170
+ }
171
+ function notice(opts) {
172
+ // function close() {
173
+ // if (messageInstance) {
174
+ // messageInstance.destroy()
175
+ // messageInstance = null
176
+ // }
177
+ // }
178
+ opts = _objectSpread(_objectSpread({}, options), opts);
179
+ getInstance(opts, function (notification) {
180
+ messageInstance = notification;
181
+ });
182
+ }
183
+ var errorMsg = function errorMsg(msg) {
184
+ if (!msg) {
185
+ console.warn('[NutUI Notify]: msg不能为空');
186
+ }
187
+ };
188
+ var Notify = {
189
+ text: function text(msg) {
190
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
191
+ errorMsg(msg);
192
+ return notice(_objectSpread({
193
+ msg: msg,
194
+ type: 'base'
195
+ }, option));
196
+ },
197
+ success: function success(msg) {
198
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
199
+ errorMsg(msg);
200
+ return notice(_objectSpread({
201
+ msg: msg,
202
+ type: 'success'
203
+ }, option));
204
+ },
205
+ primary: function primary(msg) {
206
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
207
+ errorMsg(msg);
208
+ return notice(_objectSpread({
209
+ msg: msg,
210
+ type: 'primary'
211
+ }, option));
212
+ },
213
+ danger: function danger(msg) {
214
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
215
+ errorMsg(msg);
216
+ return notice(_objectSpread({
217
+ msg: msg,
218
+ type: 'danger'
219
+ }, option));
220
+ },
221
+ warn: function warn(msg) {
222
+ var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
223
+ errorMsg(msg);
224
+ return notice(_objectSpread({
225
+ msg: msg,
226
+ type: 'warning'
227
+ }, option));
228
+ },
229
+ hide: function hide() {
230
+ if (messageInstance) {
231
+ messageInstance.destroy();
232
+ messageInstance = null;
233
+ }
234
+ }
235
+ };
236
+ export { Notify as default };
@@ -0,0 +1,2 @@
1
+ import '../../Popup/style'
2
+ import '../../../packages/numberkeyboard/numberkeyboard.scss'
@@ -0,0 +1,249 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ import React__default, { useState, useEffect } from 'react';
7
+ import classNames from 'classnames';
8
+ import { c as cn } from './bem-3b438e61.js';
9
+ import Popup from './Popup.js';
10
+ import { useConfig } from './ConfigProvider.js';
11
+ import '@bem-react/classname';
12
+ var defaultProps = {
13
+ confirmText: '',
14
+ title: '',
15
+ visible: false,
16
+ overlay: true,
17
+ type: 'default',
18
+ customKey: [],
19
+ className: '',
20
+ randomKeys: false,
21
+ popClass: '',
22
+ onClose: function onClose() {}
23
+ };
24
+ var NumberKeyboard = function NumberKeyboard(props) {
25
+ var _useConfig = useConfig(),
26
+ locale = _useConfig.locale;
27
+ var title = props.title,
28
+ confirmText = props.confirmText,
29
+ visible = props.visible,
30
+ overlay = props.overlay,
31
+ type = props.type,
32
+ customKey = props.customKey,
33
+ randomKeys = props.randomKeys,
34
+ popClass = props.popClass,
35
+ style = props.style,
36
+ className = props.className,
37
+ onChange = props.onChange,
38
+ onDelete = props.onDelete,
39
+ onClose = props.onClose;
40
+ var b = cn('numberkeyboard');
41
+ var _useState = useState(visible),
42
+ _useState2 = _slicedToArray(_useState, 2),
43
+ show = _useState2[0],
44
+ setShow = _useState2[1];
45
+ var _useState3 = useState(undefined),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ clickKeyIndex = _useState4[0],
48
+ setClickKeyIndex = _useState4[1];
49
+ var _useState5 = useState([]),
50
+ _useState6 = _slicedToArray(_useState5, 2),
51
+ keysList = _useState6[0],
52
+ setKeysList = _useState6[1];
53
+ useEffect(function () {
54
+ setShow(visible);
55
+ }, [visible]);
56
+ var defaultKey = function defaultKey() {
57
+ var leftBottomKey = {
58
+ id: 'lock',
59
+ type: 'lock'
60
+ };
61
+ if (customKey) {
62
+ var customKeys = Array.isArray(customKey) ? customKey : [customKey];
63
+ if (customKeys.length > 0) {
64
+ var newCustomKey = customKeys[0];
65
+ leftBottomKey = {
66
+ id: newCustomKey,
67
+ type: 'custom'
68
+ };
69
+ }
70
+ }
71
+ return [].concat(_toConsumableArray(getBasicKeys()), [leftBottomKey, {
72
+ id: 0,
73
+ type: 'number'
74
+ }, {
75
+ id: 'delete',
76
+ type: 'delete'
77
+ }]);
78
+ };
79
+ var getBasicKeys = function getBasicKeys() {
80
+ var keys = [];
81
+ for (var i = 1; i <= 9; i++) {
82
+ keys.push({
83
+ id: i,
84
+ type: 'number'
85
+ });
86
+ }
87
+ if (randomKeys) {
88
+ return keys.sort(function () {
89
+ return Math.random() > 0.5 ? 1 : -1;
90
+ });
91
+ }
92
+ return keys;
93
+ };
94
+ var genCustomKeys = function genCustomKeys() {
95
+ var keys = getBasicKeys();
96
+ if (!customKey) return [];
97
+ var customKeys = Array.isArray(customKey) ? customKey : [customKey];
98
+ if (customKeys.length > 2) {
99
+ customKeys = [customKeys[0], customKeys[1]];
100
+ }
101
+ if (customKeys.length === 2 && props.title && props.type !== 'rightColumn') {
102
+ customKeys = [customKeys[0]];
103
+ }
104
+ if (customKeys.length === 1) {
105
+ if (props.title && props.type !== 'rightColumn') {
106
+ keys.push({
107
+ id: customKeys[0],
108
+ type: 'custom'
109
+ }, {
110
+ id: 0,
111
+ type: 'number'
112
+ }, {
113
+ id: 'delete',
114
+ type: 'delete'
115
+ });
116
+ } else {
117
+ keys.push({
118
+ id: 0,
119
+ type: 'number'
120
+ }, {
121
+ id: customKeys[0],
122
+ type: 'custom'
123
+ });
124
+ }
125
+ } else if (customKeys.length === 2) {
126
+ keys.push({
127
+ id: customKeys[0],
128
+ type: 'custom'
129
+ }, {
130
+ id: 0,
131
+ type: 'number'
132
+ }, {
133
+ id: customKeys[1],
134
+ type: 'custom'
135
+ });
136
+ }
137
+ return keys;
138
+ };
139
+ useEffect(function () {
140
+ if (props.type === 'rightColumn' || props.title !== '') {
141
+ setKeysList(genCustomKeys());
142
+ } else {
143
+ setKeysList(defaultKey());
144
+ }
145
+ }, []);
146
+ var onTouchstart = function onTouchstart(item, event) {
147
+ event.stopPropagation();
148
+ setClickKeyIndex(item.id);
149
+ if (item.type === 'number' || item.type === 'custom') {
150
+ onChange && onChange(item.id);
151
+ }
152
+ if (item.type === 'lock') {
153
+ onClose && onClose();
154
+ }
155
+ if (item.type === 'delete') {
156
+ onDelete && onDelete();
157
+ }
158
+ };
159
+ var onTouchMove = function onTouchMove(event) {
160
+ event.stopPropagation();
161
+ };
162
+ var onTouchEnd = function onTouchEnd(event) {
163
+ event.preventDefault();
164
+ setClickKeyIndex(undefined);
165
+ };
166
+ return React__default.createElement("div", null, React__default.createElement(Popup, {
167
+ visible: show,
168
+ position: "bottom",
169
+ popClass: popClass,
170
+ onClickOverlay: onClose,
171
+ overlay: overlay,
172
+ onClickCloseIcon: onClose,
173
+ overlayStyle: {
174
+ backgroundColor: 'rgba(0, 0, 0, 0)'
175
+ }
176
+ }, React__default.createElement("div", {
177
+ className: "".concat(b(), " ").concat(className),
178
+ style: _objectSpread({}, style)
179
+ }, title ? React__default.createElement("div", {
180
+ className: b('header')
181
+ }, React__default.createElement("h3", {
182
+ className: b('header__tit')
183
+ }, title), type === 'default' ? React__default.createElement("span", {
184
+ className: b('header__close'),
185
+ onClick: onClose
186
+ }, locale.done) : null) : null, React__default.createElement("div", {
187
+ className: b('body')
188
+ }, React__default.createElement("div", {
189
+ className: b('body__keys')
190
+ }, keysList === null || keysList === void 0 ? void 0 : keysList.map(function (item, index) {
191
+ return React__default.createElement("div", {
192
+ key: index,
193
+ className: classNames({
194
+ 'key-board-wrapper': true,
195
+ 'key-board-wrapper-large': item.id === 0 && type === 'rightColumn' && Array.isArray(customKey) && customKey.length === 1
196
+ })
197
+ }, React__default.createElement("div", {
198
+ className: classNames({
199
+ key: true,
200
+ active: item.id === clickKeyIndex,
201
+ lock: item.type === 'lock',
202
+ "delete": item.type === 'delete'
203
+ }),
204
+ onTouchStart: function onTouchStart(event) {
205
+ return onTouchstart(item, event);
206
+ },
207
+ onTouchMove: onTouchMove,
208
+ onTouchEnd: onTouchEnd
209
+ }, item.type === 'number' || item.type === 'custom' ? React__default.createElement("div", null, item.id) : null, item.type === 'lock' ? React__default.createElement("img", {
210
+ src: "https://img11.360buyimg.com/imagetools/jfs/t1/146371/38/8485/738/5f606425Eca239740/14f4b4f5f20d8a68.png",
211
+ alt: ""
212
+ }) : null, item.type === 'delete' ? React__default.createElement("img", {
213
+ src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png",
214
+ alt: ""
215
+ }) : null));
216
+ })), type === 'rightColumn' ? React__default.createElement("div", {
217
+ className: b('sidebar')
218
+ }, React__default.createElement("div", {
219
+ className: "key-board-wrapper"
220
+ }, React__default.createElement("div", {
221
+ className: classNames({
222
+ key: true,
223
+ active: clickKeyIndex === 'delete'
224
+ }),
225
+ onTouchStart: function onTouchStart(event) {
226
+ return onTouchstart({
227
+ id: 'delete',
228
+ type: 'delete'
229
+ }, event);
230
+ },
231
+ onTouchMove: onTouchMove,
232
+ onTouchEnd: onTouchEnd
233
+ }, React__default.createElement("img", {
234
+ src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png",
235
+ alt: ""
236
+ }))), React__default.createElement("div", {
237
+ className: "key-board-wrapper key-board-finish",
238
+ onClick: onClose
239
+ }, React__default.createElement("div", {
240
+ className: classNames({
241
+ key: true,
242
+ finish: true,
243
+ activeFinsh: clickKeyIndex === 'finish'
244
+ })
245
+ }, confirmText || locale.done))) : null))));
246
+ };
247
+ NumberKeyboard.defaultProps = defaultProps;
248
+ NumberKeyboard.displayName = 'NutNumberKeyboard';
249
+ export { NumberKeyboard as default };
@@ -0,0 +1,2 @@
1
+
2
+ import '../../../packages/overlay/overlay.scss'
@@ -0,0 +1,6 @@
1
+ import { O as Overlay } from './overlay-de6c79d5.js';
2
+ import 'react';
3
+ import 'classnames';
4
+ import './bem-3b438e61.js';
5
+ import '@bem-react/classname';
6
+ export { Overlay as default };
@@ -0,0 +1,2 @@
1
+
2
+ import '../../../packages/pagination/pagination.scss'
@@ -0,0 +1,170 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ var _excluded = ["modelValue", "mode", "prevText", "nextText", "pageCount", "totalItems", "itemsPerPage", "showPageSize", "onChange", "updatecurrent", "forceEllipses", "pageNodeRender", "defaultValue", "className"];
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
+ import React__default, { useState, useEffect } from 'react';
8
+ import { useConfig } from './ConfigProvider.js';
9
+ import { c as cn } from './bem-3b438e61.js';
10
+ import '@bem-react/classname';
11
+ var defaultProps = {
12
+ defaultValue: 1,
13
+ mode: 'multi',
14
+ prevText: '',
15
+ nextText: '',
16
+ pageCount: '',
17
+ totalItems: '0',
18
+ itemsPerPage: '10',
19
+ showPageSize: '5',
20
+ forceEllipses: false,
21
+ className: '',
22
+ pageNodeRender: function pageNodeRender(item) {
23
+ return item.text;
24
+ }
25
+ };
26
+ var Pagination = function Pagination(props) {
27
+ var _useConfig = useConfig(),
28
+ locale = _useConfig.locale;
29
+ _objectSpread(_objectSpread({}, defaultProps), props);
30
+ var modelValue = props.modelValue,
31
+ mode = props.mode,
32
+ prevText = props.prevText,
33
+ nextText = props.nextText,
34
+ pageCount = props.pageCount,
35
+ totalItems = props.totalItems,
36
+ itemsPerPage = props.itemsPerPage,
37
+ showPageSize = props.showPageSize,
38
+ onChange = props.onChange,
39
+ updatecurrent = props.updatecurrent,
40
+ forceEllipses = props.forceEllipses,
41
+ pageNodeRender = props.pageNodeRender,
42
+ defaultValue = props.defaultValue,
43
+ className = props.className,
44
+ rest = _objectWithoutProperties(props, _excluded);
45
+ var _useState = useState(1),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ currentPage = _useState2[0],
48
+ setCurrent = _useState2[1];
49
+ var _useState3 = useState([]),
50
+ _useState4 = _slicedToArray(_useState3, 2),
51
+ pages = _useState4[0],
52
+ setPages = _useState4[1];
53
+ var _useState5 = useState(Number(pageCount)),
54
+ _useState6 = _slicedToArray(_useState5, 2),
55
+ countRef = _useState6[0],
56
+ setCountRef = _useState6[1];
57
+ var paginationBem = cn('pagination');
58
+ // 计算页面的数量
59
+ var computedCountRef = function computedCountRef() {
60
+ var num = Number(pageCount) || Math.ceil(Number(totalItems) / Number(itemsPerPage));
61
+ return Number.isNaN(num) ? 1 : Math.max(1, num);
62
+ };
63
+ // 生成pages数组,用来遍历
64
+ var computedPages = function computedPages(_currentPage, _countRef) {
65
+ if (mode === 'simple') return [];
66
+ var items = [];
67
+ var pageCount = _countRef || countRef; // 总的页面数量
68
+ var pageSize = Number(showPageSize); // 展示的页面个数
69
+ var _current = _currentPage || Number(currentPage); // 当前页
70
+ var startPage = 1;
71
+ var endPage = pageCount;
72
+ var partialShow = pageCount > pageSize;
73
+ if (partialShow) {
74
+ // 选中的page在展示的page中间
75
+ startPage = Math.max(_current - Math.floor(pageSize / 2), 1);
76
+ endPage = startPage + pageSize - 1;
77
+ if (endPage > pageCount) {
78
+ endPage = pageCount;
79
+ startPage = endPage - pageSize + 1;
80
+ }
81
+ }
82
+ // 遍历生成数组
83
+ for (var i = startPage; i <= endPage; i++) {
84
+ var page = setPage(i, i, _current === i);
85
+ items.push(page);
86
+ }
87
+ // 判断是否有折叠
88
+ if (partialShow && pageSize > 0 && forceEllipses) {
89
+ if (startPage > 1) {
90
+ var prevPage = setPage(startPage - 1, '...');
91
+ items.unshift(prevPage);
92
+ }
93
+ if (endPage < pageCount) {
94
+ var nextPage = setPage(endPage + 1, '...');
95
+ items.push(nextPage);
96
+ }
97
+ }
98
+ return items;
99
+ };
100
+ // 点击选择page
101
+ var selectPage = function selectPage(curPage, isSelect) {
102
+ if (curPage > countRef || curPage < 1) return;
103
+ // 是否传入modelValue
104
+ if (!('modelValue' in props)) {
105
+ setCurrent(Number(curPage));
106
+ if (curPage !== currentPage) {
107
+ setPages(computedPages(curPage));
108
+ }
109
+ }
110
+ if (curPage !== currentPage) {
111
+ updatecurrent && updatecurrent(curPage);
112
+ }
113
+ if (isSelect) onChange && onChange(curPage);
114
+ };
115
+ // set page 对象
116
+ var setPage = function setPage(number, text, active) {
117
+ return {
118
+ number: number,
119
+ text: text,
120
+ active: active
121
+ };
122
+ };
123
+ useEffect(function () {
124
+ // 初始化 判断是否传入值 计算 当前页,总页数,生成子节点
125
+ var currentValue = props.defaultValue || 1;
126
+ if ('modelValue' in props) {
127
+ currentValue = Number(props.modelValue);
128
+ }
129
+ var pageCount = computedCountRef();
130
+ setCountRef(pageCount);
131
+ setPages(computedPages(currentValue, pageCount));
132
+ }, []);
133
+ if ('modelValue' in props) {
134
+ var current = props.modelValue ? Number(props.modelValue) : 1;
135
+ if (current !== currentPage) {
136
+ setCurrent(current);
137
+ setPages(computedPages(Number(current)));
138
+ }
139
+ }
140
+ return React__default.createElement("div", _objectSpread({
141
+ className: "".concat(paginationBem(''), " ").concat(className)
142
+ }, rest), React__default.createElement("div", {
143
+ className: "".concat(paginationBem('prev'), " ").concat(mode === 'multi' ? '' : 'simple-border', " ").concat(currentPage === 1 ? 'disabled' : ''),
144
+ onClick: function onClick(e) {
145
+ return selectPage(Number(currentPage) - 1, true);
146
+ }
147
+ }, prevText || locale.pagination.prev), mode === 'multi' ? React__default.createElement("div", {
148
+ className: "".concat(paginationBem('contain'))
149
+ }, pages.map(function (item, index) {
150
+ return React__default.createElement("div", {
151
+ key: "".concat(index, "pagination"),
152
+ className: "".concat(paginationBem('item'), " ").concat(item.active ? 'active' : ''),
153
+ onClick: function onClick(e) {
154
+ return !item.active ? selectPage(item.number, true) : '';
155
+ }
156
+ }, pageNodeRender ? pageNodeRender(item) : item.text);
157
+ })) : '', mode === 'simple' ? React__default.createElement("div", {
158
+ className: "".concat(paginationBem('contain'))
159
+ }, React__default.createElement("div", {
160
+ className: "".concat(paginationBem('simple'))
161
+ }, currentPage, "/", countRef)) : '', React__default.createElement("div", {
162
+ className: "".concat(paginationBem('next'), " ").concat(Number(currentPage) >= countRef ? 'disabled' : ''),
163
+ onClick: function onClick(e) {
164
+ return selectPage(Number(currentPage) + 1, true);
165
+ }
166
+ }, nextText || locale.pagination.next));
167
+ };
168
+ Pagination.defaultProps = defaultProps;
169
+ Pagination.displayName = 'NutPagination';
170
+ export { Pagination as default };
@@ -0,0 +1,2 @@
1
+ import '../../Popup/style'
2
+ import '../../../packages/picker/picker.scss'