@foormjs/vue 0.2.0 → 0.2.2

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 CHANGED
@@ -297,6 +297,7 @@ Every field slot (`#field:text`, `#field:select`, etc.) receives:
297
297
  | `styles` | `string \| Record` | Inline styles |
298
298
  | `disabled` | `boolean` | Evaluated disabled state |
299
299
  | `hidden` | `boolean` | Evaluated hidden state |
300
+ | `readonly` | `boolean` | Evaluated readonly state |
300
301
  | `optional` | `boolean` | Evaluated optional state |
301
302
  | `required` | `boolean` | Inverse of optional |
302
303
  | `type` | `string` | Field type |
@@ -307,7 +308,7 @@ Every field slot (`#field:text`, `#field:select`, etc.) receives:
307
308
  | `maxLength` | `number` | Max length constraint |
308
309
  | `formData` | `object` | Full form data |
309
310
  | `formContext` | `object` | Form context |
310
- | `attrs` | `Record` | Additional evaluated attributes |
311
+ | `attrs` | `Record` | Custom attributes (evaluated, can be used with `v-bind`) |
311
312
 
312
313
  ### `OoField`
313
314
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { TAnnotatedTypeLike } from '@foormjs/atscript';
1
+ import { TAtscriptAnnotatedType } from '@atscript/typescript/utils';
2
+ import { TAtscriptTypeObject } from '@atscript/typescript/utils';
2
3
  import { TFoormEntryOptions } from 'foorm';
3
4
  import { TFoormField } from 'foorm';
4
5
 
@@ -21,6 +22,7 @@ export declare const OoField: <TFormData = any, TFormContext = any>(__VLS_props:
21
22
  optional: any;
22
23
  disabled: any;
23
24
  hidden: any;
25
+ readonly: any;
24
26
  type: any;
25
27
  altAction: any;
26
28
  component: any;
@@ -28,7 +30,7 @@ export declare const OoField: <TFormData = any, TFormContext = any>(__VLS_props:
28
30
  field: any;
29
31
  options: any;
30
32
  maxLength: any;
31
- required: boolean;
33
+ required: any;
32
34
  autocomplete: any;
33
35
  attrs: any;
34
36
  }): any;
@@ -53,6 +55,7 @@ export declare const OoField: <TFormData = any, TFormContext = any>(__VLS_props:
53
55
  optional: any;
54
56
  disabled: any;
55
57
  hidden: any;
58
+ readonly: any;
56
59
  type: any;
57
60
  altAction: any;
58
61
  component: any;
@@ -60,7 +63,7 @@ export declare const OoField: <TFormData = any, TFormContext = any>(__VLS_props:
60
63
  field: any;
61
64
  options: any;
62
65
  maxLength: any;
63
- required: boolean;
66
+ required: any;
64
67
  autocomplete: any;
65
68
  attrs: any;
66
69
  }): any;
@@ -169,7 +172,7 @@ export declare interface TFoormComponentProps<V, TFormData, TFormContext> {
169
172
  autocomplete?: string;
170
173
  }
171
174
 
172
- export declare function useFoorm<T = Record<string, unknown>>(type: TAnnotatedTypeLike): {
175
+ export declare function useFoorm<T extends TAtscriptAnnotatedType<TAtscriptTypeObject<any, any>>>(type: T): {
173
176
  form: any;
174
177
  formData: any;
175
178
  };