@algodomain/smart-forms 0.1.2 → 0.1.4

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 (35) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +243 -0
  3. package/dist/{SmartFormProvider-DyJoDBjQ.d.cts → SmartFormProvider-BdyRQakk.d.cts} +1 -0
  4. package/dist/{SmartFormProvider-DyJoDBjQ.d.ts → SmartFormProvider-BdyRQakk.d.ts} +1 -0
  5. package/dist/{SmartTags-HmvmCJPT.d.cts → SmartTags-DEpmTDF5.d.cts} +42 -18
  6. package/dist/{SmartTags-HmvmCJPT.d.ts → SmartTags-DEpmTDF5.d.ts} +42 -18
  7. package/dist/{chunk-KDPN4CHW.js → chunk-BNQNL7GF.js} +658 -145
  8. package/dist/chunk-BNQNL7GF.js.map +1 -0
  9. package/dist/{chunk-5LRBJEZW.js → chunk-RHECLW3K.js} +80 -7
  10. package/dist/chunk-RHECLW3K.js.map +1 -0
  11. package/dist/{chunk-CJ55WKPC.cjs → chunk-VGP3HY5Y.cjs} +758 -235
  12. package/dist/chunk-VGP3HY5Y.cjs.map +1 -0
  13. package/dist/{chunk-4H5U5IHH.cjs → chunk-WIBCOQPP.cjs} +80 -7
  14. package/dist/chunk-WIBCOQPP.cjs.map +1 -0
  15. package/dist/fields.cjs +212 -481
  16. package/dist/fields.cjs.map +1 -1
  17. package/dist/fields.d.cts +14 -22
  18. package/dist/fields.d.ts +14 -22
  19. package/dist/fields.js +66 -338
  20. package/dist/fields.js.map +1 -1
  21. package/dist/index.cjs +42 -30
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +7 -3
  24. package/dist/index.d.ts +7 -3
  25. package/dist/index.js +17 -9
  26. package/dist/index.js.map +1 -1
  27. package/dist/opinionated.cjs +18 -18
  28. package/dist/opinionated.d.cts +1 -1
  29. package/dist/opinionated.d.ts +1 -1
  30. package/dist/opinionated.js +2 -2
  31. package/package.json +4 -2
  32. package/dist/chunk-4H5U5IHH.cjs.map +0 -1
  33. package/dist/chunk-5LRBJEZW.js.map +0 -1
  34. package/dist/chunk-CJ55WKPC.cjs.map +0 -1
  35. package/dist/chunk-KDPN4CHW.js.map +0 -1
package/dist/fields.d.cts CHANGED
@@ -1,25 +1,7 @@
1
- export { S as SmartFormProvider, a as useFormField, u as useSmartForm } from './SmartFormProvider-DyJoDBjQ.cjs';
2
- export { a as SmartCheckbox, d as SmartDatePicker, S as SmartInput, f as SmartInputProps, b as SmartRadioGroup, c as SmartSelect, e as SmartTags, g as SmartTagsProps } from './SmartTags-HmvmCJPT.cjs';
1
+ export { S as SmartFormProvider, a as useFormField, u as useSmartForm } from './SmartFormProvider-BdyRQakk.cjs';
2
+ export { a as SmartCheckbox, d as SmartCombobox, e as SmartDatePicker, i as SmartDatePickerProps, S as SmartInput, g as SmartInputProps, b as SmartRadioGroup, c as SmartSelect, f as SmartTags, h as SmartTagsProps } from './SmartTags-DEpmTDF5.cjs';
3
3
  import React__default from 'react';
4
-
5
- interface SmartComboboxOption {
6
- value: string;
7
- label: string;
8
- }
9
- interface SmartComboboxProps {
10
- field: string;
11
- label?: string;
12
- options: SmartComboboxOption[];
13
- className?: string;
14
- placeholder?: string;
15
- allowCustom?: boolean;
16
- validation?: any;
17
- required?: boolean;
18
- defaultValue?: string;
19
- info?: string;
20
- subLabel?: string;
21
- }
22
- declare const SmartCombobox: React__default.FC<SmartComboboxProps>;
4
+ import 'react/jsx-runtime';
23
5
 
