@pisell/materials 1.0.140 → 1.0.142

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.
@@ -100,11 +100,11 @@ export default {
100
100
  title: {
101
101
  label: '弹出位置',
102
102
  tip:
103
- '菜单弹出位置:`bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight`',
103
+ '菜单弹出位置:`bottomLeft` `bottom` `bottomRight` `topLeft` `top` `topRight`',
104
104
  },
105
105
  propType: {
106
106
  type: 'oneOf',
107
- value: ['bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'],
107
+ value: ['bottomLeft', 'bottom', 'bottomRight', 'topLeft', 'top', 'topRight'],
108
108
  },
109
109
  },
110
110
  {
@@ -1,71 +1,363 @@
1
1
  export default [
2
2
  {
3
- title: '下拉菜单',
4
- screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/dropdown-1.png',
3
+ title: "下拉菜单",
4
+ screenshot:
5
+ "https://alifd.alicdn.com/fusion-cool/icons/icon-antd/dropdown-1.png",
5
6
  schema: {
6
- componentName: 'Dropdown',
7
+ componentName: "Dropdown",
7
8
  props: {
8
9
  overlay: {
9
- type: 'JSSlot',
10
+ type: "JSSlot",
10
11
  value: [
11
12
  {
12
- componentName: 'Menu',
13
+ componentName: "Menu",
13
14
  props: {
14
15
  items: [
15
16
  {
16
- key: 'timeLinei5wd',
17
- category: 'Item',
18
- title: '菜单名',
17
+ key: "timeLinei5wd",
18
+ category: "Item",
19
+ title: "菜单名",
20
+ label: "菜单名"
19
21
  },
20
22
  ],
21
23
  },
22
- children: [
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ children: [
29
+ {
30
+ componentName: "Button",
31
+ props: {
32
+ type: "link",
33
+ children: {
34
+ type: "JSSlot",
35
+ value: [
36
+ {
37
+ componentName: "Typography.Text",
38
+ props: {
39
+ children: "Hover me",
40
+ style: {
41
+ color: "inherit",
42
+ },
43
+ },
44
+ },
23
45
  {
24
- componentName: 'Menu.Item',
25
- id: 'node_ocky01yzdq3',
46
+ componentName: "Icon",
26
47
  props: {
27
- key: 'timeLinei5wd',
28
- category: 'Item',
29
- title: '菜单名',
30
- children: '菜单名',
48
+ type: "DownOutlined",
49
+ size: 15,
50
+ style: {
51
+ marginLeft: 4,
52
+ verticalAlign: "middle",
53
+ },
31
54
  },
32
55
  },
33
56
  ],
34
57
  },
58
+ },
59
+ },
60
+ ],
61
+ },
62
+ },
63
+ {
64
+ title: "筛选下拉",
65
+ screenshot:
66
+ "https://alifd.alicdn.com/fusion-cool/icons/icon-antd/dropdown-1.png",
67
+ schema: {
68
+ componentName: "Dropdown",
69
+ props: {
70
+ overlay: {
71
+ type: "JSSlot",
72
+ value: [
73
+ {
74
+ componentName: "ClassicLayout",
75
+ props: {
76
+ header: "",
77
+ content: {
78
+ type: "JSSlot",
79
+ value: [
80
+ {
81
+ componentName: "FDCol",
82
+ props: {
83
+ width: "",
84
+ gap: 12,
85
+ style: {},
86
+ },
87
+ title: "列容器",
88
+ children: [
89
+ {
90
+ componentName: "FDCell",
91
+ props: {
92
+ align: "left",
93
+ verAlign: "top",
94
+ width: "",
95
+ },
96
+ title: "",
97
+
98
+ children: [
99
+ {
100
+ componentName: "FDP",
101
+ props: {
102
+ spacing: "small",
103
+ style: {
104
+ display: "flex",
105
+ flexDirection: "column",
106
+ justifyContent: "flex-start",
107
+ alignItems: "flex-start",
108
+ gap: "4px",
109
+ },
110
+ },
111
+ title: "段落",
112
+
113
+ children: [
114
+ {
115
+ componentName: "Typography.Text",
116
+ props: {
117
+ children: "状态筛选",
118
+ code: false,
119
+ delete: false,
120
+ disabled: false,
121
+ mark: false,
122
+ keyboard: false,
123
+ underline: false,
124
+ strong: false,
125
+ },
126
+ title: "",
127
+ },
128
+ {
129
+ componentName: "Select",
130
+ props: {
131
+ style: {
132
+ width: 200,
133
+ },
134
+ options: [
135
+ {
136
+ label: "A",
137
+ value: "A",
138
+ },
139
+ {
140
+ label: "B",
141
+ value: "B",
142
+ },
143
+ {
144
+ label: "C",
145
+ value: "C",
146
+ },
147
+ ],
148
+ allowClear: false,
149
+ autoFocus: false,
150
+ defaultActiveFirstOption: true,
151
+ disabled: false,
152
+ labelInValue: false,
153
+ showSearch: false,
154
+ loading: false,
155
+ bordered: true,
156
+ optionFilterProp: "value",
157
+ tokenSeparators: [],
158
+ isShowDropdown: false,
159
+ maxTagCount: 0,
160
+ maxTagTextLength: 0,
161
+ selectAll: false,
162
+ },
163
+ title: "",
164
+ },
165
+ ],
166
+ },
167
+ ],
168
+ },
169
+ {
170
+ componentName: "FDCell",
171
+ props: {
172
+ align: "left",
173
+ verAlign: "top",
174
+ width: "",
175
+ },
176
+ title: "容器",
177
+
178
+ children: [
179
+ {
180
+ componentName: "FDP",
181
+ props: {
182
+ style: {
183
+ display: "flex",
184
+ flexDirection: "column",
185
+ justifyContent: "flex-start",
186
+ alignItems: "flex-start",
187
+ gap: "4px",
188
+ },
189
+ },
190
+ title: "段落",
191
+
192
+ children: [
193
+ {
194
+ componentName: "Typography.Text",
195
+ props: {
196
+ children: "日期区间",
197
+ code: false,
198
+ delete: false,
199
+ disabled: false,
200
+ mark: false,
201
+ keyboard: false,
202
+ underline: false,
203
+ strong: false,
204
+ },
205
+
206
+ title: "",
207
+ },
208
+ {
209
+ componentName: "DatePicker",
210
+ props: {
211
+ format: "YYYY-MM-DD",
212
+ allowClear: true,
213
+ bordered: true,
214
+ showToday: true,
215
+ autoFocus: false,
216
+ disabled: false,
217
+ inputReadOnly: false,
218
+ showTime: false,
219
+ style: {
220
+ width: "100%",
221
+ },
222
+ },
223
+ title: "",
224
+ },
225
+ ],
226
+ },
227
+ ],
228
+ },
229
+ {
230
+ componentName: "FDCell",
231
+ props: {
232
+ align: "left",
233
+ verAlign: "top",
234
+ },
235
+ title: "容器",
236
+
237
+ children: [
238
+ {
239
+ componentName: "FDP",
240
+ props: {
241
+ style: {
242
+ display: "flex",
243
+ flexDirection: "column",
244
+ justifyContent: "flex-start",
245
+ alignItems: "flex-start",
246
+ gap: "4px",
247
+ },
248
+ },
249
+ title: "段落",
250
+
251
+ children: [
252
+ {
253
+ componentName: "Typography.Text",
254
+ props: {
255
+ children: "场次",
256
+ code: false,
257
+ delete: false,
258
+ disabled: false,
259
+ mark: false,
260
+ keyboard: false,
261
+ underline: false,
262
+ strong: false,
263
+ },
264
+
265
+ title: "",
266
+ },
267
+ {
268
+ componentName: "Input",
269
+ props: {
270
+ placeholder: "请输入",
271
+ bordered: true,
272
+ disabled: false,
273
+ },
274
+ title: "",
275
+ },
276
+ ],
277
+ },
278
+ ],
279
+ },
280
+ ],
281
+ },
282
+ ],
283
+ },
284
+ footer: "",
285
+ style: {
286
+ borderRadius: "8px",
287
+ border: "1px solid var(--gray-200, #EAECF0)",
288
+ boxShadow:
289
+ "0px 8px 8px -4px rgba(16, 24, 40, 0.03), 0px 20px 24px -4px rgba(16, 24, 40, 0.08)",
290
+ background: "var(--base-white, #FFF)",
291
+ padding: "16px",
292
+ },
293
+ },
294
+
295
+ title: "",
296
+ },
35
297
  ],
36
298
  },
299
+ arrow: false,
300
+ disabled: false,
301
+ placement: "bottomCenter",
302
+ trigger: ["click"],
37
303
  },
38
304
  children: [
39
305
  {
40
- componentName: 'Button',
306
+ componentName: "Button",
41
307
  props: {
42
- type: 'link',
308
+ type: "primary",
43
309
  children: {
44
- type: 'JSSlot',
310
+ type: "JSSlot",
45
311
  value: [
46
312
  {
47
- componentName: 'Typography.Text',
313
+ componentName: "Typography.Text",
48
314
  props: {
49
- children: 'Hover me',
315
+ children: "Filtered",
50
316
  style: {
51
- color: 'inherit',
317
+ color: "inherit",
52
318
  },
319
+ code: false,
320
+ delete: false,
321
+ disabled: false,
322
+ mark: false,
323
+ keyboard: false,
324
+ underline: false,
325
+ strong: false,
53
326
  },
327
+ title: "",
54
328
  },
329
+ ],
330
+ },
331
+ htmlType: "button",
332
+ size: "middle",
333
+ shape: "default",
334
+ icon: {
335
+ type: "JSSlot",
336
+ value: [
55
337
  {
56
- componentName: 'Icon',
338
+ componentName: "Icon",
57
339
  props: {
58
- type: 'DownOutlined',
59
- size: 15,
60
- style: {
61
- marginLeft: 4,
62
- verticalAlign: 'middle',
63
- },
340
+ type: "FilterOutlined",
341
+ size: 20,
342
+ rotate: 0,
343
+ spin: false,
64
344
  },
345
+ title: "",
65
346
  },
66
347
  ],
67
348
  },
349
+ block: false,
350
+ danger: false,
351
+ ghost: false,
352
+ disabled: false,
353
+ style: {
354
+ display: "inline-flex",
355
+ color: "var(--gray-700, #344054)",
356
+ borderRadius: "99px",
357
+ backgroundColor: "#fff",
358
+ },
68
359
  },
360
+ title: "",
69
361
  },
70
362
  ],
71
363
  },
@@ -82,7 +82,7 @@ export default {
82
82
  return {
83
83
  key: 'item-' + uuid(),
84
84
  category: 'Menu.Item',
85
- children: '菜单名',
85
+ label: '菜单名',
86
86
  };
87
87
  },
88
88
  },
@@ -0,0 +1,117 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "Sort",
6
+ title: "排序",
7
+ category: "数据展示",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "Sort",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ props: [
20
+ {
21
+ name: 'button',
22
+ title: { label: '自定义按钮', tip: '自定义按钮' },
23
+ propType: { type: 'oneOfType', value: ['node', 'func'] },
24
+ },
25
+ {
26
+ name: 'value',
27
+ title: { label: '当前选中项', tip: '当前选中的菜单项 key 数组' },
28
+ propType: { type: 'arrayOf', value: 'string' },
29
+ },
30
+ {
31
+ name: "list",
32
+ setter: {
33
+ componentName: "ArraySetter",
34
+ props: {
35
+ itemSetter: {
36
+ componentName: "ObjectSetter",
37
+ props: {
38
+ config: {
39
+ items: [
40
+ {
41
+ name: "label",
42
+ title: { label: "排序项", tip: "排序项展示文案" },
43
+ propType: "string",
44
+ setter: "PisellI18nSetter",
45
+ isRequired: true,
46
+ },
47
+ {
48
+ name: "name",
49
+ title: { label: "字段", tip: "所排序的字段" },
50
+ propType: "string",
51
+ setter: "StringSetter",
52
+ isRequired: true,
53
+ },
54
+ {
55
+ name: "type",
56
+ title: { label: "字段类型", tip: "所排序的字段类型" },
57
+ propType: "string",
58
+ setter: {
59
+ componentName: "SelectSetter",
60
+ mode: "single",
61
+ defaultValue: "single",
62
+ props: {
63
+ options: [
64
+ {
65
+ title: "日期排序",
66
+ value: "date",
67
+ },
68
+ {
69
+ title: "数字排序",
70
+ value: "number",
71
+ },
72
+ {
73
+ title: "a-z排序",
74
+ value: "string",
75
+ },
76
+ {
77
+ title: "时间排序",
78
+ value: "time",
79
+ },
80
+ ],
81
+ },
82
+ },
83
+ },
84
+ ],
85
+ },
86
+ },
87
+ initialValue: { label: "标题", name: "name", type: "date" },
88
+ },
89
+ },
90
+ },
91
+ },
92
+ {
93
+ name: 'placement',
94
+ title: {
95
+ label: '弹出位置',
96
+ tip:
97
+ '菜单弹出位置:`bottomLeft` `bottom` `bottomRight` `topLeft` `top` `topRight`',
98
+ },
99
+ propType: {
100
+ type: 'oneOf',
101
+ value: ['bottomLeft', 'bottom', 'bottomRight', 'topLeft', 'top', 'topRight'],
102
+ },
103
+ },
104
+ ],
105
+ configure: {
106
+ supports: {
107
+ style: true,
108
+ events: [
109
+ {
110
+ name: "onChange",
111
+ template:
112
+ "onChange(val,${extParams}){\n// 排序\nconsole.log('onChange', val);}",
113
+ },
114
+ ],
115
+ },
116
+ },
117
+ };
@@ -0,0 +1,22 @@
1
+ export default [
2
+ {
3
+ title: '排序按钮',
4
+ schema: {
5
+ componentName: 'Sort',
6
+ props: {
7
+ list: [
8
+ {
9
+ label: 'created time',
10
+ name: "time",
11
+ type: "date",
12
+ },
13
+ {
14
+ label: 'Alphabetical',
15
+ name: "name",
16
+ type: "string",
17
+ },
18
+ ]
19
+ },
20
+ },
21
+ },
22
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.140",
3
+ "version": "1.0.142",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -55,9 +55,9 @@
55
55
  "@dnd-kit/utilities": "^3.2.1",
56
56
  "ahooks": "^3.7.6",
57
57
  "react-infinite-scroll-component": "^6.1.0",
58
- "@pisell/utils": "1.0.18",
59
58
  "@pisell/icon": "0.0.8",
60
- "@pisell/date-picker": "1.0.51"
59
+ "@pisell/date-picker": "1.0.51",
60
+ "@pisell/utils": "1.0.18"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": "^18.0.0",