@nutui/nutui-react-taro 1.2.2-beta.0 → 1.3.0-beta.5

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 (283) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/esm/ActionSheet.js +5 -4
  3. package/dist/esm/Address.js +5 -4
  4. package/dist/esm/AnimatingNumbers.js +3 -2
  5. package/dist/esm/Avatar.js +3 -3
  6. package/dist/esm/AvatarGroup.js +2 -2
  7. package/dist/esm/BackTop.js +3 -3
  8. package/dist/esm/Badge.js +3 -3
  9. package/dist/esm/Barrage.js +3 -2
  10. package/dist/esm/Button.js +3 -3
  11. package/dist/esm/Calendar.js +5 -4
  12. package/dist/esm/CalendarItem.js +2 -2
  13. package/dist/esm/Card.js +3 -3
  14. package/dist/esm/Cell.js +3 -3
  15. package/dist/esm/Checkbox.js +3 -3
  16. package/dist/esm/CheckboxGroup.js +2 -2
  17. package/dist/esm/Col.js +2 -2
  18. package/dist/esm/Collapse.js +2 -2
  19. package/dist/esm/CollapseItem.js +3 -3
  20. package/dist/esm/DatePicker.js +7 -6
  21. package/dist/esm/Dialog.js +4 -4
  22. package/dist/esm/Divider.js +2 -2
  23. package/dist/esm/Drag.js +2 -2
  24. package/dist/esm/Elevator.js +3 -2
  25. package/dist/esm/Empty.js +2 -2
  26. package/dist/esm/FixedNav.js +3 -3
  27. package/dist/esm/Icon/style/index.js +1 -0
  28. package/dist/esm/Icon.js +2 -2
  29. package/dist/esm/Infiniteloading.js +3 -3
  30. package/dist/esm/Input.js +3 -3
  31. package/dist/esm/InputNumber.js +3 -3
  32. package/dist/esm/NavBar.js +4 -3
  33. package/dist/esm/NoticeBar.js +3 -3
  34. package/dist/esm/{Notification-b09c89e8.js → Notification-dccc7625.js} +18 -11
  35. package/dist/esm/Notify.js +2 -2
  36. package/dist/esm/NumberKeyboard.js +5 -4
  37. package/dist/esm/Picker.js +7 -6
  38. package/dist/esm/Popover.js +5 -4
  39. package/dist/esm/Popup.js +4 -3
  40. package/dist/esm/Progress.js +3 -3
  41. package/dist/esm/Radio.js +4 -4
  42. package/dist/esm/RadioGroup.js +2 -3
  43. package/dist/esm/Range.js +7 -7
  44. package/dist/esm/Rate.js +3 -3
  45. package/dist/esm/Row.js +2 -2
  46. package/dist/esm/SearchBar.js +3 -3
  47. package/dist/esm/ShortPassword.js +5 -4
  48. package/dist/esm/SideNavBar/style/index.js +2 -0
  49. package/dist/esm/SideNavBar.js +14 -0
  50. package/dist/esm/SideNavBarItem/style/index.js +2 -0
  51. package/dist/esm/SideNavBarItem.js +3 -0
  52. package/dist/esm/Signature.js +4 -4
  53. package/dist/esm/Skeleton.js +3 -3
  54. package/dist/esm/Step.js +3 -3
  55. package/dist/esm/SubSideNavBar/style/index.js +2 -0
  56. package/dist/esm/SubSideNavBar.js +4 -0
  57. package/dist/esm/Swiper.js +2 -2
  58. package/dist/esm/SwiperItem.js +2 -2
  59. package/dist/esm/TabPane.js +2 -2
  60. package/dist/esm/TabbarItem.js +3 -3
  61. package/dist/esm/Table/style/index.js +2 -0
  62. package/dist/esm/Table.js +9 -0
  63. package/dist/esm/Tabs.js +3 -3
  64. package/dist/esm/Tag.js +3 -3
  65. package/dist/esm/TextArea.js +2 -2
  66. package/dist/esm/TimeSelect.js +5 -4
  67. package/dist/esm/Toast.js +4 -4
  68. package/dist/esm/Uploader.js +3 -3
  69. package/dist/esm/{actionsheet.taro-4ae40ea0.js → actionsheet.taro-f4d407b0.js} +1 -1
  70. package/dist/esm/{address.taro-82a8fa11.js → address.taro-a1092e30.js} +78 -30
  71. package/dist/esm/{animatingnumbers.taro-cda438cc.js → animatingnumbers.taro-877baa98.js} +20 -15
  72. package/dist/esm/{avatar.taro-5dafffdc.js → avatar.taro-0a0472fd.js} +1 -2
  73. package/dist/esm/{avatargroup.taro-a39282b3.js → avatargroup-65173caa.js} +0 -0
  74. package/dist/esm/{backtop.taro-65dccd86.js → backtop.taro-0e2e3946.js} +8 -6
  75. package/dist/esm/{badge.taro-8c001377.js → badge.taro-eeac9de8.js} +5 -5
  76. package/dist/esm/{barrage.taro-f1139b9c.js → barrage.taro-efac8422.js} +42 -19
  77. package/dist/esm/{button.taro-90c8bb93.js → button-521a516b.js} +1 -1
  78. package/dist/esm/{button-9b1f3219.js → button.taro-d5968f9d.js} +1 -1
  79. package/dist/esm/{calendar.taro-d3a90861.js → calendar.taro-4b2103c1.js} +6 -2
  80. package/dist/esm/{calendaritem.taro-bbe4a226.js → calendaritem.taro-fe84d94b.js} +23 -71
  81. package/dist/esm/{card.taro-c4f88500.js → card.taro-0861c7b3.js} +2 -2
  82. package/dist/esm/{cell.taro-8080af48.js → cell.taro-3bb1b0f2.js} +1 -1
  83. package/dist/esm/{checkbox.taro-7267be92.js → checkbox.taro-6fbc4b3c.js} +55 -10
  84. package/dist/esm/{checkboxgroup.taro-bc16131f.js → checkboxgroup.taro-3d380042.js} +26 -4
  85. package/dist/esm/{col.taro-ff3af36f.js → col.taro-2a437387.js} +6 -2
  86. package/dist/esm/{collapse.taro-5fac953d.js → collapse.taro-72e58ba2.js} +1 -0
  87. package/dist/esm/{collapseitem.taro-179cf530.js → collapseitem-5556ec54.js} +14 -13
  88. package/dist/esm/{datepicker.taro-f7c8ef80.js → datepicker.taro-c1249537.js} +7 -5
  89. package/dist/esm/{dialog.taro-57f6fc2e.js → dialog.taro-5b850861.js} +1 -1
  90. package/dist/esm/{divider.taro-beaec14a.js → divider.taro-5236fe6a.js} +6 -3
  91. package/dist/esm/{drag.taro-7c0493f8.js → drag.taro-56e8c87a.js} +1 -1
  92. package/dist/esm/{elevator.taro-e37a3fbb.js → elevator.taro-15b0d8c2.js} +139 -39
  93. package/dist/esm/{empty.taro-c7ccac8a.js → empty.taro-6f86eda5.js} +2 -2
  94. package/dist/esm/{fixednav.taro-5b473df6.js → fixednav.taro-ca94fd6a.js} +3 -3
  95. package/dist/esm/{icon-62bd7379.js → icon-8dc4de10.js} +9 -9
  96. package/dist/esm/{icon.taro-bf130544.js → icon.taro-1d0d4fb7.js} +11 -9
  97. package/dist/esm/{infiniteloading.taro-abf15a17.js → infiniteloading.taro-d2c0ca14.js} +1 -1
  98. package/dist/esm/input.taro-2e31ebbb.js +392 -0
  99. package/dist/esm/{inputnumber.taro-4ec2bfb6.js → inputnumber.taro-75662231.js} +17 -18
  100. package/dist/esm/navbar.taro-f2eae6a6.js +123 -0
  101. package/dist/esm/{noticebar.taro-70193e5e.js → noticebar.taro-ae593896.js} +74 -41
  102. package/dist/esm/{notify.taro-837a878b.js → notify.taro-95b5f97e.js} +19 -4
  103. package/dist/esm/{numberkeyboard.taro-a80cec74.js → numberkeyboard.taro-71b2e0eb.js} +1 -1
  104. package/dist/esm/nutui-react.es.js +69 -65
  105. package/dist/esm/offsetContext-0e3d04b3.js +19 -0
  106. package/dist/esm/{picker.taro-c05b1930.js → picker.taro-0eb8bfa3.js} +7 -5
  107. package/dist/esm/{pickerSlot-c8f5343e.js → pickerSlot-f8e4e542.js} +9 -6
  108. package/dist/esm/{popover.taro-3b06163e.js → popover.taro-4c102df6.js} +142 -105
  109. package/dist/esm/{popup-15922d84.js → popup-67173ec6.js} +55 -31
  110. package/dist/esm/{popup.taro-897e35fd.js → popup.taro-a89dd3a1.js} +55 -31
  111. package/dist/esm/{progress.taro-51bcdd4f.js → progress.taro-dd93ac38.js} +1 -1
  112. package/dist/esm/radio.taro-32cb0172.js +129 -0
  113. package/dist/esm/{radiogroup.taro-f2401b7a.js → radiogroup-e698d3df.js} +5 -2
  114. package/dist/esm/{range.taro-41ced357.js → range.taro-034fcf7a.js} +188 -20
  115. package/dist/esm/{rate.taro-3d6edec3.js → rate.taro-a0b21714.js} +6 -2
  116. package/dist/esm/{row.taro-7afb510a.js → row.taro-cec13a7e.js} +9 -3
  117. package/dist/esm/{searchbar.taro-b05ef5a8.js → searchbar.taro-4c6091cb.js} +1 -1
  118. package/dist/esm/{shortpassword.taro-aad27ce9.js → shortpassword.taro-ce46b9cd.js} +2 -2
  119. package/dist/esm/sidenavbar.taro-36f1e118.js +65 -0
  120. package/dist/esm/sidenavbaritem.taro-77e077f4.js +32 -0
  121. package/dist/esm/{signature.taro-454c5413.js → signature.taro-45aedfa9.js} +1 -1
  122. package/dist/esm/{skeleton.taro-b2831f6f.js → skeleton.taro-5934c7d7.js} +6 -7
  123. package/dist/esm/{step.taro-33775bf4.js → step-9a048771.js} +1 -1
  124. package/dist/esm/subsidenavbar.taro-2c1fcf16.js +94 -0
  125. package/dist/esm/{swiper.taro-624d2cf2.js → swiper.taro-59bf2777.js} +37 -13
  126. package/dist/esm/{swiperitem.taro-984e3ebb.js → swiperitem-d00e7513.js} +1 -15
  127. package/dist/esm/{tabbaritem.taro-898becb1.js → tabbaritem.taro-a88d3ae7.js} +1 -1
  128. package/dist/esm/table.taro-49009dfc.js +153 -0
  129. package/dist/esm/{tabpane.taro-24514060.js → tabpane.taro-95aa185b.js} +3 -2
  130. package/dist/esm/{tabs.taro-56a953f6.js → tabs.taro-d1e85ea5.js} +15 -5
  131. package/dist/esm/{tag.taro-77cf134f.js → tag.taro-3bbbb557.js} +2 -2
  132. package/dist/esm/{textarea.taro-5d4efaf0.js → textarea.taro-0c40e966.js} +5 -2
  133. package/dist/esm/{timeselect.taro-e4c97354.js → timeselect.taro-c35d3490.js} +1 -1
  134. package/dist/esm/{toast.taro-b7ff92f1.js → toast.taro-48539c09.js} +1 -1
  135. package/dist/esm/{uploader.taro-5fab7e14.js → uploader.taro-ece83a00.js} +3 -3
  136. package/dist/esm/{index-31152350.js → useTouch-a2ea68c6.js} +26 -12
  137. package/dist/locales/base.js +1 -1
  138. package/dist/locales/en-US.js +1 -1
  139. package/dist/locales/id-ID.js +1 -1
  140. package/dist/locales/zh-CN.js +1 -1
  141. package/dist/locales/zh-TW.js +1 -1
  142. package/dist/nutui.react.es.js +2406 -1269
  143. package/dist/nutui.react.umd.js +17 -20
  144. package/dist/packages/address/address.scss +9 -2
  145. package/dist/packages/col/col.scss +6 -6
  146. package/dist/packages/icon/icon.scss +104 -12
  147. package/dist/packages/noticebar/noticebar.scss +31 -15
  148. package/dist/packages/notify/notify.scss +9 -0
  149. package/dist/packages/popover/popover.scss +205 -83
  150. package/dist/packages/range/range.scss +141 -13
  151. package/dist/packages/sidenavbar/sidenavbar.scss +69 -0
  152. package/dist/packages/sidenavbaritem/sidenavbaritem.scss +8 -0
  153. package/dist/packages/subsidenavbar/subsidenavbar.scss +23 -0
  154. package/dist/packages/swiper/swiper.scss +3 -0
  155. package/dist/packages/table/table.scss +81 -0
  156. package/dist/packages/toast/toast.scss +16 -13
  157. package/dist/style.css +1 -1
  158. package/dist/style.es.js +1 -1
  159. package/dist/styles/animation/icon.scss +245 -0
  160. package/dist/styles/animation/index.scss +1 -0
  161. package/dist/styles/font/config.json +169 -0
  162. package/dist/styles/font/demo_index.html +210 -3
  163. package/dist/styles/font/iconfont.css +39 -3
  164. package/dist/styles/font/iconfont.js +32 -32
  165. package/dist/styles/font/iconfont.json +63 -0
  166. package/dist/styles/font/iconfont.ttf +0 -0
  167. package/dist/styles/font/iconfont.woff +0 -0
  168. package/dist/styles/font/iconfont.woff2 +0 -0
  169. package/dist/styles/themes/default.scss +4 -0
  170. package/dist/styles/variables.scss +43 -14
  171. package/dist/types/address/address.taro.d.ts +4 -27
  172. package/dist/types/animatingnumbers/animatingnumbers.taro.d.ts +1 -1
  173. package/dist/types/animatingnumbers/countup.taro.d.ts +11 -0
  174. package/dist/types/avatargroup/index.taro.d.ts +1 -1
  175. package/dist/types/backtop/backtop.taro.d.ts +4 -4
  176. package/dist/types/badge/badge.taro.d.ts +2 -1
  177. package/dist/types/card/card.taro.d.ts +4 -4
  178. package/dist/types/cellgroup/cellgroup.taro.d.ts +1 -0
  179. package/dist/types/checkbox/checkbox.taro.d.ts +4 -0
  180. package/dist/types/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  181. package/dist/types/col/col.taro.d.ts +4 -1
  182. package/dist/types/collapse/collapse.taro.d.ts +2 -1
  183. package/dist/types/collapseitem/index.taro.d.ts +1 -1
  184. package/dist/types/elevator/elevator.taro.d.ts +6 -1
  185. package/dist/types/fixednav/fixednav.taro.d.ts +5 -5
  186. package/dist/types/icon/icon.taro.d.ts +10 -3
  187. package/dist/types/input/input.taro.d.ts +42 -5
  188. package/dist/types/navbar/navbar.taro.d.ts +10 -4
  189. package/dist/types/noticebar/noticebar.taro.d.ts +1 -1
  190. package/dist/types/nutui.react.d.ts +5 -1
  191. package/dist/types/picker/picker.taro.d.ts +1 -0
  192. package/dist/types/popover/popover.taro.d.ts +15 -7
  193. package/dist/types/popup/popup.taro.d.ts +2 -0
  194. package/dist/types/radiogroup/index.taro.d.ts +1 -1
  195. package/dist/types/range/range.taro.d.ts +3 -1
  196. package/dist/types/row/row.taro.d.ts +4 -1
  197. package/dist/types/sidenavbar/index.taro.d.ts +2 -0
  198. package/dist/types/sidenavbar/sidenavbar.taro.d.ts +3 -0
  199. package/dist/types/sidenavbaritem/index.taro.d.ts +2 -0
  200. package/dist/types/sidenavbaritem/sidenavbaritem.taro.d.ts +3 -0
  201. package/dist/types/skeleton/skeleton.taro.d.ts +1 -0
  202. package/dist/types/step/index.taro.d.ts +1 -1
  203. package/dist/types/subsidenavbar/index.taro.d.ts +2 -0
  204. package/dist/types/subsidenavbar/subsidenavbar.taro.d.ts +3 -0
  205. package/dist/types/swiper/swiper.taro.d.ts +1 -0
  206. package/dist/types/swiperitem/index.taro.d.ts +1 -1
  207. package/dist/types/tabbar/tabbar.taro.d.ts +1 -0
  208. package/dist/types/table/index.taro.d.ts +2 -0
  209. package/dist/types/table/table.taro.d.ts +3 -0
  210. package/dist/types/tabpane/tabpane.taro.d.ts +3 -1
  211. package/dist/types/tabs/tabs.taro.d.ts +2 -0
  212. package/dist/types/tag/tag.taro.d.ts +2 -1
  213. package/package.json +15 -8
  214. package/dist/esm/context-aa058329.js +0 -6
  215. package/dist/esm/input.taro-b6927020.js +0 -190
  216. package/dist/esm/navbar.taro-f2ba2cf4.js +0 -66
  217. package/dist/esm/radio.taro-923d91bc.js +0 -200
  218. package/dist/packages/range/custom.scss +0 -9
  219. package/dist/types/actionsheet/demo.taro.d.ts +0 -6
  220. package/dist/types/address/demo.taro.d.ts +0 -3
  221. package/dist/types/animatingnumbers/demo.taro.d.ts +0 -3
  222. package/dist/types/avatar/demo.taro.d.ts +0 -4
  223. package/dist/types/avatargroup/avatargroup.taro.d.ts +0 -14
  224. package/dist/types/backtop/demo.taro.d.ts +0 -3
  225. package/dist/types/badge/demo.taro.d.ts +0 -3
  226. package/dist/types/barrage/demo.taro.d.ts +0 -4
  227. package/dist/types/button/demo.taro.d.ts +0 -3
  228. package/dist/types/calendar/demo.taro.d.ts +0 -3
  229. package/dist/types/card/demo.taro.d.ts +0 -3
  230. package/dist/types/cell/demo.taro.d.ts +0 -3
  231. package/dist/types/checkbox/demo.taro.d.ts +0 -3
  232. package/dist/types/circleprogress/demo.taro.d.ts +0 -4
  233. package/dist/types/collapse/demo.taro.d.ts +0 -3
  234. package/dist/types/collapseitem/collapseitem.taro.d.ts +0 -18
  235. package/dist/types/configprovider/demo.taro.d.ts +0 -3
  236. package/dist/types/countdown/demo.taro.d.ts +0 -3
  237. package/dist/types/datepicker/demo.taro.d.ts +0 -3
  238. package/dist/types/dialog/demo.taro.d.ts +0 -3
  239. package/dist/types/divider/demo.taro.d.ts +0 -3
  240. package/dist/types/drag/demo.taro.d.ts +0 -3
  241. package/dist/types/elevator/demo.taro.d.ts +0 -3
  242. package/dist/types/empty/demo.taro.d.ts +0 -4
  243. package/dist/types/fixednav/demo.taro.d.ts +0 -3
  244. package/dist/types/icon/demo.taro.d.ts +0 -3
  245. package/dist/types/indicator/demo.taro.d.ts +0 -4
  246. package/dist/types/infiniteloading/demo.taro.d.ts +0 -4
  247. package/dist/types/input/demo.taro.d.ts +0 -3
  248. package/dist/types/inputnumber/demo.taro.d.ts +0 -3
  249. package/dist/types/layout/demo.taro.d.ts +0 -4
  250. package/dist/types/navbar/demo.taro.d.ts +0 -3
  251. package/dist/types/noticebar/demo.taro.d.ts +0 -3
  252. package/dist/types/notify/demo.taro.d.ts +0 -3
  253. package/dist/types/numberkeyboard/demo.taro.d.ts +0 -3
  254. package/dist/types/overlay/demo.taro.d.ts +0 -4
  255. package/dist/types/pagination/demo.taro.d.ts +0 -3
  256. package/dist/types/picker/demo.taro.d.ts +0 -3
  257. package/dist/types/popover/demo.taro.d.ts +0 -3
  258. package/dist/types/popup/demo.taro.d.ts +0 -4
  259. package/dist/types/price/demo.taro.d.ts +0 -3
  260. package/dist/types/progress/demo.taro.d.ts +0 -3
  261. package/dist/types/radio/demo.taro.d.ts +0 -3
  262. package/dist/types/radiogroup/radiogroup.taro.d.ts +0 -11
  263. package/dist/types/range/demo.taro.d.ts +0 -3
  264. package/dist/types/rate/demo.taro.d.ts +0 -3
  265. package/dist/types/searchbar/demo.taro.d.ts +0 -3
  266. package/dist/types/shortpassword/demo.taro.d.ts +0 -3
  267. package/dist/types/signature/demo.taro.d.ts +0 -3
  268. package/dist/types/skeleton/demo.taro.d.ts +0 -4
  269. package/dist/types/step/step.taro.d.ts +0 -13
  270. package/dist/types/steps/demo.taro.d.ts +0 -4
  271. package/dist/types/swiper/demo.taro.d.ts +0 -4
  272. package/dist/types/swiperitem/swiperitem.taro.d.ts +0 -7
  273. package/dist/types/switch/demo.taro.d.ts +0 -3
  274. package/dist/types/tabbar/demo.taro.d.ts +0 -3
  275. package/dist/types/tabs/demo.taro.d.ts +0 -3
  276. package/dist/types/tag/demo.taro.d.ts +0 -3
  277. package/dist/types/textarea/demo.taro.d.ts +0 -3
  278. package/dist/types/timedetail/demo.taro.d.ts +0 -3
  279. package/dist/types/timepannel/demo.taro.d.ts +0 -3
  280. package/dist/types/timeselect/demo.taro.d.ts +0 -3
  281. package/dist/types/toast/demo.taro.d.ts +0 -3
  282. package/dist/types/uploader/demo.taro.d.ts +0 -16
  283. package/dist/types/virtuallist/demo.taro.d.ts +0 -3