24
6
  interface SmartFileUploadProps {
25
7
  field: string;
@@ -38,6 +20,8 @@ interface SmartFileUploadProps {
38
20
  defaultValue?: File | File[];
39
21
  info?: string;
40
22
  subLabel?: string;
23
+ disabled?: boolean | ((formData: any) => boolean);
24
+ hidden?: boolean | ((formData: any) => boolean);
41
25
  }
42
26
  declare const SmartFileUpload: React__default.FC<SmartFileUploadProps>;
43
27
 
@@ -55,6 +39,8 @@ interface SmartSliderProps {
55
39
  defaultValue?: number;
56
40
  info?: string;
57
41
  subLabel?: string;
42
+ disabled?: boolean | ((formData: any) => boolean);
43
+ hidden?: boolean | ((formData: any) => boolean);
58
44
  }
59
45
  declare const SmartSlider: React__default.FC<SmartSliderProps>;
60
46
 
@@ -77,6 +63,8 @@ interface SmartDualRangeSliderProps {
77
63
  defaultMaxValue?: number;
78
64
  info?: string;
79
65
  subLabel?: string;
66
+ disabled?: boolean | ((formData: any) => boolean);
67
+ hidden?: boolean | ((formData: any) => boolean);
80
68
  }
81
69
  declare const SmartDualRangeSlider: React__default.FC<SmartDualRangeSliderProps>;
82
70
 
@@ -98,6 +86,8 @@ interface SmartAutoSuggestTagsProps {
98
86
  onTagCreate?: (tag: TagOption) => void;
99
87
  info?: string;
100
88
  subLabel?: string;
89
+ disabled?: boolean | ((formData: any) => boolean);
90
+ hidden?: boolean | ((formData: any) => boolean);
101
91
  }
102
92
  declare const SmartAutoSuggestTags: React__default.FC<SmartAutoSuggestTagsProps>;
103
93
 
@@ -113,7 +103,9 @@ interface SmartBasicRichTextboxProps {
113
103
  maxHeight?: string;
114
104
  info?: string;
115
105
  subLabel?: string;
106
+ disabled?: boolean | ((formData: any) => boolean);
107
+ hidden?: boolean | ((formData: any) => boolean);
116
108
  }
117
109
  declare const SmartBasicRichTextbox: React__default.FC<SmartBasicRichTextboxProps>;
118
110
 
119
- export { SmartAutoSuggestTags, type SmartAutoSuggestTagsProps, SmartBasicRichTextbox, type SmartBasicRichTextboxProps, SmartCombobox, SmartDualRangeSlider, type SmartDualRangeSliderProps, SmartFileUpload, SmartSlider, type SmartSliderProps, type TagOption };
111
+ export { SmartAutoSuggestTags, type SmartAutoSuggestTagsProps, SmartBasicRichTextbox, type SmartBasicRichTextboxProps, SmartDualRangeSlider, type SmartDualRangeSliderProps, SmartFileUpload, SmartSlider, type SmartSliderProps, type TagOption };
package/dist/fields.d.ts CHANGED
@@ -1,25 +1,7 @@
1
- export { S as SmartFormProvider, a as useFormField, u as useSmartForm } from './SmartFormProvider-DyJoDBjQ.js';
2
- export { a as SmartCheckbox, d as SmartDatePicker, S as SmartInput, f as SmartInputProps, b as SmartRadioGroup, c as SmartSelect, e as SmartTags, g as SmartTagsProps } from './SmartTags-HmvmCJPT.js';
1
+ export { S as SmartFormProvider, a as useFormField, u as useSmartForm } from './SmartFormProvider-BdyRQakk.js';
2
+ export { a as SmartCheckbox, d as SmartCombobox, e as SmartDatePicker, i as SmartDatePickerProps, S as SmartInput, g as SmartInputProps, b as SmartRadioGroup, c as SmartSelect, f as SmartTags, h as SmartTagsProps } from './SmartTags-DEpmTDF5.js';
3
3
  import React__default from 'react';
4
-
5
- interface SmartComboboxOption {
6
- value: string;
7
- label: string;
8
- }
9
- interface SmartComboboxProps {
10
- field: string;
11
- label?: string;
12
- options: SmartComboboxOption[];
13
- className?: string;
14
- placeholder?: string;
15
- allowCustom?: boolean;
16
- validation?: any;
17
- required?: boolean;
18
- defaultValue?: string;
19
- info?: string;
20
- subLabel?: string;
21
- }
22
- declare const SmartCombobox: React__default.FC<SmartComboboxProps>;
4
+ import 'react/jsx-runtime';
23
5
 
24
6
  interface SmartFileUploadProps {
25
7
  field: string;
@@ -38,6 +20,8 @@ interface SmartFileUploadProps {
38
20
  defaultValue?: File | File[];
39
21
  info?: string;
40
22
  subLabel?: string;
23
+ disabled?: boolean | ((formData: any) => boolean);
24
+ hidden?: boolean | ((formData: any) => boolean);
41
25
  }
42
26
  declare const SmartFileUpload: React__default.FC<SmartFileUploadProps>;
43
27
 
@@ -55,6 +39,8 @@ interface SmartSliderProps {
55
39
  defaultValue?: number;
56
40
  info?: string;
57
41
  subLabel?: string;
42
+ disabled?: boolean | ((formData: any) => boolean);
43
+ hidden?: boolean | ((formData: any) => boolean);
58
44
  }
59
45
  declare const SmartSlider: React__default.FC<SmartSliderProps>;
60
46
 
@@ -77,6 +63,8 @@ interface SmartDualRangeSliderProps {
77
63
  defaultMaxValue?: number;
78
64
  info?: string;
79
65
  subLabel?: string;
66
+ disabled?: boolean | ((formData: any) => boolean);
67
+ hidden?: boolean | ((formData: any) => boolean);
80
68
  }
81
69
  declare const SmartDualRangeSlider: React__default.FC<SmartDualRangeSliderProps>;
82
70
 
@@ -98,6 +86,8 @@ interface SmartAutoSuggestTagsProps {
98
86
  onTagCreate?: (tag: TagOption) => void;
99
87
  info?: string;
100
88
  subLabel?: string;
89
+ disabled?: boolean | ((formData: any) => boolean);
90
+ hidden?: boolean | ((formData: any) => boolean);
101
91
  }
102
92
  declare const SmartAutoSuggestTags: React__default.FC<SmartAutoSuggestTagsProps>;
103
93
 
@@ -113,7 +103,9 @@ interface SmartBasicRichTextboxProps {
113
103
  maxHeight?: string;
114
104
  info?: string;
115
105
  subLabel?: string;
106
+ disabled?: boolean | ((formData: any) => boolean);
107
+ hidden?: boolean | ((formData: any) => boolean);
116
108
  }
117
109
  declare const SmartBasicRichTextbox: React__default.FC<SmartBasicRichTextboxProps>;
118
110
 
119
- export { SmartAutoSuggestTags, type SmartAutoSuggestTagsProps, SmartBasicRichTextbox, type SmartBasicRichTextboxProps, SmartCombobox, SmartDualRangeSlider, type SmartDualRangeSliderProps, SmartFileUpload, SmartSlider, type SmartSliderProps, type TagOption };
111
+ export { SmartAutoSuggestTags, type SmartAutoSuggestTagsProps, SmartBasicRichTextbox, type SmartBasicRichTextboxProps, SmartDualRangeSlider, type SmartDualRangeSliderProps, SmartFileUpload, SmartSlider, type SmartSliderProps, type TagOption };