@object-ui/types 0.3.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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +304 -0
  3. package/dist/api-types.d.ts +451 -0
  4. package/dist/api-types.d.ts.map +1 -0
  5. package/dist/api-types.js +10 -0
  6. package/dist/app.d.ts +120 -0
  7. package/dist/app.d.ts.map +1 -0
  8. package/dist/app.js +7 -0
  9. package/dist/base.d.ts +360 -0
  10. package/dist/base.d.ts.map +1 -0
  11. package/dist/base.js +10 -0
  12. package/dist/complex.d.ts +433 -0
  13. package/dist/complex.d.ts.map +1 -0
  14. package/dist/complex.js +9 -0
  15. package/dist/crud.d.ts +457 -0
  16. package/dist/crud.d.ts.map +1 -0
  17. package/dist/crud.js +10 -0
  18. package/dist/data-display.d.ts +599 -0
  19. package/dist/data-display.d.ts.map +1 -0
  20. package/dist/data-display.js +9 -0
  21. package/dist/data.d.ts +295 -0
  22. package/dist/data.d.ts.map +1 -0
  23. package/dist/data.js +10 -0
  24. package/dist/disclosure.d.ts +107 -0
  25. package/dist/disclosure.d.ts.map +1 -0
  26. package/dist/disclosure.js +9 -0
  27. package/dist/feedback.d.ts +159 -0
  28. package/dist/feedback.d.ts.map +1 -0
  29. package/dist/feedback.js +9 -0
  30. package/dist/form.d.ts +932 -0
  31. package/dist/form.d.ts.map +1 -0
  32. package/dist/form.js +9 -0
  33. package/dist/index.d.ts +108 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +48 -0
  36. package/dist/layout.d.ts +418 -0
  37. package/dist/layout.d.ts.map +1 -0
  38. package/dist/layout.js +10 -0
  39. package/dist/navigation.d.ts +224 -0
  40. package/dist/navigation.d.ts.map +1 -0
  41. package/dist/navigation.js +9 -0
  42. package/dist/objectql.d.ts +254 -0
  43. package/dist/objectql.d.ts.map +1 -0
  44. package/dist/objectql.js +10 -0
  45. package/dist/overlay.d.ts +396 -0
  46. package/dist/overlay.d.ts.map +1 -0
  47. package/dist/overlay.js +9 -0
  48. package/dist/registry.d.ts +85 -0
  49. package/dist/registry.d.ts.map +1 -0
  50. package/dist/registry.js +1 -0
  51. package/package.json +82 -0
  52. package/src/api-types.ts +464 -0
  53. package/src/app.ts +138 -0
  54. package/src/base.ts +416 -0
  55. package/src/complex.ts +465 -0
  56. package/src/crud.ts +467 -0
  57. package/src/data-display.ts +630 -0
  58. package/src/data.ts +341 -0
  59. package/src/disclosure.ts +113 -0
  60. package/src/feedback.ts +170 -0
  61. package/src/form.ts +954 -0
  62. package/src/index.ts +350 -0
  63. package/src/layout.ts +451 -0
  64. package/src/navigation.ts +235 -0
  65. package/src/objectql.ts +301 -0
  66. package/src/overlay.ts +418 -0
  67. package/src/registry.ts +182 -0