@@ -12,7 +12,7 @@ import React__default, { useState, useRef, useContext, useEffect } from 'react';
12
12
  import classNames from 'classnames';
13
13
  import { A as AvatarContext } from './AvatarContext-7153ad2b.js';
14
14
  import { c as cn } from './bem-893ad28d.js';
15
- import { I as Icon } from './icon-62bd7379.js';
15
+ import { I as Icon } from './icon-8dc4de10.js';
16
16
  var defaultProps$1 = {
17
17
  size: '',
18
18
  icon: '',
@@ -72,8 +72,8 @@ var Avatar = function Avatar(props) {
72
72
  height: sizeValue.indexOf(size) > -1 ? '' : "".concat(size, "px"),
73
73
  backgroundColor: "".concat(bgColor),
74
74
  color: "".concat(color),
75
- marginLeft: avatarIndex != 1 && parent !== null && parent !== void 0 && (_parent$propAvatarGro3 = parent.propAvatarGroup) !== null && _parent$propAvatarGro3 !== void 0 && _parent$propAvatarGro3.span ? "".concat(parent === null || parent === void 0 ? void 0 : (_parent$propAvatarGro4 = parent.propAvatarGroup) === null || _parent$propAvatarGro4 === void 0 ? void 0 : _parent$propAvatarGro4.span, "px") : '',
76
- zIndex: (parent === null || parent === void 0 ? void 0 : (_parent$propAvatarGro5 = parent.propAvatarGroup) === null || _parent$propAvatarGro5 === void 0 ? void 0 : _parent$propAvatarGro5.zIndex) == 'right' ? "".concat(Math.abs(maxSum - avatarIndex)) : ''
75
+ marginLeft: avatarIndex !== 1 && parent !== null && parent !== void 0 && (_parent$propAvatarGro3 = parent.propAvatarGroup) !== null && _parent$propAvatarGro3 !== void 0 && _parent$propAvatarGro3.span ? "".concat(parent === null || parent === void 0 ? void 0 : (_parent$propAvatarGro4 = parent.propAvatarGroup) === null || _parent$propAvatarGro4 === void 0 ? void 0 : _parent$propAvatarGro4.span, "px") : '',
76
+ zIndex: (parent === null || parent === void 0 ? void 0 : (_parent$propAvatarGro5 = parent.propAvatarGroup) === null || _parent$propAvatarGro5 === void 0 ? void 0 : _parent$propAvatarGro5.zIndex) === 'right' ? "".concat(Math.abs(maxSum - avatarIndex)) : ''
77
77
  }, style);
