@kne/form-creator 0.1.29 → 0.1.31
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.
- package/README.md +623 -0
- package/dist/index.css +348 -13
- package/dist/index.css.map +1 -1
- package/dist/index.js +566 -61
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +568 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -144,6 +144,163 @@
|
|
|
144
144
|
.kne-form-creator_9bWOD {
|
|
145
145
|
width: 100%;
|
|
146
146
|
min-width: 0;
|
|
147
|
+
/*
|
|
148
|
+
* 答卷 SchemaContent 与填写态 FormInfo(.form-outer) 标题层级对齐:
|
|
149
|
+
* 一级色条、二级圆点;禁止沿用 info-page 二级胶囊(inline-block + 底色),
|
|
150
|
+
* 否则 ant-card-head-title 默认 nowrap 会让 title/subtitle 叠字、副标题发灰发虚。
|
|
151
|
+
*/
|
|
152
|
+
}
|
|
153
|
+
.kne-form-creator_9bWOD .part.ant-card > .ant-card-head .ant-card-head-title {
|
|
154
|
+
display: block;
|
|
155
|
+
white-space: normal;
|
|
156
|
+
overflow: visible;
|
|
157
|
+
}
|
|
158
|
+
.kne-form-creator_9bWOD .part.ant-card > .ant-card-head .part-title {
|
|
159
|
+
display: block;
|
|
160
|
+
flex: none;
|
|
161
|
+
padding: 0;
|
|
162
|
+
border-radius: 0;
|
|
163
|
+
background: transparent;
|
|
164
|
+
color: var(--font-color);
|
|
165
|
+
font-size: var(--font-size-large, 16px);
|
|
166
|
+
font-weight: 600;
|
|
167
|
+
line-height: 24px;
|
|
168
|
+
white-space: pre-wrap;
|
|
169
|
+
}
|
|
170
|
+
.kne-form-creator_9bWOD .part.ant-card > .ant-card-head .part-title::before {
|
|
171
|
+
content: "";
|
|
172
|
+
display: inline-block;
|
|
173
|
+
width: 4px;
|
|
174
|
+
height: 16px;
|
|
175
|
+
margin-right: 8px;
|
|
176
|
+
border-radius: 2px;
|
|
177
|
+
background: var(--primary-color);
|
|
178
|
+
vertical-align: middle;
|
|
179
|
+
transform: translateY(-2px);
|
|
180
|
+
}
|
|
181
|
+
.kne-form-creator_9bWOD .part.ant-card > .ant-card-head .part-title-sub {
|
|
182
|
+
margin-top: 4px;
|
|
183
|
+
padding-left: 12px;
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
line-height: 20px;
|
|
186
|
+
font-weight: normal;
|
|
187
|
+
color: var(--font-color-grey-1);
|
|
188
|
+
white-space: pre-wrap;
|
|
189
|
+
}
|
|
190
|
+
.kne-form-creator_9bWOD .part .part.ant-card:not(.part-level-root) > .ant-card-head .ant-card-head-title > .part-title,
|
|
191
|
+
.kne-form-creator_9bWOD .part.part-level-root .part.ant-card > .ant-card-head .ant-card-head-title > .part-title {
|
|
192
|
+
font-size: var(--font-size-default, 14px);
|
|
193
|
+
line-height: 22px;
|
|
194
|
+
display: block;
|
|
195
|
+
border-radius: 0;
|
|
196
|
+
background: transparent;
|
|
197
|
+
padding: 0;
|
|
198
|
+
color: var(--font-color);
|
|
199
|
+
}
|
|
200
|
+
.kne-form-creator_9bWOD .part .part.ant-card:not(.part-level-root) > .ant-card-head .ant-card-head-title > .part-title::before,
|
|
201
|
+
.kne-form-creator_9bWOD .part.part-level-root .part.ant-card > .ant-card-head .ant-card-head-title > .part-title::before {
|
|
202
|
+
content: "";
|
|
203
|
+
display: inline-block;
|
|
204
|
+
width: 6px;
|
|
205
|
+
height: 6px;
|
|
206
|
+
margin-right: 8px;
|
|
207
|
+
border-radius: 50%;
|
|
208
|
+
background: var(--primary-color);
|
|
209
|
+
vertical-align: middle;
|
|
210
|
+
transform: translateY(-2px);
|
|
211
|
+
}
|
|
212
|
+
.kne-form-creator_9bWOD .part .part.ant-card:not(.part-level-root) > .ant-card-head .ant-card-head-title > .part-title-sub,
|
|
213
|
+
.kne-form-creator_9bWOD .part.part-level-root .part.ant-card > .ant-card-head .ant-card-head-title > .part-title-sub {
|
|
214
|
+
padding-left: 14px;
|
|
215
|
+
}
|
|
216
|
+
.kne-form-creator_9bWOD .part.part-level-root > .ant-card-head .ant-card-head-title > .part-title {
|
|
217
|
+
font-size: var(--font-size-large, 16px);
|
|
218
|
+
line-height: 24px;
|
|
219
|
+
}
|
|
220
|
+
.kne-form-creator_9bWOD .part.part-level-root > .ant-card-head .ant-card-head-title > .part-title::before {
|
|
221
|
+
width: 4px;
|
|
222
|
+
height: 16px;
|
|
223
|
+
border-radius: 2px;
|
|
224
|
+
}
|
|
225
|
+
.kne-form-creator_9bWOD .part.part-level-root > .ant-card-head .ant-card-head-title > .part-title-sub {
|
|
226
|
+
padding-left: 12px;
|
|
227
|
+
}
|
|
228
|
+
.kne-form-creator_9bWOD {
|
|
229
|
+
/*
|
|
230
|
+
* 嵌套 Part 不逐层缩进:info-page 给内层 head/body 加 padding-left:24px,多层嵌套会一路右移。
|
|
231
|
+
* 层级靠标题圆点区分即可;:not(#_) 提权以压过 info-page 的选择器。
|
|
232
|
+
*/
|
|
233
|
+
}
|
|
234
|
+
.kne-form-creator_9bWOD .part .part:not(#_) > .ant-card-head {
|
|
235
|
+
min-height: auto;
|
|
236
|
+
padding: 0;
|
|
237
|
+
}
|
|
238
|
+
.kne-form-creator_9bWOD .part .part:not(#_) > .ant-card-body {
|
|
239
|
+
padding: 12px 0 0;
|
|
240
|
+
}
|
|
241
|
+
.kne-form-creator_9bWOD .part .part.bordered:not(#_) {
|
|
242
|
+
padding: 0;
|
|
243
|
+
border: none;
|
|
244
|
+
border-radius: 0;
|
|
245
|
+
background: transparent;
|
|
246
|
+
box-shadow: none;
|
|
247
|
+
}
|
|
248
|
+
.kne-form-creator_9bWOD .part .part.bordered:not(#_) > .ant-card-head {
|
|
249
|
+
border-bottom: none;
|
|
250
|
+
border-radius: 0;
|
|
251
|
+
background: transparent;
|
|
252
|
+
}
|
|
253
|
+
.kne-form-creator_9bWOD .part .part.no-title:not(#_) > .ant-card-body {
|
|
254
|
+
padding-top: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* 字段区与其后的嵌套块之间留距(无标题嵌套块否则会贴着上一行值) */
|
|
258
|
+
.kne-form-creator_EmRDV + .part,
|
|
259
|
+
.kne-form-creator_EmRDV + .kne-form-creator_Xpl6K {
|
|
260
|
+
margin-top: 16px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* 同级嵌套块之间留距,避免上一块的值与下一块标题贴在一起 */
|
|
264
|
+
.kne-form-creator_9bWOD .part .part + .part:not(#kne-form-creator_jWWXR) {
|
|
265
|
+
margin-top: 16px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* 列表项:浅底分组卡区分「第 N 项」,再嵌套一层时改白底以拉开层次 */
|
|
269
|
+
.kne-form-creator_Xpl6K {
|
|
270
|
+
display: flex;
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
gap: 12px;
|
|
273
|
+
width: 100%;
|
|
274
|
+
min-width: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR) {
|
|
278
|
+
padding: 12px 16px 16px;
|
|
279
|
+
border: 1px solid var(--bg-color-grey-3, #f0f0f0);
|
|
280
|
+
border-radius: var(--radius-default, 8px);
|
|
281
|
+
background: var(--bg-color-grey-1, #fafafa);
|
|
282
|
+
box-shadow: none;
|
|
283
|
+
}
|
|
284
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR) > .ant-card-head {
|
|
285
|
+
min-height: auto;
|
|
286
|
+
padding: 0;
|
|
287
|
+
border-bottom: none;
|
|
288
|
+
background: transparent;
|
|
289
|
+
}
|
|
290
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR) > .ant-card-body {
|
|
291
|
+
padding: 12px 0 0;
|
|
292
|
+
}
|
|
293
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR).no-title > .ant-card-body {
|
|
294
|
+
padding-top: 0;
|
|
295
|
+
}
|
|
296
|
+
@container kne-responsive (max-width: 768px) {
|
|
297
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR) {
|
|
298
|
+
padding: 10px 12px 12px;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.kne-form-creator_9bWOD .kne-form-creator_dBG5B .kne-form-creator_dBG5B.part.ant-card:not(#kne-form-creator_jWWXR) {
|
|
303
|
+
background: #fff;
|
|
147
304
|
}
|
|
148
305
|
|
|
149
306
|
.kne-form-creator_EmRDV {
|
|
@@ -208,6 +365,170 @@
|
|
|
208
365
|
word-break: break-all;
|
|
209
366
|
}
|
|
210
367
|
|
|
368
|
+
/* SchemaContent 只读矩阵:对齐 form-info MatrixScale 的表头 + 行列网格 */
|
|
369
|
+
.kne-form-creator_Wj4Oi {
|
|
370
|
+
--matrix-scale-title-width: 160px;
|
|
371
|
+
--matrix-scale-option-min-width: 96px;
|
|
372
|
+
width: 100%;
|
|
373
|
+
min-width: 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.kne-form-creator_g0-ex {
|
|
377
|
+
--matrix-scale-columns: var(--matrix-scale-title-width) repeat(var(--matrix-scale-option-count, 1), minmax(var(--matrix-scale-option-min-width), 1fr));
|
|
378
|
+
--matrix-scale-min-width: calc(var(--matrix-scale-title-width) + var(--matrix-scale-option-count, 1) * var(--matrix-scale-option-min-width));
|
|
379
|
+
border: solid 1px var(--bg-color-grey-3);
|
|
380
|
+
border-radius: var(--radius-default, 8px);
|
|
381
|
+
width: 100%;
|
|
382
|
+
overflow-x: auto;
|
|
383
|
+
overflow-y: hidden;
|
|
384
|
+
box-sizing: border-box;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.kne-form-creator_6Ew-1 {
|
|
388
|
+
display: grid;
|
|
389
|
+
grid-template-columns: var(--matrix-scale-columns);
|
|
390
|
+
min-width: var(--matrix-scale-min-width);
|
|
391
|
+
background: var(--bg-color-grey-1, #fafafa);
|
|
392
|
+
border-bottom: solid 1px var(--bg-color-grey-3);
|
|
393
|
+
color: var(--font-color-grey);
|
|
394
|
+
font-size: 14px;
|
|
395
|
+
line-height: 20px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.kne-form-creator_QQ9-w,
|
|
399
|
+
.kne-form-creator_OuEl1 {
|
|
400
|
+
padding: 8px 12px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.kne-form-creator_QQ9-w {
|
|
404
|
+
position: sticky;
|
|
405
|
+
left: 0;
|
|
406
|
+
z-index: 1;
|
|
407
|
+
background: inherit;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.kne-form-creator_Wj4Oi.kne-form-creator_xnHgj .kne-form-creator_OuEl1 {
|
|
411
|
+
text-align: center;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.kne-form-creator_fFwMK {
|
|
415
|
+
display: grid;
|
|
416
|
+
grid-template-columns: var(--matrix-scale-columns);
|
|
417
|
+
min-width: var(--matrix-scale-min-width);
|
|
418
|
+
align-items: stretch;
|
|
419
|
+
background: #fff;
|
|
420
|
+
}
|
|
421
|
+
.kne-form-creator_fFwMK:not(:last-child) {
|
|
422
|
+
border-bottom: solid 1px var(--bg-color-grey-3);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.kne-form-creator_W09sG {
|
|
426
|
+
position: sticky;
|
|
427
|
+
left: 0;
|
|
428
|
+
z-index: 1;
|
|
429
|
+
padding: 12px;
|
|
430
|
+
background: inherit;
|
|
431
|
+
color: var(--font-color);
|
|
432
|
+
font-size: 14px;
|
|
433
|
+
line-height: 22px;
|
|
434
|
+
word-break: break-word;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.kne-form-creator_T3bcF {
|
|
438
|
+
display: flex;
|
|
439
|
+
align-items: center;
|
|
440
|
+
justify-content: center;
|
|
441
|
+
min-width: 0;
|
|
442
|
+
padding: 12px 8px;
|
|
443
|
+
color: var(--font-color);
|
|
444
|
+
font-size: 14px;
|
|
445
|
+
line-height: 22px;
|
|
446
|
+
word-break: break-word;
|
|
447
|
+
text-align: center;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.kne-form-creator_fFwMK.kne-form-creator_buqr3 .kne-form-creator_T3bcF {
|
|
451
|
+
justify-content: flex-start;
|
|
452
|
+
text-align: left;
|
|
453
|
+
padding-left: 12px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.kne-form-creator_T3bcF.kne-form-creator_NadyF {
|
|
457
|
+
color: var(--primary-color);
|
|
458
|
+
font-size: 16px;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.kne-form-creator_Wj4Oi.kne-form-creator_LtgJz .kne-form-creator_g0-ex {
|
|
462
|
+
border: none;
|
|
463
|
+
overflow: visible;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.kne-form-creator_MCWtM {
|
|
467
|
+
padding: 12px 0;
|
|
468
|
+
}
|
|
469
|
+
.kne-form-creator_MCWtM:not(:last-child) {
|
|
470
|
+
border-bottom: solid 1px var(--bg-color-grey-3);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.kne-form-creator_CSjHH {
|
|
474
|
+
margin-bottom: 6px;
|
|
475
|
+
color: var(--font-color);
|
|
476
|
+
font-size: 14px;
|
|
477
|
+
font-weight: 500;
|
|
478
|
+
line-height: 22px;
|
|
479
|
+
word-break: break-word;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.kne-form-creator_qtvEn,
|
|
483
|
+
.kne-form-creator_G-a37 {
|
|
484
|
+
color: var(--font-color);
|
|
485
|
+
font-size: 14px;
|
|
486
|
+
line-height: 22px;
|
|
487
|
+
word-break: break-word;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.kne-form-creator_G-a37 + .kne-form-creator_G-a37 {
|
|
491
|
+
margin-top: 4px;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.kne-form-creator_Mjuwi {
|
|
495
|
+
color: var(--font-color-grey-1);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* SchemaContent steps:focus 样式对齐填写态 FocusSteps 条带,不再套 bordered Part 卡片 */
|
|
499
|
+
.kne-form-creator_WUBdi {
|
|
500
|
+
display: flex;
|
|
501
|
+
flex-direction: column;
|
|
502
|
+
gap: 24px;
|
|
503
|
+
width: 100%;
|
|
504
|
+
min-width: 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.kne-form-creator_WJ8b8 {
|
|
508
|
+
display: flex;
|
|
509
|
+
flex-direction: column;
|
|
510
|
+
gap: 12px;
|
|
511
|
+
width: 100%;
|
|
512
|
+
min-width: 0;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.kne-form-creator_JH8KR {
|
|
516
|
+
width: 100%;
|
|
517
|
+
min-width: 0;
|
|
518
|
+
display: flex;
|
|
519
|
+
flex-direction: column;
|
|
520
|
+
gap: 16px;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.kne-form-creator_jfPgO {
|
|
524
|
+
margin-top: -4px;
|
|
525
|
+
font-size: 12px;
|
|
526
|
+
line-height: 20px;
|
|
527
|
+
color: var(--fc-step-text-tertiary, var(--ant-color-text-tertiary, rgba(0, 0, 0, 0.45)));
|
|
528
|
+
white-space: pre-wrap;
|
|
529
|
+
word-break: break-word;
|
|
530
|
+
}
|
|
531
|
+
|
|
211
532
|
.kne-form-creator_16Zre {
|
|
212
533
|
height: 30px !important;
|
|
213
534
|
padding: 0 14px !important;
|
|
@@ -938,12 +1259,6 @@
|
|
|
938
1259
|
box-sizing: border-box;
|
|
939
1260
|
}
|
|
940
1261
|
|
|
941
|
-
.kne-form-creator_5A1eM {
|
|
942
|
-
margin-bottom: 4px;
|
|
943
|
-
}
|
|
944
|
-
.kne-form-creator_5A1eM .react-form__field {
|
|
945
|
-
margin-bottom: 8px;
|
|
946
|
-
}
|
|
947
1262
|
.kne-form-creator_5A1eM .ant-checkbox-group {
|
|
948
1263
|
display: flex;
|
|
949
1264
|
flex-wrap: wrap;
|
|
@@ -959,16 +1274,15 @@
|
|
|
959
1274
|
flex-direction: column;
|
|
960
1275
|
gap: 16px;
|
|
961
1276
|
width: 100%;
|
|
962
|
-
margin-
|
|
963
|
-
padding-top: 16px;
|
|
964
|
-
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
1277
|
+
margin-bottom: 20px;
|
|
965
1278
|
box-sizing: border-box;
|
|
966
1279
|
}
|
|
967
1280
|
|
|
968
1281
|
.kne-form-creator_T0nND {
|
|
969
|
-
margin-
|
|
970
|
-
padding: 16px 0
|
|
971
|
-
border
|
|
1282
|
+
margin-bottom: 20px;
|
|
1283
|
+
padding: 16px 0;
|
|
1284
|
+
border: 1px dashed rgba(0, 0, 0, 0.1);
|
|
1285
|
+
border-radius: 8px;
|
|
972
1286
|
font-size: 13px;
|
|
973
1287
|
line-height: 20px;
|
|
974
1288
|
color: rgba(0, 0, 0, 0.45);
|
|
@@ -979,7 +1293,7 @@
|
|
|
979
1293
|
width: 100%;
|
|
980
1294
|
min-width: 0;
|
|
981
1295
|
box-sizing: border-box;
|
|
982
|
-
padding:
|
|
1296
|
+
padding: 16px 16px 0;
|
|
983
1297
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
984
1298
|
border-radius: 8px;
|
|
985
1299
|
background: #fafafa;
|
|
@@ -988,6 +1302,9 @@
|
|
|
988
1302
|
.kne-form-creator_FQixN .ant-card-body {
|
|
989
1303
|
background: transparent;
|
|
990
1304
|
}
|
|
1305
|
+
.kne-form-creator_FQixN > .part.no-title:not(#_) > .ant-card-body {
|
|
1306
|
+
padding: 0;
|
|
1307
|
+
}
|
|
991
1308
|
|
|
992
1309
|
.kne-form-creator_ofRo2 {
|
|
993
1310
|
margin-bottom: 12px;
|
|
@@ -1812,12 +2129,30 @@
|
|
|
1812
2129
|
outline-offset: 2px;
|
|
1813
2130
|
}
|
|
1814
2131
|
|
|
2132
|
+
/* SchemaContent 只读 steps:进度条不可点,取消 hover 放大 */
|
|
2133
|
+
.kne-form-creator_WJ8b8 .kne-form-creator_4z3t0 {
|
|
2134
|
+
pointer-events: none;
|
|
2135
|
+
}
|
|
2136
|
+
.kne-form-creator_WJ8b8 .kne-form-creator_4z3t0.kne-form-creator_nBNzi {
|
|
2137
|
+
cursor: default;
|
|
2138
|
+
}
|
|
2139
|
+
.kne-form-creator_WJ8b8 .kne-form-creator_4z3t0.kne-form-creator_nBNzi:hover {
|
|
2140
|
+
background: color-mix(in srgb, var(--fc-step-primary) 45%, transparent);
|
|
2141
|
+
transform: none;
|
|
2142
|
+
}
|
|
2143
|
+
.kne-form-creator_WJ8b8 .kne-form-creator_4z3t0.kne-form-creator_a8lqo:hover {
|
|
2144
|
+
background: var(--fc-step-primary);
|
|
2145
|
+
transform: none;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
1815
2148
|
.kne-form-creator_NgZBR {
|
|
1816
2149
|
display: flex;
|
|
1817
2150
|
align-items: center;
|
|
1818
2151
|
justify-content: space-between;
|
|
1819
2152
|
gap: 12px;
|
|
1820
2153
|
margin-top: 20px;
|
|
2154
|
+
/* form-info .part.bordered body 为 padding-bottom:0,操作区是卡片最后一块时需自留下边距,否则贴底并与表单提交区挤在一起 */
|
|
2155
|
+
margin-bottom: 20px;
|
|
1821
2156
|
padding-top: 16px;
|
|
1822
2157
|
border-top: 1px dashed var(--ant-color-border-secondary, #f0f0f0);
|
|
1823
2158
|
}
|