@cloudbase/weda-ui 3.1.0 → 3.1.3

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 (333) hide show
  1. package/dist/asset-manifest.json +17 -0
  2. package/dist/configs/actions/showModal.json +48 -0
  3. package/dist/configs/actions/showToast.json +41 -0
  4. package/dist/configs/components/auth.json +16 -0
  5. package/dist/configs/components/button.json +239 -0
  6. package/dist/configs/components/calendar.json +81 -0
  7. package/dist/configs/components/carousel.json +292 -0
  8. package/dist/configs/components/chart/bar.json +721 -0
  9. package/dist/configs/components/chart/line.json +674 -0
  10. package/dist/configs/components/chart/pie.json +494 -0
  11. package/dist/configs/components/chart/statisticsCard.json +376 -0
  12. package/dist/configs/components/container.json +50 -0
  13. package/dist/configs/components/dataView.json +239 -0
  14. package/dist/configs/components/drawer.json +115 -0
  15. package/dist/configs/components/form/checkbox.json +178 -0
  16. package/dist/configs/components/form/form.json +45 -0
  17. package/dist/configs/components/form/input.json +154 -0
  18. package/dist/configs/components/form/location.json +216 -0
  19. package/dist/configs/components/form/radio.json +203 -0
  20. package/dist/configs/components/form/richText.json +125 -0
  21. package/dist/configs/components/form/select.json +430 -0
  22. package/dist/configs/components/form/switch.json +58 -0
  23. package/dist/configs/components/form/textarea.json +116 -0
  24. package/dist/configs/components/form/tips.json +34 -0
  25. package/dist/configs/components/form/uploader.json +171 -0
  26. package/dist/configs/components/form/uploaderFile.json +158 -0
  27. package/dist/configs/components/graphicCard.json +413 -0
  28. package/dist/configs/components/image.json +187 -0
  29. package/dist/configs/components/link.json +79 -0
  30. package/dist/configs/components/listView.json +370 -0
  31. package/dist/configs/components/lottery.json +163 -0
  32. package/dist/configs/components/modal.json +72 -0
  33. package/dist/configs/components/navLayout.json +368 -0
  34. package/dist/configs/components/navigationBar.json +62 -0
  35. package/dist/configs/components/richtextview.json +26 -0
  36. package/dist/configs/components/scrollVeiw.json +253 -0
  37. package/dist/configs/components/slot.json +17 -0
  38. package/dist/configs/components/swiper.json +90 -0
  39. package/dist/configs/components/tabs.json +121 -0
  40. package/dist/configs/components/text.json +95 -0
  41. package/dist/configs/components/wedaVideo.json +89 -0
  42. package/dist/configs/components/wxOpenApi/phone.json +127 -0
  43. package/dist/configs/components/wxOpenApi/phoneCode.json +109 -0
  44. package/dist/configs/components/wxOpenApi/share.json +157 -0
  45. package/dist/configs/components/wxOpenApi/userInfo.json +156 -0
  46. package/dist/configs/index.d.ts +97 -0
  47. package/dist/configs/index.js +105 -0
  48. package/dist/docs/common/format.d.ts +13 -0
  49. package/dist/docs/common/format.js +103 -0
  50. package/dist/docs/common/tableView.d.ts +30 -0
  51. package/dist/docs/common/tableView.js +159 -0
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.html +88 -0
  54. package/dist/index.js +3 -0
  55. package/dist/setupTests.d.ts +1 -0
  56. package/dist/setupTests.js +14 -0
  57. package/dist/static/js/bundle.js +963 -0
  58. package/dist/static/js/bundle.js.map +1 -0
  59. package/dist/static/js/main.chunk.js +8841 -0
  60. package/dist/static/js/main.chunk.js.map +1 -0
  61. package/dist/static/js/vendors~main.chunk.js +247885 -0
  62. package/dist/static/js/vendors~main.chunk.js.map +1 -0
  63. package/dist/static/media/ef6fa527e24e354765d806b826b41391.fa67580a.svg +627 -0
  64. package/dist/web/actions/index.d.ts +2 -0
  65. package/dist/web/actions/index.js +2 -0
  66. package/dist/web/actions/showModal/index.d.ts +3 -0
  67. package/dist/web/actions/showModal/index.js +66 -0
  68. package/dist/web/actions/showToast/index.d.ts +1 -0
  69. package/dist/web/actions/showToast/index.js +3 -0
  70. package/dist/web/components/auth/index.d.ts +10 -0
  71. package/dist/web/components/auth/index.js +37 -0
  72. package/dist/web/components/button/index.css +27 -0
  73. package/dist/web/components/button/index.d.ts +32 -0
  74. package/dist/web/components/button/index.js +48 -0
  75. package/dist/web/components/calendar/index.css +416 -0
  76. package/dist/web/components/calendar/index.d.ts +19 -0
  77. package/dist/web/components/calendar/index.js +181 -0
  78. package/dist/web/components/calendar/util.d.ts +13 -0
  79. package/dist/web/components/calendar/util.js +74 -0
  80. package/dist/web/components/carousel/index.css +119 -0
  81. package/dist/web/components/carousel/index.d.ts +41 -0
  82. package/dist/web/components/carousel/index.js +240 -0
  83. package/dist/web/components/chart/bar/index.d.ts +41 -0
  84. package/dist/web/components/chart/bar/index.js +56 -0
  85. package/dist/web/components/chart/common/config/bar.d.ts +48 -0
  86. package/dist/web/components/chart/common/config/bar.js +49 -0
  87. package/dist/web/components/chart/common/config/global.d.ts +13 -0
  88. package/dist/web/components/chart/common/config/global.js +16 -0
  89. package/dist/web/components/chart/common/config/line.d.ts +46 -0
  90. package/dist/web/components/chart/common/config/line.js +49 -0
  91. package/dist/web/components/chart/common/config/pie.d.ts +29 -0
  92. package/dist/web/components/chart/common/config/pie.js +36 -0
  93. package/dist/web/components/chart/common/core/eChartBar.d.ts +68 -0
  94. package/dist/web/components/chart/common/core/eChartBar.js +196 -0
  95. package/dist/web/components/chart/common/core/eChartBase.d.ts +128 -0
  96. package/dist/web/components/chart/common/core/eChartBase.js +346 -0
  97. package/dist/web/components/chart/common/core/eChartLine.d.ts +62 -0
  98. package/dist/web/components/chart/common/core/eChartLine.js +168 -0
  99. package/dist/web/components/chart/common/core/eChartPie.d.ts +50 -0
  100. package/dist/web/components/chart/common/core/eChartPie.js +132 -0
  101. package/dist/web/components/chart/common/core/type.d.ts +35 -0
  102. package/dist/web/components/chart/common/core/type.js +9 -0
  103. package/dist/web/components/chart/common/echarts.d.ts +2 -0
  104. package/dist/web/components/chart/common/echarts.js +24 -0
  105. package/dist/web/components/chart/common/useChart.d.ts +8 -0
  106. package/dist/web/components/chart/common/useChart.js +60 -0
  107. package/dist/web/components/chart/line/index.d.ts +39 -0
  108. package/dist/web/components/chart/line/index.js +53 -0
  109. package/dist/web/components/chart/pie/index.d.ts +27 -0
  110. package/dist/web/components/chart/pie/index.js +40 -0
  111. package/dist/web/components/chart/statisticsCard/index.css +63 -0
  112. package/dist/web/components/chart/statisticsCard/index.d.ts +85 -0
  113. package/dist/web/components/chart/statisticsCard/index.js +203 -0
  114. package/dist/web/components/chart/statisticsCard/interface.d.ts +13 -0
  115. package/dist/web/components/chart/statisticsCard/interface.js +1 -0
  116. package/dist/web/components/container/index.d.ts +6 -0
  117. package/dist/web/components/container/index.js +6 -0
  118. package/dist/web/components/dataView/index.d.ts +6 -0
  119. package/dist/web/components/dataView/index.js +8 -0
  120. package/dist/web/components/dataView/interface.d.ts +5 -0
  121. package/dist/web/components/dataView/interface.js +1 -0
  122. package/dist/web/components/drawer/index.d.ts +13 -0
  123. package/dist/web/components/drawer/index.js +12 -0
  124. package/dist/web/components/form/checkbox/index.d.ts +13 -0
  125. package/dist/web/components/form/checkbox/index.js +167 -0
  126. package/dist/web/components/form/enumSelect/MultipleSelect.d.ts +78 -0
  127. package/dist/web/components/form/enumSelect/MultipleSelect.js +52 -0
  128. package/dist/web/components/form/enumSelect/NormalSelect.d.ts +83 -0
  129. package/dist/web/components/form/enumSelect/NormalSelect.js +52 -0
  130. package/dist/web/components/form/enumSelect/SelectContainer.d.ts +16 -0
  131. package/dist/web/components/form/enumSelect/SelectContainer.js +30 -0
  132. package/dist/web/components/form/enumSelect/index.d.ts +82 -0
  133. package/dist/web/components/form/enumSelect/index.js +6 -0
  134. package/dist/web/components/form/enumSelect/props/defaultProps.d.ts +34 -0
  135. package/dist/web/components/form/enumSelect/props/defaultProps.js +40 -0
  136. package/dist/web/components/form/enumSelect/props/propsTypes.d.ts +39 -0
  137. package/dist/web/components/form/enumSelect/props/propsTypes.js +47 -0
  138. package/dist/web/components/form/form/index.css +9 -0
  139. package/dist/web/components/form/form/index.d.ts +13 -0
  140. package/dist/web/components/form/form/index.js +31 -0
  141. package/dist/web/components/form/formcell/index.css +85 -0
  142. package/dist/web/components/form/formcell/index.d.ts +8 -0
  143. package/dist/web/components/form/formcell/index.js +40 -0
  144. package/dist/web/components/form/input/index.css +40 -0
  145. package/dist/web/components/form/input/index.d.ts +14 -0
  146. package/dist/web/components/form/input/index.js +86 -0
  147. package/dist/web/components/form/location/common/mapChoose.css +477 -0
  148. package/dist/web/components/form/location/common/mapChoose.d.ts +15 -0
  149. package/dist/web/components/form/location/common/mapChoose.js +435 -0
  150. package/dist/web/components/form/location/common/mapView.d.ts +19 -0
  151. package/dist/web/components/form/location/common/mapView.js +170 -0
  152. package/dist/web/components/form/location/common/propsConfig.d.ts +59 -0
  153. package/dist/web/components/form/location/common/propsConfig.js +50 -0
  154. package/dist/web/components/form/location/common/selectModal.css +45 -0
  155. package/dist/web/components/form/location/common/selectModal.d.ts +21 -0
  156. package/dist/web/components/form/location/common/selectModal.js +44 -0
  157. package/dist/web/components/form/location/common/useLocationInfo.d.ts +36 -0
  158. package/dist/web/components/form/location/common/useLocationInfo.js +104 -0
  159. package/dist/web/components/form/location/components/LocationH5/index.css +100 -0
  160. package/dist/web/components/form/location/components/LocationH5/location.h5.d.ts +8 -0
  161. package/dist/web/components/form/location/components/LocationH5/location.h5.js +323 -0
  162. package/dist/web/components/form/location/components/LocationPC/Header.d.ts +12 -0
  163. package/dist/web/components/form/location/components/LocationPC/Header.js +43 -0
  164. package/dist/web/components/form/location/components/LocationPC/index.css +40 -0
  165. package/dist/web/components/form/location/components/LocationPC/location.PC.d.ts +8 -0
  166. package/dist/web/components/form/location/components/LocationPC/location.PC.js +224 -0
  167. package/dist/web/components/form/location/constants.d.ts +2 -0
  168. package/dist/web/components/form/location/constants.js +3 -0
  169. package/dist/web/components/form/location/index.css +13 -0
  170. package/dist/web/components/form/location/index.d.ts +1 -0
  171. package/dist/web/components/form/location/index.js +17 -0
  172. package/dist/web/components/form/radio/index.css +12 -0
  173. package/dist/web/components/form/radio/index.d.ts +11 -0
  174. package/dist/web/components/form/radio/index.js +115 -0
  175. package/dist/web/components/form/renderDecorator.d.ts +6 -0
  176. package/dist/web/components/form/renderDecorator.js +20 -0
  177. package/dist/web/components/form/select/h5.d.ts +16 -0
  178. package/dist/web/components/form/select/h5.js +504 -0
  179. package/dist/web/components/form/select/index.css +27 -0
  180. package/dist/web/components/form/select/index.d.ts +65 -0
  181. package/dist/web/components/form/select/index.js +301 -0
  182. package/dist/web/components/form/select/region/index.d.ts +6 -0
  183. package/dist/web/components/form/select/region/index.js +147 -0
  184. package/dist/web/components/form/select/time.d.ts +9 -0
  185. package/dist/web/components/form/select/time.js +146 -0
  186. package/dist/web/components/form/select/year.d.ts +7 -0
  187. package/dist/web/components/form/select/year.js +72 -0
  188. package/dist/web/components/form/switch/index.d.ts +6 -0
  189. package/dist/web/components/form/switch/index.js +57 -0
  190. package/dist/web/components/form/textarea/index.css +11 -0
  191. package/dist/web/components/form/textarea/index.d.ts +12 -0
  192. package/dist/web/components/form/textarea/index.js +66 -0
  193. package/dist/web/components/form/tips/index.css +4 -0
  194. package/dist/web/components/form/tips/index.d.ts +8 -0
  195. package/dist/web/components/form/tips/index.js +17 -0
  196. package/dist/web/components/form/uploader/index.css +118 -0
  197. package/dist/web/components/form/uploader/index.d.ts +3 -0
  198. package/dist/web/components/form/uploader/index.js +42 -0
  199. package/dist/web/components/form/uploader/uploader.h5.d.ts +19 -0
  200. package/dist/web/components/form/uploader/uploader.h5.js +201 -0
  201. package/dist/web/components/form/uploader/uploader.pc.d.ts +29 -0
  202. package/dist/web/components/form/uploader/uploader.pc.js +182 -0
  203. package/dist/web/components/form/uploaderFile/index.css +422 -0
  204. package/dist/web/components/form/uploaderFile/index.d.ts +4 -0
  205. package/dist/web/components/form/uploaderFile/index.js +19 -0
  206. package/dist/web/components/form/uploaderFile/uploadFile.h5.d.ts +23 -0
  207. package/dist/web/components/form/uploaderFile/uploadFile.h5.js +315 -0
  208. package/dist/web/components/form/uploaderFile/uploadFile.pc.d.ts +24 -0
  209. package/dist/web/components/form/uploaderFile/uploadFile.pc.js +290 -0
  210. package/dist/web/components/graphicCard/index.css +159 -0
  211. package/dist/web/components/graphicCard/index.d.ts +31 -0
  212. package/dist/web/components/graphicCard/index.js +166 -0
  213. package/dist/web/components/image/image.d.ts +9 -0
  214. package/dist/web/components/image/image.js +119 -0
  215. package/dist/web/components/image/index.css +54 -0
  216. package/dist/web/components/image/index.d.ts +13 -0
  217. package/dist/web/components/image/index.js +91 -0
  218. package/dist/web/components/index.d.ts +47 -0
  219. package/dist/web/components/index.js +94 -0
  220. package/dist/web/components/link/index.css +8 -0
  221. package/dist/web/components/link/index.d.ts +24 -0
  222. package/dist/web/components/link/index.js +71 -0
  223. package/dist/web/components/listView/index.css +143 -0
  224. package/dist/web/components/listView/index.d.ts +7 -0
  225. package/dist/web/components/listView/index.js +262 -0
  226. package/dist/web/components/listView/interface.d.ts +122 -0
  227. package/dist/web/components/listView/interface.js +1 -0
  228. package/dist/web/components/lottery/index.css +359 -0
  229. package/dist/web/components/lottery/index.d.ts +22 -0
  230. package/dist/web/components/lottery/index.js +390 -0
  231. package/dist/web/components/lottery/lotteryUtil.d.ts +23 -0
  232. package/dist/web/components/lottery/lotteryUtil.js +180 -0
  233. package/dist/web/components/modal/h5.css +53 -0
  234. package/dist/web/components/modal/index.d.ts +17 -0
  235. package/dist/web/components/modal/index.js +11 -0
  236. package/dist/web/components/modal/modal.h5.d.ts +4 -0
  237. package/dist/web/components/modal/modal.h5.js +46 -0
  238. package/dist/web/components/modal/modal.pc.d.ts +3 -0
  239. package/dist/web/components/modal/modal.pc.js +31 -0
  240. package/dist/web/components/navLayout/index.css +332 -0
  241. package/dist/web/components/navLayout/index.d.ts +46 -0
  242. package/dist/web/components/navLayout/index.js +116 -0
  243. package/dist/web/components/navigationBar/common.d.ts +15 -0
  244. package/dist/web/components/navigationBar/common.js +127 -0
  245. package/dist/web/components/navigationBar/h5Menu.d.ts +14 -0
  246. package/dist/web/components/navigationBar/h5Menu.js +72 -0
  247. package/dist/web/components/navigationBar/horizontalMenu.d.ts +12 -0
  248. package/dist/web/components/navigationBar/horizontalMenu.js +99 -0
  249. package/dist/web/components/navigationBar/index.css +762 -0
  250. package/dist/web/components/navigationBar/index.d.ts +13 -0
  251. package/dist/web/components/navigationBar/index.js +157 -0
  252. package/dist/web/components/navigationBar/verticalMenu.d.ts +13 -0
  253. package/dist/web/components/navigationBar/verticalMenu.js +38 -0
  254. package/dist/web/components/phone/index.d.ts +18 -0
  255. package/dist/web/components/phone/index.js +4 -0
  256. package/dist/web/components/phoneCode/index.d.ts +18 -0
  257. package/dist/web/components/phoneCode/index.js +4 -0
  258. package/dist/web/components/picker/datePicker.d.ts +10 -0
  259. package/dist/web/components/picker/datePicker.js +31 -0
  260. package/dist/web/components/picker/picker.d.ts +6 -0
  261. package/dist/web/components/picker/picker.js +45 -0
  262. package/dist/web/components/picker/timePicker.d.ts +7 -0
  263. package/dist/web/components/picker/timePicker.js +42 -0
  264. package/dist/web/components/richText/const.d.ts +1 -0
  265. package/dist/web/components/richText/const.js +2 -0
  266. package/dist/web/components/richText/index.css +93 -0
  267. package/dist/web/components/richText/index.d.ts +51 -0
  268. package/dist/web/components/richText/index.js +298 -0
  269. package/dist/web/components/richTextView/index.css +63 -0
  270. package/dist/web/components/richTextView/index.d.ts +7 -0
  271. package/dist/web/components/richTextView/index.js +44 -0
  272. package/dist/web/components/scrollView/index.d.ts +27 -0
  273. package/dist/web/components/scrollView/index.js +95 -0
  274. package/dist/web/components/share/index.d.ts +34 -0
  275. package/dist/web/components/share/index.js +4 -0
  276. package/dist/web/components/slot/index.d.ts +6 -0
  277. package/dist/web/components/slot/index.js +9 -0
  278. package/dist/web/components/swiper/index.css +106 -0
  279. package/dist/web/components/swiper/index.d.ts +24 -0
  280. package/dist/web/components/swiper/index.js +149 -0
  281. package/dist/web/components/tabs/index.css +64 -0
  282. package/dist/web/components/tabs/index.d.ts +13 -0
  283. package/dist/web/components/tabs/index.js +15 -0
  284. package/dist/web/components/tabs/tabs.h5.d.ts +4 -0
  285. package/dist/web/components/tabs/tabs.h5.js +42 -0
  286. package/dist/web/components/tabs/tabs.pc.d.ts +3 -0
  287. package/dist/web/components/tabs/tabs.pc.js +40 -0
  288. package/dist/web/components/text/index.css +26 -0
  289. package/dist/web/components/text/index.d.ts +14 -0
  290. package/dist/web/components/text/index.js +17 -0
  291. package/dist/web/components/uploaderFileView/index.css +11 -0
  292. package/dist/web/components/uploaderFileView/index.d.ts +10 -0
  293. package/dist/web/components/uploaderFileView/index.js +61 -0
  294. package/dist/web/components/uploaderView/index.css +31 -0
  295. package/dist/web/components/uploaderView/index.d.ts +17 -0
  296. package/dist/web/components/uploaderView/index.js +48 -0
  297. package/dist/web/components/userInfo/index.d.ts +26 -0
  298. package/dist/web/components/userInfo/index.js +4 -0
  299. package/dist/web/components/wedaVideo/index.css +42 -0
  300. package/dist/web/components/wedaVideo/index.d.ts +17 -0
  301. package/dist/web/components/wedaVideo/index.js +159 -0
  302. package/dist/web/index.d.ts +8 -0
  303. package/dist/web/index.js +4 -0
  304. package/dist/web/utils/classnames.d.ts +2 -0
  305. package/dist/web/utils/classnames.js +37 -0
  306. package/dist/web/utils/constant.d.ts +23 -0
  307. package/dist/web/utils/constant.js +24 -0
  308. package/dist/web/utils/debounce.d.ts +2 -0
  309. package/dist/web/utils/debounce.js +92 -0
  310. package/dist/web/utils/events.d.ts +1 -0
  311. package/dist/web/utils/events.js +2 -0
  312. package/dist/web/utils/getLocalCounter.d.ts +1 -0
  313. package/dist/web/utils/getLocalCounter.js +4 -0
  314. package/dist/web/utils/isObjectEqual.d.ts +2 -0
  315. package/dist/web/utils/isObjectEqual.js +12 -0
  316. package/dist/web/utils/loading-fallback.d.ts +2 -0
  317. package/dist/web/utils/loading-fallback.js +2 -0
  318. package/dist/web/utils/lodash.d.ts +1 -0
  319. package/dist/web/utils/lodash.js +2 -0
  320. package/dist/web/utils/platform.d.ts +18 -0
  321. package/dist/web/utils/platform.js +191 -0
  322. package/dist/web/utils/tcb.d.ts +23 -0
  323. package/dist/web/utils/tcb.js +82 -0
  324. package/dist/web/utils/tmap.d.ts +3 -0
  325. package/dist/web/utils/tmap.js +21 -0
  326. package/dist/web/utils/useSetState.d.ts +1 -0
  327. package/dist/web/utils/useSetState.js +8 -0
  328. package/dist/web/utils/useSyncValue.d.ts +4 -0
  329. package/dist/web/utils/useSyncValue.js +15 -0
  330. package/dist/web/utils/weui.d.ts +1 -0
  331. package/dist/web/utils/weui.js +2 -0
  332. package/dist/web/weda-ui.css +90 -0
  333. package/package.json +12 -12
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+ import { Container, Text, Button } from '../index';
3
+ import './h5.css';
4
+ import { useSyncValue } from '../../utils/useSyncValue';
5
+ export function ModalH5(props) {
6
+ const { events, visible, content, isDefaultButton, customButton, customContent, outerRef, } = props;
7
+ const [isVisible, setIsVisible] = useSyncValue(visible);
8
+ React.useImperativeHandle(outerRef, () => {
9
+ return {
10
+ methods: {
11
+ close: () => {
12
+ setIsVisible(false);
13
+ },
14
+ open: () => {
15
+ setIsVisible(true);
16
+ },
17
+ toggle: () => {
18
+ setIsVisible((prev) => !prev);
19
+ },
20
+ },
21
+ };
22
+ }, [setIsVisible]);
23
+ const buttonEvents = React.useMemo(() => {
24
+ return {
25
+ tap: events.confirm,
26
+ };
27
+ }, [events]);
28
+ const closeEvents = React.useMemo(() => {
29
+ return {
30
+ tap: events.close,
31
+ };
32
+ }, [events]);
33
+ if (!isVisible) {
34
+ return React.createElement(Container, { className: "lcap-modal" });
35
+ }
36
+ return (React.createElement(Container, { className: "lcap-modal" },
37
+ React.createElement(Container, { className: "container" },
38
+ React.createElement(Container, { className: "lcap-modal__mask" }),
39
+ React.createElement(Container, { className: `lcap-modal__dialog ${isVisible ? 'enter' : ''}` },
40
+ React.createElement(Container, { className: "lcap-modal__close_btn", events: closeEvents },
41
+ React.createElement(Container, { className: "lcap-icon-close lcap-icon", style: {
42
+ fontSize: 24,
43
+ } })),
44
+ React.createElement(Container, { title: "modal-header" }, content ? (React.createElement(Text, { level: "0", text: content, maxLines: 2, userSelect: true, space: false, contenteditable: 'false' })) : (customContent)),
45
+ React.createElement(Container, { className: "lcap-modal__confirm_btn" }, isDefaultButton ? (React.createElement(Button, { className: "lcap-modal__default_btn", text: "\u786E\u5B9A", events: buttonEvents })) : (customButton))))));
46
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PropTypes } from '.';
3
+ export declare function ModalPc(props: PropTypes): JSX.Element;
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { Modal, Button, ConfigProvider } from 'tea-component';
3
+ import classNames from '../../utils/classnames';
4
+ import { useSyncValue } from '../../utils/useSyncValue';
5
+ export function ModalPc(props) {
6
+ const { className, content, visible, customButton, customContent, isDefaultButton, size, events, outerRef, ...restProps } = props;
7
+ const [isVisible, setIsVisible] = useSyncValue(visible);
8
+ React.useImperativeHandle(outerRef, () => {
9
+ return {
10
+ methods: {
11
+ close: () => {
12
+ setIsVisible(false);
13
+ },
14
+ open: () => {
15
+ setIsVisible(true);
16
+ },
17
+ toggle: () => {
18
+ setIsVisible((prev) => !prev);
19
+ },
20
+ },
21
+ };
22
+ }, [setIsVisible]);
23
+ return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
24
+ React.createElement(Modal, { size: size, className: classNames('weda-ui', 'lcap-modal', 'container', className), visible: isVisible, onClose: () => {
25
+ events.close();
26
+ }, ...restProps },
27
+ React.createElement(Modal.Body, null, content ? content : customContent),
28
+ React.createElement(Modal.Footer, null, isDefaultButton ? (React.createElement(Button, { type: "primary", onClick: () => {
29
+ events.confirm();
30
+ } }, "\u786E\u5B9A")) : (customButton)))));
31
+ }
@@ -0,0 +1,332 @@
1
+ @font-face {
2
+ font-family: 'lcap-icon';
3
+ font-weight: normal;
4
+ font-style: normal;
5
+ src: url(data:application/font-woff2;charset=utf-8;base64,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)
6
+ format('woff2');
7
+ }
8
+
9
+ .lcap-icon {
10
+ font-size: 2.42857rem;
11
+ /* display: inline-block; */
12
+ font-family: 'lcap-icon' !important;
13
+ speak: none;
14
+ font-style: normal;
15
+ font-weight: normal;
16
+ font-variant: normal;
17
+ text-transform: none;
18
+ text-rendering: auto;
19
+ line-height: 1;
20
+ -webkit-font-smoothing: antialiased;
21
+ -moz-osx-font-smoothing: grayscale;
22
+ }
23
+
24
+ .lcap-icon-nointernet:before {
25
+ content: '\e900';
26
+ }
27
+ .lcap-icon-success:before {
28
+ content: '\e901';
29
+ }
30
+ .lcap-icon-warning:before {
31
+ content: '\e902';
32
+ }
33
+ .lcap-icon-pending:before {
34
+ content: '\e903';
35
+ }
36
+ .lcap-icon-refresh:before {
37
+ content: '\e904';
38
+ }
39
+ .lcap-icon-folder:before {
40
+ content: '\e905';
41
+ }
42
+ .lcap-icon-arrowup:before {
43
+ content: '\e906';
44
+ }
45
+ .lcap-icon-arrowdown:before {
46
+ content: '\e907';
47
+ }
48
+ .lcap-icon-arrowleft:before {
49
+ content: '\e908';
50
+ }
51
+ .lcap-icon-arrowright:before {
52
+ content: '\e909';
53
+ }
54
+ .lcap-icon-chevronup:before {
55
+ content: '\e90a';
56
+ }
57
+ .lcap-icon-chevrondown:before {
58
+ content: '\e90b';
59
+ }
60
+ .lcap-icon-chevronleft:before {
61
+ content: '\e90c';
62
+ }
63
+ .lcap-icon-chevronright:before {
64
+ content: '\e90d';
65
+ }
66
+ .lcap-icon-delete:before {
67
+ content: '\e90e';
68
+ }
69
+ .lcap-icon-edit:before {
70
+ content: '\e90f';
71
+ }
72
+ .lcap-icon-search:before {
73
+ content: '\e910';
74
+ }
75
+ .lcap-icon-check:before {
76
+ content: '\e911';
77
+ }
78
+ .lcap-icon-close:before {
79
+ content: '\e912';
80
+ }
81
+ .lcap-icon-add:before {
82
+ content: '\e913';
83
+ }
84
+ .lcap-icon-download:before {
85
+ content: '\e914';
86
+ }
87
+ .lcap-icon-success-fill:before {
88
+ content: '\e915';
89
+ }
90
+ .lcap-icon-close-fill:before {
91
+ content: '\e916';
92
+ }
93
+ .lcap-icon-minus-fill:before {
94
+ content: '\e917';
95
+ }
96
+ .lcap-icon-add-fill:before {
97
+ content: '\e918';
98
+ }
99
+ .lcap-icon-info-fill:before {
100
+ content: '\e919';
101
+ }
102
+ .lcap-icon-pending-fill:before {
103
+ content: '\e91a';
104
+ }
105
+ .lcap-icon-warning-fill:before {
106
+ content: '\e91b';
107
+ }
108
+ .lcap-icon-more:before {
109
+ content: '\e91c';
110
+ }
111
+ .lcap-icon-star:before {
112
+ content: '\e91d';
113
+ }
114
+ .lcap-icon-star-fill:before {
115
+ content: '\e91e';
116
+ }
117
+ .lcap-icon-location:before {
118
+ content: '\e91f';
119
+ }
120
+ .lcap-icon-question:before {
121
+ content: '\e920';
122
+ }
123
+ /* pc style */
124
+ .weda-grid-navigation {
125
+ /* max-width: 1200px;
126
+ margin: 0 auto; */
127
+ width: 100%;
128
+ }
129
+
130
+ .weda-grid-navigation .weda-grid-navigation__wrapper {
131
+ width: 100%;
132
+ padding: 0 1.71429rem;
133
+ }
134
+
135
+ .weda-grid-navigation .weda-grid-navigation__row {
136
+ margin: 0;
137
+ }
138
+
139
+ .weda-grid-navigation .weda-grid-navigation__col {
140
+ padding: 0;
141
+ }
142
+
143
+ .weda-grid-navigation .weda-grid-navigation__col .wedatea2td-grid__box {
144
+ display: flex;
145
+ flex-direction: column;
146
+ justify-content: flex-start;
147
+ /* align-items: center; */
148
+ padding: 1.14286rem 0;
149
+ text-align: center;
150
+ }
151
+
152
+ .weda-grid-navigation
153
+ .weda-grid-navigation__col.weda-grid-navigation__col--big
154
+ .wedatea2td-grid__box {
155
+ padding: 1.42857rem 0;
156
+ }
157
+
158
+ .weda-grid-navigation .weda-grid-navigation__col .weda-grid-navigation__icon {
159
+ width: 4em;
160
+ height: 4em;
161
+ }
162
+ .weda-grid-navigation
163
+ .weda-grid-navigation__col
164
+ .weda-grid-navigation__fonticon {
165
+ font-size: 4em;
166
+ }
167
+ .weda-grid-navigation
168
+ .weda-grid-navigation__col--small
169
+ .weda-grid-navigation__icon {
170
+ width: 3.428571em;
171
+ height: 3.428571em;
172
+ }
173
+ .weda-grid-navigation
174
+ .weda-grid-navigation__col--small
175
+ .weda-grid-navigation__fonticon {
176
+ font-size: 3.428571em;
177
+ }
178
+
179
+ .weda-grid-navigation
180
+ .weda-grid-navigation__col--big
181
+ .weda-grid-navigation__icon {
182
+ width: 5.14285em;
183
+ height: 5.14285em;
184
+ }
185
+ .weda-grid-navigation
186
+ .weda-grid-navigation__col--big
187
+ .weda-grid-navigation__fonticon {
188
+ font-size: 5.14285em;
189
+ }
190
+
191
+ .weda-grid-navigation .weda-grid-navigation__img {
192
+ width: 100%;
193
+ /* height: 100%; */
194
+ }
195
+
196
+ .weda-grid-navigation .weda-grid-navigation__col .weda-grid-navigation__text {
197
+ font-size: 1.142857em;
198
+ /* line-height: 24px; */
199
+ text-align: center;
200
+ color: rgba(0, 0, 0, 0.6);
201
+ display: -webkit-box;
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ -webkit-box-orient: vertical;
205
+ -webkit-line-clamp: 1;
206
+ margin-top: 0.85714rem;
207
+ }
208
+
209
+ .weda-grid-navigation
210
+ .weda-grid-navigation__col--big
211
+ .weda-grid-navigation__text {
212
+ margin-top: 1.14286rem;
213
+ }
214
+
215
+ .weda-grid-navigation
216
+ .weda-grid-navigation__col--small
217
+ .weda-grid-navigation__text {
218
+ font-size: 1em;
219
+ line-height: 1.5714em;
220
+ }
221
+
222
+ .weda-grid-navigation
223
+ .weda-grid-navigation__col--big
224
+ .weda-grid-navigation__text {
225
+ font-size: 1.42857em;
226
+ line-height: 2em;
227
+ }
228
+
229
+ /* h5 style */
230
+ .weda-grid-navigation.weda-grid-navigation-mobile {
231
+ margin: 0;
232
+ max-width: 100%;
233
+ }
234
+
235
+ .weda-grid-navigation-mobile .weda-grid-navigation__wrapper {
236
+ padding: 0 1.14286rem;
237
+ }
238
+
239
+ .weda-grid-navigation-mobile .weda-grid-navigation__col .wedatea2td-grid__box {
240
+ padding: 0.57143rem 0;
241
+ }
242
+
243
+ .weda-grid-navigation-mobile
244
+ .weda-grid-navigation__row:first-child
245
+ .weda-grid-navigation__col
246
+ .wedatea2td-grid__box {
247
+ text-align: center;
248
+ padding-top: 1.14286rem;
249
+ }
250
+
251
+ .weda-grid-navigation-mobile
252
+ .weda-grid-navigation__row:last-child
253
+ .weda-grid-navigation__col
254
+ .wedatea2td-grid__box {
255
+ text-align: center;
256
+ padding-bottom: 1.14286rem;
257
+ }
258
+
259
+ .weda-grid-navigation-mobile
260
+ .weda-grid-navigation__col.weda-grid-navigation__col--big
261
+ .wedatea2td-grid__box {
262
+ padding: 0.71429rem 0;
263
+ }
264
+
265
+ .weda-grid-navigation-mobile
266
+ .weda-grid-navigation__row:first-child
267
+ .weda-grid-navigation__col.weda-grid-navigation__col--big
268
+ .wedatea2td-grid__box {
269
+ text-align: center;
270
+ padding-top: 1.42857rem;
271
+ }
272
+
273
+ .weda-grid-navigation-mobile
274
+ .weda-grid-navigation__row:last-child
275
+ .weda-grid-navigation__col.weda-grid-navigation__col--big
276
+ .wedatea2td-grid__box {
277
+ padding-bottom: 1.42857rem;
278
+ }
279
+
280
+ .weda-grid-navigation-mobile
281
+ .weda-grid-navigation__col
282
+ .weda-grid-navigation__icon {
283
+ width: 2.57142em;
284
+ height: 2.57142em;
285
+ }
286
+ .weda-grid-navigation-mobile
287
+ .weda-grid-navigation__col
288
+ .weda-grid-navigation__fonticon {
289
+ font-size: 2.57142em;
290
+ }
291
+
292
+ .weda-grid-navigation-mobile
293
+ .weda-grid-navigation__col--small
294
+ .weda-grid-navigation__icon {
295
+ width: 2.285714em;
296
+ height: 2.285714em;
297
+ }
298
+ .weda-grid-navigation-mobile
299
+ .weda-grid-navigation__col--small
300
+ .weda-grid-navigation__fonticon {
301
+ font-size: 2.285714em;
302
+ }
303
+ .weda-grid-navigation-mobile
304
+ .weda-grid-navigation__col--big
305
+ .weda-grid-navigation__fonticon {
306
+ font-size: 2.857142em;
307
+ }
308
+ .weda-grid-navigation-mobile
309
+ .weda-grid-navigation__col--big
310
+ .weda-grid-navigation__icon {
311
+ width: 2.85714em;
312
+ height: 2.85714em;
313
+ }
314
+ .weda-grid-navigation-mobile
315
+ .weda-grid-navigation__col
316
+ .weda-grid-navigation__text,
317
+ .weda-grid-navigation-mobile
318
+ .weda-grid-navigation__col--big
319
+ .weda-grid-navigation__text,
320
+ .weda-grid-navigation-mobile
321
+ .weda-grid-navigation__col--small
322
+ .weda-grid-navigation__text {
323
+ font-size: 0.85714em;
324
+ line-height: 1.42857em;
325
+ margin-top: 0.28571rem;
326
+ }
327
+
328
+ .weda-grid-navigation-mobile
329
+ .weda-grid-navigation__col--big
330
+ .weda-grid-navigation__text {
331
+ margin-top: 0.57143rem;
332
+ }
@@ -0,0 +1,46 @@
1
+ /// <reference types="react" />
2
+ import type { CommonPropsType } from '../../types';
3
+ import './index.css';
4
+ export default function NavLayout({ navOption, mobileCol, pcCol, iconSize, textColor, fontSize, lineHeight, fontWeight, maxLines, className, style, }: H5NavLayoutProps): JSX.Element;
5
+ export interface H5NavLayoutProps extends CommonPropsType {
6
+ /**
7
+ * 导航配置
8
+ */
9
+ navOption?: Array<any>;
10
+ /**
11
+ * 移动端每行列数
12
+ */
13
+ mobileCol?: number;
14
+ /**
15
+ * PC端每行列数
16
+ */
17
+ pcCol?: number;
18
+ /**
19
+ * icon尺寸
20
+ */
21
+ iconSize?: 'medium' | 'samll' | 'big';
22
+ /**
23
+ * 标题颜色
24
+ */
25
+ textColor?: string;
26
+ /**
27
+ * 标题字重
28
+ */
29
+ fontWeight?: 'lighter' | 'normal' | 'bolder';
30
+ /**
31
+ * 最大行数
32
+ */
33
+ maxLines?: number;
34
+ /**
35
+ * 字号
36
+ */
37
+ fontSize?: number;
38
+ /**
39
+ * 行高
40
+ */
41
+ lineHeight: string;
42
+ /**
43
+ * 点击事件
44
+ */
45
+ navTap?: (colInfo: any) => void;
46
+ }
@@ -0,0 +1,116 @@
1
+ import React from 'react';
2
+ import classNames from '../../utils/classnames';
3
+ import { Row, Col, ConfigProvider } from 'tea-component';
4
+ import { usePlatform } from '../../utils/platform';
5
+ import './index.css';
6
+ import { IconFont } from 'tdesign-icons-react';
7
+ import Image from '../image';
8
+ /**
9
+ * Web端
10
+ */
11
+ const CLASS_PREFIX = 'weda-grid-navigation';
12
+ export default function NavLayout({ navOption, mobileCol, pcCol, iconSize, textColor, fontSize, lineHeight, fontWeight, maxLines, className, style, }) {
13
+ const platform = usePlatform();
14
+ // 等分列占比
15
+ const [colCount, setColCount] = React.useState(4);
16
+ const cls = classNames({
17
+ [CLASS_PREFIX]: true,
18
+ [className]: className,
19
+ [`${CLASS_PREFIX}-mobile`]: platform === 'h5',
20
+ });
21
+ const navList = React.useMemo(() => {
22
+ const list = [];
23
+ list.length = Math.floor(navOption.length / colCount);
24
+ list.forEach((item, index) => {
25
+ list[index] = [];
26
+ });
27
+ navOption.forEach((item, index) => {
28
+ const _index = Math.floor(index / colCount);
29
+ if (!list[_index] || list[_index].length <= 0) {
30
+ // 保证每个col 的数据都是有的,列入总共7个数据,那么第二行的3, 4,5数据是undefined, 占位
31
+ list[_index] = Array(colCount).fill(null);
32
+ }
33
+ const paramObj = {};
34
+ if (item === null || item === void 0 ? void 0 : item.params) {
35
+ for (const info of item.params) {
36
+ paramObj[info.key] = info.value;
37
+ }
38
+ }
39
+ item.paramObj = paramObj;
40
+ list[_index][index - _index * colCount] = item;
41
+ });
42
+ return list;
43
+ }, [colCount, navOption]);
44
+ React.useEffect(() => {
45
+ setColCount(platform === 'h5' ? mobileCol : pcCol);
46
+ }, [mobileCol, pcCol]);
47
+ // 每个col的宽度百分比
48
+ const colStyle = {
49
+ width: `${(1 / colCount) * 100}%`,
50
+ };
51
+ const mutiLabelStyle = {
52
+ width: '100%',
53
+ display: '-webkit-box',
54
+ WebkitLineClamp: `${maxLines ? maxLines : 'inherit'}`,
55
+ overflow: 'hidden',
56
+ color: `${textColor}`,
57
+ fontWeight: `${fontWeight}`,
58
+ fontSize: `${fontSize}` + 'px',
59
+ lineHeight: `${lineHeight == 'auto' ? 'normal' : lineHeight}`,
60
+ };
61
+ const navTap = (colInfo = navOption[0]) => {
62
+ switch (colInfo === null || colInfo === void 0 ? void 0 : colInfo.tapStatus) {
63
+ case 'tap':
64
+ return null;
65
+ case 'inside':
66
+ if (colInfo.insideUrl) {
67
+ app.navigateTo({
68
+ mode: 'weDa',
69
+ pageId: colInfo.insideUrl,
70
+ params: (colInfo === null || colInfo === void 0 ? void 0 : colInfo.withParams) && (colInfo === null || colInfo === void 0 ? void 0 : colInfo.params.length) > 0
71
+ ? colInfo.paramObj
72
+ : null,
73
+ });
74
+ }
75
+ else {
76
+ return;
77
+ }
78
+ break;
79
+ case 'outer':
80
+ if (colInfo.newPage) {
81
+ colInfo.outerUrl ? window.open(colInfo.outerUrl) : false;
82
+ }
83
+ else {
84
+ colInfo.outerUrl ? (window.location.href = colInfo.outerUrl) : false;
85
+ }
86
+ break;
87
+ default:
88
+ return null;
89
+ }
90
+ };
91
+ return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
92
+ React.createElement("div", { className: cls, "data-testid": "navLayout", style: style },
93
+ React.createElement("div", { className: `${CLASS_PREFIX}__wrapper` }, navList.map((row, rowIndex) => {
94
+ return (React.createElement(Row, { className: `${CLASS_PREFIX}__row`, key: rowIndex },
95
+ React.createElement(React.Fragment, null, row &&
96
+ row.map((colInfo, colIndex) => {
97
+ return (React.createElement(Col, { style: {
98
+ ...colStyle,
99
+ cursor: (colInfo === null || colInfo === void 0 ? void 0 : colInfo.tapStatus) != 'tap'
100
+ ? 'pointer'
101
+ : 'auto',
102
+ }, className: `${CLASS_PREFIX}__col ${CLASS_PREFIX}__col--${iconSize}`, key: colIndex },
103
+ React.createElement("div", { "data-testid": `${colIndex}_click`, onClick: () => navTap(colInfo) },
104
+ !(colInfo === null || colInfo === void 0 ? void 0 : colInfo.iconSrc) ? (React.createElement(IconShow, { onIcon: colInfo === null || colInfo === void 0 ? void 0 : colInfo.icon })) : (React.createElement("div", { className: `${CLASS_PREFIX}__img` },
105
+ React.createElement(Image, { mode: 'scaleToFill', lazyLoad: false, maskClosable: false, imgPreview: false, fit: 'cover', alt: '', src: colInfo === null || colInfo === void 0 ? void 0 : colInfo.iconSrc, className: `${CLASS_PREFIX}__icon` }))),
106
+ (colInfo === null || colInfo === void 0 ? void 0 : colInfo.title) && (React.createElement("div", { className: `${CLASS_PREFIX}__text`, style: mutiLabelStyle }, colInfo === null || colInfo === void 0 ? void 0 : colInfo.title)))));
107
+ }))));
108
+ })))));
109
+ }
110
+ /**
111
+ * icon回显组件
112
+ */
113
+ const IconShow = ({ onIcon }) => {
114
+ return (React.createElement(React.Fragment, null, (onIcon === null || onIcon === void 0 ? void 0 : onIcon.includes('td:')) ? (React.createElement("div", null,
115
+ React.createElement(IconFont, { name: onIcon === null || onIcon === void 0 ? void 0 : onIcon.split(':')[1], className: `${CLASS_PREFIX}__fonticon` }))) : (React.createElement("div", { className: `${CLASS_PREFIX}__fonticon lcap-icon lcap-icon-${onIcon}` }))));
116
+ };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { IMenuItem, INavigationStyle } from './type';
3
+ export declare const renderTitle: (navigationStyle: INavigationStyle) => JSX.Element;
4
+ export declare const renderMenuTitle: (navigationStyle: INavigationStyle, item: Partial<IMenuItem>, hasIcon: boolean) => JSX.Element;
5
+ export declare const renderLogo: (navigationStyle: INavigationStyle, className: string) => JSX.Element;
6
+ export declare const IconShow: ({ onIcon, menuColor, menuFontSize }: {
7
+ onIcon: any;
8
+ menuColor: any;
9
+ menuFontSize: any;
10
+ }) => JSX.Element;
11
+ export declare const renderMenuIcon: (iconUrl: string, iconPath: string, navigationStyle: INavigationStyle) => JSX.Element;
12
+ export declare const navigateTo: (menu: IMenuItem) => void;
13
+ export declare const hasSelectedMenu: (menu: IMenuItem, selectedkey: string) => boolean;
14
+ export declare const expandMenu: (menuData: IMenuItem[], menuItem: Partial<IMenuItem>, init?: boolean) => any;
15
+ export declare const findMenuItemByPath: (menus: IMenuItem[], targetPath: string) => IMenuItem | null;