78
78
 
79
79
  var maxStyles = {
@@ -97,18 +97,17 @@ var Avatar = function Avatar(props) {
97
97
  for (var i = 0; i < children.length; i++) {
98
98
  console.log('child', children[i], children[i].classList);
99
99
 
100
- if (children[i] && children[i].classList && children[i].classList[0] == 'nut-avatar') {
100
+ if (children[i] && children[i].classList && children[i].classList[0] === 'nut-avatar') {
101
101
  children[i].setAttribute('data-index', i + 1);
102
102
  }
103
103
  }
104
104
 
105
- var index = avatarRef === null || avatarRef === void 0 ? void 0 : (_avatarRef$current = avatarRef.current) === null || _avatarRef$current === void 0 ? void 0 : (_avatarRef$current$da = _avatarRef$current.dataset) === null || _avatarRef$current$da === void 0 ? void 0 : _avatarRef$current$da.index;
105
+ var index = Number(avatarRef === null || avatarRef === void 0 ? void 0 : (_avatarRef$current = avatarRef.current) === null || _avatarRef$current === void 0 ? void 0 : (_avatarRef$current$da = _avatarRef$current.dataset) === null || _avatarRef$current$da === void 0 ? void 0 : _avatarRef$current$da.index);
106
106
  var maxCount = parent === null || parent === void 0 ? void 0 : (_parent$propAvatarGro8 = parent.propAvatarGroup) === null || _parent$propAvatarGro8 === void 0 ? void 0 : _parent$propAvatarGro8.maxCount;
107
107
  setMaxSum(children.length);
108
- console.log('index', index, avatarRef);
109
108
  setAvatarIndex(index);
110
109
 
111
- if (index == children.length && index != maxCount && children.length > maxCount) {
110
+ if (index === children.length && index !== maxCount && children.length > maxCount) {
112
111
  setShowMax(true);
113
112
  }
114
113
  };
@@ -10,7 +10,7 @@ import React__default, { useContext } from 'react';
10
10
  import classNames from 'classnames';
11
11
  import { D as DataContext } from './UserContext-68f62e66.js';
12
12
  import { c as cn } from './bem-893ad28d.js';
13
- import { I as Icon } from './icon-62bd7379.js';
13
+ import { I as Icon } from './icon-8dc4de10.js';
14
14
  var defaultProps = {
15
15
  title: '',
16
16
  content: '',
@@ -0,0 +1,94 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "ikey", "children", "titleClick", "open"];
4
+
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
+
7
+ 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; }
8
+
9
+ import React__default, { useContext, useRef, useCallback, useEffect } from 'react';
10
+ import { O as OffsetContext, h as handleClick } from './offsetContext-0e3d04b3.js';
11
+ var defaultProps = {
12
+ open: true
13
+ };
14
+
15
+ var SubSideNavBar = function SubSideNavBar(props) {
16
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
17
+ title = _defaultProps$props.title,
18
+ ikey = _defaultProps$props.ikey,
19
+ children = _defaultProps$props.children,
20
+ titleClick = _defaultProps$props.titleClick,
21
+ open = _defaultProps$props.open,
22
+ rest = _objectWithoutProperties(_defaultProps$props, _excluded); // const offset = props.offset ? Number(props.offset) : 20
23
+
24
+
25
+ var offset = useContext(OffsetContext);
26
+ console.log('offset>>>>>>>', offset);
27
+ var listRef = useRef(null);
28
+ var setListLevel = useCallback(function (nodeList) {
29
+ var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
30
+ var titleClass = nodeList[0].className;
31
+
32
+ if (titleClass.includes('nut-subsidenavbar__title')) {
33
+ // const left = 15 + offset * level
34
+ var left = offset * (level + 1);
35
+ nodeList[0].style.paddingLeft = "".concat(left, "px");
36
+ }
37
+
38
+ var childNodes = nodeList[1] && nodeList[1].children && Array.from(nodeList[1].children).filter(function (item) {
39
+ return item.nodeType !== 3 && item.nodeType !== 8;
40
+ });
41
+ childNodes.forEach(function (item) {
42
+ var itemClass = item.className;
43
+
44
+ if (itemClass.includes('nut-subsidenavbar__item')) {
45
+ // const left = 15 + offset * (level + 1)
46
+ var _left = offset * (level + 2);
47
+
48
+ item.style.paddingLeft = "".concat(_left, "px");
49
+ }
50
+
51
+ if (itemClass.includes('nut-subsidenavbar__list')) {
52
+ var _level = item.getAttribute('level') ? Number(item.getAttribute('level')) : 1;
53
+
54
+ _level += 1;
55
+ item.setAttribute('level', _level.toString());
56
+ item.children && setListLevel(item.children, _level);
57
+ }
58
+ });
59
+ }, [offset]);
60
+
61
+ var clickFn = function clickFn(e) {
62
+ handleClick(e);
63
+ var currentClass = e.currentTarget.className;
64
+ var isShow = currentClass.includes('nutShow');
65
+ titleClick && titleClick({
66
+ title: title,
67
+ ikey: ikey,
68
+ isShow: isShow
69
+ });
70
+ };
71
+
72
+ useEffect(function () {
73
+ var _listRef$current, _listRef$current2;
74
+
75
+ var childNodes = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.children;
76
+ (_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.setAttribute('level', '1');
77
+ childNodes && setListLevel(childNodes);
78
+ }, [setListLevel]);
79
+ var divClass = open ? 'nut-subsidenavbar__list nutShow' : 'nut-subsidenavbar__list nutHide';
80
+ var iconClass = open ? 'arrow-icon arrow-down' : 'arrow-icon arrow-up';
81
+ return React__default.createElement("div", _objectSpread({
82
+ className: divClass,
83
+ ref: listRef,
84
+ onClick: clickFn
85
+ }, rest), React__default.createElement("div", {
86
+ className: "nut-subsidenavbar__title border-bt"
87
+ }, title, " ", React__default.createElement("i", {
88
+ className: iconClass
89
+ })), React__default.createElement("div", {
90
+ className: "nut-subsidenavbar__content"
91
+ }, children));
92
+ };
93
+
94
+ export { SubSideNavBar as S };
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import _typeof from "@babel/runtime/helpers/typeof";
6
- var _excluded = ["children", "direction", "className", "pageContent", "onChange", "initPage", "paginationColor", "paginationVisible", "touchable", "isPreventDefault", "isStopPropagation", "autoPlay"];
6
+ var _excluded = ["children", "direction", "className", "pageContent", "onChange", "initPage", "paginationColor", "paginationVisible", "touchable", "isPreventDefault", "isStopPropagation", "autoPlay", "isCenter"];
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
 
9
9
  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; }
@@ -27,6 +27,7 @@ var defaultProps = {
27
27
  touchable: true,
28
28
  isPreventDefault: true,
29
29
  isStopPropagation: true,
30
+ isCenter: false,
30
31
  className: ''
31
32
  };
32
33
  var DISTANCE = 5;
@@ -47,6 +48,7 @@ var Swiper = React__default.forwardRef(function (props, ref) {
47
48
  isPreventDefault = propSwiper.isPreventDefault,
48
49
  isStopPropagation = propSwiper.isStopPropagation,
49
50
  autoPlay = propSwiper.autoPlay,
51
+ isCenter = propSwiper.isCenter,
50
52
  rest = _objectWithoutProperties(propSwiper, _excluded);
51
53
 
52
54
  var container = useRef(null);
@@ -66,7 +68,8 @@ var Swiper = React__default.forwardRef(function (props, ref) {
66
68
  var _useState = useState(null),
67
69
  _useState2 = _slicedToArray(_useState, 2),
68
70
  rect = _useState2[0],
69
- setRect = _useState2[1];
71
+ setRect = _useState2[1]; // eslint-disable-next-line prefer-const
72
+
70
73
 
71
74
  var _useState3 = useState(0),
72
75
  _useState4 = _slicedToArray(_useState3, 2),
@@ -139,7 +142,7 @@ var Swiper = React__default.forwardRef(function (props, ref) {
139
142
 
140
143
  var minOffset = function () {
141
144
  if (rect) {
142
- var base = isVertical ? rect.height : rect.width;
145
+ var base = isVertical ? rect === null || rect === void 0 ? void 0 : rect.height : rect === null || rect === void 0 ? void 0 : rect.width;
143
146
  return base - Number(size) * childCount;
144
147
  }
145
148
 
@@ -266,7 +269,6 @@ var Swiper = React__default.forwardRef(function (props, ref) {
266
269
  }
267
270
 
268
271
  active = targetActive;
269
- offset = targetOffset;
270
272
  setActive(targetActive);
271
273
  setOffset(targetOffset);
272
274
  getStyle(targetOffset);
@@ -361,8 +363,18 @@ var Swiper = React__default.forwardRef(function (props, ref) {
361
363
  var getStyle = function getStyle() {
362
364
  var moveOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : offset;
363
365
  var target = innerRef.current;
364
- if (!target) return;
365
- target.style.transform = "translate3D".concat(!isVertical ? "(".concat(moveOffset, "px,0,0)") : "(0,".concat(moveOffset, "px,0)"));
366
+ var _offset = 0;
367
+
368
+ if (!isCenter) {
369
+ _offset = moveOffset;
370
+ } else {
371
+ var _size = isVertical ? height : width;
372
+
373
+ var val = isVertical ? (rect === null || rect === void 0 ? void 0 : rect.height) - _size : (rect === null || rect === void 0 ? void 0 : rect.width) - _size;
374
+ _offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
375
+ }
376
+
377
+ target.style.transform = "translate3D".concat(!isVertical ? "(".concat(_offset, "px,0,0)") : "(0,".concat(_offset, "px,0)"));
366
378
  target.style.transitionDuration = "".concat(_swiper.current.moving ? 0 : props.duration, "ms");
367
379
  target.style[isVertical ? 'height' : 'width'] = "".concat(Number(size) * childCount, "px");
368
380
  target.style[isVertical ? 'width' : 'height'] = "".concat(isVertical ? width : height, "px");
@@ -398,10 +410,14 @@ var Swiper = React__default.forwardRef(function (props, ref) {
398
410
  _swiper.current.moving = false;
399
411
 
400
412
  if (isShouldMove && touch.stateDirection === props.direction) {
401
- var _offset = isVertical ? touch.offsetY : touch.offsetX;
413
+ var _offset2 = isVertical ? touch.offsetY : touch.offsetX;
402
414
 
403
415
  if (props.loop) {
404
- pace = _offset > 0 ? touch.delta > 0 ? -1 : 1 : 0;
416
+ if (_offset2 > 0) {
417
+ pace = touch.delta > 0 ? -1 : 1;
418
+ } else {
419
+ pace = 0;
420
+ }
405
421
  } else {
406
422
  pace = -Math[touch.delta > 0 ? 'ceil' : 'floor'](touch.delta / size);
407
423
  }
@@ -510,8 +526,13 @@ var Swiper = React__default.forwardRef(function (props, ref) {
510
526
  target.removeEventListener('touchend', onTouchEnd, false);
511
527
  };
512
528
  });
529
+ useEffect(function () {
530
+ return function () {
531
+ stopAutoPlay();
532
+ };
533
+ }, []);
513
534
 
514
- var style = function style(index) {
535
+ var itemStyle = function itemStyle(index) {
515
536
  var style = {};
516
537
 
517
538
  var _direction = propSwiper.direction || direction;
@@ -549,16 +570,19 @@ var Swiper = React__default.forwardRef(function (props, ref) {
549
570
  }, React__default.Children.map(childs, function (child, index) {
550
571
  return React__default.createElement("div", {
551
572
  className: b('item-wrapper'),
552
- style: style(index),
573
+ style: itemStyle(index),
553
574
  key: index
554
575
  }, child);
555
576
  })), propSwiper.paginationVisible && !('pageContent' in propSwiper) ? React__default.createElement("div", {
556
577
  className: classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(b('pagination')), true), _defineProperty(_classNames2, "".concat(b('pagination-vertical')), isVertical), _classNames2))
557
578
  }, React__default.Children.map(childs, function (item, index) {
579
+ var _classNames3;
580
+
558
581
  return React__default.createElement("i", {
559
- style: {
560
- backgroundColor: (active + childCount) % childCount === index ? propSwiper.paginationColor : '#ddd'
561
- },
582
+ style: (active + childCount) % childCount === index ? {
583
+ backgroundColor: propSwiper.paginationColor
584
+ } : undefined,
585
+ className: classNames((_classNames3 = {}, _defineProperty(_classNames3, "".concat(b('pagination-item')), true), _defineProperty(_classNames3, "active", (active + childCount) % childCount === index), _classNames3)),
562
586
  key: index
563
587
  });
564
588
  })) : React__default.createElement("div", null, pageContent)));
@@ -1,11 +1,10 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
 
4
3
  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
4
 
6
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; }
7
6
 
8
- import React__default, { useContext, useState, useImperativeHandle } from 'react';
7
+ import React__default, { useContext } from 'react';
9
8
  import classNames from 'classnames';
10
9
  import { D as DataContext } from './UserContext-b4181162.js';
11
10
  import { c as cn } from './bem-893ad28d.js';
@@ -19,21 +18,8 @@ var SwiperItem = React__default.forwardRef(function (props, ref) {
19
18
  direction = _props.direction,
20
19
  size = _props.size;
21
20
  var parent = useContext(DataContext);
22
-
23
- var _useState = useState(0),
24
- _useState2 = _slicedToArray(_useState, 2),
25
- offset = _useState2[0],
26
- setOffset = _useState2[1];
27
-
28
21
  var b = cn('swiper-item');
29
22
  var classes = classNames(b(''));
30
- useImperativeHandle(ref, function () {
31
- return {
32
- changeOffset: function changeOffset(num) {
33
- setOffset(num);
34
- }
35
- };
36
- });
37
23
 
38
24
  var style = function style() {
39
25
  var style = {};
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
  import React__default, { useEffect } from 'react';
8
8
  import { useHistory } from 'react-router-dom';
9
9
  import { c as cn } from './bem-893ad28d.js';
10
- import { I as Icon } from './icon-62bd7379.js';
10
+ import { I as Icon } from './icon-8dc4de10.js';
11
11
  var defaultProps = {
12
12
  dot: false,
13
13
  size: '',
@@ -0,0 +1,153 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["children", "className", "style", "columns", "data", "bordered", "summary", "striped", "noData", "onSorter"];
5
+
6
+ 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; }
7
+
8
+ 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; }
9
+
10
+ import React__default, { useState, useEffect } from 'react';
11
+ import classNames from 'classnames';
12
+ import { c as cn } from './bem-893ad28d.js';
13
+ import { I as Icon } from './icon-8dc4de10.js';
14
+ import { u as useConfig } from './configprovider-18657611.js';
15
+ var defaultProps = {
16
+ className: '',
17
+ style: {},
18
+ columns: [],
19
+ data: [],
20
+ bordered: true,
21
+ striped: false,
22
+ noData: '无数据'
23
+ };
24
+
25
+ var Table = function Table(props) {
26
+ var _useConfig = useConfig(),
27
+ locale = _useConfig.locale;
28
+
29
+ defaultProps.noData = locale.noData;
30
+
31
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
32
+ children = _defaultProps$props.children,
33
+ className = _defaultProps$props.className,
34
+ style = _defaultProps$props.style,
35
+ columns = _defaultProps$props.columns,
36
+ data = _defaultProps$props.data,
37
+ bordered = _defaultProps$props.bordered,
38
+ summary = _defaultProps$props.summary,
39
+ striped = _defaultProps$props.striped,
40
+ noData = _defaultProps$props.noData,
41
+ onSorter = _defaultProps$props.onSorter,
42
+ rest = _objectWithoutProperties(_defaultProps$props, _excluded);
43
+
44
+ var _useState = useState(data),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ curData = _useState2[0],
47
+ setCurData = _useState2[1];
48
+
49
+ useEffect(function () {
50
+ if (data && String(data) !== String(curData)) {
51
+ setCurData(data);
52
+ }
53
+ }, [data]);
54
+ var b = cn('table');
55
+ var classes = classNames({});
56
+ var cls = classNames(b(), classes, className);
57
+
58
+ var handleSorterClick = function handleSorterClick(item) {
59
+ if (item.sorter) {
60
+ onSorter && onSorter(item, curData);
61
+
62
+ if (typeof item.sorter === 'function') {
63
+ setCurData(curData.sort(item.sorter));
64
+ } else {
65
+ setCurData(item.sorter === 'default' ? curData.sort() : curData);
66
+ }
67
+ }
68
+ };
69
+
70
+ var cellClasses = function cellClasses(item) {
71
+ return _defineProperty({
72
+ 'nut-table__main__head__tr--border': props.bordered
73
+ }, "nut-table__main__head__tr--align".concat(item.align ? item.align : ''), true);
74
+ };
75
+
76
+ var getColumnItem = function getColumnItem(value) {
77
+ return columns.filter(function (item) {
78
+ return item.key === value;
79
+ })[0];
80
+ };
81
+
82
+ var renderHeadCells = function renderHeadCells() {
83
+ return columns.map(function (item, index) {
84
+ return React__default.createElement("span", {
85
+ className: classNames('nut-table__main__head__tr__th', cellClasses(item)),
86
+ key: item.key,
87
+ onClick: function onClick() {
88
+ return handleSorterClick(item);
89
+ }
90
+ }, item.title, item.sorter && React__default.createElement(Icon, {
91
+ name: "down-arrow",
92
+ size: "12px"
93
+ }));
94
+ });
95
+ };
96
+
97
+ var sortDataItem = function sortDataItem() {
98
+ return columns.map(function (columns) {
99
+ return [columns.key, columns.render];
100
+ });
101
+ };
102
+
103
+ var renderBodyTds = function renderBodyTds(item) {
104
+ return sortDataItem().map(function (_ref2, index) {
105
+ var _ref3 = _slicedToArray(_ref2, 2),
106
+ value = _ref3[0],
107
+ render = _ref3[1];
108
+
109
+ return React__default.createElement("span", {
110
+ className: classNames('nut-table__main__body__tr__td', cellClasses(getColumnItem(value))),
111
+ key: value
112
+ }, typeof item[value] === 'function' || typeof render === 'function' ? React__default.createElement("div", null, render ? render(item) : item[value](item)) : item[value]);
113
+ });
114
+ };
115
+
116
+ var renderBoyTrs = function renderBoyTrs() {
117
+ return curData.map(function (item, index) {
118
+ return React__default.createElement("div", {
119
+ className: "nut-table__main__body__tr",
120
+ key: index
121
+ }, renderBodyTds(item));
122
+ });
123
+ };
124
+
125
+ return React__default.createElement("div", _objectSpread({
126
+ className: cls,
127
+ style: style
128
+ }, rest), React__default.createElement("div", {
129
+ className: classNames('nut-table__main', {
130
+ 'nut-table__main--striped': striped
131
+ })
132
+ }, React__default.createElement("div", {
133
+ className: "nut-table__main__head"
134
+ }, React__default.createElement("div", {
135
+ className: "nut-table__main__head__tr"
136
+ }, renderHeadCells())), React__default.createElement("div", {
137
+ className: "nut-table__main__body"
138
+ }, renderBoyTrs())), summary && React__default.createElement("div", {
139
+ className: "nut-table__summary"
140
+ }, React__default.createElement("span", {
141
+ className: "nut-table__summary__text"
142
+ }, summary)), curData.length === 0 && React__default.createElement("div", {
143
+ className: "nut-table__nodata"
144
+ }, React__default.createElement("div", {
145
+ className: "nut-table__nodata"
146
+ }, React__default.createElement("div", {
147
+ className: "nut-table__nodata__text"
148
+ }, noData))));
149
+ };
150
+
151
+ Table.defaultProps = defaultProps;
152
+ Table.displayName = 'NutTable';
153
+ export { Table as T };
@@ -18,12 +18,13 @@ var TabPane = function TabPane(props) {
18
18
  var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
19
19
  children = _defaultProps$props.children,
20
20
  paneKey = _defaultProps$props.paneKey,
21
- activeKey = _defaultProps$props.activeKey;
21
+ activeKey = _defaultProps$props.activeKey,
22
+ autoHeightClassName = _defaultProps$props.autoHeightClassName;
22
23
 
23
24
  var b = cn('tabpane');
24
25
  var classes = classNames({
25
26
  active: paneKey === activeKey
26
- }, b(''));
27
+ }, b(''), autoHeightClassName);
27
28
  return React__default.createElement("div", {
28
29
  className: classes
29
30
  }, children);
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
5
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
- var _excluded = ["value", "color", "background", "direction", "type", "titleScroll", "ellipsis", "animatedTime", "titleGutter", "size", "titleNode", "children", "onClick", "onChange", "className"];
6
+ var _excluded = ["value", "color", "background", "direction", "type", "titleScroll", "ellipsis", "animatedTime", "titleGutter", "size", "titleNode", "children", "onClick", "onChange", "className", "autoHeight"];
7
7
 
8
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
9
 
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
12
12
  import React__default, { useState, useRef, useEffect } from 'react';
13
13
  import classNames from 'classnames';
14
14
  import { c as cn } from './bem-893ad28d.js';
15
- import { I as Icon } from './icon-62bd7379.js';
15
+ import { I as Icon } from './icon-8dc4de10.js';
16
16
 
17
17
  var Title = /*#__PURE__*/_createClass( // eslint-disable-next-line no-useless-constructor
18
18
  function Title() {
@@ -37,7 +37,8 @@ var defaultProps = {
37
37
  ellipsis: true,
38
38
  animatedTime: 300,
39
39
  titleGutter: 0,
40
- size: 'normal'
40
+ size: 'normal',
41
+ autoHeight: false
41
42
  };
42
43
 
43
44
  var pxCheck = function pxCheck(value) {
@@ -63,6 +64,7 @@ var Tabs = function Tabs(props) {
63
64
  onClick = _defaultProps$props.onClick,
64
65
  onChange = _defaultProps$props.onChange,
65
66
  className = _defaultProps$props.className,
67
+ autoHeight = _defaultProps$props.autoHeight,
66
68
  rest = _objectWithoutProperties(_defaultProps$props, _excluded);
67
69
 
68
70
  var _useState = useState({
@@ -86,7 +88,7 @@ var Tabs = function Tabs(props) {
86
88
 
87
89
  var title = new Title();
88
90
 
89
- if ((_child$props = child.props) !== null && _child$props !== void 0 && _child$props.title || (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.paneKey) {
91
+ if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.title || child !== null && child !== void 0 && (_child$props2 = child.props) !== null && _child$props2 !== void 0 && _child$props2.paneKey) {
90
92
  var _child$props3, _child$props4, _child$props5;
91
93
 
92
94
  title.title = (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.title;
@@ -147,7 +149,7 @@ var Tabs = function Tabs(props) {
147
149
  return tabChange(item);
148
150
  },
149
151
  className: classNames({
150
- active: item.paneKey === value,
152
+ active: String(item.paneKey) === String(value),
151
153
  disabled: item.disabled
152
154
  }, "".concat(b(''), "__titles-item")),
153
155
  key: item.paneKey
@@ -169,6 +171,8 @@ var Tabs = function Tabs(props) {
169
171
  className: "".concat(b(''), "__content"),
170
172
  style: contentStyle
171
173
  }, React__default.Children.map(children, function (child, idx) {
174
+ var _child$props6;
175
+
172
176
  if (!React__default.isValidElement(child)) {
173
177
  return null;
174
178
  }
@@ -177,6 +181,12 @@ var Tabs = function Tabs(props) {
177
181
  activeKey: value
178
182
  });
179
183
 
184
+ if (String(value) !== String(((_child$props6 = child.props) === null || _child$props6 === void 0 ? void 0 : _child$props6.paneKey) || idx) && autoHeight) {
185
+ childProps = _objectSpread(_objectSpread({}, childProps), {}, {
186
+ autoHeightClassName: 'inactive'
187
+ });
188
+ }
189
+
180
190
  return React__default.cloneElement(child, childProps);
181
191
  })));
182
192
  };
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
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
7
 
8
8
  import React__default, { useState, useEffect } from 'react';
9
- import { I as Icon } from './icon-62bd7379.js';
9
+ import { I as Icon } from './icon-8dc4de10.js';
10
10
  var defaultProps = {
11
11
  type: 'default',
12
12
  color: '',
@@ -90,7 +90,7 @@ var Tag = function Tag(props) {
90
90
  className: "_icon",
91
91
  name: "close",
92
92
  size: "12",
93
- click: function click(e) {
93
+ onClick: function onClick(e) {
94
94
  setIsTagShow(false);
95
95
 
96
96
  if (props.onClose) {
@@ -60,7 +60,7 @@ var TextArea = function TextArea(props) {
60
60
  }, [defaultValue]);
61
61
 
62
62
  var textChange = function textChange(event) {
63
- var text = event.target;
63
+ var text = event.detail;
64
64
 
65
65
  if (maxlength && text.value.length > Number(maxlength)) {
66
66
  text.value = text.value.substring(0, Number(maxlength));
@@ -79,7 +79,7 @@ var TextArea = function TextArea(props) {
79
79
  var textBlur = function textBlur(event) {
80
80
  if (disabled) return;
81
81
  if (readonly) return;
82
- var text = event.target;
82
+ var text = event.detail;
83
83
  onChange && onChange(text.value, event);
84
84
  onBlur && onBlur(event);
85
85
  };
@@ -95,6 +95,9 @@ var TextArea = function TextArea(props) {
95
95
  disabled: disabled,
96
96
  readOnly: readonly,
97
97
  value: inputValue,
98
+ onInput: function onInput(e) {
99
+ textChange(e);
100
+ },
98
101
  onChange: function onChange(e) {
99
102
  textChange(e);
100
103
  },
@@ -7,7 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
  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; }
8
8
 
9
9
  import React__default, { useState, useEffect } from 'react';
10
- import { P as Popup } from './popup-15922d84.js';
10
+ import { P as Popup } from './popup-67173ec6.js';
11
11
  import { c as cn } from './bem-893ad28d.js';
12
12
  import { u as useConfig } from './configprovider-18657611.js';
13
13
  var defaultProps$2 = {
@@ -4,7 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
 
5
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
6
 
7
- import { N as Notification } from './Notification-b09c89e8.js';
7
+ import { N as Notification } from './Notification-dccc7625.js';
8
8
  var messageInstance = null;
9
9
  var options = {
10
10
  msg: '',