@pisell/materials 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. package/.tmp/assets-daily.json +93 -0
  2. package/.tmp/assets-dev.json +93 -0
  3. package/.tmp/assets-prod.json +93 -0
  4. package/.tmp/default.view.js +24 -0
  5. package/.tmp/index.jsx +279 -0
  6. package/.tmp/meta.js +251 -0
  7. package/.tmp/preview.jsx +72 -0
  8. package/.tmp/view.js +25 -0
  9. package/CHANGELOG.md +6 -0
  10. package/build/lowcode/assets-daily.json +93 -0
  11. package/build/lowcode/assets-dev.json +93 -0
  12. package/build/lowcode/assets-prod.json +93 -0
  13. package/build/lowcode/designer.html +303 -0
  14. package/build/lowcode/index.html +305 -0
  15. package/build/lowcode/index.js +1 -0
  16. package/build/lowcode/meta.js +9 -0
  17. package/build/lowcode/preview.css +1 -0
  18. package/build/lowcode/preview.html +35 -0
  19. package/build/lowcode/preview.js +304 -0
  20. package/build/lowcode/render/default/view.js +22 -0
  21. package/build/lowcode/view.js +22 -0
  22. package/build.lowcode.js +46 -0
  23. package/lowcode/_setters/antd-icon-setter/index.tsx +285 -0
  24. package/lowcode/_setters/antd-icon-setter/style.less +69 -0
  25. package/lowcode/_setters/index.tsx +1 -0
  26. package/lowcode/_utils/hoc.tsx +93 -0
  27. package/lowcode/_utils/transform-meta.ts +343 -0
  28. package/lowcode/_utils/utils.ts +6 -0
  29. package/lowcode/affix/__screenshots__/affix-1.jpg +0 -0
  30. package/lowcode/affix/meta.ts +68 -0
  31. package/lowcode/affix/snippets.ts +20 -0
  32. package/lowcode/alert/__screenshots__/alert-1.png +0 -0
  33. package/lowcode/alert/__screenshots__/alert-2.png +0 -0
  34. package/lowcode/alert/__screenshots__/alert-3.png +0 -0
  35. package/lowcode/alert/__screenshots__/alert-4.png +0 -0
  36. package/lowcode/alert/meta.ts +102 -0
  37. package/lowcode/alert/snippets.ts +54 -0
  38. package/lowcode/anchor/__screenshots__/anchor-1.png +0 -0
  39. package/lowcode/anchor/snippets.ts +30 -0
  40. package/lowcode/anchor.link/meta.ts +29 -0
  41. package/lowcode/anchor.link/snippets.ts +1 -0
  42. package/lowcode/auto-complete/__screenshots__/auto-complete-1.png +0 -0
  43. package/lowcode/auto-complete/meta.ts +453 -0
  44. package/lowcode/auto-complete/snippets.ts +26 -0
  45. package/lowcode/avatar/__screenshots__/avatar-1.jpg +0 -0
  46. package/lowcode/avatar/meta.ts +82 -0
  47. package/lowcode/avatar/snippets.ts +12 -0
  48. package/lowcode/badge/__screenshots__/badge-1.png +0 -0
  49. package/lowcode/badge/meta.ts +94 -0
  50. package/lowcode/badge/snippets.ts +12 -0
  51. package/lowcode/breadcrumb/__screenshots__/breadcrumb-1.jpg +0 -0
  52. package/lowcode/breadcrumb/meta.ts +136 -0
  53. package/lowcode/breadcrumb/snippets.ts +44 -0
  54. package/lowcode/button/__screenshots__/button-1.png +0 -0
  55. package/lowcode/button/__screenshots__/button-2.png +0 -0
  56. package/lowcode/button/__screenshots__/button-3.png +0 -0
  57. package/lowcode/button/__screenshots__/button-4.png +0 -0
  58. package/lowcode/button/__screenshots__/button-5.png +0 -0
  59. package/lowcode/button/__screenshots__/button-6.png +0 -0
  60. package/lowcode/button/meta.ts +510 -0
  61. package/lowcode/button/snippets.ts +68 -0
  62. package/lowcode/calendar/__screenshots__/calendar-1.jpg +0 -0
  63. package/lowcode/calendar/meta.ts +133 -0
  64. package/lowcode/calendar/snippets.ts +10 -0
  65. package/lowcode/card/__screenshots__/card-1.png +0 -0
  66. package/lowcode/card/meta.ts +97 -0
  67. package/lowcode/card/snippets.ts +12 -0
  68. package/lowcode/carousel/__screenshots__/carousel-1.jpg +0 -0
  69. package/lowcode/carousel/meta.ts +148 -0
  70. package/lowcode/carousel/snippets.ts +23 -0
  71. package/lowcode/cascader/__screenshots__/cascader-1.png +0 -0
  72. package/lowcode/cascader/meta.ts +175 -0
  73. package/lowcode/cascader/snippets.ts +46 -0
  74. package/lowcode/checkbox/__screenshots__/checkbox-1.png +0 -0
  75. package/lowcode/checkbox/meta.ts +85 -0
  76. package/lowcode/checkbox/snippets.ts +35 -0
  77. package/lowcode/checkbox.group/__screenshots__/checkbox-group-1.png +0 -0
  78. package/lowcode/checkbox.group/meta.ts +150 -0
  79. package/lowcode/collapse/__screenshots__/collapse-1.png +0 -0
  80. package/lowcode/collapse/meta.ts +221 -0
  81. package/lowcode/collapse/snippets.ts +28 -0
  82. package/lowcode/collapse.pane/meta.ts +84 -0
  83. package/lowcode/config-provider/__screenshots__/config-provider-1.jpg +0 -0
  84. package/lowcode/config-provider/meta.ts +140 -0
  85. package/lowcode/config-provider/snippets.ts +10 -0
  86. package/lowcode/date-picker/__screenshots__/date-picker-1.png +0 -0
  87. package/lowcode/date-picker/__screenshots__/date-picker-2.png +0 -0
  88. package/lowcode/date-picker/__screenshots__/date-picker-3.png +0 -0
  89. package/lowcode/date-picker/__screenshots__/date-picker-4.png +0 -0
  90. package/lowcode/date-picker/__screenshots__/date-picker-5.png +0 -0
  91. package/lowcode/date-picker/meta.ts +281 -0
  92. package/lowcode/date-picker/snippets.ts +50 -0
  93. package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-1.png +0 -0
  94. package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-2.png +0 -0
  95. package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-3.png +0 -0
  96. package/lowcode/date-picker.range-picker/__screenshots__/date-picker-range-picker-4.png +0 -0
  97. package/lowcode/date-picker.range-picker/meta.ts +356 -0
  98. package/lowcode/date-picker.range-picker/snippets.ts +44 -0
  99. package/lowcode/descriptions/__screenshots__/descriptions-1.jpg +0 -0
  100. package/lowcode/descriptions/meta.ts +230 -0
  101. package/lowcode/descriptions/snippets.ts +18 -0
  102. package/lowcode/descriptions.item/meta.ts +37 -0
  103. package/lowcode/directory-tree/meta.ts +2747 -0
  104. package/lowcode/divider/__screenshots__/divider-1.png +0 -0
  105. package/lowcode/divider/__screenshots__/divider-2.png +0 -0
  106. package/lowcode/divider/meta.ts +70 -0
  107. package/lowcode/divider/snippets.ts +27 -0
  108. package/lowcode/drawer/__screenshots__/drawer-1.png +0 -0
  109. package/lowcode/drawer/__screenshots__/drawer-2.png +0 -0
  110. package/lowcode/drawer/meta.ts +420 -0
  111. package/lowcode/drawer/snippets.ts +40 -0
  112. package/lowcode/dropdown/__screenshots__/dropdown-1.png +0 -0
  113. package/lowcode/dropdown/meta.ts +143 -0
  114. package/lowcode/dropdown/snippets.ts +73 -0
  115. package/lowcode/empty/__screenshots__/empty-1.png +0 -0
  116. package/lowcode/empty/meta.ts +40 -0
  117. package/lowcode/empty/snippets.ts +10 -0
  118. package/lowcode/form/__screenshots__/form-1.png +0 -0
  119. package/lowcode/form/meta.ts +380 -0
  120. package/lowcode/form/snippets.ts +511 -0
  121. package/lowcode/form.item/__screenshots__/form-item-1.jpg +0 -0
  122. package/lowcode/form.item/meta.ts +348 -0
  123. package/lowcode/form.item/snippets.ts +12 -0
  124. package/lowcode/form.list/meta.ts +42 -0
  125. package/lowcode/form.list/snippets.ts +11 -0
  126. package/lowcode/grid.col/meta.ts +116 -0
  127. package/lowcode/grid.col/snippets.ts +1 -0
  128. package/lowcode/grid.row/__screenshots__/1-1-1-1.png +0 -0
  129. package/lowcode/grid.row/__screenshots__/1-1-1.png +0 -0
  130. package/lowcode/grid.row/__screenshots__/1-1.png +0 -0
  131. package/lowcode/grid.row/__screenshots__/1-3.png +0 -0
  132. package/lowcode/grid.row/meta.ts +118 -0
  133. package/lowcode/grid.row/snippets.ts +108 -0
  134. package/lowcode/icon/__screenshots__/icon-1.jpg +0 -0
  135. package/lowcode/icon/meta.ts +74 -0
  136. package/lowcode/icon/snippets.ts +13 -0
  137. package/lowcode/image/__screenshots__/image-1.png +0 -0
  138. package/lowcode/image/meta.ts +53 -0
  139. package/lowcode/image/snippets.ts +14 -0
  140. package/lowcode/input/__screenshots__/input-1.png +0 -0
  141. package/lowcode/input/meta.ts +190 -0
  142. package/lowcode/input/snippets.ts +12 -0
  143. package/lowcode/input-number/__screenshots__/input-number-1.png +0 -0
  144. package/lowcode/input-number/meta.ts +213 -0
  145. package/lowcode/input-number/snippets.ts +12 -0
  146. package/lowcode/input.group/__screenshots__/input-group-1.jpg +0 -0
  147. package/lowcode/input.group/meta.ts +53 -0
  148. package/lowcode/input.group/snippets.ts +24 -0
  149. package/lowcode/input.password/__screenshots__/input-password-1.png +0 -0
  150. package/lowcode/input.password/meta.ts +192 -0
  151. package/lowcode/input.password/snippets.ts +12 -0
  152. package/lowcode/input.search/__screenshots__/input-search-1.png +0 -0
  153. package/lowcode/input.search/meta.ts +206 -0
  154. package/lowcode/input.search/snippets.ts +12 -0
  155. package/lowcode/input.text-area/__screenshots__/input-text-area-1.png +0 -0
  156. package/lowcode/input.text-area/meta.ts +210 -0
  157. package/lowcode/input.text-area/snippets.ts +16 -0
  158. package/lowcode/list/__screenshots__/list-1.png +0 -0
  159. package/lowcode/list/meta.ts +499 -0
  160. package/lowcode/list/snippets.ts +201 -0
  161. package/lowcode/list.item/meta.ts +58 -0
  162. package/lowcode/list.item.meta/meta.ts +49 -0
  163. package/lowcode/login/meta.ts +56 -0
  164. package/lowcode/mentions/__screenshots__/mentions-1.png +0 -0
  165. package/lowcode/mentions/meta.ts +159 -0
  166. package/lowcode/mentions/snippets.ts +10 -0
  167. package/lowcode/menu/__screenshots__/menu-1.jpg +0 -0
  168. package/lowcode/menu/meta.ts +248 -0
  169. package/lowcode/menu/snippets.ts +22 -0
  170. package/lowcode/menu/utils.ts +97 -0
  171. package/lowcode/menu.item/meta.ts +63 -0
  172. package/lowcode/menu.item/snippets.ts +1 -0
  173. package/lowcode/menu.item-group/__screenshots__/menu-item-group-1.png +0 -0
  174. package/lowcode/menu.item-group/meta.ts +110 -0
  175. package/lowcode/menu.item-group/snippets.ts +1 -0
  176. package/lowcode/menu.sub-menu/meta.ts +131 -0
  177. package/lowcode/menu.sub-menu/snippets.ts +1 -0
  178. package/lowcode/modal/__screenshots__/modal-1.png +0 -0
  179. package/lowcode/modal/__screenshots__/modal-2.png +0 -0
  180. package/lowcode/modal/meta.ts +270 -0
  181. package/lowcode/modal/snippets.ts +33 -0
  182. package/lowcode/page-header/__screenshots__/page-header-1.jpg +0 -0
  183. package/lowcode/page-header/meta.ts +157 -0
  184. package/lowcode/page-header/snippets.ts +13 -0
  185. package/lowcode/pagination/__screenshots__/pagination-1.jpg +0 -0
  186. package/lowcode/pagination/meta.ts +231 -0
  187. package/lowcode/pagination/snippets.ts +14 -0
  188. package/lowcode/popconfirm/__screenshots__/popconfirm-1.jpg +0 -0
  189. package/lowcode/popconfirm/meta.ts +121 -0
  190. package/lowcode/popconfirm/snippets.ts +21 -0
  191. package/lowcode/popover/__screenshots__/popover-1.jpg +0 -0
  192. package/lowcode/popover/meta.ts +332 -0
  193. package/lowcode/popover/snippets.ts +10 -0
  194. package/lowcode/progress/__screenshots__/progress-1.png +0 -0
  195. package/lowcode/progress/__screenshots__/progress-2.png +0 -0
  196. package/lowcode/progress/meta.ts +142 -0
  197. package/lowcode/progress/snippets.ts +24 -0
  198. package/lowcode/radio/__screenshots__/radio-1.png +0 -0
  199. package/lowcode/radio/meta.ts +69 -0
  200. package/lowcode/radio/snippets.ts +35 -0
  201. package/lowcode/radio.group/__screenshots__/radio-group-1.png +0 -0
  202. package/lowcode/radio.group/meta.ts +213 -0
  203. package/lowcode/rate/__screenshots__/rate-1.png +0 -0
  204. package/lowcode/rate/meta.ts +132 -0
  205. package/lowcode/rate/snippets.ts +12 -0
  206. package/lowcode/result/__screenshots__/result-1.png +0 -0
  207. package/lowcode/result/meta.ts +53 -0
  208. package/lowcode/result/snippets.ts +14 -0
  209. package/lowcode/select/__screenshots__/select-1.png +0 -0
  210. package/lowcode/select/meta.ts +427 -0
  211. package/lowcode/select/snippets.ts +28 -0
  212. package/lowcode/skeleton/__screenshots__/skeleton-1.png +0 -0
  213. package/lowcode/skeleton/meta.ts +63 -0
  214. package/lowcode/skeleton/snippets.ts +13 -0
  215. package/lowcode/slider/__screenshots__/slider-1.png +0 -0
  216. package/lowcode/slider/meta.ts +218 -0
  217. package/lowcode/slider/snippets.ts +12 -0
  218. package/lowcode/slot/meta.ts +61 -0
  219. package/lowcode/slot/view.tsx +58 -0
  220. package/lowcode/space/__screenshots__/space-1.png +0 -0
  221. package/lowcode/space/meta.ts +65 -0
  222. package/lowcode/space/snippets.ts +24 -0
  223. package/lowcode/spin/__screenshots__/spin-1.png +0 -0
  224. package/lowcode/spin/meta.ts +60 -0
  225. package/lowcode/spin/snippets.ts +13 -0
  226. package/lowcode/statistic/__screenshots__/statistic-1.png +0 -0
  227. package/lowcode/statistic/meta.ts +67 -0
  228. package/lowcode/statistic/snippets.ts +13 -0
  229. package/lowcode/steps/__screenshots__/steps-1.png +0 -0
  230. package/lowcode/steps/meta.ts +281 -0
  231. package/lowcode/steps/snippets.ts +36 -0
  232. package/lowcode/steps.step/meta.ts +54 -0
  233. package/lowcode/steps.step/snippets.ts +1 -0
  234. package/lowcode/switch/__screenshots__/switch-1.png +0 -0
  235. package/lowcode/switch/meta.ts +122 -0
  236. package/lowcode/switch/snippets.ts +12 -0
  237. package/lowcode/table/__screenshots__/table-1.png +0 -0
  238. package/lowcode/table/meta.ts +847 -0
  239. package/lowcode/table/snippets.ts +43 -0
  240. package/lowcode/tabs/__screenshots__/tabs-1.jpg +0 -0
  241. package/lowcode/tabs/__screenshots__/tabs-2.jpg +0 -0
  242. package/lowcode/tabs/__screenshots__/tabs-3.jpg +0 -0
  243. package/lowcode/tabs/meta.ts +415 -0
  244. package/lowcode/tabs/snippets.ts +86 -0
  245. package/lowcode/tabs.tab-pane/meta.ts +78 -0
  246. package/lowcode/tag/__screenshots__/tag-1.png +0 -0
  247. package/lowcode/tag/meta.ts +69 -0
  248. package/lowcode/tag/snippets.ts +13 -0
  249. package/lowcode/time-picker/__screenshots__/time-picker-1.png +0 -0
  250. package/lowcode/time-picker/meta.ts +224 -0
  251. package/lowcode/time-picker/snippets.ts +10 -0
  252. package/lowcode/timeline/__screenshots__/timeline-1.jpg +0 -0
  253. package/lowcode/timeline/meta.ts +189 -0
  254. package/lowcode/timeline/snippets.ts +21 -0
  255. package/lowcode/timeline.item/__screenshots__/timeline-1.jpg +0 -0
  256. package/lowcode/timeline.item/meta.ts +53 -0
  257. package/lowcode/timeline.item/snippets.ts +10 -0
  258. package/lowcode/tooltip/__screenshots__/tooltip-1.jpg +0 -0
  259. package/lowcode/tooltip/meta.ts +306 -0
  260. package/lowcode/tooltip/snippets.ts +12 -0
  261. package/lowcode/transfer/__screenshots__/transfer-1.png +0 -0
  262. package/lowcode/transfer/meta.ts +304 -0
  263. package/lowcode/transfer/snippets.ts +42 -0
  264. package/lowcode/tree/__screenshots__/tree-1.jpg +0 -0
  265. package/lowcode/tree/meta.ts +377 -0
  266. package/lowcode/tree/snippets.ts +30 -0
  267. package/lowcode/tree-select/__screenshots__/tree-select-1.png +0 -0
  268. package/lowcode/tree-select/meta.ts +314 -0
  269. package/lowcode/tree-select/snippets.ts +34 -0
  270. package/lowcode/typography.link/__screenshots__/typography-link-1.png +0 -0
  271. package/lowcode/typography.link/meta.ts +44 -0
  272. package/lowcode/typography.link/snippets.ts +14 -0
  273. package/lowcode/typography.paragraph/__screenshots__/typography-paragraph-1.png +0 -0
  274. package/lowcode/typography.paragraph/meta.ts +129 -0
  275. package/lowcode/typography.paragraph/snippets.ts +14 -0
  276. package/lowcode/typography.text/__screenshots__/typography-text-1.png +0 -0
  277. package/lowcode/typography.text/__screenshots__/typography-text-2.png +0 -0
  278. package/lowcode/typography.text/__screenshots__/typography-text-3.png +0 -0
  279. package/lowcode/typography.text/meta.ts +200 -0
  280. package/lowcode/typography.text/snippets.ts +34 -0
  281. package/lowcode/typography.title/__screenshots__/typography-title-1.png +0 -0
  282. package/lowcode/typography.title/__screenshots__/typography-title-2.png +0 -0
  283. package/lowcode/typography.title/__screenshots__/typography-title-3.png +0 -0
  284. package/lowcode/typography.title/__screenshots__/typography-title-4.png +0 -0
  285. package/lowcode/typography.title/meta.ts +130 -0
  286. package/lowcode/typography.title/snippets.ts +46 -0
  287. package/lowcode/upload/__screenshots__/upload-1.png +0 -0
  288. package/lowcode/upload/meta.ts +439 -0
  289. package/lowcode/upload/snippets.ts +16 -0
  290. package/package.json +29 -3
  291. package/src/components/auto-complete/index.tsx +6 -0
  292. package/src/components/button/index.tsx +12 -0
  293. package/src/components/calendar/index.tsx +10 -0
  294. package/src/components/cascader/index.tsx +6 -0
  295. package/src/components/checkbox/index.tsx +7 -0
  296. package/src/components/config-provider/index.tsx +27 -0
  297. package/src/components/date-picker/index.tsx +22 -0
  298. package/src/components/drawer/index.tsx +13 -0
  299. package/src/components/dropdown/index.tsx +13 -0
  300. package/src/components/form/index.tsx +97 -0
  301. package/src/components/icon/index.tsx +34 -0
  302. package/src/components/input/index.tsx +18 -0
  303. package/src/components/modal/index.tsx +18 -0
  304. package/src/components/radio/index.tsx +7 -0
  305. package/src/components/select/index.tsx +6 -0
  306. package/src/components/skeleton/index.tsx +6 -0
  307. package/src/components/slider/index.tsx +18 -0
  308. package/src/components/table/index.tsx +10 -0
  309. package/src/components/tabs/index.tsx +67 -0
  310. package/src/components/time-picker/index.tsx +9 -0
  311. package/src/components/tree-select/index.tsx +8 -0
  312. package/src/components/upload/index.tsx +5 -0
  313. package/src/index.tsx +141 -0
  314. package/src/utils/hoc.tsx +92 -0
  315. package/src/utils/warning.ts +3 -0
