@segmentify/ui 0.0.17 → 0.0.19

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.
@@ -1,21 +1,17 @@
1
1
  import * as React from 'react';
2
- import { type FieldPath, type FieldValues } from 'react-hook-form';
3
- type FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
4
- name: TName;
2
+ import type { FieldError } from 'react-hook-form';
3
+ type FormFieldContextValue = {
4
+ name: string;
5
+ error?: FieldError;
5
6
  };
6
7
  type FormItemContextValue = {
7
8
  id: string;
8
9
  };
9
- export declare const FormFieldContext: React.Context<FormFieldContextValue<FieldValues, string>>;
10
- export declare const FormItemContext: React.Context<FormItemContextValue>;
10
+ export declare const FormFieldContext: React.Context<FormFieldContextValue | null>;
11
+ export declare const FormItemContext: React.Context<FormItemContextValue | null>;
11
12
  export declare const useFormField: () => {
12
- invalid: boolean;
13
- isDirty: boolean;
14
- isTouched: boolean;
15
- isValidating: boolean;
16
- error?: import("react-hook-form").FieldError;
17
- id: string;
18
13
  name: string;
14
+ error: FieldError | undefined;
19
15
  formItemId: string;
20
16
  formDescriptionId: string;
21
17
  formMessageId: string;