maxit-cli 0.1.0

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 (715) hide show
  1. package/LICENSE +49 -0
  2. package/README.md +56 -0
  3. package/bin/maxit.js +75 -0
  4. package/lib/commands.js +142 -0
  5. package/lib/project.js +58 -0
  6. package/lib/registry.js +50 -0
  7. package/package.json +30 -0
  8. package/registry/components/action-sheet/action-sheet.js +1 -0
  9. package/registry/components/action-sheet/action-sheet.json +1 -0
  10. package/registry/components/action-sheet/action-sheet.wxml +1 -0
  11. package/registry/components/action-sheet/action-sheet.wxs +34 -0
  12. package/registry/components/action-sheet/action-sheet.wxss +197 -0
  13. package/registry/components/action-sheet/index.js +1 -0
  14. package/registry/components/action-sheet/props.js +1 -0
  15. package/registry/components/action-sheet/show.js +1 -0
  16. package/registry/components/action-sheet/template/grid.wxml +1 -0
  17. package/registry/components/avatar/avatar.js +1 -0
  18. package/registry/components/avatar/avatar.json +1 -0
  19. package/registry/components/avatar/avatar.wxml +1 -0
  20. package/registry/components/avatar/avatar.wxs +30 -0
  21. package/registry/components/avatar/avatar.wxss +105 -0
  22. package/registry/components/avatar/index.js +1 -0
  23. package/registry/components/avatar/props.js +1 -0
  24. package/registry/components/avatar-group/avatar-group.js +1 -0
  25. package/registry/components/avatar-group/avatar-group.json +1 -0
  26. package/registry/components/avatar-group/avatar-group.wxml +1 -0
  27. package/registry/components/avatar-group/avatar-group.wxss +248 -0
  28. package/registry/components/avatar-group/index.js +1 -0
  29. package/registry/components/avatar-group/props.js +1 -0
  30. package/registry/components/back-top/back-top.js +1 -0
  31. package/registry/components/back-top/back-top.json +1 -0
  32. package/registry/components/back-top/back-top.wxml +1 -0
  33. package/registry/components/back-top/back-top.wxss +77 -0
  34. package/registry/components/back-top/index.js +1 -0
  35. package/registry/components/back-top/props.js +1 -0
  36. package/registry/components/badge/badge.js +1 -0
  37. package/registry/components/badge/badge.json +1 -0
  38. package/registry/components/badge/badge.wxml +1 -0
  39. package/registry/components/badge/badge.wxs +64 -0
  40. package/registry/components/badge/badge.wxss +168 -0
  41. package/registry/components/badge/index.js +1 -0
  42. package/registry/components/badge/props.js +1 -0
  43. package/registry/components/balance-card/balance-card.js +34 -0
  44. package/registry/components/balance-card/balance-card.json +1 -0
  45. package/registry/components/balance-card/balance-card.wxml +33 -0
  46. package/registry/components/balance-card/balance-card.wxss +111 -0
  47. package/registry/components/balance-card/index.js +2 -0
  48. package/registry/components/balance-card/props.js +14 -0
  49. package/registry/components/balance-thumb-card/balance-thumb-card.js +39 -0
  50. package/registry/components/balance-thumb-card/balance-thumb-card.json +1 -0
  51. package/registry/components/balance-thumb-card/balance-thumb-card.wxml +26 -0
  52. package/registry/components/balance-thumb-card/balance-thumb-card.wxss +31 -0
  53. package/registry/components/balance-thumb-card/index.js +2 -0
  54. package/registry/components/balance-thumb-card/props.js +17 -0
  55. package/registry/components/bill-card/bill-card.js +23 -0
  56. package/registry/components/bill-card/bill-card.json +1 -0
  57. package/registry/components/bill-card/bill-card.wxml +30 -0
  58. package/registry/components/bill-card/bill-card.wxss +33 -0
  59. package/registry/components/bill-card/index.js +2 -0
  60. package/registry/components/bill-card/props.js +18 -0
  61. package/registry/components/button/button.js +1 -0
  62. package/registry/components/button/button.json +1 -0
  63. package/registry/components/button/button.wxml +1 -0
  64. package/registry/components/button/button.wxss +775 -0
  65. package/registry/components/button/index.js +1 -0
  66. package/registry/components/button/props.js +1 -0
  67. package/registry/components/calendar/calendar-header.wxml +1 -0
  68. package/registry/components/calendar/calendar.js +1 -0
  69. package/registry/components/calendar/calendar.json +1 -0
  70. package/registry/components/calendar/calendar.wxml +1 -0
  71. package/registry/components/calendar/calendar.wxs +44 -0
  72. package/registry/components/calendar/calendar.wxss +246 -0
  73. package/registry/components/calendar/index.js +1 -0
  74. package/registry/components/calendar/props.js +1 -0
  75. package/registry/components/calendar/template.wxml +1 -0
  76. package/registry/components/calendar/utils.js +1 -0
  77. package/registry/components/card/card.js +24 -0
  78. package/registry/components/card/card.json +1 -0
  79. package/registry/components/card/card.wxml +23 -0
  80. package/registry/components/card/card.wxss +103 -0
  81. package/registry/components/card/index.js +2 -0
  82. package/registry/components/card/props.js +16 -0
  83. package/registry/components/card-list/card-list.js +22 -0
  84. package/registry/components/card-list/card-list.json +1 -0
  85. package/registry/components/card-list/card-list.wxml +7 -0
  86. package/registry/components/card-list/card-list.wxss +30 -0
  87. package/registry/components/card-list/index.js +2 -0
  88. package/registry/components/card-list/props.js +16 -0
  89. package/registry/components/cascader/cascader.js +1 -0
  90. package/registry/components/cascader/cascader.json +1 -0
  91. package/registry/components/cascader/cascader.wxml +1 -0
  92. package/registry/components/cascader/cascader.wxss +178 -0
  93. package/registry/components/cascader/index.js +1 -0
  94. package/registry/components/cascader/props.js +1 -0
  95. package/registry/components/category-filter/category-filter.js +50 -0
  96. package/registry/components/category-filter/category-filter.json +1 -0
  97. package/registry/components/category-filter/category-filter.wxml +16 -0
  98. package/registry/components/category-filter/category-filter.wxss +47 -0
  99. package/registry/components/category-filter/index.js +2 -0
  100. package/registry/components/category-filter/props.js +10 -0
  101. package/registry/components/cell/cell.js +1 -0
  102. package/registry/components/cell/cell.json +1 -0
  103. package/registry/components/cell/cell.wxml +1 -0
  104. package/registry/components/cell/cell.wxss +136 -0
  105. package/registry/components/cell/index.js +1 -0
  106. package/registry/components/cell/props.js +1 -0
  107. package/registry/components/check-tag/check-tag.js +1 -0
  108. package/registry/components/check-tag/check-tag.json +1 -0
  109. package/registry/components/check-tag/check-tag.wxml +1 -0
  110. package/registry/components/check-tag/check-tag.wxss +275 -0
  111. package/registry/components/check-tag/index.js +1 -0
  112. package/registry/components/check-tag/props.js +1 -0
  113. package/registry/components/checkbox/checkbox.js +1 -0
  114. package/registry/components/checkbox/checkbox.json +1 -0
  115. package/registry/components/checkbox/checkbox.wxml +1 -0
  116. package/registry/components/checkbox/checkbox.wxss +230 -0
  117. package/registry/components/checkbox/index.js +1 -0
  118. package/registry/components/checkbox/props.js +1 -0
  119. package/registry/components/checkbox-group/checkbox-group.js +1 -0
  120. package/registry/components/checkbox-group/checkbox-group.json +1 -0
  121. package/registry/components/checkbox-group/checkbox-group.wxml +1 -0
  122. package/registry/components/checkbox-group/checkbox-group.wxss +7 -0
  123. package/registry/components/checkbox-group/index.js +1 -0
  124. package/registry/components/checkbox-group/props.js +1 -0
  125. package/registry/components/collapse/collapse.js +1 -0
  126. package/registry/components/collapse/collapse.json +1 -0
  127. package/registry/components/collapse/collapse.wxml +1 -0
  128. package/registry/components/collapse/collapse.wxss +8 -0
  129. package/registry/components/collapse/index.js +1 -0
  130. package/registry/components/collapse/props.js +1 -0
  131. package/registry/components/collapse-panel/collapse-panel.js +1 -0
  132. package/registry/components/collapse-panel/collapse-panel.json +1 -0
  133. package/registry/components/collapse-panel/collapse-panel.wxml +1 -0
  134. package/registry/components/collapse-panel/collapse-panel.wxss +186 -0
  135. package/registry/components/collapse-panel/index.js +1 -0
  136. package/registry/components/collapse-panel/props.js +1 -0
  137. package/registry/components/color-picker/color-picker.js +1 -0
  138. package/registry/components/color-picker/color-picker.json +1 -0
  139. package/registry/components/color-picker/color-picker.wxml +1 -0
  140. package/registry/components/color-picker/color-picker.wxss +312 -0
  141. package/registry/components/color-picker/constants.js +1 -0
  142. package/registry/components/color-picker/index.js +1 -0
  143. package/registry/components/color-picker/interfaces.js +1 -0
  144. package/registry/components/color-picker/props.js +1 -0
  145. package/registry/components/color-picker/template.wxml +1 -0
  146. package/registry/components/color-picker/utils.js +1 -0
  147. package/registry/components/common/bus.js +1 -0
  148. package/registry/components/common/config.js +1 -0
  149. package/registry/components/common/libs/tinycolor.js +1 -0
  150. package/registry/components/common/locale.js +20 -0
  151. package/registry/components/common/mixins/page-scroll.js +1 -0
  152. package/registry/components/common/mixins/touch.js +1 -0
  153. package/registry/components/common/mixins/transition.js +1 -0
  154. package/registry/components/common/mixins/using-config.js +24 -0
  155. package/registry/components/common/mixins/using-custom-navbar.js +1 -0
  156. package/registry/components/common/shared/calendar/index.js +1 -0
  157. package/registry/components/common/shared/color-picker/cmyk.js +1 -0
  158. package/registry/components/common/shared/color-picker/color.js +1 -0
  159. package/registry/components/common/shared/color-picker/gradient.js +1 -0
  160. package/registry/components/common/shared/color-picker/index.js +1 -0
  161. package/registry/components/common/shared/date.js +1 -0
  162. package/registry/components/common/shared/qrcode/qrcodegen.js +1 -0
  163. package/registry/components/common/shared/qrcode/utils.js +1 -0
  164. package/registry/components/common/src/control.js +1 -0
  165. package/registry/components/common/src/flatTool.js +1 -0
  166. package/registry/components/common/src/index.js +1 -0
  167. package/registry/components/common/src/instantiationDecorator.js +1 -0
  168. package/registry/components/common/src/superComponent.js +1 -0
  169. package/registry/components/common/style/card.wxss +245 -0
  170. package/registry/components/common/style/index.wxss +3 -0
  171. package/registry/components/common/style/tokens.wxss +233 -0
  172. package/registry/components/common/template/badge.wxml +1 -0
  173. package/registry/components/common/template/button.wxml +1 -0
  174. package/registry/components/common/template/icon.wxml +1 -0
  175. package/registry/components/common/template/image.wxml +1 -0
  176. package/registry/components/common/tslib.js +2 -0
  177. package/registry/components/common/typography/ellipsis.wxml +1 -0
  178. package/registry/components/common/typography/typography.wxs +49 -0
  179. package/registry/components/common/utils.js +1 -0
  180. package/registry/components/common/utils.wxs +149 -0
  181. package/registry/components/common/validator.js +1 -0
  182. package/registry/components/common/wechat.js +1 -0
  183. package/registry/components/consumption-card/consumption-card.js +23 -0
  184. package/registry/components/consumption-card/consumption-card.json +1 -0
  185. package/registry/components/consumption-card/consumption-card.wxml +16 -0
  186. package/registry/components/consumption-card/consumption-card.wxss +36 -0
  187. package/registry/components/consumption-card/index.js +2 -0
  188. package/registry/components/consumption-card/props.js +14 -0
  189. package/registry/components/contact-list/contact-list.js +60 -0
  190. package/registry/components/contact-list/contact-list.json +1 -0
  191. package/registry/components/contact-list/contact-list.wxml +24 -0
  192. package/registry/components/contact-list/contact-list.wxss +73 -0
  193. package/registry/components/contact-list/index.js +2 -0
  194. package/registry/components/contact-list/props.js +13 -0
  195. package/registry/components/description-tile/description-tile.js +22 -0
  196. package/registry/components/description-tile/description-tile.json +1 -0
  197. package/registry/components/description-tile/description-tile.wxml +11 -0
  198. package/registry/components/description-tile/description-tile.wxss +21 -0
  199. package/registry/components/description-tile/index.js +2 -0
  200. package/registry/components/description-tile/props.js +10 -0
  201. package/registry/components/details-card/details-card.js +38 -0
  202. package/registry/components/details-card/details-card.json +1 -0
  203. package/registry/components/details-card/details-card.wxml +37 -0
  204. package/registry/components/details-card/details-card.wxss +119 -0
  205. package/registry/components/details-card/index.js +2 -0
  206. package/registry/components/details-card/props.js +22 -0
  207. package/registry/components/dialog/dialog.js +1 -0
  208. package/registry/components/dialog/dialog.json +1 -0
  209. package/registry/components/dialog/dialog.wxml +1 -0
  210. package/registry/components/dialog/dialog.wxs +13 -0
  211. package/registry/components/dialog/dialog.wxss +123 -0
  212. package/registry/components/dialog/index.js +1 -0
  213. package/registry/components/dialog/props.js +1 -0
  214. package/registry/components/divider/divider.js +1 -0
  215. package/registry/components/divider/divider.json +1 -0
  216. package/registry/components/divider/divider.wxml +1 -0
  217. package/registry/components/divider/divider.wxss +69 -0
  218. package/registry/components/divider/index.js +1 -0
  219. package/registry/components/divider/props.js +1 -0
  220. package/registry/components/drawer/drawer.js +1 -0
  221. package/registry/components/drawer/drawer.json +1 -0
  222. package/registry/components/drawer/drawer.wxml +1 -0
  223. package/registry/components/drawer/drawer.wxss +75 -0
  224. package/registry/components/drawer/index.js +1 -0
  225. package/registry/components/drawer/props.js +1 -0
  226. package/registry/components/dropdown-item/dropdown-item.js +1 -0
  227. package/registry/components/dropdown-item/dropdown-item.json +1 -0
  228. package/registry/components/dropdown-item/dropdown-item.wxml +1 -0
  229. package/registry/components/dropdown-item/dropdown-item.wxss +116 -0
  230. package/registry/components/dropdown-item/index.js +1 -0
  231. package/registry/components/dropdown-item/index.wxs +9 -0
  232. package/registry/components/dropdown-item/props.js +1 -0
  233. package/registry/components/dropdown-menu/dropdown-menu.js +1 -0
  234. package/registry/components/dropdown-menu/dropdown-menu.json +1 -0
  235. package/registry/components/dropdown-menu/dropdown-menu.wxml +1 -0
  236. package/registry/components/dropdown-menu/dropdown-menu.wxss +72 -0
  237. package/registry/components/dropdown-menu/index.js +1 -0
  238. package/registry/components/dropdown-menu/props.js +1 -0
  239. package/registry/components/empty/empty.js +1 -0
  240. package/registry/components/empty/empty.json +1 -0
  241. package/registry/components/empty/empty.wxml +1 -0
  242. package/registry/components/empty/empty.wxss +28 -0
  243. package/registry/components/empty/index.js +1 -0
  244. package/registry/components/empty/props.js +1 -0
  245. package/registry/components/entry-card/entry-card.js +23 -0
  246. package/registry/components/entry-card/entry-card.json +1 -0
  247. package/registry/components/entry-card/entry-card.wxml +14 -0
  248. package/registry/components/entry-card/entry-card.wxss +30 -0
  249. package/registry/components/entry-card/index.js +2 -0
  250. package/registry/components/entry-card/props.js +11 -0
  251. package/registry/components/file-drop/file-drop.js +23 -0
  252. package/registry/components/file-drop/file-drop.json +1 -0
  253. package/registry/components/file-drop/file-drop.wxml +13 -0
  254. package/registry/components/file-drop/file-drop.wxss +35 -0
  255. package/registry/components/file-drop/index.js +2 -0
  256. package/registry/components/file-drop/props.js +9 -0
  257. package/registry/components/grid/grid.js +1 -0
  258. package/registry/components/grid/grid.json +1 -0
  259. package/registry/components/grid/grid.wxml +1 -0
  260. package/registry/components/grid/grid.wxss +18 -0
  261. package/registry/components/grid/index.js +1 -0
  262. package/registry/components/grid/props.js +1 -0
  263. package/registry/components/grid-item/grid-item.js +1 -0
  264. package/registry/components/grid-item/grid-item.json +1 -0
  265. package/registry/components/grid-item/grid-item.wxml +1 -0
  266. package/registry/components/grid-item/grid-item.wxss +130 -0
  267. package/registry/components/grid-item/index.js +1 -0
  268. package/registry/components/grid-item/props.js +1 -0
  269. package/registry/components/guide/content.wxml +1 -0
  270. package/registry/components/guide/guide.js +1 -0
  271. package/registry/components/guide/guide.json +1 -0
  272. package/registry/components/guide/guide.wxml +1 -0
  273. package/registry/components/guide/guide.wxss +79 -0
  274. package/registry/components/guide/index.js +1 -0
  275. package/registry/components/guide/props.js +1 -0
  276. package/registry/components/icon/icon.js +1 -0
  277. package/registry/components/icon/icon.json +1 -0
  278. package/registry/components/icon/icon.wxml +1 -0
  279. package/registry/components/icon/icon.wxss +2361 -0
  280. package/registry/components/icon/index.js +1 -0
  281. package/registry/components/icon/props.js +1 -0
  282. package/registry/components/image/image.js +1 -0
  283. package/registry/components/image/image.json +1 -0
  284. package/registry/components/image/image.wxml +1 -0
  285. package/registry/components/image/image.wxss +55 -0
  286. package/registry/components/image/index.js +1 -0
  287. package/registry/components/image/props.js +1 -0
  288. package/registry/components/image-viewer/image-viewer.js +1 -0
  289. package/registry/components/image-viewer/image-viewer.json +1 -0
  290. package/registry/components/image-viewer/image-viewer.wxml +1 -0
  291. package/registry/components/image-viewer/image-viewer.wxs +7 -0
  292. package/registry/components/image-viewer/image-viewer.wxss +90 -0
  293. package/registry/components/image-viewer/index.js +1 -0
  294. package/registry/components/image-viewer/props.js +1 -0
  295. package/registry/components/info-card/index.js +2 -0
  296. package/registry/components/info-card/info-card.js +22 -0
  297. package/registry/components/info-card/info-card.json +1 -0
  298. package/registry/components/info-card/info-card.wxml +14 -0
  299. package/registry/components/info-card/info-card.wxss +56 -0
  300. package/registry/components/info-card/props.js +11 -0
  301. package/registry/components/input/index.js +1 -0
  302. package/registry/components/input/input.js +1 -0
  303. package/registry/components/input/input.json +1 -0
  304. package/registry/components/input/input.wxml +1 -0
  305. package/registry/components/input/input.wxs +16 -0
  306. package/registry/components/input/input.wxss +313 -0
  307. package/registry/components/input/props.js +1 -0
  308. package/registry/components/insight-card/index.js +2 -0
  309. package/registry/components/insight-card/insight-card.js +19 -0
  310. package/registry/components/insight-card/insight-card.json +1 -0
  311. package/registry/components/insight-card/insight-card.wxml +17 -0
  312. package/registry/components/insight-card/insight-card.wxss +35 -0
  313. package/registry/components/insight-card/props.js +12 -0
  314. package/registry/components/link/index.js +1 -0
  315. package/registry/components/link/link.js +1 -0
  316. package/registry/components/link/link.json +1 -0
  317. package/registry/components/link/link.wxml +1 -0
  318. package/registry/components/link/link.wxss +155 -0
  319. package/registry/components/link/props.js +1 -0
  320. package/registry/components/list-item/index.js +2 -0
  321. package/registry/components/list-item/list-item.js +39 -0
  322. package/registry/components/list-item/list-item.json +1 -0
  323. package/registry/components/list-item/list-item.wxml +22 -0
  324. package/registry/components/list-item/list-item.wxss +110 -0
  325. package/registry/components/list-item/props.js +22 -0
  326. package/registry/components/loading/index.js +1 -0
  327. package/registry/components/loading/loading.js +1 -0
  328. package/registry/components/loading/loading.json +1 -0
  329. package/registry/components/loading/loading.wxml +1 -0
  330. package/registry/components/loading/loading.wxss +281 -0
  331. package/registry/components/loading/props.js +1 -0
  332. package/registry/components/main-card/index.js +2 -0
  333. package/registry/components/main-card/main-card.js +23 -0
  334. package/registry/components/main-card/main-card.json +1 -0
  335. package/registry/components/main-card/main-card.wxml +37 -0
  336. package/registry/components/main-card/main-card.wxss +63 -0
  337. package/registry/components/main-card/props.js +24 -0
  338. package/registry/components/media-card/index.js +2 -0
  339. package/registry/components/media-card/media-card.js +23 -0
  340. package/registry/components/media-card/media-card.json +1 -0
  341. package/registry/components/media-card/media-card.wxml +11 -0
  342. package/registry/components/media-card/media-card.wxss +51 -0
  343. package/registry/components/media-card/props.js +8 -0
  344. package/registry/components/message/index.js +1 -0
  345. package/registry/components/message/message.interface.js +1 -0
  346. package/registry/components/message/message.js +1 -0
  347. package/registry/components/message/message.json +1 -0
  348. package/registry/components/message/message.wxml +1 -0
  349. package/registry/components/message/message.wxss +2 -0
  350. package/registry/components/message/props.js +1 -0
  351. package/registry/components/message-item/index.js +1 -0
  352. package/registry/components/message-item/message-item.js +1 -0
  353. package/registry/components/message-item/message-item.json +1 -0
  354. package/registry/components/message-item/message-item.wxml +1 -0
  355. package/registry/components/message-item/message-item.wxs +31 -0
  356. package/registry/components/message-item/message-item.wxss +141 -0
  357. package/registry/components/navbar/index.js +1 -0
  358. package/registry/components/navbar/navbar.js +1 -0
  359. package/registry/components/navbar/navbar.json +1 -0
  360. package/registry/components/navbar/navbar.wxml +1 -0
  361. package/registry/components/navbar/navbar.wxss +126 -0
  362. package/registry/components/navbar/props.js +1 -0
  363. package/registry/components/notice-bar/index.js +1 -0
  364. package/registry/components/notice-bar/notice-bar.js +1 -0
  365. package/registry/components/notice-bar/notice-bar.json +1 -0
  366. package/registry/components/notice-bar/notice-bar.wxml +1 -0
  367. package/registry/components/notice-bar/notice-bar.wxss +95 -0
  368. package/registry/components/notice-bar/props.js +1 -0
  369. package/registry/components/notification-item/index.js +2 -0
  370. package/registry/components/notification-item/notification-item.js +35 -0
  371. package/registry/components/notification-item/notification-item.json +1 -0
  372. package/registry/components/notification-item/notification-item.wxml +14 -0
  373. package/registry/components/notification-item/notification-item.wxss +47 -0
  374. package/registry/components/notification-item/props.js +10 -0
  375. package/registry/components/offer-card/index.js +2 -0
  376. package/registry/components/offer-card/offer-card.js +22 -0
  377. package/registry/components/offer-card/offer-card.json +1 -0
  378. package/registry/components/offer-card/offer-card.wxml +33 -0
  379. package/registry/components/offer-card/offer-card.wxss +37 -0
  380. package/registry/components/offer-card/props.js +21 -0
  381. package/registry/components/om-card/index.js +2 -0
  382. package/registry/components/om-card/om-card.js +40 -0
  383. package/registry/components/om-card/om-card.json +1 -0
  384. package/registry/components/om-card/om-card.wxml +35 -0
  385. package/registry/components/om-card/om-card.wxss +90 -0
  386. package/registry/components/om-card/props.js +14 -0
  387. package/registry/components/overlay/index.js +1 -0
  388. package/registry/components/overlay/overlay.js +1 -0
  389. package/registry/components/overlay/overlay.json +1 -0
  390. package/registry/components/overlay/overlay.wxml +1 -0
  391. package/registry/components/overlay/overlay.wxss +22 -0
  392. package/registry/components/overlay/props.js +1 -0
  393. package/registry/components/paragraph/index.js +1 -0
  394. package/registry/components/paragraph/paragraph.js +1 -0
  395. package/registry/components/paragraph/paragraph.json +1 -0
  396. package/registry/components/paragraph/paragraph.wxml +1 -0
  397. package/registry/components/paragraph/paragraph.wxss +151 -0
  398. package/registry/components/paragraph/props.js +1 -0
  399. package/registry/components/picker/index.js +1 -0
  400. package/registry/components/picker/picker.js +1 -0
  401. package/registry/components/picker/picker.json +1 -0
  402. package/registry/components/picker/picker.wxml +1 -0
  403. package/registry/components/picker/picker.wxs +9 -0
  404. package/registry/components/picker/picker.wxss +84 -0
  405. package/registry/components/picker/props.js +1 -0
  406. package/registry/components/picker/template.wxml +1 -0
  407. package/registry/components/picker-item/index.js +1 -0
  408. package/registry/components/picker-item/picker-item.js +1 -0
  409. package/registry/components/picker-item/picker-item.json +1 -0
  410. package/registry/components/picker-item/picker-item.wxml +1 -0
  411. package/registry/components/picker-item/picker-item.wxss +41 -0
  412. package/registry/components/picker-item/props.js +1 -0
  413. package/registry/components/popover/index.js +1 -0
  414. package/registry/components/popover/popover.js +1 -0
  415. package/registry/components/popover/popover.json +1 -0
  416. package/registry/components/popover/popover.wxml +1 -0
  417. package/registry/components/popover/popover.wxss +336 -0
  418. package/registry/components/popover/props.js +1 -0
  419. package/registry/components/popup/index.js +1 -0
  420. package/registry/components/popup/popup.js +1 -0
  421. package/registry/components/popup/popup.json +1 -0
  422. package/registry/components/popup/popup.wxml +1 -0
  423. package/registry/components/popup/popup.wxs +21 -0
  424. package/registry/components/popup/popup.wxss +96 -0
  425. package/registry/components/popup/props.js +1 -0
  426. package/registry/components/post-item/index.js +2 -0
  427. package/registry/components/post-item/post-item.js +22 -0
  428. package/registry/components/post-item/post-item.json +1 -0
  429. package/registry/components/post-item/post-item.wxml +5 -0
  430. package/registry/components/post-item/post-item.wxss +37 -0
  431. package/registry/components/post-item/props.js +7 -0
  432. package/registry/components/progress/index.js +1 -0
  433. package/registry/components/progress/progress.js +1 -0
  434. package/registry/components/progress/progress.json +1 -0
  435. package/registry/components/progress/progress.wxml +1 -0
  436. package/registry/components/progress/progress.wxs +80 -0
  437. package/registry/components/progress/progress.wxss +161 -0
  438. package/registry/components/progress/props.js +1 -0
  439. package/registry/components/progress/utils.js +1 -0
  440. package/registry/components/purchase-card/index.js +2 -0
  441. package/registry/components/purchase-card/props.js +13 -0
  442. package/registry/components/purchase-card/purchase-card.js +40 -0
  443. package/registry/components/purchase-card/purchase-card.json +1 -0
  444. package/registry/components/purchase-card/purchase-card.wxml +22 -0
  445. package/registry/components/purchase-card/purchase-card.wxss +19 -0
  446. package/registry/components/qrcode/components/qrcode-canvas/props.js +1 -0
  447. package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.js +1 -0
  448. package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.json +1 -0
  449. package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxml +1 -0
  450. package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxss +10 -0
  451. package/registry/components/qrcode/components/qrcode-status/props.js +1 -0
  452. package/registry/components/qrcode/components/qrcode-status/qrcode-status.js +1 -0
  453. package/registry/components/qrcode/components/qrcode-status/qrcode-status.json +1 -0
  454. package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxml +1 -0
  455. package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxss +32 -0
  456. package/registry/components/qrcode/hooks/useQRCode.js +1 -0
  457. package/registry/components/qrcode/index.js +1 -0
  458. package/registry/components/qrcode/props.js +1 -0
  459. package/registry/components/qrcode/qrcode.js +1 -0
  460. package/registry/components/qrcode/qrcode.json +1 -0
  461. package/registry/components/qrcode/qrcode.wxml +1 -0
  462. package/registry/components/qrcode/qrcode.wxss +36 -0
  463. package/registry/components/quick-action/index.js +2 -0
  464. package/registry/components/quick-action/props.js +10 -0
  465. package/registry/components/quick-action/quick-action.js +22 -0
  466. package/registry/components/quick-action/quick-action.json +1 -0
  467. package/registry/components/quick-action/quick-action.wxml +15 -0
  468. package/registry/components/quick-action/quick-action.wxss +80 -0
  469. package/registry/components/radio/index.js +1 -0
  470. package/registry/components/radio/props.js +1 -0
  471. package/registry/components/radio/radio.js +1 -0
  472. package/registry/components/radio/radio.json +1 -0
  473. package/registry/components/radio/radio.wxml +1 -0
  474. package/registry/components/radio/radio.wxss +219 -0
  475. package/registry/components/radio-group/index.js +1 -0
  476. package/registry/components/radio-group/props.js +1 -0
  477. package/registry/components/radio-group/radio-group.js +1 -0
  478. package/registry/components/radio-group/radio-group.json +1 -0
  479. package/registry/components/radio-group/radio-group.wxml +1 -0
  480. package/registry/components/radio-group/radio-group.wxss +7 -0
  481. package/registry/components/rate/index.js +1 -0
  482. package/registry/components/rate/props.js +1 -0
  483. package/registry/components/rate/rate.js +1 -0
  484. package/registry/components/rate/rate.json +1 -0
  485. package/registry/components/rate/rate.wxml +1 -0
  486. package/registry/components/rate/rate.wxs +65 -0
  487. package/registry/components/rate/rate.wxss +99 -0
  488. package/registry/components/rating-card/index.js +2 -0
  489. package/registry/components/rating-card/props.js +12 -0
  490. package/registry/components/rating-card/rating-card.js +42 -0
  491. package/registry/components/rating-card/rating-card.json +1 -0
  492. package/registry/components/rating-card/rating-card.wxml +24 -0
  493. package/registry/components/rating-card/rating-card.wxss +49 -0
  494. package/registry/components/recap-card/index.js +2 -0
  495. package/registry/components/recap-card/props.js +21 -0
  496. package/registry/components/recap-card/recap-card.js +38 -0
  497. package/registry/components/recap-card/recap-card.json +1 -0
  498. package/registry/components/recap-card/recap-card.wxml +43 -0
  499. package/registry/components/recap-card/recap-card.wxss +60 -0
  500. package/registry/components/result/illustrations.js +2 -0
  501. package/registry/components/result/index.js +1 -0
  502. package/registry/components/result/props.js +1 -0
  503. package/registry/components/result/result.js +1 -0
  504. package/registry/components/result/result.json +1 -0
  505. package/registry/components/result/result.wxml +1 -0
  506. package/registry/components/result/result.wxss +97 -0
  507. package/registry/components/review-item/index.js +2 -0
  508. package/registry/components/review-item/props.js +13 -0
  509. package/registry/components/review-item/review-item.js +38 -0
  510. package/registry/components/review-item/review-item.json +1 -0
  511. package/registry/components/review-item/review-item.wxml +19 -0
  512. package/registry/components/review-item/review-item.wxss +65 -0
  513. package/registry/components/search/index.js +1 -0
  514. package/registry/components/search/props.js +1 -0
  515. package/registry/components/search/search.js +1 -0
  516. package/registry/components/search/search.json +1 -0
  517. package/registry/components/search/search.wxml +1 -0
  518. package/registry/components/search/search.wxs +6 -0
  519. package/registry/components/search/search.wxss +100 -0
  520. package/registry/components/section-title/index.js +2 -0
  521. package/registry/components/section-title/props.js +6 -0
  522. package/registry/components/section-title/section-title.js +22 -0
  523. package/registry/components/section-title/section-title.json +1 -0
  524. package/registry/components/section-title/section-title.wxml +6 -0
  525. package/registry/components/section-title/section-title.wxss +19 -0
  526. package/registry/components/segmented/index.js +1 -0
  527. package/registry/components/segmented/props.js +1 -0
  528. package/registry/components/segmented/segmented.js +1 -0
  529. package/registry/components/segmented/segmented.json +1 -0
  530. package/registry/components/segmented/segmented.wxml +1 -0
  531. package/registry/components/segmented/segmented.wxss +113 -0
  532. package/registry/components/selection-card/index.js +2 -0
  533. package/registry/components/selection-card/props.js +11 -0
  534. package/registry/components/selection-card/selection-card.js +25 -0
  535. package/registry/components/selection-card/selection-card.json +1 -0
  536. package/registry/components/selection-card/selection-card.wxml +7 -0
  537. package/registry/components/selection-card/selection-card.wxss +27 -0
  538. package/registry/components/shortcut-chip/index.js +2 -0
  539. package/registry/components/shortcut-chip/props.js +7 -0
  540. package/registry/components/shortcut-chip/shortcut-chip.js +24 -0
  541. package/registry/components/shortcut-chip/shortcut-chip.json +1 -0
  542. package/registry/components/shortcut-chip/shortcut-chip.wxml +4 -0
  543. package/registry/components/shortcut-chip/shortcut-chip.wxss +29 -0
  544. package/registry/components/skeleton/index.js +1 -0
  545. package/registry/components/skeleton/props.js +1 -0
  546. package/registry/components/skeleton/skeleton.js +1 -0
  547. package/registry/components/skeleton/skeleton.json +1 -0
  548. package/registry/components/skeleton/skeleton.wxml +1 -0
  549. package/registry/components/skeleton/skeleton.wxss +92 -0
  550. package/registry/components/slider/index.js +1 -0
  551. package/registry/components/slider/props.js +1 -0
  552. package/registry/components/slider/slider.js +1 -0
  553. package/registry/components/slider/slider.json +1 -0
  554. package/registry/components/slider/slider.wxml +1 -0
  555. package/registry/components/slider/slider.wxs +10 -0
  556. package/registry/components/slider/slider.wxss +287 -0
  557. package/registry/components/slider/tool.js +1 -0
  558. package/registry/components/step-item/index.js +1 -0
  559. package/registry/components/step-item/props.js +1 -0
  560. package/registry/components/step-item/step-item.js +1 -0
  561. package/registry/components/step-item/step-item.json +1 -0
  562. package/registry/components/step-item/step-item.wxml +1 -0
  563. package/registry/components/step-item/step-item.wxs +7 -0
  564. package/registry/components/step-item/step-item.wxss +226 -0
  565. package/registry/components/stepper/index.js +1 -0
  566. package/registry/components/stepper/props.js +1 -0
  567. package/registry/components/stepper/stepper.js +1 -0
  568. package/registry/components/stepper/stepper.json +1 -0
  569. package/registry/components/stepper/stepper.wxml +1 -0
  570. package/registry/components/stepper/stepper.wxss +130 -0
  571. package/registry/components/steps/index.js +1 -0
  572. package/registry/components/steps/props.js +1 -0
  573. package/registry/components/steps/steps.js +1 -0
  574. package/registry/components/steps/steps.json +1 -0
  575. package/registry/components/steps/steps.wxml +1 -0
  576. package/registry/components/steps/steps.wxss +27 -0
  577. package/registry/components/sticky/index.js +1 -0
  578. package/registry/components/sticky/props.js +1 -0
  579. package/registry/components/sticky/sticky.js +1 -0
  580. package/registry/components/sticky/sticky.json +1 -0
  581. package/registry/components/sticky/sticky.wxml +1 -0
  582. package/registry/components/sticky/sticky.wxss +6 -0
  583. package/registry/components/story-item/index.js +2 -0
  584. package/registry/components/story-item/props.js +8 -0
  585. package/registry/components/story-item/story-item.js +22 -0
  586. package/registry/components/story-item/story-item.json +1 -0
  587. package/registry/components/story-item/story-item.wxml +9 -0
  588. package/registry/components/story-item/story-item.wxss +43 -0
  589. package/registry/components/swipe-cell/index.js +1 -0
  590. package/registry/components/swipe-cell/props.js +1 -0
  591. package/registry/components/swipe-cell/swipe-cell.js +1 -0
  592. package/registry/components/swipe-cell/swipe-cell.json +1 -0
  593. package/registry/components/swipe-cell/swipe-cell.wxml +1 -0
  594. package/registry/components/swipe-cell/swipe-cell.wxs +185 -0
  595. package/registry/components/swipe-cell/swipe-cell.wxss +40 -0
  596. package/registry/components/swiper/index.js +1 -0
  597. package/registry/components/swiper/index.wxs +25 -0
  598. package/registry/components/swiper/props.js +1 -0
  599. package/registry/components/swiper/swiper.js +1 -0
  600. package/registry/components/swiper/swiper.json +1 -0
  601. package/registry/components/swiper/swiper.wxml +1 -0
  602. package/registry/components/swiper/swiper.wxss +28 -0
  603. package/registry/components/swiper-nav/index.js +1 -0
  604. package/registry/components/swiper-nav/props.js +1 -0
  605. package/registry/components/swiper-nav/swiper-nav.js +1 -0
  606. package/registry/components/swiper-nav/swiper-nav.json +1 -0
  607. package/registry/components/swiper-nav/swiper-nav.wxml +1 -0
  608. package/registry/components/swiper-nav/swiper-nav.wxss +155 -0
  609. package/registry/components/switch/index.js +1 -0
  610. package/registry/components/switch/props.js +1 -0
  611. package/registry/components/switch/switch.js +1 -0
  612. package/registry/components/switch/switch.json +1 -0
  613. package/registry/components/switch/switch.wxml +1 -0
  614. package/registry/components/switch/switch.wxss +169 -0
  615. package/registry/components/tab-bar/index.js +1 -0
  616. package/registry/components/tab-bar/props.js +1 -0
  617. package/registry/components/tab-bar/tab-bar.js +1 -0
  618. package/registry/components/tab-bar/tab-bar.json +1 -0
  619. package/registry/components/tab-bar/tab-bar.wxml +1 -0
  620. package/registry/components/tab-bar/tab-bar.wxss +50 -0
  621. package/registry/components/tab-bar-item/index.js +1 -0
  622. package/registry/components/tab-bar-item/props.js +1 -0
  623. package/registry/components/tab-bar-item/tab-bar-item.js +1 -0
  624. package/registry/components/tab-bar-item/tab-bar-item.json +1 -0
  625. package/registry/components/tab-bar-item/tab-bar-item.wxml +1 -0
  626. package/registry/components/tab-bar-item/tab-bar-item.wxss +177 -0
  627. package/registry/components/tab-panel/index.js +1 -0
  628. package/registry/components/tab-panel/props.js +1 -0
  629. package/registry/components/tab-panel/tab-panel.js +1 -0
  630. package/registry/components/tab-panel/tab-panel.json +1 -0
  631. package/registry/components/tab-panel/tab-panel.wxml +1 -0
  632. package/registry/components/tab-panel/tab-panel.wxss +20 -0
  633. package/registry/components/tabs/index.js +1 -0
  634. package/registry/components/tabs/props.js +1 -0
  635. package/registry/components/tabs/tabs.js +1 -0
  636. package/registry/components/tabs/tabs.json +1 -0
  637. package/registry/components/tabs/tabs.wxml +1 -0
  638. package/registry/components/tabs/tabs.wxs +30 -0
  639. package/registry/components/tabs/tabs.wxss +233 -0
  640. package/registry/components/tag/index.js +1 -0
  641. package/registry/components/tag/props.js +1 -0
  642. package/registry/components/tag/tag.js +1 -0
  643. package/registry/components/tag/tag.json +1 -0
  644. package/registry/components/tag/tag.wxml +1 -0
  645. package/registry/components/tag/tag.wxss +268 -0
  646. package/registry/components/text/index.js +1 -0
  647. package/registry/components/text/props.js +1 -0
  648. package/registry/components/text/text.js +1 -0
  649. package/registry/components/text/text.json +1 -0
  650. package/registry/components/text/text.wxml +1 -0
  651. package/registry/components/text/text.wxss +151 -0
  652. package/registry/components/textarea/index.js +1 -0
  653. package/registry/components/textarea/props.js +1 -0
  654. package/registry/components/textarea/textarea.js +1 -0
  655. package/registry/components/textarea/textarea.json +1 -0
  656. package/registry/components/textarea/textarea.wxml +1 -0
  657. package/registry/components/textarea/textarea.wxs +15 -0
  658. package/registry/components/textarea/textarea.wxss +151 -0
  659. package/registry/components/ticket/index.js +2 -0
  660. package/registry/components/ticket/props.js +19 -0
  661. package/registry/components/ticket/ticket.js +19 -0
  662. package/registry/components/ticket/ticket.json +1 -0
  663. package/registry/components/ticket/ticket.wxml +31 -0
  664. package/registry/components/ticket/ticket.wxss +57 -0
  665. package/registry/components/title/index.js +1 -0
  666. package/registry/components/title/props.js +1 -0
  667. package/registry/components/title/title.js +1 -0
  668. package/registry/components/title/title.json +1 -0
  669. package/registry/components/title/title.wxml +1 -0
  670. package/registry/components/title/title.wxss +151 -0
  671. package/registry/components/toast/index.js +1 -0
  672. package/registry/components/toast/props.js +1 -0
  673. package/registry/components/toast/toast.js +1 -0
  674. package/registry/components/toast/toast.json +1 -0
  675. package/registry/components/toast/toast.wxml +1 -0
  676. package/registry/components/toast/toast.wxss +87 -0
  677. package/registry/components/toggle-card/index.js +2 -0
  678. package/registry/components/toggle-card/props.js +7 -0
  679. package/registry/components/toggle-card/toggle-card.js +37 -0
  680. package/registry/components/toggle-card/toggle-card.json +1 -0
  681. package/registry/components/toggle-card/toggle-card.wxml +12 -0
  682. package/registry/components/toggle-card/toggle-card.wxss +11 -0
  683. package/registry/components/top-item/index.js +2 -0
  684. package/registry/components/top-item/props.js +10 -0
  685. package/registry/components/top-item/top-item.js +22 -0
  686. package/registry/components/top-item/top-item.json +1 -0
  687. package/registry/components/top-item/top-item.wxml +8 -0
  688. package/registry/components/top-item/top-item.wxss +37 -0
  689. package/registry/components/transaction-card/index.js +2 -0
  690. package/registry/components/transaction-card/props.js +25 -0
  691. package/registry/components/transaction-card/transaction-card.js +43 -0
  692. package/registry/components/transaction-card/transaction-card.json +1 -0
  693. package/registry/components/transaction-card/transaction-card.wxml +44 -0
  694. package/registry/components/transaction-card/transaction-card.wxss +45 -0
  695. package/registry/components/transfer-item/index.js +2 -0
  696. package/registry/components/transfer-item/props.js +18 -0
  697. package/registry/components/transfer-item/transfer-item.js +40 -0
  698. package/registry/components/transfer-item/transfer-item.json +1 -0
  699. package/registry/components/transfer-item/transfer-item.wxml +34 -0
  700. package/registry/components/transfer-item/transfer-item.wxss +66 -0
  701. package/registry/components/upload/drag.wxs +242 -0
  702. package/registry/components/upload/index.js +1 -0
  703. package/registry/components/upload/props.js +1 -0
  704. package/registry/components/upload/upload.js +1 -0
  705. package/registry/components/upload/upload.json +1 -0
  706. package/registry/components/upload/upload.wxml +1 -0
  707. package/registry/components/upload/upload.wxs +129 -0
  708. package/registry/components/upload/upload.wxss +354 -0
  709. package/registry/components/wheel-select/index.js +2 -0
  710. package/registry/components/wheel-select/props.js +8 -0
  711. package/registry/components/wheel-select/wheel-select.js +38 -0
  712. package/registry/components/wheel-select/wheel-select.json +1 -0
  713. package/registry/components/wheel-select/wheel-select.wxml +9 -0
  714. package/registry/components/wheel-select/wheel-select.wxss +22 -0
  715. package/registry/registry.json +1033 -0
