form-driver 0.3.13 → 0.4.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 (37) hide show
  1. package/README.md +3 -3
  2. package/dist/m3.css +57 -0
  3. package/dist/m3.js +1 -1
  4. package/es/m3.css +57 -0
  5. package/es/m3.js +2190 -1386
  6. package/lib/m3.css +57 -0
  7. package/lib/m3.js +2188 -1382
  8. package/package.json +13 -9
  9. package/src/framework/Init.tsx +152 -150
  10. package/src/framework/M3.tsx +83 -59
  11. package/src/framework/MUtil.tsx +275 -140
  12. package/src/framework/MViewer.tsx +198 -106
  13. package/src/framework/Schema.ts +100 -87
  14. package/src/types/MSetType.ts +128 -71
  15. package/src/ui/editor/basic/ACheckBox.tsx +98 -50
  16. package/src/ui/editor/complex/ACheckDrag.tsx +356 -0
  17. package/src/ui/editor/complex/AForm.tsx +3 -1
  18. package/src/ui/editor/complex/JsonEditor.tsx +32 -21
  19. package/src/ui/widget/DIYCheckbox.less +36 -0
  20. package/src/ui/widget/DIYCheckbox.tsx +154 -0
  21. package/src/ui/widget/SortDrag.less +32 -0
  22. package/src/ui/widget/SortDrag.tsx +145 -0
  23. package/types/framework/Assembly.d.ts +2 -2
  24. package/types/framework/M3.d.ts +2 -2
  25. package/types/framework/MUtil.d.ts +5 -5
  26. package/types/framework/MViewer.d.ts +1 -1
  27. package/types/framework/Schema.d.ts +13 -11
  28. package/types/framework/Validator.d.ts +1 -1
  29. package/types/types/MDecorationType.d.ts +3 -3
  30. package/types/types/MSetType.d.ts +1 -1
  31. package/types/ui/editor/basic/ACheckBox.d.ts +2 -2
  32. package/types/ui/editor/basic/ARangePicker.d.ts +6 -2
  33. package/types/ui/editor/complex/ACheckDrag.d.ts +28 -0
  34. package/types/ui/editor/complex/JsonEditor.d.ts +1 -1
  35. package/types/ui/widget/DIYCheckbox.d.ts +19 -0
  36. package/types/ui/widget/SegmentEditSwitch.d.ts +1 -1
  37. package/types/ui/widget/SortDrag.d.ts +14 -0
package/lib/m3.css CHANGED
@@ -318,6 +318,63 @@ table.M3_table tr:last-child td {
318
318
  margin-bottom: 5px;
319
319
  }
320
320
 
321
+ .diy-checkbox-wrapper:hover .diy-checkbox-icon {
322
+ transform: scale(1.1);
323
+ }
324
+ .diy-checkbox-wrapper .diy-checkbox-icon {
325
+ display: inline-flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ width: 16px;
329
+ height: 16px;
330
+ border: 1px solid #d9d9d9;
331
+ border-radius: 2px;
332
+ transition: all 0.3s;
333
+ }
334
+ .diy-checkbox-wrapper .diy-checkbox-icon.checked {
335
+ background-color: #1890ff;
336
+ border-color: #1890ff;
337
+ color: white;
338
+ }
339
+ .diy-checkbox-wrapper .diy-checkbox-icon.indeterminate {
340
+ background-color: #1890ff;
341
+ border-color: #1890ff;
342
+ color: white;
343
+ }
344
+ .diy-checkbox-wrapper .diy-checkbox-icon:hover {
345
+ border-color: #40a9ff;
346
+ }
347
+ .diy-checkbox-wrapper .diy-checkbox-label {
348
+ -webkit-user-select: none;
349
+ -moz-user-select: none;
350
+ -ms-user-select: none;
351
+ user-select: none;
352
+ }
353
+
354
+ .sortDrag .dragItem {
355
+ display: flex;
356
+ justify-content: space-between;
357
+ padding: 4px 8px;
358
+ background: #fff;
359
+ font-size: 16px;
360
+ transition: background 0.2s, box-shadow 0.2s;
361
+ cursor: -webkit-grab;
362
+ cursor: grab;
363
+ }
364
+ .sortDrag .dragItem.dragging {
365
+ background: #bae7ff;
366
+ box-shadow: 0 2px 8px rgba(24,144,255,0.2);
367
+ }
368
+ .sortDrag .dragItem.dropping {
369
+ background: #f2f2f2;
370
+ }
371
+ .sortDrag .dragBody {
372
+ flex: 1;
373
+ }
374
+ .sortDrag .dragHandle {
375
+ width: 40px;
376
+ }
377
+
321
378
  .form-driver-plugin-richtext-viewer-wrap .richtext-viewer-more {
322
379
  text-align: center;
323
380
  box-shadow: 0px -5px 5px rgba(232,232,232,0.38039);