@@ -0,0 +1,136 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "Breadcrumb",
6
+ title: "面包屑",
7
+ category: "导航",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "Breadcrumb",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ configure: {
20
+ props: [
21
+ {
22
+ title: "基础",
23
+ display: "block",
24
+ type: "group",
25
+ items: [
26
+ {
27
+ name: "routes",
28
+ title: { label: "路由栈信息", tip: "router 的路由栈信息" },
29
+ propType: {
30
+ type: "arrayOf",
31
+ value: {
32
+ type: "shape",
33
+ value: [
34
+ { name: "path", propType: "string" },
35
+ { name: "breadcrumbName", propType: "string" },
36
+ ],
37
+ },
38
+ },
39
+ setter: {
40
+ componentName: "ArraySetter",
41
+ props: {
42
+ itemSetter: {
43
+ componentName: "ObjectSetter",
44
+ props: {
45
+ config: {
46
+ items: [
47
+ {
48
+ name: "path",
49
+ title: { label: "路由路径", tip: "path | 路由路径" },
50
+ propType: "string",
51
+ setter: "StringSetter",
52
+ isRequired: true,
53
+ },
54
+ {
55
+ name: "breadcrumbName",
56
+ title: {
57
+ label: "路由名称",
58
+ tip: "breadcrumbName | 路由名称",
59
+ },
60
+ propType: "string",
61
+ setter: "StringSetter",
62
+ isRequired: true,
63
+ },
64
+ ],
65
+ },
66
+ },
67
+ initialValue: {
68
+ path: "path",
69
+ breadcrumbName: "breadcrumbName",
70
+ },
71
+ },
72
+ },
73
+ },
74
+ },
75
+ {
76
+ name: "params",
77
+ title: { label: "路由的参数", tip: "路由的参数" },
78
+ propType: "object",
79
+ setter: "JsonSetter",
80
+ },
81
+ {
82
+ name: "separator",
83
+ title: { label: "分隔符自定义", tip: "分隔符自定义" },
84
+ propType: { type: "oneOfType", value: ["string", "node"] },
85
+ setter: [
86
+ "StringSetter",
87
+ {
88
+ componentName: "SlotSetter",
89
+ initialValue: {
90
+ type: "JSSlot",
91
+ value: [],
92
+ },
93
+ },
94
+ "VariableSetter",
95
+ ],
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ title: "扩展",
101
+ display: "block",
102
+ type: "group",
103
+ items: [
104
+ {
105
+ name: "itemRender",
106
+ title: {
107
+ label: "自定义渲染",
108
+ tip: "itemRender | 自定义渲染",
109
+ },
110
+ propType: { type: "oneOfType", value: ["func", "node"] },
111
+ setter: [
112
+ {
113
+ componentName: "SlotSetter",
114
+ title: "自定义渲染插槽",
115
+ initialValue: {
116
+ type: "JSSlot",
117
+ params: ["route", "params", "routes", "paths"],
118
+ value: [],
119
+ },
120
+ },
121
+ {
122
+ componentName: "FunctionSetter",
123
+ props: {
124
+ template:
125
+ "itemRender(route, params, routes, paths,${extParams}){\n// 自定义渲染\nreturn `${route.breadcrumbName}`}",
126
+ },
127
+ },
128
+ "VariableSetter",
129
+ ],
130
+ },
131
+ ],
132
+ },
133
+ ],
134
+ supports: { style: true },
135
+ },
136
+ };
@@ -0,0 +1,44 @@
1
+ export default [
2
+ {
3
+ title: '面包屑',
4
+ screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/breadcrumb-1.jpg',
5
+ schema: {
6
+ componentName: 'Breadcrumb',
7
+ props: {
8
+ routes: [
9
+ {
10
+ path: 'a',
11
+ breadcrumbName: 'Home',
12
+ },
13
+ {
14
+ path: 'center',
15
+ breadcrumbName: 'Application Center',
16
+ },
17
+ {
18
+ path: 'app',
19
+ breadcrumbName: 'An Application',
20
+ },
21
+ ],
22
+ itemRender: {
23
+ type: 'JSSlot',
24
+ params: ['route', 'params', 'routes', 'paths'],
25
+ value: [
26
+ {
27
+ componentName: 'Typography.Link',
28
+ props: {
29
+ href: {
30
+ type: 'JSExpression',
31
+ value: 'this.route.path',
32
+ },
33
+ children: {
34
+ type: 'JSExpression',
35
+ value: 'this.route.breadcrumbName',
36
+ },
37
+ },
38
+ },
39
+ ],
40
+ },
41
+ },
42
+ },
43
+ },
44
+ ];
@@ -0,0 +1,510 @@
1
+ import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
2
+ import snippets from "./snippets";
3
+
4
+ const ButtonMeta: ComponentMetadata = {
5
+ componentName: "Button",
6
+ title: "Button",
7
+ /** todo: category属性的多语言不生效 后续组件面板自己实现时加入 */
8
+ category: "通用",
9
+ docUrl: "",
10
+ screenshot: "",
11
+ devMode: "proCode",
12
+ npm: {
13
+ package: "@pisell/materials",
14
+ version: "1.0.1",
15
+ exportName: "Button",
16
+ main: "src/index.tsx",
17
+ destructuring: true,
18
+ subName: "",
19
+ },
20
+ configure: {
21
+ props: [
22
+ {
23
+ title: {
24
+ label: {
25
+ type: "i18n",
26
+ "en-US": "Feature",
27
+ "zh-CN": "功能",
28
+ },
29
+ },
30
+ display: "block",
31
+ type: "group",
32
+ items: [
33
+ {
34
+ name: "children",
35
+ title: {
36
+ label: {
37
+ type: "i18n",
38
+ "en-US": "content",
39
+ "zh-CN": "内容",
40
+ },
41
+ tip: "children",
42
+ },
43
+ propType: {
44
+ type: "oneOfType",
45
+ value: ["node", "string"],
46
+ },
47
+ setter: ["SlotSetter", "StringSetter", "VariableSetter"],
48
+ },
49
+ {
50
+ name: "htmlType",
51
+ title: {
52
+ label: {
53
+ type: "i18n",
54
+ "en-US": "native type",
55
+ "zh-CN": "原生类型",
56
+ },
57
+ tip: {
58
+ type: "i18n",
59
+ "en-US": "htmlType | Set the native `type` value of `button`",
60
+ "zh-CN": "htmlType | 设置 `button` 原生的 `type` 值",
61
+ },
62
+ },
63
+ propType: {
64
+ type: "oneOf",
65
+ value: ["submit", "reset", "button"],
66
+ },
67
+ setter: [
68
+ {
69
+ componentName: "RadioGroupSetter",
70
+ props: {
71
+ options: [
72
+ {
73
+ title: "Submit",
74
+ value: "submit",
75
+ },
76
+ {
77
+ title: "Reset",
78
+ value: "reset",
79
+ },
80
+ {
81
+ title: "Button",
82
+ value: "button",
83
+ },
84
+ ],
85
+ },
86
+ },
87
+ "VariableSetter",
88
+ ],
89
+ defaultValue: "button",
90
+ },
91
+ {
92
+ name: "href",
93
+ title: {
94
+ label: {
95
+ type: "i18n",
96
+ "en-US": "jump address",
97
+ "zh-CN": "跳转地址",
98
+ },
99
+ tip: {
100
+ type: "i18n",
101
+ "en-US":
102
+ "href | click to jump to the address, specify this attribute button behavior is consistent with a link",
103
+ "zh-CN":
104
+ "href | 点击跳转的地址,指定此属性 button 的行为和 a 链接一致",
105
+ },
106
+ },
107
+ propType: "string",
108
+ setter: ["StringSetter", "VariableSetter"],
109
+ },
110
+ {
111
+ name: "target",
112
+ title: {
113
+ label: "Target",
114
+ tip: {
115
+ type: "i18n",
116
+ "en-US":
117
+ "target | Equivalent to the target attribute of a link, effective when href exists",
118
+ "zh-CN":
119
+ "target | 相当于 a 链接的 target 属性,href 存在时生效",
120
+ },
121
+ },
122
+ propType: {
123
+ type: "oneOf",
124
+ value: ["_self", "_blank", "_parent", "_top"],
125
+ },
126
+ setter: [
127
+ {
128
+ componentName: "SelectSetter",
129
+ props: {
130
+ options: [
131
+ {
132
+ title: {
133
+ type: "i18n",
134
+ "en-US": "Jump to this window",
135
+ "zh-CN": "本窗口跳转",
136
+ },
137
+ value: "_self",
138
+ },
139
+ {
140
+ title: {
141
+ type: "i18n",
142
+ "en-US": "open a new tab",
143
+ "zh-CN": "打开新标签页",
144
+ },
145
+ value: "_blank",
146
+ },
147
+ {
148
+ title: {
149
+ type: "i18n",
150
+ "en-US": "parent window jump",
151
+ "zh-CN": "父窗口跳转",
152
+ },
153
+ value: "_parent",
154
+ },
155
+ {
156
+ title: {
157
+ type: "i18n",
158
+ "en-US": "Top-level window jump",
159
+ "zh-CN": "顶层窗口跳转",
160
+ },
161
+ value: "_top",
162
+ },
163
+ ],
164
+ },
165
+ },
166
+ "StringSetter",
167
+ "VariableSetter",
168
+ ],
169
+ condition: {
170
+ type: "JSFunction",
171
+ value:
172
+ 'target => !!target.getProps().getPropValue("href")?.trim()',
173
+ },
174
+ },
175
+ ],
176
+ },
177
+ {
178
+ title: {
179
+ type: "i18n",
180
+ "en-US": "exterior",
181
+ "zh-CN": "外观",
182
+ },
183
+ display: "block",
184
+ type: "group",
185
+ items: [
186
+ {
187
+ name: "type",
188
+ title: {
189
+ label: {
190
+ type: "i18n",
191
+ "en-US": "type",
192
+ "zh-CN": "类型",
193
+ },
194
+ tip: {
195
+ type: "i18n",
196
+ "en-US": "type | set button type",
197
+ "zh-CN": "type | 设置按钮类型",
198
+ },
199
+ },
200
+ propType: {
201
+ type: "oneOf",
202
+ value: ["primary", "ghost", "dashed", "danger", "link", "text"],
203
+ },
204
+ setter: [
205
+ {
206
+ componentName: "SelectSetter",
207
+ props: {
208
+ options: [
209
+ {
210
+ title: {
211
+ type: "i18n",
212
+ "en-US": "primary button",
213
+ "zh-CN": "主按钮",
214
+ },
215
+ value: "primary",
216
+ },
217
+ {
218
+ title: {
219
+ type: "i18n",
220
+ "en-US": "dashed button",
221
+ "zh-CN": "虚线框按钮",
222
+ },
223
+ value: "dashed",
224
+ },
225
+ {
226
+ title: {
227
+ type: "i18n",
228
+ "en-US": "danger button",
229
+ "zh-CN": "危险按钮",
230
+ },
231
+ value: "danger",
232
+ },
233
+ {
234
+ title: {
235
+ type: "i18n",
236
+ "en-US": "link button",
237
+ "zh-CN": "链接按钮",
238
+ },
239
+ value: "link",
240
+ },
241
+ {
242
+ title: {
243
+ type: "i18n",
244
+ "en-US": "text button",
245
+ "zh-CN": "类文本按钮",
246
+ },
247
+ value: "text",
248
+ },
249
+ ],
250
+ },
251
+ },
252
+ "VariableSetter",
253
+ ],
254
+ },
255
+ {
256
+ name: "size",
257
+ title: {
258
+ label: {
259
+ type: "i18n",
260
+ "en-US": "size",
261
+ "zh-CN": "尺寸",
262
+ },
263
+ tip: {
264
+ type: "i18n",
265
+ "en-US": "size | set button size",
266
+ "zh-CN": "size | 设置按钮大小",
267
+ },
268
+ },
269
+ propType: { type: "oneOf", value: ["large", "middle", "small"] },
270
+ setter: [
271
+ {
272
+ componentName: "RadioGroupSetter",
273
+ props: {
274
+ options: [
275
+ {
276
+ title: {
277
+ type: "i18n",
278
+ "en-US": "large",
279
+ "zh-CN": "大",
280
+ },
281
+ value: "large",
282
+ },
283
+ {
284
+ title: {
285
+ type: "i18n",
286
+ "en-US": "middle",
287
+ "zh-CN": "中",
288
+ },
289
+ value: "middle",
290
+ },
291
+ {
292
+ title: {
293
+ type: "i18n",
294
+ "en-US": "small",
295
+ "zh-CN": "小",
296
+ },
297
+ value: "small",
298
+ },
299
+ ],
300
+ },
301
+ },
302
+ "VariableSetter",
303
+ ],
304
+ defaultValue: "middle",
305
+ },
306
+ {
307
+ name: "shape",
308
+ title: {
309
+ label: {
310
+ type: "i18n",
311
+ "en-US": "shape",
312
+ "zh-CN": "形状",
313
+ },
314
+ tip: {
315
+ type: "i18n",
316
+ "en-US":
317
+ "shape | Set button shape, optional value is `circle`, `round` or not set",
318
+ "zh-CN":
319
+ "shape | 设置按钮形状,可选值为 `circle`、 `round` 或者不设",
320
+ },
321
+ },
322
+ propType: { type: "oneOf", value: ["default", "circle", "round"] },
323
+ defaultValue: "default",
324
+ setter: [
325
+ {
326
+ componentName: "RadioGroupSetter",
327
+ props: {
328
+ options: [
329
+ {
330
+ title: {
331
+ type: "i18n",
332
+ "en-US": "default",
333
+ "zh-CN": "默认",
334
+ },
335
+ value: "default",
336
+ },
337
+ {
338
+ title: {
339
+ type: "i18n",
340
+ "en-US": "circle",
341
+ "zh-CN": "圆形",
342
+ },
343
+ value: "circle",
344
+ },
345
+ {
346
+ title: {
347
+ type: "i18n",
348
+ "en-US": "round",
349
+ "zh-CN": "圆角",
350
+ },
351
+ value: "round",
352
+ },
353
+ ],
354
+ },
355
+ },
356
+ "VariableSetter",
357
+ ],
358
+ },
359
+ {
360
+ name: "icon",
361
+ title: {
362
+ label: {
363
+ type: "i18n",
364
+ "en-US": "icon",
365
+ "zh-CN": "图标",
366
+ },
367
+ tip: "icon | Set the icon component of the button",
368
+ },
369
+ propType: "node",
370
+ setter: {
371
+ componentName: "SlotSetter",
372
+ initialValue: {
373
+ type: "JSSlot",
374
+ value: [
375
+ {
376
+ componentName: "Icon",
377
+ props: {
378
+ type: "SmileOutlined",
379
+ size: 20,
380
+ rotate: 0,
381
+ spin: false,
382
+ },
383
+ },
384
+ ],
385
+ },
386
+ },
387
+ },
388
+ {
389
+ name: "block",
390
+ title: {
391
+ label: {
392
+ type: "i18n",
393
+ "en-US": "adaptive",
394
+ "zh-CN": "自适应",
395
+ },
396
+ tip: {
397
+ type: "i18n",
398
+ "en-US":
399
+ "block | Option to adjust button width to its parent width",
400
+ "zh-CN": "block | 将按钮宽度调整为其父宽度的选项",
401
+ },
402
+ },
403
+ propType: "bool",
404
+ setter: "BoolSetter",
405
+ defaultValue: false,
406
+ },
407
+ {
408
+ name: "danger",
409
+ title: {
410
+ label: {
411
+ type: "i18n",
412
+ "en-US": "danger button",
413
+ "zh-CN": "危险按钮",
414
+ },
415
+ tip: {
416
+ type: "i18n",
417
+ "en-US": "danger | set hazard button",
418
+ "zh-CN": "danger | 设置危险按钮",
419
+ },
420
+ },
421
+ propType: "bool",
422
+ setter: "BoolSetter",
423
+ defaultValue: false,
424
+ },
425
+ {
426
+ name: "ghost",
427
+ title: {
428
+ label: {
429
+ type: "i18n",
430
+ "en-US": "ghost attribute",
431
+ "zh-CN": "幽灵属性",
432
+ },
433
+ tip: {
434
+ type: "i18n",
435
+ "en-US":
436
+ "ghost | Ghost property to make button background transparent",
437
+ "zh-CN": "ghost | 幽灵属性,使按钮背景透明",
438
+ },
439
+ },
440
+ propType: "bool",
441
+ setter: "BoolSetter",
442
+ defaultValue: false,
443
+ },
444
+ ],
445
+ },
446
+ {
447
+ title: {
448
+ type: "i18n",
449
+ "en-US": "state",
450
+ "zh-CN": "状态",
451
+ },
452
+ display: "block",
453
+ type: "group",
454
+ items: [
455
+ {
456
+ name: "loading",
457
+ title: {
458
+ label: {
459
+ type: "i18n",
460
+ "en-US": "loading status",
461
+ "zh-CN": "载入状态",
462
+ },
463
+ tip: {
464
+ type: "i18n",
465
+ "en-US": "loading | Set button loading state",
466
+ "zh-CN": "loading | 设置按钮载入状态",
467
+ },
468
+ },
469
+ propType: "bool",
470
+ setter: ["BoolSetter", "VariableSetter"],
471
+ },
472
+ {
473
+ name: "disabled",
474
+ title: {
475
+ label: {
476
+ type: "i18n",
477
+ "en-US": "Whether to disable",
478
+ "zh-CN": "是否禁用",
479
+ },
480
+ tip: {
481
+ type: "i18n",
482
+ "en-US": "disabled | Is it disabled",
483
+ "zh-CN": "disabled | 是否为禁用状态",
484
+ },
485
+ },
486
+ propType: "bool",
487
+ setter: ["BoolSetter", "VariableSetter"],
488
+ defaultValue: false,
489
+ },
490
+ ],
491
+ },
492
+ ],
493
+ supports: {
494
+ style: true,
495
+ events: [
496
+ {
497
+ name: "onClick",
498
+ template:
499
+ "onClick(event,${extParams}){\n// 点击按钮时的回调\nconsole.log('onClick', event);}",
500
+ },
501
+ ],
502
+ },
503
+ component: {},
504
+ },
505
+ };
506
+
507
+ export default {
508
+ ...ButtonMeta,
509
+ snippets,
510
+ };