package/LICENSE ADDED
@@ -0,0 +1,49 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 maxit-cli authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ -------------------------------------------------------------------------------
24
+
25
+ The components in registry/components are derived from TDesign Mini Program
26
+ (https://github.com/Tencent/tdesign-miniprogram), distributed under the
27
+ following license:
28
+
29
+ MIT License
30
+
31
+ Copyright (c) 2021-present TDesign
32
+
33
+ Permission is hereby granted, free of charge, to any person obtaining a copy
34
+ of this software and associated documentation files (the "Software"), to deal
35
+ in the Software without restriction, including without limitation the rights
36
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37
+ copies of the Software, and to permit persons to whom the Software is
38
+ furnished to do so, subject to the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be included in all
41
+ copies or substantial portions of the Software.
42
+
43
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # maxit-cli
2
+
3
+ Installe les composants o-* du design system Max it dans un mini-programme, avec leurs dépendances, comme `ng generate component` pour Angular.
4
+
5
+ ```bash
6
+ maxit add button
7
+ maxit g c balance-card --page pages/home/home
8
+ ```
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install -g maxit-cli
14
+ ```
15
+
16
+ Ou sans installation :
17
+
18
+ ```bash
19
+ npx maxit-cli add button
20
+ ```
21
+
22
+ Node 16.7 ou plus, aucune dépendance.
23
+
24
+ ## Commandes
25
+
26
+ | Commande | Effet |
27
+ |---|---|
28
+ | `maxit init` | Copie `components/common` et ajoute l'import des jetons dans `app.wxss`. Facultatif : `add` le fait aussi. |
29
+ | `maxit add <nom>…` | Copie les composants et tous les composants dont ils ont besoin dans `components/`, importe les jetons dans `app.wxss`, déclare `o-<nom>` dans `app.json`. |
30
+ | `maxit generate component <nom>` | Alias de `add`, aussi `maxit g c <nom>`. |
31
+ | `maxit list` | Liste les 104 composants par catégorie ; `✓` = déjà dans le projet. `--json` pour une sortie JSON. |
32
+
33
+ Options de `add` :
34
+
35
+ - `--page pages/home/home` : déclare le composant dans cette page plutôt que dans `app.json` (le `.json` de la page est créé s'il manque).
36
+ - `--no-register` : ne déclare rien, affiche seulement la ligne `usingComponents` à ajouter.
37
+ - `--overwrite` : remplace un dossier de composant déjà présent mais différent. Sans cette option, un composant modifié localement n'est jamais écrasé.
38
+ - `--dry-run` : montre ce qui serait fait sans rien écrire.
39
+ - `--cwd <dossier>` : projet cible, sinon le dossier courant. La CLI remonte jusqu'à `app.json` (et suit `miniprogramRoot` de `project.config.json`).
40
+
41
+ Les composants sont toujours installés dans `<racine du mini-programme>/components/`, car ils importent les jetons par le chemin absolu `/components/common/style/tokens.wxss`.
42
+
43
+ ## Mettre à jour les composants embarqués
44
+
45
+ La CLI contient une copie des composants (`registry/`). Après une modification dans `mini-app-components` :
46
+
47
+ ```bash
48
+ npm run sync # recopie mini-app-components/components et recalcule les dépendances
49
+ npm test # essai de bout en bout sur un mini-programme temporaire
50
+ ```
51
+
52
+ `npm pack` lance la synchronisation automatiquement. Les titres et catégories viennent de `mini-app-components/docs/scripts/doc-data.js`.
53
+
54
+ ## Licence
55
+
56
+ MIT. Les composants sont dérivés de [TDesign Mini Program](https://github.com/Tencent/tdesign-miniprogram) (MIT) : voir `LICENSE`.
package/bin/maxit.js ADDED
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+ const commands = require('../lib/commands');
3
+ const { version } = require('../package.json');
4
+
5
+ const HELP = `maxit ${version} — composants o-* du design system Max it
6
+
7
+ Utilisation :
8
+ maxit init Copie components/common et importe les jetons dans app.wxss
9
+ maxit add <nom> [<nom>…] Installe des composants et leurs dépendances
10
+ maxit generate component <nom> Alias de add (aussi : maxit g c <nom>)
11
+ maxit list Liste les composants disponibles
12
+
13
+ Options de add :
14
+ --page <chemin> Déclare dans la page (ex. pages/home/home) au lieu de app.json
15
+ --no-register Ne déclare nulle part (affiche seulement la ligne à ajouter)
16
+ --overwrite Remplace les dossiers déjà présents mais différents
17
+ --dry-run Affiche ce qui serait fait sans rien modifier
18
+
19
+ Options générales :
20
+ --cwd <dossier> Projet cible (par défaut : dossier courant)
21
+ --json (list) sortie JSON
22
+ -h, --help Aide · -v, --version Version
23
+
24
+ Exemples :
25
+ maxit add button
26
+ maxit g c balance-card --page pages/home/home
27
+ maxit add input textarea switch --dry-run`;
28
+
29
+ function parse(argv) {
30
+ const options = { cwd: process.cwd(), register: true };
31
+ const args = [];
32
+ for (let i = 0; i < argv.length; i++) {
33
+ const a = argv[i];
34
+ const value = () => {
35
+ const v = argv[++i];
36
+ if (!v || v.startsWith('-')) throw new Error(`L'option ${a} attend une valeur.`);
37
+ return v;
38
+ };
39
+ if (a === '--page') options.page = value();
40
+ else if (a === '--cwd') options.cwd = value();
41
+ else if (a === '--no-register') options.register = false;
42
+ else if (a === '--overwrite') options.overwrite = true;
43
+ else if (a === '--dry-run') options.dryRun = true;
44
+ else if (a === '--json') options.json = true;
45
+ else if (a === '-h' || a === '--help') options.help = true;
46
+ else if (a === '-v' || a === '--version') options.version = true;
47
+ else if (a.startsWith('-')) throw new Error(`Option inconnue : ${a}\n\n${HELP}`);
48
+ else args.push(a);
49
+ }
50
+ return { args, options };
51
+ }
52
+
53
+ function main() {
54
+ const { args, options } = parse(process.argv.slice(2));
55
+ if (options.version) return console.log(version);
56
+ let [command, ...rest] = args;
57
+ if (options.help || !command || command === 'help') return console.log(HELP);
58
+ if (command === 'generate' || command === 'g') {
59
+ const [type, ...names] = rest;
60
+ if (type !== 'component' && type !== 'c') throw new Error(`Seul « ${command} component » est disponible (ex. maxit g c button).`);
61
+ command = 'add';
62
+ rest = names;
63
+ }
64
+ if (command === 'add' || command === 'install' || command === 'i') return commands.add(rest, options);
65
+ if (command === 'init') return commands.init(options);
66
+ if (command === 'list' || command === 'ls') return commands.list(options);
67
+ throw new Error(`Commande inconnue : ${command}\n\n${HELP}`);
68
+ }
69
+
70
+ try {
71
+ main();
72
+ } catch (err) {
73
+ console.error(`✗ ${err.message}`);
74
+ process.exit(1);
75
+ }
@@ -0,0 +1,142 @@
1
+ // maxit init | add | list
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+ const registryLib = require('./registry');
5
+ const { findProject, readJson, writeJson, compareDir } = require('./project');
6
+
7
+ // The components import the tokens with an absolute path, so they always live in /components.
8
+ const COMPONENTS = 'components';
9
+ const TOKENS_IMPORT = "@import '/components/common/style/tokens.wxss';";
10
+
11
+ function projectOrFail(options) {
12
+ const root = findProject(options.cwd);
13
+ if (!root) throw new Error(`Aucun mini-programme trouvé depuis ${path.resolve(options.cwd)} (app.json introuvable). Lancez la commande dans le projet ou passez --cwd <dossier>.`);
14
+ return root;
15
+ }
16
+
17
+ function log(options, line) {
18
+ console.log(line);
19
+ }
20
+
21
+ // Copies one folder of the registry into the project. Local changes are kept unless --overwrite.
22
+ function install(root, name, options, report) {
23
+ const source = path.join(registryLib.COMPONENTS_DIR, name);
24
+ const target = path.join(root, COMPONENTS, name);
25
+ const state = compareDir(source, target);
26
+ if (state === 'same') return report.same.push(name);
27
+ if (state === 'changed' && !options.overwrite) return report.kept.push(name);
28
+ if (!options.dryRun) {
29
+ if (state === 'changed') fs.rmSync(target, { recursive: true, force: true });
30
+ fs.mkdirSync(path.dirname(target), { recursive: true });
31
+ fs.cpSync(source, target, { recursive: true });
32
+ }
33
+ (state === 'changed' ? report.replaced : report.added).push(name);
34
+ }
35
+
36
+ // Adds the tokens import at the top of app.wxss (created if needed).
37
+ function ensureTokens(root, options) {
38
+ const file = path.join(root, 'app.wxss');
39
+ const text = fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : '';
40
+ if (text.includes('/components/common/style/tokens.wxss')) return false;
41
+ const eol = text.includes('\r\n') ? '\r\n' : '\n';
42
+ const header = `/* Jetons du design system Max it (couleurs, typographie) pour les composants o-* */${eol}${TOKENS_IMPORT}${eol}`;
43
+ if (!options.dryRun) fs.writeFileSync(file, header + (text ? eol + text : ''));
44
+ return true;
45
+ }
46
+
47
+ // Declares the components in app.json (whole app) or in one page's .json.
48
+ function register(root, names, options) {
49
+ let file;
50
+ if (options.page) {
51
+ const page = options.page.replace(/^\/+/, '').replace(/\.(json|wxml|js|wxss)$/, '');
52
+ file = path.join(root, page + '.json');
53
+ if (!fs.existsSync(file)) {
54
+ if (!fs.existsSync(path.join(root, page + '.wxml'))) throw new Error(`Page introuvable : ${page} (ni ${page}.json ni ${page}.wxml).`);
55
+ if (!options.dryRun) fs.writeFileSync(file, '{\n "usingComponents": {}\n}\n');
56
+ else return { file, added: names.map((n) => `o-${n}`) };
57
+ }
58
+ } else {
59
+ file = path.join(root, 'app.json');
60
+ }
61
+ const json = readJson(file);
62
+ const using = json.data.usingComponents || (json.data.usingComponents = {});
63
+ const added = [];
64
+ for (const name of names) {
65
+ const tag = `o-${name}`;
66
+ const value = `/${COMPONENTS}/${name}/${name}`;
67
+ if (using[tag] === value) continue;
68
+ using[tag] = value;
69
+ added.push(tag);
70
+ }
71
+ if (added.length && !options.dryRun) writeJson(file, json);
72
+ return { file, added };
73
+ }
74
+
75
+ function init(options) {
76
+ const root = projectOrFail(options);
77
+ const registry = registryLib.load();
78
+ const report = { added: [], replaced: [], same: [], kept: [] };
79
+ registry.shared.forEach((name) => install(root, name, options, report));
80
+ const tokens = ensureTokens(root, options);
81
+ printReport(root, report, options);
82
+ log(options, tokens ? ` ✓ app.wxss : import des jetons ajouté` : ` · app.wxss : jetons déjà importés`);
83
+ log(options, `\nPrêt. Ajoutez un composant avec : maxit add button`);
84
+ }
85
+
86
+ function add(names, options) {
87
+ if (!names.length) throw new Error('Indiquez au moins un composant, par exemple : maxit add button');
88
+ const registry = registryLib.load();
89
+ const unknown = names.filter((n) => !registry.components[n]);
90
+ if (unknown.length) {
91
+ const hints = unknown.map((n) => {
92
+ const s = registryLib.suggest(registry, n);
93
+ return ` ${n}${s.length ? ` — vouliez-vous dire : ${s.join(', ')} ?` : ''}`;
94
+ });
95
+ throw new Error(`Composant inconnu :\n${hints.join('\n')}\nListe complète : maxit list`);
96
+ }
97
+ const root = projectOrFail(options);
98
+ const report = { added: [], replaced: [], same: [], kept: [] };
99
+ registryLib.resolve(registry, names).forEach((name) => install(root, name, options, report));
100
+ const tokens = ensureTokens(root, options);
101
+ const registration = options.register ? register(root, names, options) : null;
102
+
103
+ printReport(root, report, options);
104
+ if (tokens) log(options, ` ✓ app.wxss : import des jetons ajouté`);
105
+ if (registration) {
106
+ const where = path.relative(root, registration.file);
107
+ log(options, registration.added.length ? ` ✓ ${where} : ${registration.added.join(', ')} déclaré${registration.added.length > 1 ? 's' : ''}` : ` · ${where} : déjà déclaré`);
108
+ } else {
109
+ log(options, `\nÀ déclarer dans app.json ou le .json de la page :\n${names.map((n) => ` "o-${n}": "/${COMPONENTS}/${n}/${n}"`).join(',\n')}`);
110
+ }
111
+ log(options, `\nUtilisation :\n${names.map((n) => ` <o-${n} />`).join('\n')}`);
112
+ if (options.dryRun) log(options, `\n(--dry-run : aucun fichier modifié)`);
113
+ }
114
+
115
+ function printReport(root, report, options) {
116
+ const dir = COMPONENTS;
117
+ log(options, `Projet : ${root}`);
118
+ report.added.forEach((n) => log(options, ` ✓ ${dir}/${n} ajouté`));
119
+ report.replaced.forEach((n) => log(options, ` ✓ ${dir}/${n} remplacé (--overwrite)`));
120
+ report.same.forEach((n) => log(options, ` · ${dir}/${n} déjà à jour`));
121
+ report.kept.forEach((n) => log(options, ` ! ${dir}/${n} existe et diffère : conservé (--overwrite pour le remplacer)`));
122
+ }
123
+
124
+ function list(options) {
125
+ const registry = registryLib.load();
126
+ const root = findProject(options.cwd);
127
+ const installed = (name) => root && fs.existsSync(path.join(root, COMPONENTS, name));
128
+ if (options.json) {
129
+ console.log(JSON.stringify(registry.components, null, 2));
130
+ return;
131
+ }
132
+ for (const cat of registry.categories) {
133
+ const names = Object.keys(registry.components).filter((n) => registry.components[n].category === cat.id);
134
+ if (!names.length) continue;
135
+ console.log(`\n${cat.label}`);
136
+ const width = Math.max(...names.map((n) => n.length));
137
+ for (const n of names) console.log(` ${installed(n) ? '✓' : ' '} ${n.padEnd(width)} ${registry.components[n].title}`);
138
+ }
139
+ console.log(`\n${Object.keys(registry.components).length} composants${root ? ' · ✓ = déjà dans ce projet' : ''}. Installer : maxit add <nom>`);
140
+ }
141
+
142
+ module.exports = { init, add, list };
package/lib/project.js ADDED
@@ -0,0 +1,58 @@
1
+ // The target mini-program: where it lives, and file helpers that keep its formatting.
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ // Walks up from `start` to the folder holding app.json (or project.config.json with miniprogramRoot).
6
+ function findProject(start) {
7
+ let dir = path.resolve(start);
8
+ for (;;) {
9
+ const config = path.join(dir, 'project.config.json');
10
+ if (fs.existsSync(config)) {
11
+ const { miniprogramRoot } = readJson(config).data;
12
+ const root = miniprogramRoot ? path.resolve(dir, miniprogramRoot) : dir;
13
+ if (fs.existsSync(path.join(root, 'app.json'))) return root;
14
+ }
15
+ if (fs.existsSync(path.join(dir, 'app.json'))) return dir;
16
+ const parent = path.dirname(dir);
17
+ if (parent === dir) return null;
18
+ dir = parent;
19
+ }
20
+ }
21
+
22
+ // JSON with the file's indentation and line endings, so rewriting it only shows the real change.
23
+ function readJson(file) {
24
+ const text = fs.readFileSync(file, 'utf8');
25
+ const indent = (text.match(/^[ \t]+(?=")/m) || [' '])[0];
26
+ const eol = text.includes('\r\n') ? '\r\n' : '\n';
27
+ let data;
28
+ try {
29
+ data = JSON.parse(text.replace(/^/, ''));
30
+ } catch (err) {
31
+ throw new Error(`JSON invalide dans ${file} : ${err.message}`);
32
+ }
33
+ return { data, indent, eol, finalEol: /\r?\n$/.test(text) };
34
+ }
35
+
36
+ function writeJson(file, json) {
37
+ const text = JSON.stringify(json.data, null, json.indent).replace(/\n/g, json.eol);
38
+ fs.writeFileSync(file, text + (json.finalEol ? json.eol : ''));
39
+ }
40
+
41
+ function listFiles(dir, base = dir) {
42
+ return fs.readdirSync(dir, { withFileTypes: true }).flatMap((d) => {
43
+ const full = path.join(dir, d.name);
44
+ return d.isDirectory() ? listFiles(full, base) : [path.relative(base, full)];
45
+ });
46
+ }
47
+
48
+ // 'missing', 'same', or 'changed' (local edits, or another version of the library).
49
+ function compareDir(source, target) {
50
+ if (!fs.existsSync(target)) return 'missing';
51
+ for (const file of listFiles(source)) {
52
+ const other = path.join(target, file);
53
+ if (!fs.existsSync(other) || !fs.readFileSync(other).equals(fs.readFileSync(path.join(source, file)))) return 'changed';
54
+ }
55
+ return 'same';
56
+ }
57
+
58
+ module.exports = { findProject, readJson, writeJson, compareDir };
@@ -0,0 +1,50 @@
1
+ // The components shipped with the CLI (registry/, filled by scripts/sync.js).
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ const ROOT = path.join(__dirname, '../registry');
6
+ const COMPONENTS_DIR = path.join(ROOT, 'components');
7
+
8
+ function load() {
9
+ const file = path.join(ROOT, 'registry.json');
10
+ if (!fs.existsSync(file)) throw new Error('Registre vide : lancez « npm run sync » dans maxit-cli.');
11
+ return JSON.parse(fs.readFileSync(file, 'utf8'));
12
+ }
13
+
14
+ // Requested components first, then their dependencies (depth first), shared folders last.
15
+ function resolve(registry, names) {
16
+ const order = [];
17
+ const seen = new Set();
18
+ const visit = (name) => {
19
+ if (seen.has(name)) return;
20
+ seen.add(name);
21
+ if (registry.shared.includes(name)) return;
22
+ order.push(name);
23
+ registry.components[name].dependencies.forEach(visit);
24
+ };
25
+ names.forEach(visit);
26
+ return order.concat(registry.shared);
27
+ }
28
+
29
+ // Closest names, for "did you mean" hints.
30
+ function suggest(registry, name) {
31
+ const names = Object.keys(registry.components);
32
+ const distance = (a, b) => {
33
+ const d = Array.from({ length: a.length + 1 }, (_, i) => [i]);
34
+ for (let j = 1; j <= b.length; j++) d[0][j] = j;
35
+ for (let i = 1; i <= a.length; i++) {
36
+ for (let j = 1; j <= b.length; j++) {
37
+ d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
38
+ }
39
+ }
40
+ return d[a.length][b.length];
41
+ };
42
+ return names
43
+ .map((n) => ({ n, d: n.includes(name) || name.includes(n) ? 1 : distance(name, n) }))
44
+ .filter((x) => x.d <= 3)
45
+ .sort((a, b) => a.d - b.d)
46
+ .slice(0, 3)
47
+ .map((x) => x.n);
48
+ }
49
+
50
+ module.exports = { COMPONENTS_DIR, load, resolve, suggest };
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "maxit-cli",
3
+ "version": "0.1.0",
4
+ "description": "CLI pour installer les composants o-* du design system Max it dans un mini-programme",
5
+ "bin": {
6
+ "maxit": "bin/maxit.js"
7
+ },
8
+ "files": [
9
+ "bin",
10
+ "lib",
11
+ "registry"
12
+ ],
13
+ "scripts": {
14
+ "sync": "node scripts/sync.js",
15
+ "test": "node test/smoke.js",
16
+ "prepack": "node scripts/sync.js"
17
+ },
18
+ "engines": {
19
+ "node": ">=16.7"
20
+ },
21
+ "keywords": [
22
+ "maxit",
23
+ "miniprogram",
24
+ "mini-program",
25
+ "tdesign",
26
+ "components",
27
+ "cli"
28
+ ],
29
+ "license": "MIT"
30
+ }
@@ -0,0 +1 @@
1
+ import{__decorate}from"../common/tslib";import{chunk}from"../common/utils";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import{ActionSheetTheme,show}from"./show";import props from"./props";import useCustomNavbar from"../common/mixins/using-custom-navbar";import usingConfig from"../common/mixins/using-config";const{prefix:prefix}=config,componentName="action-sheet";let ActionSheet=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar,usingConfig({componentName:componentName})],this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-cancel`],this.properties=Object.assign({},props),this.data={prefix:prefix,classPrefix:`${prefix}-${componentName}`,gridThemeItems:[],currentSwiperIndex:0,defaultPopUpProps:{},defaultPopUpzIndex:11500},this.controlledProps=[{key:"visible",event:"visible-change"}],this.observers={items(){this.splitGridThemeActions()},globalConfig(){this.updateInitialData()}},this.lifetimes={ready(){this.init()}},this.methods={init(){this.memoInitialData(),this.splitGridThemeActions()},memoInitialData(){this.updateInitialData()},updateInitialData(){this.initialData=Object.assign(Object.assign({},this.properties),this.data)},splitGridThemeActions(){this.data.theme===ActionSheetTheme.Grid&&this.setData({gridThemeItems:chunk(this.data.items,this.data.count)})},show(e){this.setData(Object.assign(Object.assign(Object.assign({},this.initialData),e),{visible:!0})),this.splitGridThemeActions(),this.autoClose=!0,this._trigger("visible-change",{visible:!0})},close(){this.triggerEvent("close",{trigger:"command"}),this._trigger("visible-change",{visible:!1})},onPopupVisibleChange({detail:e}){e.visible||(this.triggerEvent("close",{trigger:"overlay"}),this._trigger("visible-change",{visible:!1})),this.autoClose&&(this.setData({visible:!1}),this.autoClose=!1)},onSwiperChange(e){const{current:t}=e.detail;this.setData({currentSwiperIndex:t})},onSelect(e){const{currentSwiperIndex:t,items:i,gridThemeItems:s,count:o,theme:n}=this.data,{index:a}=e.currentTarget.dataset,r=n===ActionSheetTheme.Grid,h=r?s[t][a]:i[a],c=r?a+t*o:a;h&&(this.triggerEvent("selected",{selected:h,index:c}),h.disabled||(this.triggerEvent("close",{trigger:"select"}),this._trigger("visible-change",{visible:!1})))},onCancel(){this.triggerEvent("cancel"),this.autoClose&&(this.setData({visible:!1}),this.autoClose=!1)}}}};ActionSheet.show=show,ActionSheet=__decorate([wxComponent()],ActionSheet);export default ActionSheet;
@@ -0,0 +1 @@
1
+ {"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon","o-popup":"../popup/popup","o-grid":"../grid/grid","o-grid-item":"../grid-item/grid-item"}}
@@ -0,0 +1 @@
1
+ <wxs src="./action-sheet.wxs" module="_this"/><wxs src="../common/utils.wxs" module="_"/><import src="./template/grid.wxml"/><import src="../common/template/icon.wxml"/><view id="{{classPrefix}}" style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix, [align, theme, ['no-description', !description]])}} class {{prefix}}-class"><o-popup visible="{{visible}}" placement="bottom" usingCustomNavbar="{{usingCustomNavbar}}" bind:visible-change="onPopupVisibleChange" show-overlay="{{showOverlay}}" z-index="{{ popupProps.zIndex || defaultPopUpzIndex }}" overlay-props="{{ popupProps.overlayProps || defaultPopUpProps }}"><view class="{{classPrefix}}__content {{prefix}}-class-content" tabindex="0"><view wx:if="{{description}}" tabindex="0" class="{{classPrefix}}__description">{{description}}</view><block wx:if="{{gridThemeItems.length}}"><template is="grid" data="{{classPrefix, prefix, gridThemeItems, count, currentSwiperIndex}}"/></block><view wx:elif="{{items && items.length}}" class="{{classPrefix}}__list"><block wx:for="{{ items }}" wx:key="index"><view data-index="{{index}}" style="{{ item.color ? 'color: ' + item.color : '' }}" class="{{_.cls(classPrefix + '__list-item', [['disabled', item.disabled]])}}" bind:tap="onSelect" aria-role="{{ariaRole || 'button'}}" aria-label="{{item.label || item}}" tabindex="0"><view class="{{classPrefix}}__list-item-content"><template wx:if="{{_this.getIconData(item.icon)}}" is="icon" data="{{oClass: classPrefix + '__list-item-icon', ..._this.getIconData(item.icon)}}"/><view class="{{classPrefix}}__list-item-text">{{item.label || item}}</view><template wx:if="{{_this.getIconData(item.suffixIcon)}}" is="icon" data="{{oClass: classPrefix + '__list-item-icon--suffix', ..._this.getIconData(item.suffixIcon)}}"/></view><view wx:if="{{item.description}}" class="{{classPrefix}}__list-item-desc">{{item.description}}</view></view></block></view></view><slot/><view wx:if="{{showCancel}}" class="{{classPrefix}}__footer"><view class="{{classPrefix}}__gap-{{theme}}"/><view class="{{classPrefix}}__cancel {{prefix}}-class-cancel" hover-class="{{classPrefix}}__cancel--hover" hover-stay-time="70" bind:tap="onCancel" aria-role="button">{{ cancelText || globalConfig.cancel }}</view></view></o-popup></view>
@@ -0,0 +1,34 @@
1
+ var utils = require('../common/utils.wxs');
2
+
3
+ var getListThemeItemClass = function (props) {
4
+ var classPrefix = props.classPrefix;
5
+ var item = props.item;
6
+ var prefix = props.prefix;
7
+ var classList = [classPrefix + '__list-item'];
8
+ if (item.disabled) {
9
+ classList.push(prefix + '-is-disabled');
10
+ }
11
+ return classList.join(' ');
12
+ };
13
+
14
+ var getIconData = function (icon) {
15
+ if (utils.isString(icon)) {
16
+ return { name: icon };
17
+ }
18
+
19
+ if (utils.isNoEmptyObj(icon)) {
20
+ return icon;
21
+ }
22
+
23
+ return null;
24
+ };
25
+
26
+ var isImage = function (name) {
27
+ return name.indexOf('/') !== -1;
28
+ };
29
+
30
+ module.exports = {
31
+ getListThemeItemClass: getListThemeItemClass,
32
+ getIconData: getIconData,
33
+ isImage: isImage,
34
+ };