@next-bricks/form 1.21.3 → 1.21.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,114 @@
3
3
  "package": "@next-bricks/form",
4
4
  "name": "form",
5
5
  "bricks": [
6
+ {
7
+ "name": "eo-textarea",
8
+ "alias": [
9
+ "form.general-textarea"
10
+ ],
11
+ "properties": [
12
+ {
13
+ "name": "name",
14
+ "description": "字段名称",
15
+ "type": "string"
16
+ },
17
+ {
18
+ "name": "label",
19
+ "description": "标签文字",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "value",
24
+ "description": "值",
25
+ "type": "string"
26
+ },
27
+ {
28
+ "name": "placeholder",
29
+ "description": "占位说明",
30
+ "type": "string"
31
+ },
32
+ {
33
+ "name": "disabled",
34
+ "description": "是否禁用",
35
+ "type": "boolean"
36
+ },
37
+ {
38
+ "name": "minLength",
39
+ "description": "最小长度",
40
+ "type": "number"
41
+ },
42
+ {
43
+ "name": "maxLength",
44
+ "description": "最大长度",
45
+ "type": "number"
46
+ },
47
+ {
48
+ "name": "autoSize",
49
+ "description": "大小自适应",
50
+ "attribute": false,
51
+ "type": "AutoSize"
52
+ },
53
+ {
54
+ "name": "required",
55
+ "description": "是否必填",
56
+ "type": "boolean"
57
+ },
58
+ {
59
+ "name": "max",
60
+ "description": "表单校验最大长度",
61
+ "type": "number"
62
+ },
63
+ {
64
+ "name": "min",
65
+ "description": "表单校验最小长度",
66
+ "type": "number"
67
+ },
68
+ {
69
+ "name": "message",
70
+ "description": "校验信息",
71
+ "attribute": false,
72
+ "type": "Record<string, string>"
73
+ },
74
+ {
75
+ "name": "textareaStyle",
76
+ "description": "自定义样式",
77
+ "attribute": false,
78
+ "type": "React.CSSProperties"
79
+ },
80
+ {
81
+ "name": "variant",
82
+ "description": "变体\n\n- muted: 在 themeVariant 为 elevo 时可用,设置时输入框没有 box-shadow",
83
+ "type": "\"default\" | \"muted\""
84
+ },
85
+ {
86
+ "name": "themeVariant",
87
+ "description": "主题变体",
88
+ "type": "\"default\" | \"elevo\""
89
+ }
90
+ ],
91
+ "events": [
92
+ {
93
+ "name": "change",
94
+ "description": "",
95
+ "detail": {
96
+ "description": null,
97
+ "type": "string"
98
+ }
99
+ }
100
+ ],
101
+ "slots": [],
102
+ "methods": [
103
+ {
104
+ "name": "focusTextarea",
105
+ "params": [],
106
+ "description": "focus",
107
+ "returns": {}
108
+ }
109
+ ],
110
+ "parts": [],
111
+ "description": "通用多行文本输入框构件",
112
+ "category": "form-input-basic"
113
+ },
6
114
  {
7
115
  "name": "eo-form",
8
116
  "alias": [
@@ -255,114 +363,6 @@
255
363
  "description": "通用单选构件",
256
364
  "category": "form-input-basic"
257
365
  },
258
- {
259
- "name": "eo-textarea",
260
- "alias": [
261
- "form.general-textarea"
262
- ],
263
- "properties": [
264
- {
265
- "name": "name",
266
- "description": "字段名称",
267
- "type": "string"
268
- },
269
- {
270
- "name": "label",
271
- "description": "标签文字",
272
- "type": "string"
273
- },
274
- {
275
- "name": "value",
276
- "description": "值",
277
- "type": "string"
278
- },
279
- {
280
- "name": "placeholder",
281
- "description": "占位说明",
282
- "type": "string"
283
- },
284
- {
285
- "name": "disabled",
286
- "description": "是否禁用",
287
- "type": "boolean"
288
- },
289
- {
290
- "name": "minLength",
291
- "description": "最小长度",
292
- "type": "number"
293
- },
294
- {
295
- "name": "maxLength",
296
- "description": "最大长度",
297
- "type": "number"
298
- },
299
- {
300
- "name": "autoSize",
301
- "description": "大小自适应",
302
- "attribute": false,
303
- "type": "AutoSize"
304
- },
305
- {
306
- "name": "required",
307
- "description": "是否必填",
308
- "type": "boolean"
309
- },
310
- {
311
- "name": "max",
312
- "description": "表单校验最大长度",
313
- "type": "number"
314
- },
315
- {
316
- "name": "min",
317
- "description": "表单校验最小长度",
318
- "type": "number"
319
- },
320
- {
321
- "name": "message",
322
- "description": "校验信息",
323
- "attribute": false,
324
- "type": "Record<string, string>"
325
- },
326
- {
327
- "name": "textareaStyle",
328
- "description": "自定义样式",
329
- "attribute": false,
330
- "type": "React.CSSProperties"
331
- },
332
- {
333
- "name": "variant",
334
- "description": "变体\n\n- muted: 在 themeVariant 为 elevo 时可用,设置时输入框没有 box-shadow",
335
- "type": "\"default\" | \"muted\""
336
- },
337
- {
338
- "name": "themeVariant",
339
- "description": "主题变体",
340
- "type": "\"default\" | \"elevo\""
341
- }
342
- ],
343
- "events": [
344
- {
345
- "name": "change",
346
- "description": "",
347
- "detail": {
348
- "description": null,
349
- "type": "string"
350
- }
351
- }
352
- ],
353
- "slots": [],
354
- "methods": [
355
- {
356
- "name": "focusTextarea",
357
- "params": [],
358
- "description": "focus",
359
- "returns": {}
360
- }
361
- ],
362
- "parts": [],
363
- "description": "通用多行文本输入框构件",
364
- "category": "form-input-basic"
365
- },
366
366
  {
367
367
  "name": "eo-select",
368
368
  "alias": [
@@ -995,43 +995,117 @@
995
995
  "category": "form-input-basic"
996
996
  },
997
997
  {
998
- "name": "eo-upload-file",
998
+ "name": "eo-switch",
999
+ "alias": [
1000
+ "form.general-switch"
1001
+ ],
999
1002
  "properties": [
1000
- {
1001
- "name": "label",
1002
- "description": "字段说明",
1003
- "type": "string"
1004
- },
1005
1003
  {
1006
1004
  "name": "name",
1007
1005
  "description": "字段名称",
1008
1006
  "type": "string"
1009
1007
  },
1010
1008
  {
1011
- "name": "required",
1012
- "description": "是否必填",
1013
- "type": "boolean"
1014
- },
1015
- {
1016
- "name": "message",
1017
- "description": "校验文本信息",
1018
- "attribute": false,
1019
- "type": "Record<string, string>"
1009
+ "name": "label",
1010
+ "description": "字段文本",
1011
+ "type": "string"
1020
1012
  },
1021
1013
  {
1022
1014
  "name": "value",
1023
- "description": "",
1024
- "attribute": false,
1025
- "type": "FileData[]"
1015
+ "description": "初始值",
1016
+ "type": "boolean"
1026
1017
  },
1027
1018
  {
1028
- "name": "multiple",
1029
- "description": "是否支持多选",
1019
+ "name": "disabled",
1020
+ "description": "是否禁用",
1030
1021
  "type": "boolean"
1031
1022
  },
1032
1023
  {
1033
- "name": "accept",
1034
- "description": "接受上传的文件类型,多个之间用 `,` 连接",
1024
+ "name": "size",
1025
+ "description": "按钮大小,目前只支持small和非small两种大小。",
1026
+ "type": "ComponentSize"
1027
+ },
1028
+ {
1029
+ "name": "checkedText",
1030
+ "description": "选中时的文本",
1031
+ "type": "string"
1032
+ },
1033
+ {
1034
+ "name": "unCheckedText",
1035
+ "description": "非选中时的文本",
1036
+ "type": "string"
1037
+ },
1038
+ {
1039
+ "name": "checkedIcon",
1040
+ "description": "选中时的图标",
1041
+ "attribute": false,
1042
+ "type": "GeneralIconProps"
1043
+ },
1044
+ {
1045
+ "name": "unCheckedIcon",
1046
+ "description": "非选中时的文本",
1047
+ "attribute": false,
1048
+ "type": "GeneralIconProps"
1049
+ },
1050
+ {
1051
+ "name": "themeVariant",
1052
+ "description": "主题变体",
1053
+ "type": "\"default\" | \"elevo\""
1054
+ }
1055
+ ],
1056
+ "events": [
1057
+ {
1058
+ "name": "switch",
1059
+ "description": "开关改变时触发",
1060
+ "detail": {
1061
+ "type": "boolean"
1062
+ }
1063
+ }
1064
+ ],
1065
+ "slots": [],
1066
+ "methods": [],
1067
+ "parts": [],
1068
+ "description": "开关",
1069
+ "category": "form-input-basic"
1070
+ },
1071
+ {
1072
+ "name": "eo-upload-file",
1073
+ "properties": [
1074
+ {
1075
+ "name": "label",
1076
+ "description": "字段说明",
1077
+ "type": "string"
1078
+ },
1079
+ {
1080
+ "name": "name",
1081
+ "description": "字段名称",
1082
+ "type": "string"
1083
+ },
1084
+ {
1085
+ "name": "required",
1086
+ "description": "是否必填",
1087
+ "type": "boolean"
1088
+ },
1089
+ {
1090
+ "name": "message",
1091
+ "description": "校验文本信息",
1092
+ "attribute": false,
1093
+ "type": "Record<string, string>"
1094
+ },
1095
+ {
1096
+ "name": "value",
1097
+ "description": "值",
1098
+ "attribute": false,
1099
+ "type": "FileData[]"
1100
+ },
1101
+ {
1102
+ "name": "multiple",
1103
+ "description": "是否支持多选",
1104
+ "type": "boolean"
1105
+ },
1106
+ {
1107
+ "name": "accept",
1108
+ "description": "接受上传的文件类型,多个之间用 `,` 连接",
1035
1109
  "type": "string"
1036
1110
  },
1037
1111
  {
@@ -1122,80 +1196,6 @@
1122
1196
  "description": "上传文件",
1123
1197
  "category": "form-input-basic"
1124
1198
  },
1125
- {
1126
- "name": "eo-switch",
1127
- "alias": [
1128
- "form.general-switch"
1129
- ],
1130
- "properties": [
1131
- {
1132
- "name": "name",
1133
- "description": "字段名称",
1134
- "type": "string"
1135
- },
1136
- {
1137
- "name": "label",
1138
- "description": "字段文本",
1139
- "type": "string"
1140
- },
1141
- {
1142
- "name": "value",
1143
- "description": "初始值",
1144
- "type": "boolean"
1145
- },
1146
- {
1147
- "name": "disabled",
1148
- "description": "是否禁用",
1149
- "type": "boolean"
1150
- },
1151
- {
1152
- "name": "size",
1153
- "description": "按钮大小,目前只支持small和非small两种大小。",
1154
- "type": "ComponentSize"
1155
- },
1156
- {
1157
- "name": "checkedText",
1158
- "description": "选中时的文本",
1159
- "type": "string"
1160
- },
1161
- {
1162
- "name": "unCheckedText",
1163
- "description": "非选中时的文本",
1164
- "type": "string"
1165
- },
1166
- {
1167
- "name": "checkedIcon",
1168
- "description": "选中时的图标",
1169
- "attribute": false,
1170
- "type": "GeneralIconProps"
1171
- },
1172
- {
1173
- "name": "unCheckedIcon",
1174
- "description": "非选中时的文本",
1175
- "attribute": false,
1176
- "type": "GeneralIconProps"
1177
- },
1178
- {
1179
- "name": "themeVariant",
1180
- "description": "主题变体",
1181
- "type": "\"default\" | \"elevo\""
1182
- }
1183
- ],
1184
- "events": [
1185
- {
1186
- "name": "switch",
1187
- "description": "开关改变时触发",
1188
- "detail": {
1189
- "type": "boolean"
1190
- }
1191
- }
1192
- ],
1193
- "slots": [],
1194
- "methods": [],
1195
- "parts": [],
1196
- "description": "开关",
1197
- "category": "form-input-basic"
1198
- },
1199
1199
  {
1200
1200
  "name": "eo-auto-complete",
1201
1201
  "properties": [
@@ -1354,88 +1354,6 @@
1354
1354
  "description": "时间选择器",
1355
1355
  "category": "form-input-basic"
1356
1356
  },
1357
- {
1358
- "name": "eo-time-range-picker",
1359
- "properties": [
1360
- {
1361
- "name": "name",
1362
- "description": "时间段选择器字段名",
1363
- "type": "string"
1364
- },
1365
- {
1366
- "name": "label",
1367
- "description": "时间段选择器说明",
1368
- "type": "string"
1369
- },
1370
- {
1371
- "name": "value",
1372
- "description": "时间段选择器的初始值",
1373
- "default": "{ \"startTime\": \"00:00:00\", \"endTime\": \"23:59:59\" }",
1374
- "attribute": false,
1375
- "type": "TimeRange"
1376
- },
1377
- {
1378
- "name": "required",
1379
- "description": "是否必填",
1380
- "type": "boolean"
1381
- },
1382
- {
1383
- "name": "rangeType",
1384
- "description": "时间段类型",
1385
- "attribute": false,
1386
- "type": "RangeType"
1387
- },
1388
- {
1389
- "name": "placeholder",
1390
- "description": "输入框提示文字,单时间段时为string,范围时间段时为[string, string]",
1391
- "attribute": false,
1392
- "type": "string | [string, string]"
1393
- },
1394
- {
1395
- "name": "inputStyle",
1396
- "description": "输入框样式",
1397
- "attribute": false,
1398
- "type": "React.CSSProperties"
1399
- },
1400
- {
1401
- "name": "selectNearDays",
1402
- "description": "只有rangeType在`date` 和 `dateTime`下, 才支持只选择最近n天(当前时间向前n天)",
1403
- "type": "number"
1404
- },
1405
- {
1406
- "name": "emitChangeOnInit",
1407
- "description": "",
1408
- "default": "true\n是否在初始化完成后额外触发一次`time.range.change`, 这里因为历史原因之前默认行为就是在初始化后会触发该事件,这里为了兼容之前的行为,默认值只能设置为 true。",
1409
- "type": "boolean"
1410
- },
1411
- {
1412
- "name": "presetRanges",
1413
- "description": "",
1414
- "default": "[]\n预设时间范围快捷选择;设置了属性selectNearDays时,属性presetRanges不生效;属性rangeType为week时,presetRanges的值只能为本周、本月、本季度、今年,属性rangeType为month、quarter、year时,以此类推",
1415
- "attribute": false,
1416
- "type": "presetRangeType[]"
1417
- },
1418
- {
1419
- "name": "validator",
1420
- "attribute": false,
1421
- "type": "((value: any) => MessageBody | string)"
1422
- }
1423
- ],
1424
- "events": [
1425
- {
1426
- "name": "change",
1427
- "description": "时间段变化时触发",
1428
- "detail": {
1429
- "type": "TimeRange"
1430
- }
1431
- }
1432
- ],
1433
- "slots": [],
1434
- "methods": [],
1435
- "parts": [],
1436
- "description": "时间区间选择器",
1437
- "category": "form-input-basic"
1438
- },
1439
1357
  {
1440
1358
  "name": "eo-date-picker",
1441
1359
  "properties": [
@@ -1536,6 +1454,88 @@
1536
1454
  "description": "日期选择器",
1537
1455
  "category": "form-input-basic"
1538
1456
  },
1457
+ {
1458
+ "name": "eo-time-range-picker",
1459
+ "properties": [
1460
+ {
1461
+ "name": "name",
1462
+ "description": "时间段选择器字段名",
1463
+ "type": "string"
1464
+ },
1465
+ {
1466
+ "name": "label",
1467
+ "description": "时间段选择器说明",
1468
+ "type": "string"
1469
+ },
1470
+ {
1471
+ "name": "value",
1472
+ "description": "时间段选择器的初始值",
1473
+ "default": "{ \"startTime\": \"00:00:00\", \"endTime\": \"23:59:59\" }",
1474
+ "attribute": false,
1475
+ "type": "TimeRange"
1476
+ },
1477
+ {
1478
+ "name": "required",
1479
+ "description": "是否必填",
1480
+ "type": "boolean"
1481
+ },
1482
+ {
1483
+ "name": "rangeType",
1484
+ "description": "时间段类型",
1485
+ "attribute": false,
1486
+ "type": "RangeType"
1487
+ },
1488
+ {
1489
+ "name": "placeholder",
1490
+ "description": "输入框提示文字,单时间段时为string,范围时间段时为[string, string]",
1491
+ "attribute": false,
1492
+ "type": "string | [string, string]"
1493
+ },
1494
+ {
1495
+ "name": "inputStyle",
1496
+ "description": "输入框样式",
1497
+ "attribute": false,
1498
+ "type": "React.CSSProperties"
1499
+ },
1500
+ {
1501
+ "name": "selectNearDays",
1502
+ "description": "只有rangeType在`date` 和 `dateTime`下, 才支持只选择最近n天(当前时间向前n天)",
1503
+ "type": "number"
1504
+ },
1505
+ {
1506
+ "name": "emitChangeOnInit",
1507
+ "description": "",
1508
+ "default": "true\n是否在初始化完成后额外触发一次`time.range.change`, 这里因为历史原因之前默认行为就是在初始化后会触发该事件,这里为了兼容之前的行为,默认值只能设置为 true。",
1509
+ "type": "boolean"
1510
+ },
1511
+ {
1512
+ "name": "presetRanges",
1513
+ "description": "",
1514
+ "default": "[]\n预设时间范围快捷选择;设置了属性selectNearDays时,属性presetRanges不生效;属性rangeType为week时,presetRanges的值只能为本周、本月、本季度、今年,属性rangeType为month、quarter、year时,以此类推",
1515
+ "attribute": false,
1516
+ "type": "presetRangeType[]"
1517
+ },
1518
+ {
1519
+ "name": "validator",
1520
+ "attribute": false,
1521
+ "type": "((value: any) => MessageBody | string)"
1522
+ }
1523
+ ],
1524
+ "events": [
1525
+ {
1526
+ "name": "change",
1527
+ "description": "时间段变化时触发",
1528
+ "detail": {
1529
+ "type": "TimeRange"
1530
+ }
1531
+ }
1532
+ ],
1533
+ "slots": [],
1534
+ "methods": [],
1535
+ "parts": [],
1536
+ "description": "时间区间选择器",
1537
+ "category": "form-input-basic"
1538
+ },
1539
1539
  {
1540
1540
  "name": "eo-color-picker",
1541
1541
  "properties": [