package/dist/form.d.ts ADDED
@@ -0,0 +1,932 @@
1
+ /**
2
+ * @object-ui/types - Form Component Schemas
3
+ *
4
+ * Type definitions for form input and interactive components.
5
+ *
6
+ * @module form
7
+ * @packageDocumentation
8
+ */
9
+ import type { BaseSchema, SchemaNode } from './base';
10
+ /**
11
+ * Button component
12
+ */
13
+ export interface ButtonSchema extends BaseSchema {
14
+ type: 'button';
15
+ /**
16
+ * Button text label
17
+ */
18
+ label?: string;
19
+ /**
20
+ * Button variant/style
21
+ * @default 'default'
22
+ */
23
+ variant?: 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link';
24
+ /**
25
+ * Button size
26
+ * @default 'default'
27
+ */
28
+ size?: 'default' | 'sm' | 'lg' | 'icon';
29
+ /**
30
+ * Whether button is disabled
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * Whether button is in loading state
35
+ */
36
+ loading?: boolean;
37
+ /**
38
+ * Icon to display (lucide-react icon name)
39
+ */
40
+ icon?: string;
41
+ /**
42
+ * Icon position
43
+ * @default 'left'
44
+ */
45
+ iconPosition?: 'left' | 'right';
46
+ /**
47
+ * Click handler
48
+ */
49
+ onClick?: () => void | Promise<void>;
50
+ /**
51
+ * Button type
52
+ * @default 'button'
53
+ */
54
+ buttonType?: 'button' | 'submit' | 'reset';
55
+ /**
56
+ * Child components (for custom content)
57
+ */
58
+ children?: SchemaNode | SchemaNode[];
59
+ }
60
+ /**
61
+ * Text input component
62
+ */
63
+ export interface InputSchema extends BaseSchema {
64
+ type: 'input';
65
+ /**
66
+ * Field name for form submission
67
+ */
68
+ name?: string;
69
+ /**
70
+ * Input label
71
+ */
72
+ label?: string;
73
+ /**
74
+ * Placeholder text
75
+ */
76
+ placeholder?: string;
77
+ /**
78
+ * Input type
79
+ * @default 'text'
80
+ */
81
+ inputType?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local';
82
+ /**
83
+ * Default value
84
+ */
85
+ defaultValue?: string | number;
86
+ /**
87
+ * Controlled value
88
+ */
89
+ value?: string | number;
90
+ /**
91
+ * Whether field is required
92
+ */
93
+ required?: boolean;
94
+ /**
95
+ * Whether field is disabled
96
+ */
97
+ disabled?: boolean;
98
+ /**
99
+ * Whether field is readonly
100
+ */
101
+ readOnly?: boolean;
102
+ /**
103
+ * Help text or description
104
+ */
105
+ description?: string;
106
+ /**
107
+ * Error message
108
+ */
109
+ error?: string;
110
+ /**
111
+ * Change handler
112
+ */
113
+ onChange?: (value: string | number) => void;
114
+ /**
115
+ * Input wrapper CSS class
116
+ */
117
+ wrapperClass?: string;
118
+ /**
119
+ * Minimum value (for number type)
120
+ */
121
+ min?: number;
122
+ /**
123
+ * Maximum value (for number type)
124
+ */
125
+ max?: number;
126
+ /**
127
+ * Step value (for number type)
128
+ */
129
+ step?: number;
130
+ /**
131
+ * Maximum length
132
+ */
133
+ maxLength?: number;
134
+ /**
135
+ * Pattern for validation
136
+ */
137
+ pattern?: string;
138
+ }
139
+ /**
140
+ * Textarea component
141
+ */
142
+ export interface TextareaSchema extends BaseSchema {
143
+ type: 'textarea';
144
+ /**
145
+ * Field name for form submission
146
+ */
147
+ name?: string;
148
+ /**
149
+ * Textarea label
150
+ */
151
+ label?: string;
152
+ /**
153
+ * Placeholder text
154
+ */
155
+ placeholder?: string;
156
+ /**
157
+ * Default value
158
+ */
159
+ defaultValue?: string;
160
+ /**
161
+ * Controlled value
162
+ */
163
+ value?: string;
164
+ /**
165
+ * Number of visible rows
166
+ */
167
+ rows?: number;
168
+ /**
169
+ * Whether field is required
170
+ */
171
+ required?: boolean;
172
+ /**
173
+ * Whether field is disabled
174
+ */
175
+ disabled?: boolean;
176
+ /**
177
+ * Whether field is readonly
178
+ */
179
+ readOnly?: boolean;
180
+ /**
181
+ * Help text or description
182
+ */
183
+ description?: string;
184
+ /**
185
+ * Error message
186
+ */
187
+ error?: string;
188
+ /**
189
+ * Change handler
190
+ */
191
+ onChange?: (value: string) => void;
192
+ /**
193
+ * Maximum length
194
+ */
195
+ maxLength?: number;
196
+ }
197
+ /**
198
+ * Select dropdown component
199
+ */
200
+ export interface SelectSchema extends BaseSchema {
201
+ type: 'select';
202
+ /**
203
+ * Field name for form submission
204
+ */
205
+ name?: string;
206
+ /**
207
+ * Select label
208
+ */
209
+ label?: string;
210
+ /**
211
+ * Placeholder text
212
+ */
213
+ placeholder?: string;
214
+ /**
215
+ * Default selected value
216
+ */
217
+ defaultValue?: string;
218
+ /**
219
+ * Controlled value
220
+ */
221
+ value?: string;
222
+ /**
223
+ * Select options
224
+ */
225
+ options: SelectOption[];
226
+ /**
227
+ * Whether field is required
228
+ */
229
+ required?: boolean;
230
+ /**
231
+ * Whether field is disabled
232
+ */
233
+ disabled?: boolean;
234
+ /**
235
+ * Help text or description
236
+ */
237
+ description?: string;
238
+ /**
239
+ * Error message
240
+ */
241
+ error?: string;
242
+ /**
243
+ * Change handler
244
+ */
245
+ onChange?: (value: string) => void;
246
+ }
247
+ /**
248
+ * Select option
249
+ */
250
+ export interface SelectOption {
251
+ /**
252
+ * Option label (displayed to user)
253
+ */
254
+ label: string;
255
+ /**
256
+ * Option value (submitted in form)
257
+ */
258
+ value: string;
259
+ /**
260
+ * Whether option is disabled
261
+ */
262
+ disabled?: boolean;
263
+ /**
264
+ * Option icon
265
+ */
266
+ icon?: string;
267
+ }
268
+ /**
269
+ * Checkbox component
270
+ */
271
+ export interface CheckboxSchema extends BaseSchema {
272
+ type: 'checkbox';
273
+ /**
274
+ * Field name for form submission
275
+ */
276
+ name?: string;
277
+ /**
278
+ * Checkbox label
279
+ */
280
+ label?: string;
281
+ /**
282
+ * Default checked state
283
+ */
284
+ defaultChecked?: boolean;
285
+ /**
286
+ * Controlled checked state
287
+ */
288
+ checked?: boolean;
289
+ /**
290
+ * Whether checkbox is disabled
291
+ */
292
+ disabled?: boolean;
293
+ /**
294
+ * Help text or description
295
+ */
296
+ description?: string;
297
+ /**
298
+ * Error message
299
+ */
300
+ error?: string;
301
+ /**
302
+ * Change handler
303
+ */
304
+ onChange?: (checked: boolean) => void;
305
+ }
306
+ /**
307
+ * Radio group component
308
+ */
309
+ export interface RadioGroupSchema extends BaseSchema {
310
+ type: 'radio-group';
311
+ /**
312
+ * Field name for form submission
313
+ */
314
+ name?: string;
315
+ /**
316
+ * Radio group label
317
+ */
318
+ label?: string;
319
+ /**
320
+ * Default selected value
321
+ */
322
+ defaultValue?: string;
323
+ /**
324
+ * Controlled value
325
+ */
326
+ value?: string;
327
+ /**
328
+ * Radio options
329
+ */
330
+ options: RadioOption[];
331
+ /**
332
+ * Radio group orientation
333
+ * @default 'vertical'
334
+ */
335
+ orientation?: 'horizontal' | 'vertical';
336
+ /**
337
+ * Whether field is disabled
338
+ */
339
+ disabled?: boolean;
340
+ /**
341
+ * Help text or description
342
+ */
343
+ description?: string;
344
+ /**
345
+ * Error message
346
+ */
347
+ error?: string;
348
+ /**
349
+ * Change handler
350
+ */
351
+ onChange?: (value: string) => void;
352
+ }
353
+ /**
354
+ * Radio option
355
+ */
356
+ export interface RadioOption {
357
+ /**
358
+ * Option label
359
+ */
360
+ label: string;
361
+ /**
362
+ * Option value
363
+ */
364
+ value: string;
365
+ /**
366
+ * Whether option is disabled
367
+ */
368
+ disabled?: boolean;
369
+ /**
370
+ * Option description
371
+ */
372
+ description?: string;
373
+ }
374
+ /**
375
+ * Switch/Toggle component
376
+ */
377
+ export interface SwitchSchema extends BaseSchema {
378
+ type: 'switch';
379
+ /**
380
+ * Field name for form submission
381
+ */
382
+ name?: string;
383
+ /**
384
+ * Switch label
385
+ */
386
+ label?: string;
387
+ /**
388
+ * Default checked state
389
+ */
390
+ defaultChecked?: boolean;
391
+ /**
392
+ * Controlled checked state
393
+ */
394
+ checked?: boolean;
395
+ /**
396
+ * Whether switch is disabled
397
+ */
398
+ disabled?: boolean;
399
+ /**
400
+ * Help text or description
401
+ */
402
+ description?: string;
403
+ /**
404
+ * Change handler
405
+ */
406
+ onChange?: (checked: boolean) => void;
407
+ }
408
+ /**
409
+ * Toggle button component
410
+ */
411
+ export interface ToggleSchema extends BaseSchema {
412
+ type: 'toggle';
413
+ /**
414
+ * Toggle label
415
+ */
416
+ label?: string;
417
+ /**
418
+ * Default pressed state
419
+ */
420
+ defaultPressed?: boolean;
421
+ /**
422
+ * Controlled pressed state
423
+ */
424
+ pressed?: boolean;
425
+ /**
426
+ * Whether toggle is disabled
427
+ */
428
+ disabled?: boolean;
429
+ /**
430
+ * Toggle variant
431
+ * @default 'default'
432
+ */
433
+ variant?: 'default' | 'outline';
434
+ /**
435
+ * Toggle size
436
+ * @default 'default'
437
+ */
438
+ size?: 'default' | 'sm' | 'lg';
439
+ /**
440
+ * Change handler
441
+ */
442
+ onChange?: (pressed: boolean) => void;
443
+ /**
444
+ * Child content
445
+ */
446
+ children?: SchemaNode | SchemaNode[];
447
+ }
448
+ /**
449
+ * Slider component
450
+ */
451
+ export interface SliderSchema extends BaseSchema {
452
+ type: 'slider';
453
+ /**
454
+ * Field name for form submission
455
+ */
456
+ name?: string;
457
+ /**
458
+ * Slider label
459
+ */
460
+ label?: string;
461
+ /**
462
+ * Default value
463
+ */
464
+ defaultValue?: number[];
465
+ /**
466
+ * Controlled value
467
+ */
468
+ value?: number[];
469
+ /**
470
+ * Minimum value
471
+ * @default 0
472
+ */
473
+ min?: number;
474
+ /**
475
+ * Maximum value
476
+ * @default 100
477
+ */
478
+ max?: number;
479
+ /**
480
+ * Step increment
481
+ * @default 1
482
+ */
483
+ step?: number;
484
+ /**
485
+ * Whether slider is disabled
486
+ */
487
+ disabled?: boolean;
488
+ /**
489
+ * Help text or description
490
+ */
491
+ description?: string;
492
+ /**
493
+ * Change handler
494
+ */
495
+ onChange?: (value: number[]) => void;
496
+ }
497
+ /**
498
+ * File upload component
499
+ */
500
+ export interface FileUploadSchema extends BaseSchema {
501
+ type: 'file-upload';
502
+ /**
503
+ * Field name for form submission
504
+ */
505
+ name?: string;
506
+ /**
507
+ * Upload label
508
+ */
509
+ label?: string;
510
+ /**
511
+ * Accepted file types
512
+ * @example 'image/*', '.pdf,.doc'
513
+ */
514
+ accept?: string;
515
+ /**
516
+ * Allow multiple files
517
+ * @default false
518
+ */
519
+ multiple?: boolean;
520
+ /**
521
+ * Maximum file size in bytes
522
+ */
523
+ maxSize?: number;
524
+ /**
525
+ * Maximum number of files (for multiple)
526
+ */
527
+ maxFiles?: number;
528
+ /**
529
+ * Whether field is disabled
530
+ */
531
+ disabled?: boolean;
532
+ /**
533
+ * Help text or description
534
+ */
535
+ description?: string;
536
+ /**
537
+ * Error message
538
+ */
539
+ error?: string;
540
+ /**
541
+ * Change handler (receives FileList or File[])
542
+ */
543
+ onChange?: (files: FileList | File[]) => void;
544
+ }
545
+ /**
546
+ * Date picker component
547
+ */
548
+ export interface DatePickerSchema extends BaseSchema {
549
+ type: 'date-picker';
550
+ /**
551
+ * Field name for form submission
552
+ */
553
+ name?: string;
554
+ /**
555
+ * Date picker label
556
+ */
557
+ label?: string;
558
+ /**
559
+ * Placeholder text
560
+ */
561
+ placeholder?: string;
562
+ /**
563
+ * Default value (Date object or ISO string)
564
+ */
565
+ defaultValue?: Date | string;
566
+ /**
567
+ * Controlled value
568
+ */
569
+ value?: Date | string;
570
+ /**
571
+ * Minimum selectable date
572
+ */
573
+ minDate?: Date | string;
574
+ /**
575
+ * Maximum selectable date
576
+ */
577
+ maxDate?: Date | string;
578
+ /**
579
+ * Date format
580
+ * @default 'PPP'
581
+ */
582
+ format?: string;
583
+ /**
584
+ * Whether field is disabled
585
+ */
586
+ disabled?: boolean;
587
+ /**
588
+ * Help text or description
589
+ */
590
+ description?: string;
591
+ /**
592
+ * Error message
593
+ */
594
+ error?: string;
595
+ /**
596
+ * Change handler
597
+ */
598
+ onChange?: (date: Date | undefined) => void;
599
+ }
600
+ /**
601
+ * Calendar component
602
+ */
603
+ export interface CalendarSchema extends BaseSchema {
604
+ type: 'calendar';
605
+ /**
606
+ * Default selected date(s)
607
+ */
608
+ defaultValue?: Date | Date[];
609
+ /**
610
+ * Controlled selected date(s)
611
+ */
612
+ value?: Date | Date[];
613
+ /**
614
+ * Selection mode
615
+ * @default 'single'
616
+ */
617
+ mode?: 'single' | 'multiple' | 'range';
618
+ /**
619
+ * Minimum selectable date
620
+ */
621
+ minDate?: Date | string;
622
+ /**
623
+ * Maximum selectable date
624
+ */
625
+ maxDate?: Date | string;
626
+ /**
627
+ * Whether calendar is disabled
628
+ */
629
+ disabled?: boolean;
630
+ /**
631
+ * Change handler
632
+ */
633
+ onChange?: (date: Date | Date[] | undefined) => void;
634
+ }
635
+ /**
636
+ * Input OTP component
637
+ */
638
+ export interface InputOTPSchema extends BaseSchema {
639
+ type: 'input-otp';
640
+ /**
641
+ * Field name for form submission
642
+ */
643
+ name?: string;
644
+ /**
645
+ * OTP input label
646
+ */
647
+ label?: string;
648
+ /**
649
+ * Number of OTP digits
650
+ * @default 6
651
+ */
652
+ length?: number;
653
+ /**
654
+ * Default value
655
+ */
656
+ defaultValue?: string;
657
+ /**
658
+ * Controlled value
659
+ */
660
+ value?: string;
661
+ /**
662
+ * Whether field is disabled
663
+ */
664
+ disabled?: boolean;
665
+ /**
666
+ * Help text or description
667
+ */
668
+ description?: string;
669
+ /**
670
+ * Error message
671
+ */
672
+ error?: string;
673
+ /**
674
+ * Change handler
675
+ */
676
+ onChange?: (value: string) => void;
677
+ /**
678
+ * Complete handler (called when all digits filled)
679
+ */
680
+ onComplete?: (value: string) => void;
681
+ }
682
+ /**
683
+ * Form validation rule
684
+ */
685
+ export interface ValidationRule {
686
+ /**
687
+ * Required field validation
688
+ */
689
+ required?: string | boolean;
690
+ /**
691
+ * Minimum length validation
692
+ */
693
+ minLength?: {
694
+ value: number;
695
+ message: string;
696
+ };
697
+ /**
698
+ * Maximum length validation
699
+ */
700
+ maxLength?: {
701
+ value: number;
702
+ message: string;
703
+ };
704
+ /**
705
+ * Minimum value validation (for numbers)
706
+ */
707
+ min?: {
708
+ value: number;
709
+ message: string;
710
+ };
711
+ /**
712
+ * Maximum value validation (for numbers)
713
+ */
714
+ max?: {
715
+ value: number;
716
+ message: string;
717
+ };
718
+ /**
719
+ * Pattern validation (regex)
720
+ */
721
+ pattern?: {
722
+ value: string | RegExp;
723
+ message: string;
724
+ };
725
+ /**
726
+ * Custom validation function
727
+ * @param value - The field value to validate
728
+ * @returns true if valid, false or error message if invalid
729
+ */
730
+ validate?: (value: string | number | boolean | null | undefined) => boolean | string | Promise<boolean | string>;
731
+ }
732
+ /**
733
+ * Form field condition for conditional rendering
734
+ */
735
+ export interface FieldCondition {
736
+ /**
737
+ * Field to watch
738
+ */
739
+ field: string;
740
+ /**
741
+ * Show when field equals this value
742
+ */
743
+ equals?: any;
744
+ /**
745
+ * Show when field does not equal this value
746
+ */
747
+ notEquals?: any;
748
+ /**
749
+ * Show when field value is in this array
750
+ */
751
+ in?: any[];
752
+ /**
753
+ * Custom condition function
754
+ */
755
+ custom?: (formData: any) => boolean;
756
+ }
757
+ /**
758
+ * Form field configuration
759
+ */
760
+ export interface FormField {
761
+ /**
762
+ * Unique field identifier
763
+ */
764
+ id?: string;
765
+ /**
766
+ * Field name for form submission
767
+ */
768
+ name: string;
769
+ /**
770
+ * Field label
771
+ */
772
+ label?: string;
773
+ /**
774
+ * Field description
775
+ */
776
+ description?: string;
777
+ /**
778
+ * Field type/component
779
+ */
780
+ type?: string;
781
+ /**
782
+ * Input type (for input fields)
783
+ */
784
+ inputType?: string;
785
+ /**
786
+ * Whether field is required
787
+ */
788
+ required?: boolean;
789
+ /**
790
+ * Whether field is disabled
791
+ */
792
+ disabled?: boolean;
793
+ /**
794
+ * Placeholder text
795
+ */
796
+ placeholder?: string;
797
+ /**
798
+ * Select options (for select/radio)
799
+ */
800
+ options?: SelectOption[] | RadioOption[];
801
+ /**
802
+ * Validation rules
803
+ */
804
+ validation?: ValidationRule;
805
+ /**
806
+ * Conditional rendering
807
+ */
808
+ condition?: FieldCondition;
809
+ /**
810
+ * Additional field-specific props
811
+ */
812
+ [key: string]: any;
813
+ /**
814
+ * Column span for grid layouts
815
+ * @default 1
816
+ */
817
+ colSpan?: number;
818
+ }
819
+ /**
820
+ * Complete form component
821
+ */
822
+ export interface FormSchema extends BaseSchema {
823
+ type: 'form';
824
+ /**
825
+ * Form fields configuration
826
+ */
827
+ fields?: FormField[];
828
+ /**
829
+ * Default form values
830
+ */
831
+ defaultValues?: Record<string, any>;
832
+ /**
833
+ * Submit button label
834
+ * @default 'Submit'
835
+ */
836
+ submitLabel?: string;
837
+ /**
838
+ * Cancel button label
839
+ * @default 'Cancel'
840
+ */
841
+ cancelLabel?: string;
842
+ /**
843
+ * Show cancel button
844
+ * @default false
845
+ */
846
+ showCancel?: boolean;
847
+ /**
848
+ * Form layout
849
+ * @default 'vertical'
850
+ */
851
+ layout?: 'vertical' | 'horizontal';
852
+ /**
853
+ * Number of columns for multi-column layout
854
+ * @default 1
855
+ */
856
+ columns?: number;
857
+ /**
858
+ * Validation mode
859
+ * @default 'onSubmit'
860
+ */
861
+ validationMode?: 'onSubmit' | 'onBlur' | 'onChange' | 'onTouched' | 'all';
862
+ /**
863
+ * Reset form after successful submission
864
+ * @default false
865
+ */
866
+ resetOnSubmit?: boolean;
867
+ /**
868
+ * Whether form is disabled
869
+ */
870
+ disabled?: boolean;
871
+ /**
872
+ * Form mode
873
+ * @default 'edit'
874
+ */
875
+ mode?: 'edit' | 'read' | 'disabled';
876
+ /**
877
+ * Custom action buttons (replaces default submit/cancel)
878
+ */
879
+ actions?: SchemaNode[];
880
+ /**
881
+ * Submit handler
882
+ */
883
+ onSubmit?: (data: Record<string, any>) => void | Promise<void>;
884
+ /**
885
+ * Change handler (called on any field change)
886
+ */
887
+ onChange?: (data: Record<string, any>) => void;
888
+ /**
889
+ * Cancel handler
890
+ */
891
+ onCancel?: () => void;
892
+ /**
893
+ * Show form action buttons
894
+ * @default true
895
+ */
896
+ showActions?: boolean;
897
+ /**
898
+ * Field container CSS class
899
+ */
900
+ fieldContainerClass?: string;
901
+ /**
902
+ * Child components (alternative to fields array)
903
+ */
904
+ children?: SchemaNode | SchemaNode[];
905
+ }
906
+ /**
907
+ * Label component
908
+ */
909
+ export interface LabelSchema extends BaseSchema {
910
+ type: 'label';
911
+ /**
912
+ * Label text content
913
+ */
914
+ text?: string;
915
+ /**
916
+ * Legacy label property
917
+ */
918
+ label?: string;
919
+ /**
920
+ * Legacy content property
921
+ */
922
+ content?: string;
923
+ /**
924
+ * HTML for attribute
925
+ */
926
+ htmlFor?: string;
927
+ }
928
+ /**
929
+ * Union type of all form schemas
930
+ */
931
+ export type FormComponentSchema = ButtonSchema | InputSchema | TextareaSchema | SelectSchema | CheckboxSchema | RadioGroupSchema | SwitchSchema | ToggleSchema | SliderSchema | FileUploadSchema | DatePickerSchema | CalendarSchema | InputOTPSchema | FormSchema | LabelSchema;
932
+ //# sourceMappingURL=form.d.ts.map